LMaterial Class Reference

#include <OSG3DSLoader.h>

Inheritance diagram for LMaterial:

LObject List of all members.

Public Member Functions

 LMaterial ()
virtual ~LMaterial ()
uint GetID ()
LMapGetTextureMap1 ()
LMapGetTextureMap2 ()
LMapGetOpacityMap ()
LMapGetSpecularMap ()
LMapGetBumpMap ()
LMapGetReflectionMap ()
LColor3 GetAmbientColor ()
LColor3 GetDiffuseColor ()
LColor3 GetSpecularColor ()
float GetShininess ()
float GetTransparency ()
LShading GetShadingType ()
void SetID (uint value)
void SetAmbientColor (const LColor3 &color)
void SetDiffuseColor (const LColor3 &color)
void SetSpecularColor (const LColor3 &color)
void SetShininess (float value)
void SetTransparency (float value)
void SetShadingType (LShading shading)
virtual const std::string & GetName ()
virtual void SetName (const std::string &value)
bool IsObject (const std::string &name)

Protected Attributes

int m_id
LMap m_texMap1
LMap m_texMap2
LMap m_opacMap
LMap m_reflMap
LMap m_bumpMap
LMap m_specMap
LColor3 m_ambient
LColor3 m_diffuse
LColor3 m_specular
float m_shininess
float m_transparency
LShading m_shading
std::string m_name

Detailed Description

Definition at line 145 of file OSG3DSLoader.h.


Constructor & Destructor Documentation

LMaterial::LMaterial (  ) 

Definition at line 249 of file OSG3DSLoader.cpp.

References black, emptyMap, m_ambient, m_bumpMap, m_diffuse, m_id, m_opacMap, m_reflMap, m_shading, m_shininess, m_specMap, m_specular, m_texMap1, m_texMap2, m_transparency, and sGouraud.

00250 : LObject()
00251 {
00252     m_id = 0;
00253     m_texMap1 = emptyMap;
00254     m_texMap2 = emptyMap;
00255     m_opacMap = emptyMap;
00256     m_bumpMap = emptyMap;
00257     m_reflMap = emptyMap;
00258     m_specMap = emptyMap;
00259     m_ambient = black;
00260     m_diffuse = black;
00261     m_specular = black;
00262     m_shading = sGouraud;
00263     m_shininess = 0;
00264     m_transparency = 0;
00265 }

LMaterial::~LMaterial (  )  [virtual]

Definition at line 267 of file OSG3DSLoader.cpp.

00268 {
00269 
00270 }


Member Function Documentation

uint LMaterial::GetID (  ) 

Definition at line 272 of file OSG3DSLoader.cpp.

References m_id.

Referenced by L3DS::ReadFaceList().

00273 {
00274     return m_id;
00275 }

LMap & LMaterial::GetTextureMap1 (  ) 

Definition at line 277 of file OSG3DSLoader.cpp.

References m_texMap1.

Referenced by L3DS::ReadMaterial().

00278 {
00279     return m_texMap1;
00280 }

LMap & LMaterial::GetTextureMap2 (  ) 

Definition at line 282 of file OSG3DSLoader.cpp.

References m_texMap2.

Referenced by L3DS::ReadMaterial().

00283 {
00284     return m_texMap2;
00285 }

LMap & LMaterial::GetOpacityMap (  ) 

Definition at line 287 of file OSG3DSLoader.cpp.

References m_opacMap.

Referenced by L3DS::ReadMaterial().

00288 {
00289     return m_opacMap;
00290 }

LMap & LMaterial::GetSpecularMap (  ) 

Definition at line 292 of file OSG3DSLoader.cpp.

References m_specMap.

Referenced by L3DS::ReadMaterial().

00293 {
00294     return m_specMap;
00295 }

LMap & LMaterial::GetBumpMap (  ) 

Definition at line 297 of file OSG3DSLoader.cpp.

References m_bumpMap.

Referenced by L3DS::ReadMaterial().

00298 {
00299     return m_bumpMap;
00300 }

LMap & LMaterial::GetReflectionMap (  ) 

Definition at line 302 of file OSG3DSLoader.cpp.

References m_reflMap.

Referenced by L3DS::ReadMaterial().

00303 {
00304     return m_reflMap;
00305 }

LColor3 LMaterial::GetAmbientColor (  ) 

Definition at line 307 of file OSG3DSLoader.cpp.

References m_ambient.

00308 {
00309     return m_ambient;
00310 }

LColor3 LMaterial::GetDiffuseColor (  ) 

Definition at line 312 of file OSG3DSLoader.cpp.

References m_diffuse.

00313 {
00314     return m_diffuse;
00315 }

LColor3 LMaterial::GetSpecularColor (  ) 

Definition at line 317 of file OSG3DSLoader.cpp.

References m_specular.

00318 {
00319     return m_specular;
00320 }

float LMaterial::GetShininess (  ) 

Definition at line 322 of file OSG3DSLoader.cpp.

References m_shininess.

00323 {
00324     return m_shininess;
00325 }

