From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/classNL3D_1_1CInstanceGroup.html | 2870 +++++++++++++++++++++ 1 file changed, 2870 insertions(+) create mode 100644 docs/doxygen/nel/classNL3D_1_1CInstanceGroup.html (limited to 'docs/doxygen/nel/classNL3D_1_1CInstanceGroup.html') diff --git a/docs/doxygen/nel/classNL3D_1_1CInstanceGroup.html b/docs/doxygen/nel/classNL3D_1_1CInstanceGroup.html new file mode 100644 index 00000000..d63f14f9 --- /dev/null +++ b/docs/doxygen/nel/classNL3D_1_1CInstanceGroup.html @@ -0,0 +1,2870 @@ + + + + nevrax.org : docs + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
+
+ + +
+ + +
+Docs + +
+  + + + + + +
Documentation 
+ +
+Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  
+

NL3D::CInstanceGroup Class Reference

A CInstanceGroup is a group of mesh instance and so composed by A reference to a mesh (refered by the name) The transformations to get it to the world The parent. +More... +

+#include <scene_group.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

PointLight part

void buildPointLightList (const std::vector< CPointLightNamed > &pointLightList, std::vector< uint > &plRemap)
 Build the list of light. NB: sort by LightGroupName the array, and return index remap. More...

bool _RealTimeSunContribution
 RealTimeSunContribution. Used for ig_lighter and zone_ig_lighter. More...

CPointLightNamedArray _PointLightArray
 Array of pointLights. More...

CIGSurfaceLight _IGSurfaceLight
 The object used to light dynamic models in town and buildings. More...


Public Types

typedef std::vector< CInstanceTInstanceArray
 A vector of instance. More...

enum  { NumStaticLightPerInstance = 2 + }
 Should Never be changed. More...

enum  TState { StateNotAdded = 0, +StateAdding, +StateAdded + }

Public Methods

uint getNumInstance () const
 Get number of instance in this group. More...

const std::string & getShapeName (uint instanceNb) const
 Get the name of the mesh referenced. More...

const std::string & getInstanceName (uint instanceNb) const
 Get the instance name. More...

const NLMISC::CVectorgetInstancePos (uint instanceNb) const
 Get an instance position. More...

const NLMISC::CQuatgetInstanceRot (uint instanceNb) const
 Get an instance rotation. More...

const NLMISC::CVectorgetInstanceScale (uint instanceNb) const
void getInstanceMatrix (uint instanceNb, NLMISC::CMatrix &dest) const
const sint32 getInstanceParent (uint instanceNb) const
const CInstancegetInstance (uint instanceNb) const
CInstancegetInstance (uint instanceNb)
const NLMISC::CVectorgetGlobalPos () const
CTransformShapegetTransformShape (uint instanceNb) const
 Get the instance added to the scene. More...

 CInstanceGroup ()
 Construct, serialize and link to scene. More...

 ~CInstanceGroup ()
void build (const CVector &vGlobalPos, const TInstanceArray &array, const std::vector< CCluster > &Portals, const std::vector< CPortal > &Clusters)
 Build the group Build with an empty list of light. More...

void build (const CVector &vGlobalPos, const TInstanceArray &array, const std::vector< CCluster > &Portals, const std::vector< CPortal > &Clusters, const std::vector< CPointLightNamed > &pointLightList, const CIGSurfaceLight::TRetrieverGridMap *retrieverGridMap=NULL, float igSurfaceLightCellSize=0)
 Build the group Build also the list of light. More...

void retrieve (CVector &vGlobalPos, TInstanceArray &array, std::vector< CCluster > &Portals, std::vector< CPortal > &Clusters, std::vector< CPointLightNamed > &pointLightList) const
 Retreive group information. More...

void serial (NLMISC::IStream &f)
 Serial the group. More...

void createRoot (CScene &scene)
 Add all the instances to the scene. More...

void setTransformNameCallback (ITransformName *pTN)
 Setup the callback in charge of changing name at the addToScene moment. More...

void setAddRemoveInstanceCallback (IAddRemoveInstance *callback)
 Set a callback to know when an instance has been added / removed. More...

void setIGAddBeginCallback (IIGAddBegin *callback)
 Set a callback to know when an instance group is being created, and how many instances it contains. More...

bool addToScene (CScene &scene, IDriver *driver=NULL)
 Add all the instances to the scene. More...

