igor::iNodeLODSwitch Class Reference

#include <iNodeLODSwitch.h>

Inherits igor::iNode.

Public Member Functions

void setThresholds (iNodePtr node, float32 min, float32 max)
 
void setThresholds (const iaString &nodeName, float32 min, float32 max)
 
void setThresholds (uint32 nodeID, float32 min, float32 max)
 
void addTrigger (iNodeLODTrigger *trigger)
 
void removeTrigger (iNodeLODTrigger *trigger)
 
void addTrigger (uint32 triggerID)
 
void removeTrigger (uint32 triggerID)
 
void update ()
 
const iaVector3dgetWorldPosition () 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 ()
 

Friends

class iNodeManager
 
class iNodeVisitorUpdateTransform
 

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
 
- 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 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
 

Detailed Description

the lod switch node switches it's child nodes active depending how far a registered LOD trigger node is away

the LOS switch node can react on multiple LOD trigger nodes

child goes active when _min <= child distance < _max

Member Function Documentation

◆ addTrigger() [1/2]

void igor::iNodeLODSwitch::addTrigger ( iNodeLODTrigger trigger)

adds a trigger that has an effect on this lod switch node

Parameters
triggerthe trigger to be added

◆ addTrigger() [2/2]

void igor::iNodeLODSwitch::addTrigger ( uint32  triggerID)

adds a trigger that has an effect on this lod switch node by ID

Parameters
triggerthe trigger to be added

◆ getWorldPosition()

const iaVector3d & igor::iNodeLODSwitch::getWorldPosition ( ) const
Returns
world position of lod switch node

◆ removeTrigger() [1/2]

void igor::iNodeLODSwitch::removeTrigger ( iNodeLODTrigger trigger)

removes a trigger that had an effect on this lod switch node

Parameters
triggerthe trigger to be removed

◆ removeTrigger() [2/2]

void igor::iNodeLODSwitch::removeTrigger ( uint32  triggerID)

removes a trigger that had an effect on this lod switch node by ID

Parameters
triggerthe trigger to be removed

◆ setThresholds() [1/3]

void igor::iNodeLODSwitch::setThresholds ( const iaString nodeName,
float32  min,
float32  max 
)

sets the active threashold for a specified lod level (in this case a nodes name)

Parameters
nodeNamename of node that represents a lod level
minmin distance the specified node is visible
maxmax distance the specified node is visible

◆ setThresholds() [2/3]

void igor::iNodeLODSwitch::setThresholds ( iNodePtr  node,
float32  min,
float32  max 
)

sets the active threashold for a specified lod level (in this case a node)

Parameters
nodenode that represents a lod level
minmin distance the specified node is visible
maxmax distance the specified node is visible

◆ setThresholds() [3/3]

void igor::iNodeLODSwitch::setThresholds ( uint32  nodeID,
float32  min,
float32  max 
)

sets the active threashold for a specified lod level (in this case the nodes id)

Parameters
nodeIDid of node that represents a lod level
minmin distance the specified node is visible
maxmax distance the specified node is visible

◆ update()

void igor::iNodeLODSwitch::update ( )

calculates lowest distance to triggers and updates children accordingly

Friends And Related Function Documentation

◆ iNodeManager

friend class iNodeManager
friend

◆ iNodeVisitorUpdateTransform

friend class iNodeVisitorUpdateTransform
friend

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