DATAKIT API  V2025.1
Dtk_LightMap Class Referenceabstract
+ Inheritance diagram for Dtk_LightMap:

Public Member Functions

void AddEmissiveColor (const Dtk_RGB &inColor)
 Adds the light emitted from the surface of this object. More...
 
void AddReflectiveColor (const Dtk_RGB &inColor)
 Adds the color and amount of a perfect mirror reflection. More...
 
void AddTransparentColor (const Dtk_RGB &inColor)
 Adds the color and amount of perfectly refracted light. More...
 
Dtk_Int32 DtkDynamicType (const Dtk_Int32 &inId)
 Retrieves the dynamic entity type. More...
 
virtual int DtkDynamicType (const int &inId)=0
 
virtual void dump (FILE *file=stdout)
 
Dtk_RGB GetAmbientColor () const
 Returns the ambient light emitted from the surface. More...
 
Dtk_Double64 GetAmbientRatio () const
 Returns the ambient ratio. More...
 
Dtk_RGB GetDiffuseColor () const
 Returns the ambient light diffusely reflected from the surface of this object. More...
 
Dtk_Double64 GetDiffuseRatio () const
 Returns the diffuse ratio. More...
 
Dtk_RGB GetEmissiveColor () const
 Returns the color and amount of light emitted from the surface of this object. More...
 
Dtk_Double64 GetEmissiveRatio () const
 Returns the emissive ratio. More...
 
Dtk_RGB GetReflectiveColor () const
 Returns the color and amount of a perfect mirror reflection. More...
 
Dtk_Double64 GetReflectiveRatio () const
 Returns the reflective ratio
More...
 
Dtk_Double64 GetShininessRatio () const
 Returns the Shininess ratio. More...
 
virtual Dtk_Size_t GetSize () const
 
Dtk_RGB GetSpecularColor () const
 Returns the ambient light specularly reflected from the surface of this object. More...
 
Dtk_Double64 GetSpecularRatio () const
 Returns the specular ratio
More...
 
Dtk_RGB GetTransparentColor () const
 Returns the color and amount of perfectly refracted light. More...
 
Dtk_Double64 GetTransparentRatio () const
 Returns the transparent ratio
More...
 
void SetShininessRatio (Dtk_Double64 inShininess)
 Set the Shininess ratio (0.0 - 1.0) More...
 
void SetTransparentRatio (Dtk_Double64 inRatio)
 Sets the ratio of transparency (0.0 : opaque, 1.0 : transparent) More...
 

Static Public Member Functions

static Dtk_LightMapPtr Create (Dtk_RGB inAmbiant, Dtk_RGB inDiffuse, Dtk_RGB inSpecular)
 Create a Dtk_LightMapPtr. More...
 
static Dtk_LightMapDtkDynamicCast (Dtk_Object *s)
 Performs a dynamic cast - doesn't need RTTI -. More...
 

Protected Types

enum  { _typeID = DTK_TYPE_OBJECT }
 
enum  { _typeID = DTK_TYPE_LIGHT }
 

Protected Member Functions

void _Copy (const Dtk_LightMap &inToBeCopied)
 
void _copy (const Dtk_Object &s)
 
void _init ()
 
void _Init ()
 
void _reset ()
 
void _Reset ()
 
virtual Dtk_ObjectClone ()
 
 Dtk_LightMap ()
 
 Dtk_LightMap (const Dtk_LightMap &inToBeCopied)
 Copy constructor. More...
 
 Dtk_LightMap (Dtk_RGB inAmbient, Dtk_RGB inDiffuse, Dtk_RGB inSpecular)
 
virtual ~Dtk_LightMap ()
 Destructor. More...
 

Protected Attributes

Dtk_Handle * _Private
 
unsigned long count_
 

Friends

class Dtk_SmartPtr< Dtk_LightMap >
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
_typeID 

◆ anonymous enum

anonymous enum
protected
Enumerator
_typeID 
165 { _typeID = DTK_TYPE_LIGHT };

Constructor & Destructor Documentation

◆ Dtk_LightMap() [1/3]

Dtk_LightMap::Dtk_LightMap ( const Dtk_LightMap inToBeCopied)
protected

Copy constructor.

Parameters
inToBeCopiedObject to copy.

◆ Dtk_LightMap() [2/3]

Dtk_LightMap::Dtk_LightMap ( )
protected

◆ Dtk_LightMap() [3/3]

Dtk_LightMap::Dtk_LightMap ( Dtk_RGB  inAmbient,
Dtk_RGB  inDiffuse,
Dtk_RGB  inSpecular 
)
protected

◆ ~Dtk_LightMap()

virtual Dtk_LightMap::~Dtk_LightMap ( )
protectedvirtual

Destructor.

Member Function Documentation

◆ _Copy()

void Dtk_LightMap::_Copy ( const Dtk_LightMap inToBeCopied)
protected

◆ _copy()

void Dtk_Object::_copy ( const Dtk_Object s)
protectedinherited

◆ _init()

void Dtk_Object::_init ( )
protectedinherited

◆ _Init()

void Dtk_LightMap::_Init ( )
protected

◆ _reset()

void Dtk_Object::_reset ( )
protectedinherited

◆ _Reset()

void Dtk_LightMap::_Reset ( )
protected

◆ AddEmissiveColor()

void Dtk_LightMap::AddEmissiveColor ( const Dtk_RGB inColor)

Adds the light emitted from the surface of this object.