bool addToSceneAsync (CScene &scene, IDriver *driver=NULL)
void stopAddToSceneAsync ()
TState getAddToSceneState ()
bool removeFromScene (CScene &scene)
 Remove all the instances from the scene. More...

void getLights (std::set< std::string > &LightNames)
 Get all lights (lightmaps) from an instance group. More...

void setLightFactor (const std::string &LightName, NLMISC::CRGBA nFactor)
 Set the lightmap factor for the whole instance group. More...

void getBlendShapes (std::set< std::string > &BlendShapeNames)
 Get all the blendshapes from an instance group. More...

void setBlendShapeFactor (const std::string &BlendShapeName, float rFactor)
 Set the blendshape factor for the whole instance group (0 -> 100). More...

void addCluster (CCluster *pCluster)
 To construct the cluster system by hand. More...

void setClusterSystem (CInstanceGroup *pIG)
 Set the cluster system to test for instances that are not in a cluster. More...

void getDynamicPortals (std::vector< std::string > &names)
 Get all dynamic portals of an instance group. More...

void setDynamicPortal (std::string &name, bool opened)
 Set the state of a dynamic portal (true=opened, false=closed). More...

bool getDynamicPortal (std::string &name)
 Get the state of a dynamic portal (true=opened, false=closed). More...

void linkRoot (CScene &scene, CTransform *father)
 link the root of the ig to a node. No-op if not added to scene. Pass NULL to reset by default. More...

void setPos (const CVector &pos)
 Set the position of the IG. More...

void setRotQuat (const CQuat &quat)
 Set the rotation of the IG. More...

CVector getPos ()
 Get the position of the IG. More...

CQuat getRotQuat ()
 Get the rotation of the IG. More...

void freezeHRC ()
 see CTransform::freezeHRC(). Do it for all instances (not clusters), and for the root of the IG. More...

void unfreezeHRC ()
 see CTransform::unfreezeHRC(). Do it for all instances (not clusters), and for the root of the IG. More...

bool linkToParent (CInstanceGroup *pFather)
 Look through all hierarchy our clusters that must be linked to our parent. More...

RealTime lighting part
const std::vector< CPointLightNamed > & getPointLightList () const
 get the list of light. NB: the array is sorted by LightGroupName. More...

uint getNumPointLights () const
 Get the number of point lights. More...

CPointLightNamedgetPointLightNamed (uint index)
 Get a mutable ref on a point light named. More...

void setPointLightFactor (const std::string &lightGroupName, NLMISC::CRGBA nFactor)
 set the Light factor for all pointLights "lightGroupName". More...

bool getStaticLightSetup (const std::string &retrieverIdentifier, sint surfaceId, const CVector &localPos, std::vector< CPointLightInfluence > &pointLightList, uint8 &sunContribution, NLMISC::CRGBA &localAmbient)
 See CIGSurfaceLight::getStaticLightSetup(). More...

void enableRealTimeSunContribution (bool enable)
 Setuped at export, tells if the ig is touched by the sun. true by default. More...

bool getRealTimeSunContribution () const

Public Attributes

TInstanceArray _InstancesInfos
std::vector< CTransformShape * > _Instances
std::vector< CPortal_Portals
std::vector< CCluster_ClusterInfos
std::vector< CCluster * > _ClusterInstances
CTransform_Root
CClipTrav_ClipTrav
CInstanceGroup * _ClusterSystem
NLMISC::CVector _GlobalPos

Private Methods

bool addToSceneWhenAllShapesLoaded (CScene &scene, IDriver *driver)

Private Attributes

ITransformName_TransformName
IAddRemoveInstance_AddRemoveInstance
IIGAddBegin_IGAddBeginCallback
Async loading part
bool _AddToSceneSignal
TState _AddToSceneState
CScene_AddToSceneTempScene
IDriver_AddToSceneTempDriver
+


Detailed Description

+A CInstanceGroup is a group of mesh instance and so composed by A reference to a mesh (refered by the name) The transformations to get it to the world The parent. +

+

    +
  • * - * - This class can initialize a scene and be serialized.
+
+Author:
+Matthieu Besson , Nevrax France
+Date:
+2001
+

+ +

+Definition at line 70 of file scene_group.h.


Member Typedef Documentation

+

