Material - the object of material. More...
Public Types | |
enum | Blend { NONE =-1, ZERO =0, ONE =1, NEVER =0x0200, LESS =0x0201, EQUAL =0x0202 , GREATER =0x0204 , ALWAYS =0x0207, SRC_COLOR =0x0300, ONE_MINUS_SRC_COLOR =0x0301, SRC_ALPHA =0x0302, ONE_MINUS_SRC_ALPHA =0x0303, DST_ALPHA =0x0304, ONE_MINUS_DST_ALPHA =0x0305, DST_COLOR =0x0306, ONE_MINUS_DST_COLOR =0x0307 } |
Blend functions. More... | |
Public Types inherited from csad::BaseObject | |
enum | BASE { ANY = 0x00000000, EVENT = 0x00000001, TYPE = 0x00000002, CONTAINER = 0x00000003, MANAGER_COUNT = 0x00000004, MANAGER = 0x00000005, WRITE = 0x00000006, READ = 0x00000007, SELECT = 0x00000008, RUN = 0x00000009, LIST = 0x0000000A, LIST_COUNT = 0x0000000B, NAME = 0x0000000C, CHILD_NAME = 0x0000000D } |
the basic format of the interface More... | |
Public Member Functions | |
_FORCEINLINE vector4f | getDiffuse () |
return diffuse color. | |
CSAD_API const char * | getName () |
return material name | |
CSAD_API Texture2D * | getTexture2D (unsigned int id=0) |
return texture. | |
CSAD_API bt::matrix4f * | getTextureMatrix (unsigned int id=0) |
returns the matrix texture coordinates | |
_FORCEINLINE bool | isLight () |
Is emit light. | |
CSAD_API void * | set (unsigned _int32, void *) |
used for any interface commands. | |
CSAD_API void | setAlpha (int func, float ref=0.5f) |
set alpha function parameters | |
CSAD_API void | setAlpha (char *func=0, float ref=0.5f) |
set alpha function parameters by name | |
CSAD_API void | setAmbient (vector4f &color) |
set ambient color | |
_FORCEINLINE void | setAmbient (float r, float g, float b, float a) |
set ambient color | |
CSAD_API void | setBlend (int src=0, int dst=0) |
set blend function parameters | |
CSAD_API void | setBlend (char *src=0, char *dst=0) |
set blend function parameters by name | |
CSAD_API void | setDepth (int func) |
Depth test function. | |
CSAD_API void | setDepthWrite (bool write) |
Enable or disable depth write. | |
CSAD_API void | setDiffuse (vector4f &color) |
set color. | |
_FORCEINLINE void | setDiffuse (float r, float g, float b, float a) |
set color. | |
CSAD_API void | setEmission (vector4f &color) |
set emission color | |
_FORCEINLINE void | setEmission (float r, float g, float b, float a) |
set emission color | |
CSAD_API void | setLight (bool val) |
Emit light. | |
CSAD_API void | setLineWith (float val) |
set line with parameter | |
CSAD_API void | setPointSize (float val) |
set point size parameter | |
CSAD_API void | setSpecular (vector4f &color) |
set specular color | |
_FORCEINLINE void | setSpecular (float r, float g, float b, float a) |
set specular color | |
CSAD_API int | setTexture2D (Texture2D *texture, unsigned int id=0) |
setting the texture, the id number of the layer for multitexturing. | |
CSAD_API int | setTexture2D (char *name, unsigned int id=0) |
setting the texture, the id number of the layer for multitexturing. | |
CSAD_API void | setTextureMatrix (bt::matrix4f &matrix, unsigned int id=0) |
sets the matrix to transform texture coordinates | |
CSAD_API void | setTextureRect (bt::vector4f &rect, unsigned int id=0) |
sets the matrix to transform texture coordinates as the area of the texture | |
Public Member Functions inherited from csad::BaseObject | |
_FORCEINLINE bool | isContainer () |
returns true if the object is a container. | |
_FORCEINLINE ParametersList * | read (ParametersList *data) |
read attributes object. | |
_FORCEINLINE void * | type () |
the output pointer to the typeid() of the class. | |
_FORCEINLINE void | write (ParametersList *data) |
record attributes of the object. | |
Material - the object of material.
<Material name="material name" color="0.1 1.0 1.0 1.0" ambient="0.0 0.0 0.0 1.0" src="SRC_ALPHA" dst="DST_COLOR" />
Blend functions.