|
| ccMaterial (const QString &name=QString("default")) |
| Default constructor.
|
|
| ccMaterial (const ccMaterial &mtl) |
| Copy constructor.
|
|
| ~ccMaterial () |
| Destructor.
|
|
const QString & | getName () const |
| Returns the material name.
|
|
const QString & | getTextureFilename () const |
| Returns the texture filename (if any)
|
|
void | setName (const QString &name) |
| Sets the material name.
|
|
void | setDiffuse (const ccColor::Rgbaf &color) |
| Sets diffuse color (both front and back)
|
|
void | setDiffuseFront (const ccColor::Rgbaf &color) |
| Sets diffuse color (front)
|
|
void | setDiffuseBack (const ccColor::Rgbaf &color) |
| Sets diffuse color (back)
|
|
const ccColor::Rgbaf & | getDiffuseFront () const |
| Returns front diffuse color.
|
|
const ccColor::Rgbaf & | getDiffuseBack () const |
| Returns back diffuse color.
|
|
void | setAmbient (const ccColor::Rgbaf &color) |
| Sets ambient color.
|
|
const ccColor::Rgbaf & | getAmbient () const |
| Returns ambient color.
|
|
void | setSpecular (const ccColor::Rgbaf &color) |
| Sets specular color.
|
|
const ccColor::Rgbaf & | getSpecular () const |
| Returns specular color.
|
|
void | setEmission (const ccColor::Rgbaf &color) |
| Sets emission color.
|
|
const ccColor::Rgbaf & | getEmission () const |
| Returns emission color.
|
|
void | setShininess (float val) |
| Sets shininess (both front - 100% - and back - 80%)
|
|
void | setShininessFront (float val) |
| Sets shininess (front)
|
|
void | setShininessBack (float val) |
| Sets shininess (back)
|
|
float | getShininessFront () const |
| Returns front shininess.
|
|
float | getShininessBack () const |
| Returns back shininess.
|
|
void | setTransparency (float val) |
| Sets transparency (all colors)
|
|
void | applyGL (const QOpenGLContext *context, bool lightEnabled, bool skipDiffuse) const |
| Apply parameters (OpenGL)
|
|
bool | hasTexture () const |
| Returns whether the material has an associated texture or not.
|
|
void | setTexture (QImage image, QString absoluteFilename=QString(), bool mirrorImage=true) |
| Sets texture. More...
|
|
bool | loadAndSetTexture (const QString &absoluteFilename) |
| Loads texture from file (and set it if successful) More...
|
|
const QImage | getTexture () const |
| Returns the texture (if any)
|
|
GLuint | getTextureID () const |
| Returns the texture ID (if any)
|
|
void | releaseTexture () |
| Release the texture. More...
|
|
bool | compare (const ccMaterial &mtl) const |
| Compares this material with another one. More...
|
|
bool | isSerializable () const override |
| Returns whether object is serializable of not. More...
|
|
bool | toFile (QFile &out) const override |
|
bool | fromFile (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override |
| Loads data from binary stream. More...
|
|
QString | getUniqueIdentifier () const |
| Returns unique identifier (UUID)
|
|
void | setTextureMinMagFilters (QOpenGLTexture::Filter minificationFilter, QOpenGLTexture::Filter magnificationFilter) |
| Sets the texture minification and magnification filters.
|
|
virtual | ~ccSerializableObject ()=default |
| Destructor.
|
|
virtual bool | isSerializable () const |
| Returns whether object is serializable of not. More...
|
|
virtual bool | toFile (QFile &out) const |
| Saves data to binary stream. More...
|
|
virtual bool | fromFile (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) |
| Loads data from binary stream. More...
|
|
|
static void | MakeLightsNeutral (const QOpenGLContext *context) |
| Helper: makes all active GL light sources neutral (i.e. 'gray') More...
|
|
static QImage | GetTexture (const QString &absoluteFilename) |
| Returns the texture image associated to a given name.
|
|
static void | AddTexture (QImage image, const QString &absoluteFilename) |
| Adds a texture to the global texture DB.
|
|
static void | ReleaseTextures () |
| Release all texture objects. More...
|
|
static bool | WriteError () |
| Sends a custom error message (write error) and returns 'false'. More...
|
|
static bool | ReadError () |
| Sends a custom error message (read error) and returns 'false'. More...
|
|
static bool | MemoryError () |
| Sends a custom error message (not enough memory) and returns 'false'. More...
|
|
static bool | CorruptError () |
| Sends a custom error message (corrupted file) and returns 'false'. More...
|
|
Mesh (triangle) material.