vtdata library
|
Public Member Functions | |
vtMaterialDescriptor (const char *name, const vtString &TextureFilename, const vtMaterialColorEnum Colorable=VT_MATERIAL_SELFCOLOURED_TEXTURE, const float fUVScaleX=-1, const float fUVScaleY=-1, const bool bTwoSided=false, const bool bAmbient=false, const bool bBlended=false, const RGBi &Color=RGBi(0, 0, 0)) | |
void | SetName (const vtString &Name) |
const vtString & | GetName () const |
void | SetMatType (int type) |
int | GetMatType () const |
void | SetUVScale (const float fScaleX, const float fScaleY) |
FPoint2 | GetUVScale () const |
void | SetColorable (const vtMaterialColorEnum Type) |
const vtMaterialColorEnum | GetColorable () const |
void | SetTextureFilename (const vtString &TextureFilename) |
const vtString & | GetTextureFilename () const |
void | SetRGB (const RGBi Color) |
const RGBi | GetRGB () const |
void | SetTwoSided (bool bTwoSided) |
const bool | GetTwoSided () |
void | SetAmbient (bool bAmbient) |
const bool | GetAmbient () |
void | SetBlending (bool bBlending) |
const bool | GetBlending () |
bool | operator== (const vtMaterialDescriptor &rhs) const |
void | WriteToFile (FILE *fp) |
Public Attributes | |
ColorIndexMap | m_ColorIndexMap |
This class encapsulates the description of a shared material
vtMaterialDescriptor::vtMaterialDescriptor | ( | const char * | Name, |
const vtString & | TextureFilename, | ||
const vtMaterialColorEnum | Colorable = VT_MATERIAL_SELFCOLOURED_TEXTURE , |
||
const float | fUVScaleX = -1 , |
||
const float | fUVScaleY = -1 , |
||
const bool | bTwoSided = false , |
||
const bool | bAmbient = false , |
||
const bool | bBlending = false , |
||
const RGBi & | Color = RGBi(0,0,0) |
||
) |
Create a high-level description of a material.
Name | Name of the new material. |
TextureFilename | Filename of the source imagery, for a textured material, or "" otherwise. |
Colorable | Enumeration, one of:
|
fUVScaleX,fUVScaleY | For textured materials, this is the size of the provided texture, in meters. For example, if the texture is of a row of bricks that is 50x50 cm, then the scale factors are (.5, .5). If a texture should not be tiled (for example, a door or window which always exactly fits its surface) then scale factor is -1. |
bTwoSided | True for surfaces which should be visible from both sides. |
bAmbient | True for surfaces which are only affected by ambient light. |
bBlending | True for textures with transparency. |
Color | For VT_MATERIAL_SELFCOLOURED_TEXTURE, the color intrinsic to the texture, e.g. for a texture of orange bricks, the color is orange. |
|
inline |
type | One of:
|