+ + + + +
+ + +
typedef std::vector<CInstance> NL3D::CInstanceGroup::TInstanceArray +
+
+ + + + + +
+   + + +

+A vector of instance. +

+ +

+Definition at line 130 of file scene_group.h.

+


Member Enumeration Documentation

+

+ + + + +
+ + +
anonymous enum +
+
+ + + + + +
+   + + +

+Should Never be changed. +

+

+Enumeration values:
+ + +
NumStaticLightPerInstance  +
+
+ +

+Definition at line 75 of file scene_group.h.

+

+ + + + +
+ + +
enum NL3D::CInstanceGroup::TState +
+
+ + + + + +
+   + + +

+

+Enumeration values:
+ + + + +
StateNotAdded  +
StateAdding  +
StateAdded  +
+
+ +

+Definition at line 76 of file scene_group.h.

+


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + +
NL3D::CInstanceGroup::CInstanceGroup  
+
+ + + + + +
+   + + +

+Construct, serialize and link to scene. +

+ +

+Definition at line 222 of file scene_group.cpp. +

+References _AddRemoveInstance, _AddToSceneState, _ClusterSystem, _GlobalPos, _IGAddBeginCallback, _IGSurfaceLight, _RealTimeSunContribution, _Root, _TransformName, and StateNotAdded.

+

+ + + + +
+ + + + + + + + + +
NL3D::CInstanceGroup::~CInstanceGroup  
+
+ + + + + +
+   + + +

+ +

+Definition at line 236 of file scene_group.cpp.

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CInstanceGroup::addCluster CCluster  pCluster
+
+ + + + + +
+   + + +

+To construct the cluster system by hand. +

+ +

+Definition at line 1034 of file scene_group.cpp. +

+References _ClusterInstances.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
bool NL3D::CInstanceGroup::addToScene CScene  scene,
IDriver  driver = NULL
+
+ + + + + +
+   + + +

+Add all the instances to the scene. +

+By default, freezeHRC() those instances and the root.

+Parameters:
+ + + +
scene  +is the scene in which you want to add the instance group.
driver  +is a pointer to a driver. If this pointer is not NULL, the textures used by the shapes will be preloaded in this driver. If the pointer is NULL (default), textures will ve loaded when the shape will be used.
+
+

+Definition at line 478 of file scene_group.cpp. +

+References _IGAddBeginCallback, _Instances, _InstancesInfos, _TransformName, addToSceneWhenAllShapesLoaded, getShapeName, and nlwarning. +

+Referenced by getAddToSceneState.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
bool NL3D::CInstanceGroup::addToSceneAsync CScene  scene,
IDriver  driver = NULL
+
+ + + + + +
+   + + +

+ +

+Definition at line 736 of file scene_group.cpp. +

+References _AddToSceneSignal, _AddToSceneState, _AddToSceneTempDriver, _AddToSceneTempScene, _IGAddBeginCallback, _Instances, _InstancesInfos, _TransformName, getShapeName, and StateAdding.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
bool NL3D::CInstanceGroup::addToSceneWhenAllShapesLoaded CScene  scene,
IDriver  driver
[private]
+
+ + + + + +
+   + + +

+ +

+Definition at line 549 of file scene_group.cpp. +

+References _AddRemoveInstance, _AddToSceneState, _ClipTrav, _ClusterInfos, _ClusterInstances, _ClusterSystem, _Instances, _InstancesInfos, _PointLightArray, _Portals, _Root, NL3D::ClipTravId, NL3D::ClusterId, createRoot, freezeHRC, NL3D::HrcTravId, linkToParent, min, NL3D_MAX_LIGHT_CONTRIBUTION, and StateAdded. +

+Referenced by addToScene.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::CInstanceGroup::build const CVector &   vGlobalPos,
const TInstanceArray  array,
const std::vector< CCluster > &   Portals,
const std::vector< CPortal > &   Clusters,
const std::vector< CPointLightNamed > &   pointLightList,
const CIGSurfaceLight::TRetrieverGridMap  retrieverGridMap = NULL,
float   igSurfaceLightCellSize = 0
+
+ + + + + +
+   + + +

+Build the group Build also the list of light. +

+NB: sort by LightGroupName the array. Give also a ptr on a retrieverGridMap to build surfaces (if not NULL). +

+Definition at line 241 of file scene_group.cpp. +

