Kigs Framework  Doc version 0.8
Open source multi purpose Rapid Application Development framework
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
TravState Class Reference

#include <TravState.h>

Inheritance diagram for TravState:
CoreModifiable GenericRefCountedBaseClass

Public Member Functions

 TravState (const kstl::string &name, DECLARE_CLASS_NAME_TREE_ARG)
 constructor More...
 
void SetTime (kdouble time)
 set the tavState time More...
 
kdouble GetTime ()
 get the tavState time More...
 
void SetCurrentCamera (Camera *cam)
 set the camera More...
 
CameraGetCurrentCamera ()
 get the tavState camera More...
 
void SetLOD (kfloat lod)
 set the LOD More...
 
kfloat GetLOD ()
 get the tavState LOD More...
 
SP< CullingObject > & GetCullingObject ()
 get the culling object More...
 
unsigned int GetVisibilityFrame ()
 get the visible frame More...
 
void SetVisibilityFrame (unsigned int frame)
 set a frame visible More...
 
unsigned int BeginNewFrame ()
 update the current frame number More...
 
unsigned int GetFrameNumber ()
 get the current frame number More...
 
void SetAllVisible (bool t)
 set all frames visibles More...
 
bool IsAllVisible ()
 check if all frames are visibles More...
 
void SetCurrentLocalToGlobalMatrix (const Matrix3x4 &m)
 set the current local to global matrix More...
 
Matrix3x4 GetCurrentLocalToGlobalMatrix ()
 get the current local to global matrix More...
 
void SetCurrentGlobalToLocalMatrix (const Matrix3x4 &m)
 set the current global to local matrix More...
 
Matrix3x4 GetCurrentGlobalToLocalMatrix ()
 get the current global to local matrix More...
 
void SetRenderer (ModuleSpecificRenderer *renderer)
 set the current renderer More...
 
ModuleSpecificRendererGetRenderer ()
 get the current renderer More...
 
void SetSceneGraph (ModuleSceneGraph *scenegraph)
 set the current graph scene More...
 
ModuleSceneGraphGetSceneGraph ()
 get the scene graph More...
 
void SetScene (Scene3D *scene)
 set the current scene3D More...
 
Scene3DGetScene ()
 get the scene3D More...
 
- Public Member Functions inherited from CoreModifiable
void Init ()
 Modifiable managmenent.
 
void EmptyItemList ()
 remove all items (sons)
 
CMSP GetInstanceByPath (const std::string &path)
 return the instance corresponding to the given path in sons tree
 
std::string GetRuntimeID () const
 ID.
 
CoreModifiableAttributegetAttribute (KigsID labelid) const
 Attribute management.
 
u32 getNbArrayElements (KigsID attributeLabel) const
 return element count for an array type attribute
 
template<typename attribute_type , typename value_type >
attribute_type * AddDynamicAttribute (KigsID ID, const value_type &value)
 Dynamic attribute management.
 
const kigs::unordered_map< KigsID, ModifiableMethodStruct > * GetMethods ()
 Method management.
 
bool aggregateWith (CMSP &item, ItemPosition pos=Last)
 Aggregate management.
 
void flagAsNotificationCenterRegistered ()
 Flags.
 
void InitParametersFromList (const std::vector< CoreModifiableAttribute * > *params)
 Utility. More...
 
virtual void InitModifiable ()
 default modifiable init : set all initparams to readonly and set initflag to true More...
 
virtual void UninitModifiable ()
 called when InitModifiable has failled : reset read/write flag on all init params More...
 
virtual void ProtectedDestroy ()
 Destroy method decrement refcounter and delete instance if no more used. More...
 
virtual void addUser (CoreModifiable *user)
 add the given parent to list
 
virtual void removeUser (CoreModifiable *user)
 remove user (parent)
 
virtual bool addItem (const CMSP &item, ItemPosition pos=Last)
 add item at first or last position
 
virtual bool removeItem (const CMSP &item)
 remove item (son)
 

Public Attributes

TravPathmPath
 link to the travPath
 
MaterialmCurrentMaterial
 change material only when needed
 
kstl::set< CoreModifiable * > * mLights
 list of current used light
 
float mTangentSpaceLOD =-1.0f
 drawable sorter
 

Protected Member Functions

virtual ~TravState ()
 destructor
 
- Protected Member Functions inherited from CoreModifiable
void UpdateAggregates (const Timer &timer, void *addParam)
 Internals.
 
void Export (std::vector< CoreModifiable * > &savedList, XMLNode *currentNode, bool recursive, ExportSettings *settings)
 Export. More...
 
CoreModifiableAttributeGenericCreateDynamicAttribute (CoreModifiable::ATTRIBUTE_TYPE type, KigsID ID)
 create and add dynamic attribute except arrays
 

Protected Attributes

kdouble mTime
 time
 
kfloat mLOD
 LOD value.
 
CameramCamera
 link to the current camera
 
ModuleSpecificRenderermRenderer
 link to the current renderer
 
ModuleSceneGraphmSceneGraph
 link to the current scene graph
 
Scene3DmCurrentScene
 link to the current scene3D
 
SP< CullingObjectmCullingObject
 culling object
 
bool mAllVisible
 TRUE if all frames are visibles.
 
unsigned int mVisibilityFrame
 index of the visible frame
 
unsigned int mFrame
 index of the current frame
 
kfloat mCurrentScale
 current scale
 

Friends

class Scene3D
 

Additional Inherited Members

- Static Public Member Functions inherited from CoreModifiable
static std::vector< CMSP > GetRootInstances (const KigsID &cid, bool exactTypeOnly=false)
 static method : return the set of all root instances of the given type
 
