#include <Structure.h>
Public Member Functions | |
| vtMaterialDescriptor (const char *name, const vtString &SourceName, 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 | SetMaterialIndex (const int Index) |
| const int | GetMaterialIndex () const |
| void | SetColorable (const vtMaterialColorEnum Type) |
| const vtMaterialColorEnum | GetColorable () const |
| void | SetSourceName (const vtString &SourceName) |
| const vtString & | GetSourceName () 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 |
| bool | operator== (const vtMaterialDescriptor &rhs) |
| void | WriteToFile (FILE *fp) |
This class encapsulates the description of a shared material
| vtMaterialDescriptor::vtMaterialDescriptor | ( | const char * | Name, |
| const vtString & | SourceName, | ||
| 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. |
| SourceName | 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_COLOUR only, the single color. |
|
inline |
| type | One of:
|
1.8.4