+References _ClusterInfos, _GlobalPos, _IGSurfaceLight, _InstancesInfos, _Portals, and buildPointLightList.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::CInstanceGroup::build const CVector &   vGlobalPos,
const TInstanceArray  array,
const std::vector< CCluster > &   Portals,
const std::vector< CPortal > &   Clusters
+
+ + + + + +
+   + + +

+Build the group Build with an empty list of light. +

+ +

+Definition at line 317 of file scene_group.cpp.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CInstanceGroup::buildPointLightList const std::vector< CPointLightNamed > &   pointLightList,
std::vector< uint > &   plRemap
[private]
+
+ + + + + +
+   + + +

+Build the list of light. NB: sort by LightGroupName the array, and return index remap. +

+ +

+Definition at line 1150 of file scene_group.cpp. +

+References _InstancesInfos, _PointLightArray, NLAISCRIPT::l, and nlassert. +

+Referenced by build.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CInstanceGroup::createRoot CScene  scene
+
+ + + + + +
+   + + +

+Add all the instances to the scene. +

+ +

+Definition at line 451 of file scene_group.cpp. +

+References _Root, setPos, and NL3D::TransformId. +

+Referenced by addToSceneWhenAllShapesLoaded.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CInstanceGroup::enableRealTimeSunContribution bool   enable
+
+ + + + + +
+   + + +

+Setuped at export, tells if the ig is touched by the sun. true by default. +

+ +

+Definition at line 1197 of file scene_group.cpp. +

+References _RealTimeSunContribution.

+

+ + + + +
+ + + + + + + + + +
void NL3D::CInstanceGroup::freezeHRC  
+
+ + + + + +
+   + + +

+see CTransform::freezeHRC(). Do it for all instances (not clusters), and for the root of the IG. +

+ +

+Definition at line 1117 of file scene_group.cpp. +

+References _Instances, and _Root. +

+Referenced by addToSceneWhenAllShapesLoaded.

+

+ + + + +
+ + + + + + + + + +
CInstanceGroup::TState NL3D::CInstanceGroup::getAddToSceneState  
+
+ + + + + +
+   + + +

+ +

+Definition at line 846 of file scene_group.cpp. +

+References _AddToSceneState, _AddToSceneTempDriver, _AddToSceneTempScene, addToScene, and StateAdding.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CInstanceGroup::getBlendShapes std::set< std::string > &   BlendShapeNames
+
+ + + + + +
+   + + +

+Get all the blendshapes from an instance group. +

+

+

+ + + + +
+ + + + + + + + + + +
bool NL3D::CInstanceGroup::getDynamicPortal std::string &   name
+
+ + + + + +
+   + + +

+Get the state of a dynamic portal (true=opened, false=closed). +

+ +

+Definition at line 1065 of file scene_group.cpp. +

+References _Portals.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CInstanceGroup::getDynamicPortals std::vector< std::string > &   names
+
+ + + + + +
+   + + +

+Get all dynamic portals of an instance group. +

+ +

+Definition at line 1049 of file scene_group.cpp. +

+References _Portals, and getName.

+