◆ AddReflectiveColor()

void Dtk_LightMap::AddReflectiveColor ( const Dtk_RGB inColor)

Adds the color and amount of a perfect mirror reflection.

◆ AddTransparentColor()

void Dtk_LightMap::AddTransparentColor ( const Dtk_RGB inColor)

Adds the color and amount of perfectly refracted light.

◆ Clone()

virtual Dtk_Object* Dtk_LightMap::Clone ( )
protectedvirtual
184 { return new Dtk_LightMap(*this); }

◆ Create()

static Dtk_LightMapPtr Dtk_LightMap::Create ( Dtk_RGB  inAmbiant,
Dtk_RGB  inDiffuse,
Dtk_RGB  inSpecular 
)
static

Create a Dtk_LightMapPtr.

Parameters
AmbientRGB color
DiffuseRGB color
SpecularRGB color
Returns
the constructed Dtk_LightMapPtr.

◆ DtkDynamicCast()

static Dtk_LightMap* Dtk_LightMap::DtkDynamicCast ( Dtk_Object s)
static

Performs a dynamic cast - doesn't need RTTI -.

205  {
206  if (s->DtkDynamicType(_typeID)) return static_cast<Dtk_LightMap*>(s);
207  return NULL;
208  }

◆ DtkDynamicType() [1/2]

Dtk_Int32 Dtk_LightMap::DtkDynamicType ( const Dtk_Int32 inId)

Retrieves the dynamic entity type.

198  {
199  if (inId == _typeID) return 1;
200  return Dtk_Object::DtkDynamicType(inId);
201  }

◆ DtkDynamicType() [2/2]

◆ dump()

virtual void Dtk_Object::dump ( FILE *  file = stdout)
virtualinherited

◆ GetAmbientColor()

Dtk_RGB Dtk_LightMap::GetAmbientColor ( ) const

Returns the ambient light emitted from the surface.

◆ GetAmbientRatio()

Dtk_Double64 Dtk_LightMap::GetAmbientRatio ( ) const

Returns the ambient ratio.

Remarks
: Default ratio is 1.0

◆ GetDiffuseColor()

Dtk_RGB Dtk_LightMap::GetDiffuseColor ( ) const

Returns the ambient light diffusely reflected from the surface of this object.

◆ GetDiffuseRatio()

Dtk_Double64 Dtk_LightMap::GetDiffuseRatio ( ) const

Returns the diffuse ratio.

Remarks
: Default ratio is 1.0

◆ GetEmissiveColor()

Dtk_RGB Dtk_LightMap::GetEmissiveColor ( ) const

Returns the color and amount of light emitted from the surface of this object.

◆ GetEmissiveRatio()

Dtk_Double64 Dtk_LightMap::GetEmissiveRatio ( ) const

Returns the emissive ratio.

Remarks
: Default ratio is 1.0

◆ GetReflectiveColor()

Dtk_RGB Dtk_LightMap::GetReflectiveColor ( ) const

Returns the color and amount of a perfect mirror reflection.

◆ GetReflectiveRatio()

Dtk_Double64 Dtk_LightMap::GetReflectiveRatio ( ) const

Returns the reflective ratio

Remarks
: Default ratio is 1.0

◆ GetShininessRatio()

Dtk_Double64 Dtk_LightMap::GetShininessRatio ( ) const

Returns the Shininess ratio.

◆ GetSize()

◆ GetSpecularColor()

Dtk_RGB Dtk_LightMap::GetSpecularColor ( ) const

Returns the ambient light specularly reflected from the surface of this object.

◆ GetSpecularRatio()

Dtk_Double64 Dtk_LightMap::GetSpecularRatio ( ) const

Returns the specular ratio

Remarks
: Default ratio is 1.0

◆ GetTransparentColor()

Dtk_RGB Dtk_LightMap::GetTransparentColor ( ) const

Returns the color and amount of perfectly refracted light.

◆ GetTransparentRatio()

Dtk_Double64 Dtk_LightMap::GetTransparentRatio ( ) const

Returns the transparent ratio

Remarks
: Default ratio is 0.0

◆ SetShininessRatio()

void Dtk_LightMap::SetShininessRatio ( Dtk_Double64  inShininess)

Set the Shininess ratio (0.0 - 1.0)

◆ SetTransparentRatio()

void Dtk_LightMap::SetTransparentRatio ( Dtk_Double64  inRatio)

Sets the ratio of transparency (0.0 : opaque, 1.0 : transparent)

Friends And Related Function Documentation

◆ Dtk_SmartPtr< Dtk_LightMap >

friend class Dtk_SmartPtr< Dtk_LightMap >
friend

Field Documentation

◆ _Private

Dtk_Handle* Dtk_LightMap::_Private
protected

◆ count_

unsigned long Dtk_Object::count_
protectedinherited
Dtk_LightMap::Dtk_LightMap
Dtk_LightMap()
DTK_TYPE_LIGHT
@ DTK_TYPE_LIGHT
Definition: define.h:569
DTK_TYPE_OBJECT
@ DTK_TYPE_OBJECT
Definition: define.h:464
Dtk_LightMap::_typeID
@ _typeID
Definition: dtk_render.hpp:165
Dtk_Object::_typeID
@ _typeID
Definition: dtk_object.hpp:13
Dtk_LightMap
Definition: dtk_render.hpp:163
Dtk_Object::DtkDynamicType
virtual int DtkDynamicType(const int &inId)=0