float LMaterial::GetTransparency (  ) 

Definition at line 327 of file OSG3DSLoader.cpp.

References m_transparency.

00328 {
00329     return m_transparency;
00330 }

LShading LMaterial::GetShadingType (  ) 

Definition at line 332 of file OSG3DSLoader.cpp.

References m_shading.

00333 {
00334     return m_shading;
00335 }

void LMaterial::SetID ( uint  value  ) 

Definition at line 337 of file OSG3DSLoader.cpp.

References m_id.

00338 {
00339     m_id = value;
00340 }

void LMaterial::SetAmbientColor ( const LColor3 color  ) 

Definition at line 342 of file OSG3DSLoader.cpp.

References m_ambient.

Referenced by L3DS::ReadMaterial().

00343 {
00344     m_ambient = color;
00345 }

void LMaterial::SetDiffuseColor ( const LColor3 color  ) 

Definition at line 347 of file OSG3DSLoader.cpp.

References m_diffuse.

Referenced by L3DS::ReadMaterial().

00348 {
00349     m_diffuse = color;
00350 }

void LMaterial::SetSpecularColor ( const LColor3 color  ) 

Definition at line 352 of file OSG3DSLoader.cpp.

References m_specular.

Referenced by L3DS::ReadMaterial().

00353 {
00354     m_specular = color;
00355 }

void LMaterial::SetShininess ( float  value  ) 

Definition at line 357 of file OSG3DSLoader.cpp.

References m_shininess.

Referenced by L3DS::ReadMaterial().

00358 {
00359     m_shininess = value;
00360     if (m_shininess < 0)
00361         m_shininess = 0;
00362     if (m_shininess > 1)
00363         m_shininess = 1;
00364 }

void LMaterial::SetTransparency ( float  value  ) 

Definition at line 366 of file OSG3DSLoader.cpp.

References m_transparency.

Referenced by L3DS::ReadMaterial().

00367 {
00368     m_transparency = value;
00369     if (m_transparency < 0)
00370         m_transparency = 0;
00371     if (m_transparency > 1)
00372         m_transparency = 1;
00373 }

void LMaterial::SetShadingType ( LShading  shading  ) 

Definition at line 375 of file OSG3DSLoader.cpp.

References m_shading.

Referenced by L3DS::ReadMaterial().

00376 {
00377     m_shading = shading;
00378 }

const std::string & LObject::GetName (  )  [virtual, inherited]

Definition at line 234 of file OSG3DSLoader.cpp.

References LObject::m_name.

Referenced by OSG::A3DSSceneFileType::createMesh().

00235 {
00236     return m_name;
00237 }

void LObject::SetName ( const std::string &  value  )  [virtual, inherited]

Definition at line 229 of file OSG3DSLoader.cpp.

References LObject::m_name.

Referenced by L3DS::ReadCamera(), L3DS::ReadLight(), L3DS::ReadMaterial(), and L3DS::ReadMesh().

00230 {
00231     m_name = value;
00232 }

bool LObject::IsObject ( const std::string &  name  )  [inherited]

Definition at line 239 of file OSG3DSLoader.cpp.

References LObject::m_name.

00240 {
00241     return (m_name == name);
00242 }


Member Data Documentation

int LMaterial::m_id [protected]

Definition at line 198 of file OSG3DSLoader.h.

Referenced by GetID(), LMaterial(), and SetID().

Definition at line 200 of file OSG3DSLoader.h.

Referenced by GetTextureMap1(), and LMaterial().

Definition at line 202 of file OSG3DSLoader.h.

Referenced by GetTextureMap2(), and LMaterial().

Definition at line 204 of file OSG3DSLoader.h.

Referenced by GetOpacityMap(), and LMaterial().

Definition at line 206 of file OSG3DSLoader.h.

Referenced by GetReflectionMap(), and LMaterial().

Definition at line 208 of file OSG3DSLoader.h.

Referenced by GetBumpMap(), and LMaterial().

Definition at line 210 of file OSG3DSLoader.h.

Referenced by GetSpecularMap(), and LMaterial().

Definition at line 212 of file OSG3DSLoader.h.

Referenced by GetAmbientColor(), LMaterial(), and SetAmbientColor().

Definition at line 214 of file OSG3DSLoader.h.

Referenced by GetDiffuseColor(), LMaterial(), and SetDiffuseColor().

Definition at line 216 of file OSG3DSLoader.h.

Referenced by GetSpecularColor(), LMaterial(), and SetSpecularColor().

float LMaterial::m_shininess [protected]

Definition at line 218 of file OSG3DSLoader.h.

Referenced by GetShininess(), LMaterial(), and SetShininess().

float LMaterial::m_transparency [protected]

Definition at line 220 of file OSG3DSLoader.h.

Referenced by GetTransparency(), LMaterial(), and SetTransparency().

Definition at line 222 of file OSG3DSLoader.h.

Referenced by GetShadingType(), LMaterial(), and SetShadingType().

std::string LObject::m_name [protected, inherited]


The documentation for this class was generated from the following files: