|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CInstanceGroupUser Class ReferenceImplementation of the user interface managing instance groups.
More...
#include <instance_group_user.h>
Inheritance diagram for NL3D::CInstanceGroupUser:
List of all members.
Public Methods |
| CInstanceGroupUser () |
bool | init (const std::string &instanceGroup) |
CInstanceGroup & | getInternalIG () |
Private Methods |
void | setTransformNameCallback (ITransformName *pTN) |
| Set up the callback used at loading and instanciating of the instanceGroup. More...
|
void | setAddRemoveInstanceCallback (IAddRemoveInstance *callback) |
| set a callback to know when an instance has been added / removed from scene. More...
|
void | setIGAddBeginCallback (IIGAddBegin *callback) |
| Set a callback to know when an instance group is being created, and how many instances it contains. More...
|
void | addToScene (class UScene &scene, UDriver *driver) |
| Add all the instances to the scene. More...
|
void | addToScene (class CScene &scene, IDriver *driver) |
void | addToSceneAsync (class UScene &scene, UDriver *driver) |
TState | getAddToSceneState () |
void | stopAddToSceneAsync () |
virtual void | setDistMax (uint instance, float dist) |
virtual float | getDistMax (uint instance) const |
virtual void | setCoarseMeshDist (uint instance, float dist) |
virtual float | getCoarseMeshDist (uint instance) const |
void | removeFromScene (class UScene &scene) |
| remove this instance group from the given scene. More...
|
uint | getNumInstance () const |
| Return the count of shape instance in this group. More...
|
const std::string & | getShapeName (uint instanceNb) const |
| Return the name of the shape refered by an instance of the group. More...
|
const std::string & | getInstanceName (uint instanceNb) const |
| Return the name of an instance of the group. More...
|
virtual void | getInstanceMatrix (uint instanceNb, NLMISC::CMatrix &dest) const |
| Return the transformation matrix of an instance in the group NB no pivot is added. More...
|
const NLMISC::CVector & | getInstancePos (uint instanceNb) const |
| Return the position of an instance of the group. More...
|
const NLMISC::CQuat & | getInstanceRot (uint instanceNb) const |
| Return the rotation of an instance of the group. More...
|
const NLMISC::CVector & | getInstanceScale (uint instanceNb) const |
| Return the scale of an instance of the group. More...
|
UInstance * | getByName (std::string &name) |
| Return the instance at a given position. More...
|
const UInstance * | getByName (std::string &name) const |
| Return the instance at a given position (const version). More...
|
void | setLightFactor (const std::string &LightName, NLMISC::CRGBA nFactor) |
| Control a lightmap. More...
|
void | setBlendShapeFactor (const std::string &bsName, float rFactor) |
| Control a blendshape. More...
|
void | createRoot (UScene &scene) |
| Create the link between scene and instance group before the addToScene to allow the instance group to be moved without being linked to a father cluster system. More...
|
void | setClusterSystem (UInstanceGroup *pClusterSystem) |
| All the instances must be checked against the following cluster system. More...
|
bool | linkToParentCluster (UInstanceGroup *father) |
| Link this ig clusters as sons of clusters of 'ig' that conatains them. More...
|
void | getDynamicPortals (std::vector< std::string > &names) |
| Get all dynamic portals in the instance group. More...
|
void | setDynamicPortal (std::string &name, bool opened) |
| Set the state of a dynamic portal. More...
|
bool | getDynamicPortal (std::string &name) |
| Get the state of a dynamic portal. More...
|
void | setPos (const NLMISC::CVector &pos) |
| Set the position of the instance group Take care if the instance group is a cluster system, you must not move it outside its father cluster which is assigned at addToScene moment. More...
|
void | setRotQuat (const NLMISC::CQuat &q) |
| Set the rotation of the instance group. More...
|
void | setPointLightFactor (const std::string &lightGroupName, NLMISC::CRGBA nFactor) |
| set the Light factor for all pointLights of "lightGroupName". More...
|
bool | getStaticLightSetup (const std::string &retrieverIdentifier, sint surfaceId, const NLMISC::CVector &localPos, std::vector< CPointLightInfluence > &pointLightList, uint8 &sunContribution, NLMISC::CRGBA &localAmbient) |
| get the StaticLightSetup for a model at position localPos/retrieverIdentifier/surfaceId. More...
|
NLMISC::CVector | getPos () |
| Get the position. More...
|
NLMISC::CQuat | getRotQuat () |
| Get the rotation. More...
|
virtual void | freezeHRC () |
| see UTransform::freezeHRC(). Do it for all instances (not clusters), and for the root of the IG. More...
|
virtual void | unfreezeHRC () |
| see UTransform::unfreezeHRC(). Do it for all instances (not clusters), and for the root of the IG. More...
|
Private Attributes |
CInstanceGroup | _InstanceGroup |
std::map< std::string, CInstanceUser * > | _Instances |
TState | _AddToSceneState |
UScene * | _AddToSceneTempScene |
UDriver * | _AddToSceneTempDriver |
Friends |
class | CTransformUser |
class | CSceneUser |
Detailed Description
Implementation of the user interface managing instance groups.
-
Author:
-
Cyril 'Hulud' Corvazier , Nevrax France
-
Date:
-
2001
Definition at line 55 of file instance_group_user.h.
Constructor & Destructor Documentation
NL3D::CInstanceGroupUser::CInstanceGroupUser |
( |
|
) |
|
|
Member Function Documentation
void NL3D::CInstanceGroupUser::addToScene |
( |
class CScene & |
scene, |
|
|
IDriver * |
driver |
|
) |
[private] |
|
void NL3D::CInstanceGroupUser::addToScene |
( |
class UScene & |
scene, |
|
|
UDriver * |
driver |
|
) |
[private, virtual] |
|
|
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. |
Implements NL3D::UInstanceGroup.
Definition at line 156 of file instance_group_user.cpp.
References CSceneUser. |
void NL3D::CInstanceGroupUser::addToSceneAsync |
( |
class UScene & |
scene, |
|
|
UDriver * |
driver |
|
) |
[private, virtual] |
|
void NL3D::CInstanceGroupUser::createRoot |
( |
UScene & |
scene |
) |
[private, virtual] |
|
void NL3D::CInstanceGroupUser::freezeHRC |
( |
|
) |
[private, virtual] |
|
const UInstance * NL3D::CInstanceGroupUser::getByName |
( |
std::string & |
name |
) |
const [private, virtual] |
|
UInstance * NL3D::CInstanceGroupUser::getByName |
( |
std::string & |
name |
) |
[private, virtual] |
|
float NL3D::CInstanceGroupUser::getCoarseMeshDist |
( |
uint |
instance |
) |
const [private, virtual] |
|
float NL3D::CInstanceGroupUser::getDistMax |
( |
uint |
instance |
) |
const [private, virtual] |
|
bool NL3D::CInstanceGroupUser::getDynamicPortal |
( |
std::string & |
name |
) |
[private, virtual] |
|
void NL3D::CInstanceGroupUser::getDynamicPortals |
( |
std::vector< std::string > & |
names |
) |
[private, virtual] |
|
void NL3D::CInstanceGroupUser::getInstanceMatrix |
( |
uint |
instanceNb, |
|
|
NLMISC::CMatrix & |
dest |
|
) |
const [private, virtual] |
|
const std::string & NL3D::CInstanceGroupUser::getInstanceName |
( |
uint |
instanceNb |
) |
const [private, virtual] |
|
const NLMISC::CVector & NL3D::CInstanceGroupUser::getInstancePos |
( |
uint |
instanceNb |
) |
const [private, virtual] |
|
const NLMISC::CQuat & NL3D::CInstanceGroupUser::getInstanceRot |
( |
uint |
instanceNb |
) |
const [private, virtual] |
|
const NLMISC::CVector & NL3D::CInstanceGroupUser::getInstanceScale |
( |
uint |
instanceNb |
) |
const [private, virtual] |
|
uint NL3D::CInstanceGroupUser::getNumInstance |
( |
|
) |
const [private, virtual] |
|
CVector NL3D::CInstanceGroupUser::getPos |
( |
|
) |
[private, virtual] |
|
CQuat NL3D::CInstanceGroupUser::getRotQuat |
( |
|
) |
[private, virtual] |
|
const std::string & NL3D::CInstanceGroupUser::getShapeName |
( |
uint |
instanceNb |
) |
const [private, virtual] |
|
bool NL3D::CInstanceGroupUser::init |
( |
const std::string & |
instanceGroup |
) |
|
|
bool NL3D::CInstanceGroupUser::linkToParentCluster |
( |
UInstanceGroup * |
father |
) |
[private, virtual] |
|
void NL3D::CInstanceGroupUser::removeFromScene |
( |
class UScene & |
scene |
) |
[private, virtual] |
|
void NL3D::CInstanceGroupUser::setAddRemoveInstanceCallback |
( |
IAddRemoveInstance * |
callback |
) |
[private, virtual] |
|
void NL3D::CInstanceGroupUser::setBlendShapeFactor |
( |
const std::string & |
bsName, |
|
|
float |
rFactor |
|
) |
[private, virtual] |
|
void NL3D::CInstanceGroupUser::setClusterSystem |
( |
UInstanceGroup * |
pClusterSystem |
) |
[private, virtual] |
|
void NL3D::CInstanceGroupUser::setCoarseMeshDist |
( |
uint |
instance, |
|
|
float |
dist |
|
) |
[private, virtual] |
|
void NL3D::CInstanceGroupUser::setDistMax |
( |
uint |
instance, |
|
|
float |
dist |
|
) |
[private, virtual] |
|
void NL3D::CInstanceGroupUser::setDynamicPortal |
( |
std::string & |
name, |
|
|
bool |
opened |
|
) |
[private, virtual] |
|
void NL3D::CInstanceGroupUser::setIGAddBeginCallback |
( |
IIGAddBegin * |
callback |
) |
[private, virtual] |
|
void NL3D::CInstanceGroupUser::setLightFactor |
( |
const std::string & |
LightName, |
|
|
NLMISC::CRGBA |
nFactor |
|
) |
[private, virtual] |
|
void NL3D::CInstanceGroupUser::setPointLightFactor |
( |
const std::string & |
lightGroupName, |
|
|
NLMISC::CRGBA |
nFactor |
|
) |
[private, virtual] |
|
void NL3D::CInstanceGroupUser::setPos |
( |
const NLMISC::CVector & |
pos |
) |
[private, virtual] |
|
void NL3D::CInstanceGroupUser::setRotQuat |
( |
const NLMISC::CQuat & |
q |
) |
[private, virtual] |
|
void NL3D::CInstanceGroupUser::setTransformNameCallback |
( |
ITransformName * |
pTN |
) |
[private, virtual] |
|
void NL3D::CInstanceGroupUser::stopAddToSceneAsync |
( |
|
) |
[private, virtual] |
|
void NL3D::CInstanceGroupUser::unfreezeHRC |
( |
|
) |
[private, virtual] |
|
Friends And Related Function Documentation
friend class CSceneUser [friend]
|
|
friend class CTransformUser [friend]
|
|
Member Data Documentation
TState NL3D::CInstanceGroupUser::_AddToSceneState [private]
|
|
UDriver* NL3D::CInstanceGroupUser::_AddToSceneTempDriver [private]
|
|
UScene* NL3D::CInstanceGroupUser::_AddToSceneTempScene [private]
|
|
|
Definition at line 119 of file instance_group_user.h.
Referenced by addToScene, addToSceneAsync, createRoot, freezeHRC, getAddToSceneState, getCoarseMeshDist, getDistMax, getDynamicPortal, getDynamicPortals, getInstanceMatrix, getInstanceName, getInstancePos, getInstanceRot, getInstanceScale, getInternalIG, getNumInstance, getPos, getRotQuat, getShapeName, getStaticLightSetup, init, linkToParentCluster, removeFromScene, setAddRemoveInstanceCallback, setBlendShapeFactor, setClusterSystem, setCoarseMeshDist, setDistMax, setDynamicPortal, setIGAddBeginCallback, setLightFactor, setPointLightFactor, setPos, setRotQuat, setTransformNameCallback, stopAddToSceneAsync, and unfreezeHRC. |
std::map<std::string,CInstanceUser*> NL3D::CInstanceGroupUser::_Instances [private]
|
|
The documentation for this class was generated from the following files:
|
|