+ + + + +
+ + + + + + + + + +
const NLMISC::CVector& NL3D::CInstanceGroup::getGlobalPos   const [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 165 of file scene_group.h. +

+References _GlobalPos.

+

+ + + + +
+ + + + + + + + + + +
CInstanceGroup::CInstance & NL3D::CInstanceGroup::getInstance uint   instanceNb
+
+ + + + + +
+   + + +

+ +

+Definition at line 208 of file scene_group.cpp. +

+References _InstancesInfos.

+

+ + + + +
+ + + + + + + + + + +
const CInstanceGroup::CInstance & NL3D::CInstanceGroup::getInstance uint   instanceNb const
+
+ + + + + +
+   + + +

+ +

+Definition at line 202 of file scene_group.cpp. +

+References _InstancesInfos.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CInstanceGroup::getInstanceMatrix uint   instanceNb,
NLMISC::CMatrix  dest
const
+
+ + + + + +
+   + + +

+ +

+Definition at line 182 of file scene_group.cpp. +

+References getInstancePos, getInstanceRot, getInstanceScale, NLMISC::CMatrix::identity, NLMISC::CMatrix::rotate, NLMISC::CMatrix::scale, and NLMISC::CMatrix::translate.

+

+ + + + +
+ + + + + + + + + + +
const string & NL3D::CInstanceGroup::getInstanceName uint   instanceNb const
+
+ + + + + +
+   + + +

+Get the instance name. +

+ +

+Definition at line 150 of file scene_group.cpp. +

+References _InstancesInfos.

+

+ + + + +
+ + + + + + + + + + +
const sint32 NL3D::CInstanceGroup::getInstanceParent uint   instanceNb const
+
+ + + + + +
+   + + +

+ +

+Definition at line 194 of file scene_group.cpp. +

+References _InstancesInfos.

+

+ + + + +
+ + + + + + + + + + +
const CVector & NL3D::CInstanceGroup::getInstancePos uint   instanceNb const
+
+ + + + + +
+   + + +

+Get an instance position. +

+ +

+Definition at line 158 of file scene_group.cpp. +

+References _InstancesInfos. +

+Referenced by getInstanceMatrix.

+

+ + + + +
+ + + + + + + + + + +
const CQuat & NL3D::CInstanceGroup::getInstanceRot uint   instanceNb const
+
+ + + + + +
+   + + +

+Get an instance rotation. +

+ +

+Definition at line 166 of file scene_group.cpp. +

+References _InstancesInfos. +

+Referenced by getInstanceMatrix.

+

+ + + + +
+ + + + + + + + + + +
const CVector & NL3D::CInstanceGroup::getInstanceScale uint   instanceNb const
+
+ + + + + +
+   + + +

+ +

+Definition at line 174 of file scene_group.cpp. +

+References _InstancesInfos. +

+Referenced by getInstanceMatrix.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CInstanceGroup::getLights std::set< std::string > &   LightNames
+
+ + + + + +
+   + + +

+Get all lights (lightmaps) from an instance group. +

+

+

+ + + + +
+ + + + + + + + + +
uint NL3D::CInstanceGroup::getNumInstance   const
+
+ + + + + +
+   + + +

+Get number of instance in this group. +

+

+Todo:
+ remove all of these methods. For the moment DO NOT USE THEM !!!
+

+Definition at line 135 of file scene_group.cpp. +

+References _InstancesInfos.

+

+ + + + +
+ + + + + + + + + +
uint NL3D::CInstanceGroup::getNumPointLights   const [inline]
+
+ + + + + +
+   + + +

+Get the number of point lights. +

+ +

+Definition at line 320 of file scene_group.h. +

+References _PointLightArray.

+

+ + + + +
+ + + + + + + + + +
const std::vector<CPointLightNamed>& NL3D::CInstanceGroup::getPointLightList   const [inline]
+
+ + + + + +
+   + + +

+get the list of light. NB: the array is sorted by LightGroupName. +

+ +

+Definition at line 317 of file scene_group.h. +

+References _PointLightArray. +

+Referenced by retrieve.

+

+ + + + +
+ + + + + + + + + + +
CPointLightNamed& NL3D::CInstanceGroup::getPointLightNamed uint   index [inline]
+
+ + + + + +
+   + + +

+Get a mutable ref on a point light named. +

+ +

+Definition at line 323 of file scene_group.h. +

+References _PointLightArray, and index.

+

+ + + + +
+ + + + + + + + + +
CVector NL3D::CInstanceGroup::getPos  
+
+ + + + + +
+   + + +

+Get the position of the IG. +

+ +

+Definition at line 1089 of file scene_group.cpp. +

+References _Root.

+

+ + + + +
+ + + + + + + + + +
bool NL3D::CInstanceGroup::getRealTimeSunContribution   const [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 341 of file scene_group.h. +

+References _RealTimeSunContribution.

+

+ + + + +
+ + + + + + + + + +
CQuat NL3D::CInstanceGroup::getRotQuat  
+
+ + + + + +
+   + + +

+Get the rotation of the IG. +

+ +

+Definition at line 1098 of file scene_group.cpp. +

+References _Root.

+

+ + + + +
+ + + + + + + + + + +
const string & NL3D::CInstanceGroup::getShapeName uint   instanceNb const
+
+ + + + + +
+   + + +

+Get the name of the mesh referenced. +

+ +

+Definition at line 142 of file scene_group.cpp. +

+References _InstancesInfos. +

+Referenced by addToScene, addToSceneAsync, and stopAddToSceneAsync.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool NL3D::CInstanceGroup::getStaticLightSetup const std::string &   retrieverIdentifier,
sint   surfaceId,
const CVector &   localPos,
std::vector< CPointLightInfluence > &   pointLightList,
uint8  sunContribution,
NLMISC::CRGBA  localAmbient
[inline]
+
+ + + + + +
+   + + +

+See CIGSurfaceLight::getStaticLightSetup(). +

+ +

+Definition at line 332 of file scene_group.h. +

+References _IGSurfaceLight.

+

+ + + + +
+ + + + + + + + + + +
CTransformShape * NL3D::CInstanceGroup::getTransformShape uint   instanceNb const
+
+ + + + + +
+   + + +

+Get the instance added to the scene. +

+NULL if instanceNb too big, if addToScene not called, or if instance is DontAddToScene +

+Definition at line 214 of file scene_group.cpp. +

+References _Instances.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CInstanceGroup::linkRoot CScene  scene,
CTransform  father
+
+ + + + + +
+   + + +

+link the root of the ig to a node. No-op if not added to scene. Pass NULL to reset by default. +

+ +

+Definition at line 1107 of file scene_group.cpp. +

+References _Root, and NL3D::HrcTravId.

+

+ + + + +
+ + + + + + + + + + +
bool NL3D::CInstanceGroup::linkToParent CInstanceGroup *   pFather
+
+ + + + + +
+   + + +

+Look through all hierarchy our clusters that must be linked to our parent. +

+ +

+Definition at line 862 of file scene_group.cpp. +

+References _ClusterInstances. +

+Referenced by addToSceneWhenAllShapesLoaded.

+

+ + + + +
+ + + + + + + + + + +
bool NL3D::CInstanceGroup::removeFromScene CScene  scene
+
+ + + + + +
+   + + +

+Remove all the instances from the scene. +

+ +

+Definition at line 909 of file scene_group.cpp. +

+References _AddRemoveInstance, _ClusterInfos, _ClusterInstances, _Instances, _InstancesInfos, _PointLightArray, _Portals, _Root, NL3D::ClipTravId, and nlassert.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::CInstanceGroup::retrieve CVector &   vGlobalPos,
TInstanceArray  array,
std::vector< CCluster > &   Portals,
std::vector< CPortal > &   Clusters,
std::vector< CPointLightNamed > &   pointLightList
const
+
+ + + + + +
+   + + +

+Retreive group information. +

+NB: data may have changed, eg: order of lights. +

+Definition at line 329 of file scene_group.cpp. +

+References _ClusterInfos, _GlobalPos, _InstancesInfos, _Portals, and getPointLightList.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CInstanceGroup::serial NLMISC::IStream  f
+
+ + + + + +
+   + + +

+Serial the group. +

+ +

+Definition at line 354 of file scene_group.cpp. +

+References _ClusterInfos, _GlobalPos, _IGSurfaceLight, _InstancesInfos, _PointLightArray, _Portals, _RealTimeSunContribution, NLMISC::IStream::isReading, NLMISC::IStream::serial, NLMISC::IStream::serialCheck, NLMISC::IStream::serialCont, and NLMISC::IStream::serialVersion.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CInstanceGroup::setAddRemoveInstanceCallback IAddRemoveInstance  callback
+
+ + + + + +
+   + + +

+Set a callback to know when an instance has been added / removed. +

+ +

+Definition at line 466 of file scene_group.cpp. +

+References _AddRemoveInstance.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CInstanceGroup::setBlendShapeFactor const std::string &   BlendShapeName,
float   rFactor
+
+ + + + + +
+   + + +

+Set the blendshape factor for the whole instance group (0 -> 100). +

+

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CInstanceGroup::setClusterSystem CInstanceGroup *   pIG
+
+ + + + + +
+   + + +

+Set the cluster system to test for instances that are not in a cluster. +

+ +

+Definition at line 1040 of file scene_group.cpp. +

+References _ClusterSystem, _Instances, and _InstancesInfos.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CInstanceGroup::setDynamicPortal std::string &   name,
bool   opened
+
+ + + + + +
+   + + +

+Set the state of a dynamic portal (true=opened, false=closed). +

+ +

+Definition at line 1057 of file scene_group.cpp. +

+References _Portals.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CInstanceGroup::setIGAddBeginCallback IIGAddBegin  callback
+
+ + + + + +
+   + + +

+Set a callback to know when an instance group is being created, and how many instances it contains. +

+ +

+Definition at line 472 of file scene_group.cpp. +

+References _IGAddBeginCallback.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CInstanceGroup::setLightFactor const std::string &   LightName,
NLMISC::CRGBA   nFactor
+
+ + + + + +
+   + + +

+Set the lightmap factor for the whole instance group. +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CInstanceGroup::setPointLightFactor const std::string &   lightGroupName,
NLMISC::CRGBA   nFactor
+
+ + + + + +
+   + + +

+set the Light factor for all pointLights "lightGroupName". +

+ +

+Definition at line 1190 of file scene_group.cpp. +

+References _PointLightArray.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CInstanceGroup::setPos const CVector &   pos
+
+ + + + + +
+   + + +

+Set the position of the IG. +

+ +

+Definition at line 1074 of file scene_group.cpp. +

+References _Root. +

+Referenced by createRoot.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CInstanceGroup::setRotQuat const CQuat &   quat
+
+ + + + + +
+   + + +

+Set the rotation of the IG. +

+ +

+Definition at line 1082 of file scene_group.cpp. +

+References _Root.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CInstanceGroup::setTransformNameCallback ITransformName  pTN
+
+ + + + + +
+   + + +

+Setup the callback in charge of changing name at the addToScene moment. +

+ +

+Definition at line 459 of file scene_group.cpp. +

+References _TransformName.

+

+ + + + +
+ + + + + + + + + +
void NL3D::CInstanceGroup::stopAddToSceneAsync  
+
+ + + + + +
+   + + +

+ +

+Definition at line 806 of file scene_group.cpp. +

+References _AddToSceneSignal, _AddToSceneState, _AddToSceneTempScene, _InstancesInfos, _TransformName, getShapeName, StateAdding, and StateNotAdded.

+

+ + + + +
+ + + + + + + + + +
void NL3D::CInstanceGroup::unfreezeHRC  
+
+ + + + + +
+   + + +

+see CTransform::unfreezeHRC(). Do it for all instances (not clusters), and for the root of the IG. +

+ +

+Definition at line 1131 of file scene_group.cpp. +

+References _Instances, and _Root.

+


Member Data Documentation

+

+ + + + +
+ + +
IAddRemoveInstance* NL3D::CInstanceGroup::_AddRemoveInstance [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 395 of file scene_group.h. +

+Referenced by addToSceneWhenAllShapesLoaded, CInstanceGroup, removeFromScene, and setAddRemoveInstanceCallback.

+

+ + + + +
+ + +
bool NL3D::CInstanceGroup::_AddToSceneSignal [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 388 of file scene_group.h. +

+Referenced by addToSceneAsync, and stopAddToSceneAsync.

+

+ + + + +
+ + +
TState NL3D::CInstanceGroup::_AddToSceneState [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 389 of file scene_group.h. +

+Referenced by addToSceneAsync, addToSceneWhenAllShapesLoaded, CInstanceGroup, getAddToSceneState, and stopAddToSceneAsync.

+

+ + + + +
+ + +
IDriver* NL3D::CInstanceGroup::_AddToSceneTempDriver [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 391 of file scene_group.h. +

+Referenced by addToSceneAsync, and getAddToSceneState.

+

+ + + + +
+ + +
CScene* NL3D::CInstanceGroup::_AddToSceneTempScene [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 390 of file scene_group.h. +

+Referenced by addToSceneAsync, getAddToSceneState, and stopAddToSceneAsync.

+

+ + + + +
+ + +
CClipTrav* NL3D::CInstanceGroup::_ClipTrav +
+
+ + + + + +
+   + + +

+ +

+Definition at line 361 of file scene_group.h. +

+Referenced by addToSceneWhenAllShapesLoaded.

+

+ + + + +
+ + +
std::vector<CCluster> NL3D::CInstanceGroup::_ClusterInfos +
+
+ + + + + +
+   + + +

+ +

+Definition at line 356 of file scene_group.h. +

+Referenced by addToSceneWhenAllShapesLoaded, build, removeFromScene, retrieve, and serial.

+

+ + + + +
+ + +
std::vector<CCluster*> NL3D::CInstanceGroup::_ClusterInstances +
+
+ + + + + +
+   + + +

+ +

+Definition at line 357 of file scene_group.h. +

+Referenced by addCluster, addToSceneWhenAllShapesLoaded, linkToParent, and removeFromScene.

+

+ + + + +
+ + +
CInstanceGroup* NL3D::CInstanceGroup::_ClusterSystem +
+
+ + + + + +
+   + + +

+ +

+Definition at line 362 of file scene_group.h. +

+Referenced by addToSceneWhenAllShapesLoaded, CInstanceGroup, and setClusterSystem.

+

+ + + + +
+ + +
NLMISC::CVector NL3D::CInstanceGroup::_GlobalPos +
+
+ + + + + +
+   + + +

+ +

+Definition at line 364 of file scene_group.h. +

+Referenced by build, CInstanceGroup, getGlobalPos, retrieve, and serial.

+

+ + + + +
+ + +
IIGAddBegin* NL3D::CInstanceGroup::_IGAddBeginCallback [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 396 of file scene_group.h. +

+Referenced by addToScene, addToSceneAsync, CInstanceGroup, and setIGAddBeginCallback.

+

+ + + + +
+ + +
CIGSurfaceLight NL3D::CInstanceGroup::_IGSurfaceLight [private] +
+
+ + + + + +
+   + + +

+The object used to light dynamic models in town and buildings. +

+ +

+Definition at line 382 of file scene_group.h. +

+Referenced by build, CInstanceGroup, getStaticLightSetup, and serial.

+

+ + + + +
+ + +
std::vector<CTransformShape*> NL3D::CInstanceGroup::_Instances +
+
+ + + + + +
+   + + +

+ +

+Definition at line 353 of file scene_group.h. +

+Referenced by addToScene, addToSceneAsync, addToSceneWhenAllShapesLoaded, freezeHRC, getTransformShape, removeFromScene, setClusterSystem, and unfreezeHRC.

+

+ + + + +
+ + +
TInstanceArray NL3D::CInstanceGroup::_InstancesInfos +
+
+ + + + + +
+   + + +

+ +

+Definition at line 352 of file scene_group.h. +

+Referenced by addToScene, addToSceneAsync, addToSceneWhenAllShapesLoaded, build, buildPointLightList, getInstance, getInstanceName, getInstanceParent, getInstancePos, getInstanceRot, getInstanceScale, getNumInstance, getShapeName, removeFromScene, retrieve, serial, setClusterSystem, and stopAddToSceneAsync.

+

+ + + + +
+ + +
CPointLightNamedArray NL3D::CInstanceGroup::_PointLightArray [private] +
+
+ + + + + +
+   + + +

+Array of pointLights. +

+ +

+Definition at line 375 of file scene_group.h. +

+Referenced by addToSceneWhenAllShapesLoaded, buildPointLightList, getNumPointLights, getPointLightList, getPointLightNamed, removeFromScene, serial, and setPointLightFactor.

+

+ + + + +
+ + +
std::vector<CPortal> NL3D::CInstanceGroup::_Portals +
+
+ + + + + +
+   + + +

+ +

+Definition at line 355 of file scene_group.h. +

+Referenced by addToSceneWhenAllShapesLoaded, build, getDynamicPortal, getDynamicPortals, removeFromScene, retrieve, serial, and setDynamicPortal.

+

+ + + + +
+ + +
bool NL3D::CInstanceGroup::_RealTimeSunContribution [private] +
+
+ + + + + +
+   + + +

+RealTimeSunContribution. Used for ig_lighter and zone_ig_lighter. +

+ +

+Definition at line 372 of file scene_group.h. +

+Referenced by CInstanceGroup, enableRealTimeSunContribution, getRealTimeSunContribution, and serial.

+

+ + + + +
+ + +
CTransform* NL3D::CInstanceGroup::_Root +
+
+ + + + + +
+   + + +

+ +

+Definition at line 359 of file scene_group.h. +

+Referenced by addToSceneWhenAllShapesLoaded, CInstanceGroup, createRoot, freezeHRC, getPos, getRotQuat, linkRoot, removeFromScene, setPos, setRotQuat, and unfreezeHRC.

+

+ + + + +
+ + +
ITransformName* NL3D::CInstanceGroup::_TransformName [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 394 of file scene_group.h. +

+Referenced by addToScene, addToSceneAsync, CInstanceGroup, setTransformNameCallback, and stopAddToSceneAsync.

+


The documentation for this class was generated from the following files: + + + +
                                                                                                                                                                    +
+ + -- cgit v1.2.1