static void Append (std::string &XMLString, const std::list< CoreModifiable * > &toexport, bool recursive, ExportSettings *settings=nullptr)
 static method to export the several CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static void Export (const std::string &filename, CoreModifiable *toexport, bool recursive=false, ExportSettings *settings=nullptr)
 static method to export the given CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static XMLNodeExportToXMLNode (CoreModifiable *toexport, XML *owner_xml_file, bool recursive, ExportSettings *settings=nullptr)
 static method to export the given CoreModifiable to an XML Node. if recursive flag is set to true, export also all sons tree More...
 
static std::string ExportToXMLString (CoreModifiable *toexport, bool recursive, ExportSettings *settings=nullptr)
 static method to export the given CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static void Export (std::string &XMLString, const std::list< CoreModifiable * > &toexport, bool recursive, ExportSettings *settings=nullptr)
 static method to export the several CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static CMSP Import (const std::string &filename, bool noInit=false, bool keepImportFileName=false, ImportState *state=nullptr, const std::string &override_name="")
 return an new CoreModifiable instance using the description found in XML file given by name
 
static CMSP GetInstanceByGlobalPath (const std::string &path)
 static method : return the instance corresponding to the given path, and given search start
 
static void debugPrintfFullTree (int maxindent=3)
 Editor. More...
 
- Static Protected Member Functions inherited from CoreModifiable
template<typename StringType >
static CMSP Import (XMLNodeTemplate< StringType > *currentNode, CoreModifiable *currentModifiable, ImportState &importState)
 recusrive method to add sons and attributes found in the XML file
 

Detailed Description

Base class used to store current scene traversal state.

Constructor & Destructor Documentation

◆ TravState()

TravState::TravState ( const kstl::string &  name,
DECLARE_CLASS_NAME_TREE_ARG   
)

constructor

Parameters
name: instance name
DECLARE_CLASS_NAME_TREE_ARG: list of arguments

Member Function Documentation

◆ BeginNewFrame()

unsigned int TravState::BeginNewFrame ( )
inline

update the current frame number

Returns
the current frame number

◆ GetCullingObject()

CullingObject * TravState::GetCullingObject ( )
inline

get the culling object

Returns
the culling object

◆ GetCurrentCamera()

Camera * TravState::GetCurrentCamera ( )
inline

get the tavState camera

Returns
the tavState camera

◆ GetCurrentGlobalToLocalMatrix()

Matrix3x4 * TravState::GetCurrentGlobalToLocalMatrix ( )
inline

get the current global to local matrix

Returns
the the current global to local matrix

◆ GetCurrentLocalToGlobalMatrix()

Matrix3x4 * TravState::GetCurrentLocalToGlobalMatrix ( )
inline

get the current local to global matrix

Returns
the current local to global matrix

◆ GetFrameNumber()

unsigned int TravState::GetFrameNumber ( )
inline

get the current frame number

Returns
the current frame number

◆ GetLOD()

kfloat TravState::GetLOD ( )
inline

get the tavState LOD

Returns
the tavState LOD

◆ GetRenderer()

ModuleRenderer * TravState::GetRenderer ( )
inline

get the current renderer

Returns
the current renderer

◆ GetScene()

Scene3D * TravState::GetScene ( )
inline

get the scene3D

Returns
the scene3D

◆ GetSceneGraph()

ModuleSceneGraph * TravState::GetSceneGraph ( )
inline

get the scene graph

Returns
the scene graph

◆ GetTime()

kdouble TravState::GetTime ( )
inline

get the tavState time

Returns
the tavState time

◆ GetVisibilityFrame()

unsigned int TravState::GetVisibilityFrame ( )
inline

get the visible frame

Returns
index of the visible frame

◆ IsAllVisible()

bool TravState::IsAllVisible ( )
inline

check if all frames are visibles

Returns
TRUE is all frames are visibles

◆ SetAllVisible()

void TravState::SetAllVisible ( bool  t)
inline

set all frames visibles

Parameters
t: if TRUE, set all frames visibles

◆ SetCurrentCamera()

void TravState::SetCurrentCamera ( Camera cam)
inline

set the camera

Parameters
cam: camera to set

◆ SetCurrentGlobalToLocalMatrix()

void TravState::SetCurrentGlobalToLocalMatrix ( const Matrix3x4 &  m)
inline

set the current global to local matrix

Parameters
m: global to local matrix

◆ SetCurrentLocalToGlobalMatrix()

void TravState::SetCurrentLocalToGlobalMatrix ( const Matrix3x4 &  m)
inline

set the current local to global matrix

Parameters
m: local to global matrix

◆ SetLOD()

void TravState::SetLOD ( kfloat  lod)
inline

set the LOD

Parameters
lod: LOD to set

◆ SetRenderer()

void TravState::SetRenderer ( ModuleSpecificRenderer renderer)
inline

set the current renderer

Parameters
renderer: the current renderer

◆ SetScene()

void TravState::SetScene ( Scene3D scene)
inline

set the current scene3D

Parameters
scene: the current scene3D

◆ SetSceneGraph()

void TravState::SetSceneGraph ( ModuleSceneGraph scenegraph)
inline

set the current graph scene

Parameters
scenegraph: the current graph scene

◆ SetTime()

void TravState::SetTime ( kdouble  time)
inline

set the tavState time

Parameters
time: time to set

◆ SetVisibilityFrame()

void TravState::SetVisibilityFrame ( unsigned int  frame)
inline

set a frame visible

Parameters
indexof the frame to set visible

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