igor::iNodeLight Class Reference

#include <iNodeLight.h>

Inherits igor::iNode.

Public Member Functions

void getWorldMatrix (iaMatrixd &matrix)
 
iaColor3fgetAmbient ()
 
void setAmbient (const iaColor3f &color)
 
void setAmbient (float32 r, float32 g, float32 b)
 
iaColor3fgetDiffuse ()
 
void setDiffuse (const iaColor3f &color)
 
void setDiffuse (float32 r, float32 g, float32 b)
 
iaColor3fgetSpecular ()
 
void setSpecular (const iaColor3f &color)
 
void setSpecular (float32 r, float32 g, float32 b)
 
void setType (iLightType type)
 
iLightType getType () const
 
const iaVector3dgetPosition () const
 
const iaVector3dgetDirection () const
 
- Public Member Functions inherited from igor::iNode
iNodeKind getKind () const
 
iNodeType getType () const
 
iNodeID getID () const
 
const iaStringgetName () const
 
virtual std::vector< iaStringgetInfo (bool brief=false) const
 
void setName (const iaString &name)
 
void insertNode (iNodePtr node)
 
void insertNodeAsync (iNodePtr node)
 
void setActive (bool active=true)
 
void setActiveAsync (bool active=true)
 
void removeNode (iNodePtr node)
 
void removeNodeAsync (iNodePtr node)
 
bool isChild ()
 
bool isChild (iNodePtr child)
 
bool hasChildren ()
 
const std::vector< iNodePtr > & getChildren () const
 
void getAllChildren (std::vector< iNodePtr > &children) const
 
iNodePtr getChild (const iaString &name)
 
iNodePtr getChild (iNodeID id)
 
const std::vector< iNodePtr > & getInactiveChildren () const
 
iNodePtr getParent ()
 
iScenePtr getScene ()
 
bool isTransformationDirty ()
 
void setTransformationDirty (bool dirty=true)
 
void calcWorldTransformation (iaMatrixd &matrix)
 
bool isActive () const
 
iTransformationChangeEvent & getTransformationChangeEvent ()
 

Protected Member Functions

virtual void onPreSetScene ()
 
virtual void onPostSetScene ()
 
void onUpdateTransform (iaMatrixd &matrix)
 
- Protected Member Functions inherited from igor::iNode
void setTransformationDirtyDown ()
 
void setTransformationDirtyUp ()
 
void setDataDirty ()
 
bool isDataDirty ()
 
void setParent (iNodePtr parent)
 
void setScene (iScenePtr scene)
 
virtual void onUpdateTransform (iaMatrixd &matrix)
 
virtual void onPreSetScene ()
 
virtual void onPostSetScene ()
 
virtual bool onUpdateData ()
 
virtual void onPostCopyLink (std::map< iNodeID, iNodeID > &nodeIDMap)
 
 iNode ()
 
 iNode (iNodePtr node)
 
virtual ~iNode ()
 

Protected Attributes

iaMatrixd _worldMatrix
 
iaColor3f _ambient = {0.7f, 0.7f, 0.7f}
 
iaColor3f _diffuse = {0.9f, 0.9f, 0.9f}
 
iaColor3f _specular = {1.0f, 1.0f, 1.0f}
 
iLightType _type = iLightType::Directional
 
- Protected Attributes inherited from igor::iNode
bool _active = true
 
iNodeType _nodeType = iNodeType::iNode
 
iNodeKind _nodeKind = iNodeKind::Node
 
iaString _name = L"iNode"
 
bool _transformationDirty = true
 
iScenePtr _scene = nullptr
 
iNodePtr _parent = nullptr
 
std::vector< iNodePtr_children
 
std::vector< iNodePtr_inactiveChildren
 
iTransformationChangeEvent _transformationChangeEvent
 

Friends

class iNodeVisitorUpdateTransform
 
class iNodeManager
 

Additional Inherited Members

- Static Public Member Functions inherited from igor::iNode
static iaString getKindName (iNodeKind kind)
 
static iaString getTypeName (iNodeType nodeType)
 
- Static Public Attributes inherited from igor::iNode
static const iNodeID INVALID_NODE_ID = IGOR_INVALID_ID
 

Detailed Description

this node implementation controls a light within the scene

Member Function Documentation

◆ getAmbient()

iaColor3f & igor::iNodeLight::getAmbient ( )

returns ambient material color

◆ getDiffuse()

iaColor3f & igor::iNodeLight::getDiffuse ( )

returns diffuse material color

◆ getDirection()

const iaVector3d & igor::iNodeLight::getDirection ( ) const
Returns
direction of light

◆ getPosition()

const iaVector3d & igor::iNodeLight::getPosition ( ) const
Returns
position of light

◆ getSpecular()

iaColor3f & igor::iNodeLight::getSpecular ( )

returns specular material color

◆ getType()

iLightType igor::iNodeLight::getType ( ) const
Returns
type of light

◆ getWorldMatrix()

void igor::iNodeLight::getWorldMatrix ( iaMatrixd matrix)

returns world matrix

Parameters
[out]matrixreturned world matrix

◆ onPostSetScene()

void igor::iNodeLight::onPostSetScene ( )
protectedvirtual

register to scene

Reimplemented from igor::iNode.

◆ onPreSetScene()

void igor::iNodeLight::onPreSetScene ( )
protectedvirtual

unregister from scene

Reimplemented from igor::iNode.

◆ onUpdateTransform()

void igor::iNodeLight::onUpdateTransform ( iaMatrixd matrix)
protectedvirtual

set world matrix

Parameters
matrixmatrix to set

Reimplemented from igor::iNode.

◆ setAmbient() [1/2]

void igor::iNodeLight::setAmbient ( const iaColor3f color)

set ambient material color

Parameters
colorambient color

◆ setAmbient() [2/2]

void igor::iNodeLight::setAmbient ( float32  r,
float32  g,
float32  b 
)

set ambient material color

Parameters
rred
ggreen
bblue

◆ setDiffuse() [1/2]

void igor::iNodeLight::setDiffuse ( const iaColor3f color)

set diffuse material color

Parameters
colordiffuse color

◆ setDiffuse() [2/2]

void igor::iNodeLight::setDiffuse ( float32  r,
float32  g,
float32  b 
)

set diffuse material color

Parameters
rred
ggreen
bblue

◆ setSpecular() [1/2]

void igor::iNodeLight::setSpecular ( const iaColor3f color)

set specular material color

Parameters
colorspecular color

◆ setSpecular() [2/2]

void igor::iNodeLight::setSpecular ( float32  r,
float32  g,
float32  b 
)

set specular material color

Parameters
rred
ggreen
bblue

◆ setType()

void igor::iNodeLight::setType ( iLightType  type)

set type of light

Parameters
thetype of light

Friends And Related Function Documentation

◆ iNodeManager

friend class iNodeManager
friend

◆ iNodeVisitorUpdateTransform

friend class iNodeVisitorUpdateTransform
friend

Member Data Documentation

◆ _ambient

iaColor3f igor::iNodeLight::_ambient = {0.7f, 0.7f, 0.7f}
protected

ambient material color

◆ _diffuse

iaColor3f igor::iNodeLight::_diffuse = {0.9f, 0.9f, 0.9f}
protected

diffuse material color

◆ _specular

iaColor3f igor::iNodeLight::_specular = {1.0f, 1.0f, 1.0f}
protected

specular material color

◆ _type

iLightType igor::iNodeLight::_type = iLightType::Directional
protected

type of light

◆ _worldMatrix

iaMatrixd igor::iNodeLight::_worldMatrix
protected

resulting world matrix of light


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