vtdata library
Public Member Functions
vtMaterialDescriptor Class Reference

List of all members.

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 vtStringGetName () 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 vtStringGetSourceName () 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)

Detailed Description

This class encapsulates the description of a shared material


Constructor & Destructor Documentation

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.

Parameters:
NameName of the new material.
SourceNameFilename of the source imagery, for a textured material, or "" otherwise.
ColorableEnumeration, one of:
  • VT_MATERIAL_COLOUR A plain surface of a single color.
  • VT_MATERIAL_COLOURABLE A plain surface that can be any color.
  • VT_MATERIAL_SELFCOLOURED_TEXTURE A textured surface.
  • VT_MATERIAL_COLOURABLE_TEXTURE A textured surface which can be made any color.
fUVScaleX,fUVScaleYFor 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.
bTwoSidedTrue for surfaces which should be visible from both sides.
bAmbientTrue for surfaces which are only affected by ambient light.
bBlendingTrue for textures with transparency.
ColorFor VT_MATERIAL_COLOUR only, the single color.

Member Function Documentation

void vtMaterialDescriptor::SetMatType ( int  type) [inline]
Parameters:
typeOne of:
  • 0: A surface material, such as brick, siding, or stucco.
  • 1: An element of a strcture edge, such as a door or window.
  • 2: Reserved for "Window Wall", an efficiency optimization material which contains both a window and a wall.
  • 3: A post material, for linear structures, such as a fencepost.
 All Classes Files Functions Variables Enumerations Enumerator