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/a02909.html | 11321 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 11321 insertions(+) create mode 100644 docs/doxygen/nel/a02909.html (limited to 'docs/doxygen/nel/a02909.html') diff --git a/docs/doxygen/nel/a02909.html b/docs/doxygen/nel/a02909.html new file mode 100644 index 00000000..830fbf1d --- /dev/null +++ b/docs/doxygen/nel/a02909.html @@ -0,0 +1,11321 @@ + + +NeL: NL3D::CMeshMRMSkinnedInstance class Reference + + + +
+

NL3D::CMeshMRMSkinnedInstance Class Reference

#include <mesh_mrm_skinned_instance.h> +

+

Inheritance diagram for NL3D::CMeshMRMSkinnedInstance: +

+ +NL3D::CMeshBaseInstance +NL3D::CTransformShape +NL3D::CTransform +NLMISC::CRefCount +NL3D::ITransformable +NL3D::IAnimatable + +

Detailed Description

+An instance of CMeshMRMSkinned. no special traverse, since same functionnality as CMeshBaseInstance.
Author:
Lionel Berenguier

+Nevrax France

+
Date:
2001
+ +

+ +

+Definition at line 59 of file mesh_mrm_skinned_instance.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

IAnimatable Interface (registering only IAnimatable sons).

enum  TAnimValues { OwnerBit = CTransformShape::AnimValueLast, +AnimValueLast + }
 Added values. More...

virtual void registerToChannelMixer (CChannelMixer *chanMixer, const std::string &prefix)

[NOHEADER]

uint32 isNeedUpdateFrozenStaticLightSetup () const
 non-zero if the object has a FrozenStaticLightSetup not correclty updated.

uint32 isNeedUpdateLighting () const
 non-zero if the object needs to updatelighting.

CLightContribution _LightContribution
 The contribution of all lights. This enlarge the struct only of approx 15%.

CLightingManager::CQGItLightedModel _LightedModelIt
 each transform may be in a quadGird of lighted models (see CLightingManager)


Hrc Traversal

void updateClipTravForAncestorSkeleton ()
void updateWorld ()
 Update the world state according to the parent world state and the local states.

CSkeletonModel_AncestorSkeletonModel
bool _ClipLinkedInSonsOfAncestorSkeletonModelGroup
bool _DontUnfreezeChildren
bool _Frozen
sint64 _LocalDate
CMatrix _LocalMatrix
 Hrc IN variables.

CHrcTrav::TVisibility _LocalVis
sint64 _WorldDate
CMatrix _WorldMatrix
 Hrc OUT variables.

bool _WorldVis

Public Types

enum  TTransformMode { DirectMatrix = 0, +RotEuler, +RotQuat, +TransformModeCount + }

Public Member Functions

virtual bool canStartStop ()
 Test if there is a start/stop caps in the objects (some fxs such as remanence).

bool compareMatrixDate (uint64 callerDate) const
void freeze ()
void freezeHRC ()
virtual void getAABBox (NLMISC::CAABBox &bbox) const
CSkeletonModelgetAncestorSkeletonModel () const
bool getChannelMixerOwnerShip () const
CInstanceGroupgetClusterSystem ()
float getDistMax () const
bool getForceClipRoot () const
CLightContributiongetLightContribution ()
virtual void getLightHotSpotInWorld (CVector &modelPos, float &modelRadius) const
const CMatrixgetMatrix () const
 Get the matrix, compute her if necessary (work in all modes).

uint64 getMatrixDate () const
uint getOrderingLayer () const
 Get the ordering layer.

CScenegetOwnerScene () const
 get the scene which has created us

const sintgetRefCount () const
CSkeletonModelgetSkeletonModel () const
 Get the skeleton model. Returnr NULL in normal mode.

bool getUserClipping () const
 Return the user clipping state.

CHrcTrav::TVisibility getVisibility ()
 Get the local visibility state.

const CMatrixgetWorldMatrix () const
void heritVisibility ()
 herit the visibility from his father. (default behavior).

void hide ()
 Hide the object and his sons.

void initAnimatedLightIndex (const CScene &scene)
bool isClipVisible () const
bool isHrcVisible () const
bool isLinkToQuadCluster () const
 true if the model is linked to a quadCluster

uint32 isOpaque ()
uint32 isQuadGridClipEnabled () const
virtual bool isStarted () const
uint32 isTransparent ()
void selectTextureSet (uint id)
void setChannelMixerOwnerShip (bool enable=true)
void setClusterSystem (CInstanceGroup *pCS)
void setDistMax (float distMax)
void setDontUnfreezeChildren (bool val)
void setForceClipRoot (bool forceClipRoot)
void setLogicInfo (ILogicInfo *logicInfo)
void setOpacity (bool v)
void setOrderingLayer (uint layer)
void setTransparency (bool v)
void setUserClipping (bool enable)
void setWorldMatrix (const CMatrix &mat)
void show ()
 Show the objet and his sons.

virtual void start ()
virtual void stop ()
void unfreezeHRC ()

Static Public Member Functions

const char * getPivotValueName ()
const char * getPosValueName ()
const char * getRotEulerValueName ()
const char * getRotQuatValueName ()
const char * getScaleValueName ()
void registerBasic ()
 Call at the begining of the program, to register the model.


Data Fields

float _VPWindTreePhase
 CMeshVPWindTree instance specific part.

std::vector< CAsyncTextureBlockAsyncTextures
sint crefs
std::vector< CMaterialMaterials
CPtrInfo * pinfo
CSmartPtr< IShapeShape
 The shape, the object instancied.


Static Public Attributes

CPtrInfo NullPtrInfo

Protected Member Functions

sint addValue (CChannelMixer *chanMixer, uint valueId, uint ownerValueId, const std::string &prefix, bool detail)
void clearFlag (uint valueId)
 This method clear a bit in the bitset.

 CMeshMRMSkinnedInstance ()
 Constructor.

void forceCompute ()
CChannelMixergetChannelMixer () const
bool getShowWhenLODSticked () const
 Test if obj must be displayed when sticked to an object displayed as a LOD (example: sword in hand of a character displayed as a LOD state).

void initRenderFilterType ()
void setFlag (uint valueId)
 This method set a bit in the bitset.

void setupCurrentLightContribution (CLightContribution *lightContrib, bool useLocalAtt)
virtual void unlinkFromQuadCluster ()
 special feature for CQuadGridClipManager. remove from it.

virtual ~CMeshMRMSkinnedInstance ()
 Destructor.

Load balancing methods
virtual void changeMRMDistanceSetup (float distanceFinest, float distanceMiddle, float distanceCoarsest)
virtual const CMRMLevelDetailgetMRMLevelDetail () const
Skinning Behavior.
virtual const std::vector<
+ NLMISC::CBSphere > * 
getSkinBoneSphere () const
 Called for more precise clipping.

virtual const std::vector<
+ sint32 > * 
getSkinBoneUsage () const
 Called for lod character coloring.

virtual bool isSkinnable () const
 I can be skinned if the mesh is.

virtual sint renderShadowSkinGeom (uint remainingVertices, uint8 *vbDest)
 Called for more precise clipping.

virtual void renderShadowSkinPrimitives (CMaterial &castMat, IDriver *drv, uint baseVertex)
 Called for more precise clipping.

virtual void renderSkin (float alphaMRM)
 Implementation of the renderSkin.

virtual sint renderSkinGroupGeom (float alphaMRM, uint remainingVertices, uint8 *dest)
 Called for more precise clipping.

virtual void renderSkinGroupPrimitives (uint baseVertex, std::vector< CSkinSpecularRdrPass > &specularRdrPasses, uint skinIndex)
 Called for more precise clipping.

virtual void renderSkinGroupSpecularRdrPass (uint rdrPassId)
 Called for more precise clipping.

virtual void setApplySkin (bool state)
 Called when the skin is applied on the skeleton.

virtual bool supportShadowSkinGrouping () const
 Called for more precise clipping.

virtual bool supportSkinGrouping () const
 Called for more precise clipping.


Protected Attributes

uint32 _RenderFilterType

Private Member Functions

void clearRawSkinCache ()
 Reset the RawSkin Info.

void clearShiftedTriangleCache ()
 Reset the _ShiftedTriangleCache Info.


Static Private Member Functions

CTransformcreator ()

Private Attributes

CRawSkinnedNormalCache_RawSkinCache
 Used by CMeshMRMSkinnedGeom. This a cache for skinning objects, for skinning optimisation.

CShiftedTriangleCache_ShiftedTriangleCache
 Used by CMeshMRMSkinnedGeom. This a cache for skinning objects, for skinning optimisation.


Friends

class CMeshMRMSkinned
class CMeshMRMSkinnedGeom
struct CPtrInfo
+


Member Enumeration Documentation

+

+ + + + +
+ + +
enum NL3D::CMeshBaseInstance::TAnimValues [inherited] +
+
+ + + + + +
+   + + +

+Added values. +

+

Enumeration values:
+ + + +
OwnerBit  +
AnimValueLast  +
+
+ +

+Reimplemented from NL3D::ITransformable. +

+Definition at line 87 of file mesh_base_instance.h. +

+

00088         {
+00089                 OwnerBit= CTransformShape::AnimValueLast, 
+00090 
+00091                 AnimValueLast,
+00092         };
+
+

+ + + + +
+ + +
enum NL3D::ITransformable::TTransformMode [inherited] +
+
+ + + + + +
+   + + +

+

Enumeration values:
+ + + + + +
DirectMatrix  +
RotEuler  +
RotQuat  +
TransformModeCount  +
+
+ +

+Definition at line 58 of file transformable.h. +

+Referenced by NL3D::ITransformable::getTransformMode(). +

+

00059         {
+00060                 DirectMatrix=0,         // DirectMatrixMode.
+00061                 RotEuler,                       // Matrix is computed from sperated composantes, with euler rotation.
+00062                 RotQuat,                        // Matrix is computed from sperated composantes, with quat rotation (default).
+00063 
+00064                 TransformModeCount
+00065         };
+
+


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + +
NL3D::CMeshMRMSkinnedInstance::CMeshMRMSkinnedInstance  )  [inline, protected]
+
+ + + + + +
+   + + +

+Constructor. +

+ +

+Definition at line 67 of file mesh_mrm_skinned_instance.h. +

+

00068         {
+00069                 _RawSkinCache= NULL;
+00070                 _ShiftedTriangleCache= NULL;
+00071         }
+
+

+ + + + +
+ + + + + + + + + +
NL3D::CMeshMRMSkinnedInstance::~CMeshMRMSkinnedInstance  )  [protected, virtual]
+
+ + + + + +
+   + + +

+Destructor. +

+ +

+Definition at line 45 of file mesh_mrm_skinned_instance.cpp. +

+References NL3D::CSkeletonModel::detachSkeletonSon(), and nlassert. +

+

00046 {
+00047         // Auto detach me from skeleton. Must do it here, not in ~CTransform().
+00048         if(_FatherSkeletonModel)
+00049         {
+00050                 // detach me from the skeleton.
+00051                 // hrc and clip hierarchy is modified.
+00052                 _FatherSkeletonModel->detachSkeletonSon(this);
+00053                 nlassert(_FatherSkeletonModel==NULL);
+00054                 // If skinned, setApplySkin(false) should have been called through detachSkeletonSon()
+00055                 nlassert(_RawSkinCache== NULL);
+00056                 nlassert(_ShiftedTriangleCache== NULL);
+00057         }
+00058 }
+
+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
sint NL3D::IAnimatable::addValue CChannelMixer chanMixer,
uint  valueId,
uint  ownerValueId,
const std::string &  prefix,
bool  detail
[protected, inherited]
+
+ + + + + +
+   + + +

+This is a tool function which add a given value to a channel.

Returns:
-1 if the track was not found in the animationSet, else it return the channelId as if returned by CAnimationSet::getChannelIdByName(channelName).
+ +

+Definition at line 37 of file animatable.cpp. +

+References NL3D::CChannelMixer::addChannel(), NL3D::IAnimatable::getDefaultTrack(), NL3D::IAnimatable::getValue(), NL3D::IAnimatable::getValueName(), nlassert, sint, and uint. +

+Referenced by NL3D::CTransform::registerToChannelMixer(), NL3D::CParticleSystemModel::registerToChannelMixer(), NL3D::CCamera::registerToChannelMixer(), NL3D::CBone::registerToChannelMixer(), NL3D::CAnimatedMorph::registerToChannelMixer(), NL3D::CAnimatedMaterial::registerToChannelMixer(), and NL3D::CAnimatedLightmap::registerToChannelMixer(). +

+

00038 {
+00039         nlassert(chanMixer);
+00040         return chanMixer->addChannel(prefix+getValueName(valueId), this, getValue(valueId), getDefaultTrack(valueId), valueId, ownerValueId, detail);
+00041 }
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CTransform::canCastShadowMap  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+true if the instance cast shadow. By default false +

+ +

+Definition at line 470 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), and NL3D::CTransform::IsFinalShadowMapCaster. +

+Referenced by NL3D::CClipTrav::clipSkeletonShadowMaps(), NL3D::CTransform::enableCastShadowMap(), NL3D::CTransform::setGeneratingShadowMap(), and NL3D::CMeshInstance::traverseRender(). +

+

00470 {return getStateFlag(IsFinalShadowMapCaster)!=0;}
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CTransform::canReceiveShadowMap  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+true if the instance receive shadow. By default false +

+ +

+Definition at line 477 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), and NL3D::CTransform::IsFinalShadowMapReceiver. +

+Referenced by NL3D::CLandscapeUser::canReceiveShadowMap(), and NL3D::CLandscapeModel::traverseRender(). +

+

00477 {return getStateFlag(IsFinalShadowMapReceiver)!=0;}
+
+

+ + + + +
+ + + + + + + + + +
virtual bool NL3D::CTransformShape::canStartStop  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+Test if there is a start/stop caps in the objects (some fxs such as remanence). +

+ +

+Reimplemented in NL3D::CSegRemanence. +

+Definition at line 126 of file transform_shape.h. +

+Referenced by NL3D::CInstanceUser::canStartStop(). +

+

00126 { return false; }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransformShape::changeLightSetup CRenderTrav rdrTrav  )  [inherited]
+
+ + + + + +
+   + + +

+setup lighting for this instance into driver. The traverseRender(). +

+ +

+Definition at line 105 of file transform_shape.cpp. +

+References NL3D::CTransformShape::_CurrentLightContribution, NL3D::CTransformShape::_CurrentUseLocalAttenuation, and NL3D::CRenderTrav::changeLightSetup(). +

+Referenced by NL3D::CMeshMRMGeom::activeInstance(), NL3D::CMeshGeom::activeInstance(), NL3D::CSkeletonModel::renderSkins(), and NL3D::CTransformShape::traverseRender(). +

+

00106 {
+00107         // setup the instance lighting.
+00108         rdrTrav->changeLightSetup(_CurrentLightContribution, _CurrentUseLocalAttenuation);
+00109 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::CMeshMRMSkinnedInstance::changeMRMDistanceSetup float  distanceFinest,
float  distanceMiddle,
float  distanceCoarsest
[protected, virtual]
+
+ + + + + +
+   + + +

+Change MRM Distance setup. See CMeshBaseInstance::changeMRMDistanceSetup() +

+Reimplemented from NL3D::CMeshBaseInstance. +

+Definition at line 110 of file mesh_mrm_skinned_instance.cpp. +

+References NL3D::CMeshMRMSkinned::changeMRMDistanceSetup(). +

+

00111 {
+00112         if(Shape)
+00113         {
+00114                 // Get a pointer on the shape.
+00115                 CMeshMRMSkinned *pMesh = NLMISC::safe_cast<CMeshMRMSkinned *>((IShape*)Shape);
+00116                 // Affect the mesh directly.
+00117                 pMesh->changeMRMDistanceSetup(distanceFinest, distanceMiddle, distanceCoarsest);
+00118         }
+00119 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::IAnimatable::clearFlag uint  valueId  )  [inline, protected, inherited]
+
+ + + + + +
+   + + +

+This method clear a bit in the bitset. +

+ +

+Definition at line 233 of file animatable.h. +

+References NL3D::IAnimatable::_BitSet, and uint. +

+Referenced by NL3D::ITransformable::clearTransformFlags(), NL3D::CParticleSystemModel::doAnimate(), and NL3D::CAnimatedMaterial::update(). +

+

00234         {
+00235                 _BitSet&= ~(1<<valueId);
+00236         }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CMeshMRMSkinnedInstance::clearRawSkinCache  )  [private]
+
+ + + + + +
+   + + +

+Reset the RawSkin Info. +

+ +

+Definition at line 69 of file mesh_mrm_skinned_instance.cpp. +

+Referenced by setApplySkin(), and NL3D::CMeshMRMSkinnedGeom::updateRawSkinNormal(). +

+

00070 {
+00071         delete  _RawSkinCache;
+00072         _RawSkinCache= NULL;
+00073 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CMeshMRMSkinnedInstance::clearShiftedTriangleCache  )  [private]
+
+ + + + + +
+   + + +

+Reset the _ShiftedTriangleCache Info. +

+ +

+Definition at line 76 of file mesh_mrm_skinned_instance.cpp. +

+Referenced by setApplySkin(), and NL3D::CMeshMRMSkinnedGeom::updateShiftedTriangleCache(). +

+

00077 {
+00078         delete  _ShiftedTriangleCache;
+00079         _ShiftedTriangleCache= NULL;
+00080 }
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CTransformShape::clip  )  [virtual, inherited]
+
+ + + + + +
+   + + +

+clip method called by traverseClip(). deafult is always visible +

+ +

+Reimplemented from NL3D::CTransform. +

+Reimplemented in NL3D::CParticleSystemModel, and NL3D::CWaterModel. +

+Definition at line 141 of file transform_shape.cpp. +

+References NL3D::CTravCameraScene::CamPos, NL3D::CClipTrav::ForceNoFrustumClip, NL3D::CScene::getClipTrav(), NL3D::CTransformShape::getDistMax(), NL3D::CTransform::getOwnerScene(), NLMISC::CMatrix::getPos(), NL3D::CTransform::getWorldMatrix(), H_AUTO, NL3D::CTransformShape::Shape, and NL3D::CClipTrav::WorldPyramid. +

+

00142 {
+00143         H_AUTO( NL3D_TrShape_Clip );
+00144 
+00145         CClipTrav                       &clipTrav= getOwnerScene()->getClipTrav();
+00146 
+00147         if(Shape)
+00148         {
+00149                 // first test DistMax (faster).
+00150                 float maxDist = getDistMax();
+00151                 // if DistMax test enabled
+00152                 if(maxDist!=-1)
+00153                 {
+00154                         // Calc the distance
+00155                         float sqrDist = (clipTrav.CamPos - getWorldMatrix().getPos()).sqrnorm ();
+00156                         maxDist*=maxDist;
+00157                         
+00158                         // if dist > maxDist, skip
+00159                         if (sqrDist > maxDist)
+00160                         {
+00161                                 // Ok, not shown
+00162                                 return false;
+00163                         }
+00164                 }
+00165 
+00166                 // Else finer clip with pyramid, only if needed
+00167                 if(clipTrav.ForceNoFrustumClip)
+00168                         return true;
+00169                 else
+00170                         return Shape->clip(clipTrav.WorldPyramid, getWorldMatrix());
+00171         }
+00172         else
+00173                 return false;
+00174 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::clipAddChild CTransform son  )  [inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 1217 of file transform.cpp. +

+References NL3D::CTransform::_ClipParents, NL3D::CTransform::_ClipSons, NL3D::CTransform::clipHasParent(), NL3D::CTransform::CClipNode::ClipNode, NL3D::CFastPtrList< CTransform >::insert(), and NL3D::CTransform::CClipNode::Parent. +

+Referenced by NL3D::CScene::createModel(), NL3D::CSkeletonModel::detachSkeletonSon(), NL3D::CLandscapeModel::initModel(), NL3D::CScene::initQuadGridClipManager(), NL3D::CQuadGridClipClusterListDist::resetSons(), NL3D::CClipTrav::traverse(), and NL3D::CTransform::updateClipTravForAncestorSkeleton(). +

+

01218 {
+01219         if(!son)
+01220                 return;
+01221 
+01222         // if already linked, no-op.
+01223         if(son->clipHasParent(this))
+01224                 return;
+01225 
+01226         // add a new parent entry for our son.
+01227         CClipNode       *clipNode= new CClipNode;
+01228         son->_ClipParents.push_back(clipNode);
+01229 
+01230         // link the son to us
+01231         clipNode->Parent= this;
+01232 
+01233         // link us to the son 
+01234         _ClipSons.insert(son, &clipNode->ClipNode);
+01235 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::clipDelChild CTransform son  )  [inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 1238 of file transform.cpp. +

+References NL3D::CTransform::clipDelFromParent(). +

+Referenced by NL3D::CScene::initDefaultRoots(), NL3D::CLandscapeModel::initModel(), NL3D::CClipTrav::traverse(), and NL3D::CTransform::~CTransform(). +

+

01239 {
+01240         if(!son)
+01241                 return;
+01242 
+01243         // try to remove from me from my parent
+01244         son->clipDelFromParent(this);
+01245 }
+
+

+ + + + +
+ + + + + + + + + + +
CTransform * NL3D::CTransform::clipGetChild uint  index  )  const [inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 1265 of file transform.cpp. +

+References NL3D::CTransform::_ClipSons, index, nlassert, NL3D::CFastPtrList< CTransform >::size(), and uint. +

+Referenced by NL3D::CCluster::recursTraverseClip(), NL3D::CTransform::traverseClip(), NL3D::CRootModel::traverseClip(), NL3D::CParticleSystemModel::traverseClip(), and NL3D::CTransform::~CTransform(). +

+

01266 {
+01267         nlassert(index < _ClipSons.size());
+01268         return (const_cast<CTransform*>(this))->_ClipSons.begin()[index];
+01269 }
+
+

+ + + + +
+ + + + + + + + + +
uint NL3D::CTransform::clipGetNumChildren  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 237 of file transform.h. +

+References NL3D::CTransform::_ClipSons, NL3D::CFastPtrList< CTransform >::size(), and uint. +

+Referenced by NL3D::CCluster::recursTraverseClip(), NL3D::CTransform::traverseClip(), NL3D::CRootModel::traverseClip(), NL3D::CParticleSystemModel::traverseClip(), and NL3D::CTransform::~CTransform(). +

+

00237 {return _ClipSons.size();}
+
+

+ + + + +
+ + + + + + + + + +
uint NL3D::CTransform::clipGetNumParents  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 234 of file transform.h. +

+References NL3D::CTransform::_ClipParents, and uint. +

+Referenced by NL3D::CTransform::clipUnlinkFromAll(), NL3D::CClipTrav::traverse(), and NL3D::CTransform::updateClipTravForAncestorSkeleton(). +

+

00234 {return _ClipParents.size();}
+
+

+ + + + +
+ + + + + + + + + + +
CTransform * NL3D::CTransform::clipGetParent uint  index  )  const [inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 1258 of file transform.cpp. +

+References NL3D::CTransform::_ClipParents, index, nlassert, and uint. +

+Referenced by NL3D::CTransform::clipUnlinkFromAll(), NL3D::CClipTrav::traverse(), and NL3D::CTransform::updateClipTravForAncestorSkeleton(). +

+

01259 {
+01260         nlassert(index < _ClipParents.size());
+01261         return _ClipParents[index]->Parent;
+01262 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransform::clipUnlinkFromAll  )  [inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 1248 of file transform.cpp. +

+References NL3D::CTransform::clipDelFromParent(), NL3D::CTransform::clipGetNumParents(), and NL3D::CTransform::clipGetParent(). +

+Referenced by NL3D::CSkeletonModel::bindSkin(), NL3D::CScene::initQuadGridClipManager(), NL3D::CTransform::updateClipTravForAncestorSkeleton(), and NL3D::CTransform::~CTransform(). +

+

01249 {
+01250         // unlink from all parent clip
+01251         while( clipGetNumParents() )
+01252         {
+01253                 clipDelFromParent( clipGetParent(0) );
+01254         }
+01255 }
+
+

+ + + + +
+ + + + + + + + + + +
bool NL3D::ITransformable::compareMatrixDate uint64  callerDate  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Tells if the LocalMatrix is newer than what caller except. This return true either if the matrix components (pos/rot etc...) are touched, or if matrix is newer than caller date. +

+Definition at line 82 of file transformable.h. +

+References NL3D::ITransformable::_LocalMatrixDate, NL3D::ITransformable::needCompute(), and uint64. +

+Referenced by NL3D::CWaterModel::updateDiffuseMapMatrix(). +

+

00083         {
+00084                 return callerDate<_LocalMatrixDate || needCompute();
+00085         }
+
+

+ + + + +
+ + + + + + + + + + +
virtual bool NL3D::CTransform::computeWorldBBoxForShadow NLMISC::CAABBox worldBB  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+Special For Skeleton Caster. When Skeletons cast shadows, they first compute the WorldBBox. The model should compute its bbox in World (best fit).

Returns:
false if the model don't support it (default), or if hidden in HRC!!
+ +

+Reimplemented in NL3D::CMeshInstance, and NL3D::CSkeletonModel. +

+Definition at line 521 of file transform.h. +

+Referenced by NL3D::CSkeletonModel::computeWorldBBoxForShadow(). +

+

00521 {return false;}
+
+

+ + + + +
+ + + + + + + + + +
virtual void NL3D::CTransform::createShadowMap  )  [inline, protected, virtual, inherited]
+
+ + + + + +
+   + + +

+To implement for ShadowCaster support. typically allocate a CShadowMap and store NB: the texture doesn't have to be inited at this time. Update it each frame in generateShadowMap() +

+Reimplemented in NL3D::CMeshInstance, and NL3D::CSkeletonModel. +

+Definition at line 902 of file transform.h. +

+Referenced by NL3D::CTransform::enableCastShadowMap(). +

+

00902 {}
+
+

+ + + + +
+ + + + + + + + + +
CTransform* NL3D::CMeshMRMSkinnedInstance::creator  )  [inline, static, private]
+
+ + + + + +
+   + + +

+ +

+Reimplemented from NL3D::CMeshBaseInstance. +

+Definition at line 122 of file mesh_mrm_skinned_instance.h. +

+

00122 {return new CMeshMRMSkinnedInstance;}
+
+

+ + + + +
+ + + + + + + + + +
virtual void NL3D::CTransform::deleteShadowMap  )  [inline, protected, virtual, inherited]
+
+ + + + + +
+   + + +

+To implement for ShadowCaster support. typically free the shadowMap. +

+ +

+Reimplemented in NL3D::CMeshInstance, and NL3D::CSkeletonModel. +

+Definition at line 904 of file transform.h. +

+Referenced by NL3D::CTransform::enableCastShadowMap(). +

+

00904 {}
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CMeshBaseInstance::enableAsyncTextureMode bool  enable  )  [inherited]
+
+ + + + + +
+   + + +

+if true, the instance is said in "AsyncTextureMode". Ie user must fill AsyncTextures field with name of the textures to load. At each startAsyncTextureLoading(), the system start to load async them. Then, isAsyncTextureReady() should be test each frame, to know if loading has completed. By default, AsyncTextureMode=false. When it swap from false to true, each texture file in Materials are replaced with "blank.tga", and true fileNames are copied into AsyncTextures. When it swap from true to false, the inverse is applied. NB: calling enableAsyncTextureMode(true) calls setAsyncTextureDirty(true) +

+Definition at line 375 of file mesh_base_instance.cpp. +

+References NL3D::CMeshBaseInstance::_AsyncTextureMode, NL3D::CMeshBaseInstance::_AsyncTextureReady, NL3D::CMeshBaseInstance::_AsyncTextureToLoadRefCount, NL3D::CMeshBaseInstance::_CurrentAsyncTextures, NL3D::CMeshBaseInstance::AsyncTextures, NL3D::CTextureFile::getFileName(), NL3D::IDRV_MAT_MAXTEXTURES, nlassert, NL3D::CMeshBaseInstance::releaseCurrentAsyncTextures(), NL3D::CMeshBaseInstance::setAsyncTextureDirty(), NL3D::CTextureFile::setFileName(), and uint. +

+Referenced by NL3D::CInstanceUser::enableAsyncTextureMode(), and NL3D::CMeshBaseInstance::~CMeshBaseInstance(). +

+

00376 {
+00377         // if same, no-op.
+00378         if(_AsyncTextureMode==enable)
+00379                 return;
+00380         _AsyncTextureMode= enable;
+00381 
+00382         // if comes to async texture mode, must prepare AsyncTexturing
+00383         if(_AsyncTextureMode)
+00384         {
+00385                 _AsyncTextureReady= true;
+00386 
+00387                 // For all TextureFiles in material
+00388                 for(uint i=0;i<Materials.size();i++)
+00389                 {
+00390                         for(uint stage=0;stage<IDRV_MAT_MAXTEXTURES;stage++)
+00391                         {
+00392                                 // test if really a CTextureFile
+00393                                 CTextureFile    *text= dynamic_cast<CTextureFile*>(Materials[i].getTexture(stage));
+00394                                 if(text)
+00395                                 {
+00396                                         // Must setup the AsyncTextures
+00397                                         AsyncTextures[i].IsTextureFile[stage]= true;
+00398                                         AsyncTextures[i].TextureNames[stage]= text->getFileName();
+00399                                         // Now, must copy the textureFile, to Avoid writing in CMeshBase TextureFile descriptor !!!
+00400                                         CTextureFile *tf = new CTextureFile(*text);
+00401                                         // setup a dummy texture => Instance won't block rendering because texture not yet ready
+00402                                         tf->setFileName("blank.tga");
+00403                                         Materials[i].setTexture(stage, tf);
+00404                                 }
+00405                                 else
+00406                                 {
+00407                                         AsyncTextures[i].IsTextureFile[stage]= false;
+00408                                 }
+00409                         }
+00410                 }
+00411 
+00412                 // For convenience, flag the instance as Dirty.
+00413                 setAsyncTextureDirty(true);
+00414         }
+00415         // else, AsyncTextureMode disabled
+00416         else
+00417         {
+00418                 // first, must stop and release all textures in the async manager.
+00419                 releaseCurrentAsyncTextures();
+00420                 nlassert(_AsyncTextureToLoadRefCount==0);
+00421                 // clear the array => ensure good work if enableAsyncTextureMode(true) is made later
+00422                 contReset(_CurrentAsyncTextures);
+00423 
+00424                 // For all TextureFiles in material, copy User setup from AsyncTextures, to real fileName
+00425                 for(uint i=0;i<Materials.size();i++)
+00426                 {
+00427                         for(uint stage=0;stage<IDRV_MAT_MAXTEXTURES;stage++)
+00428                         {
+00429                                 // if an async texture file
+00430                                 if(AsyncTextures[i].IsTextureFile[stage])
+00431                                 {
+00432                                         // copy the texture name into the texture file.
+00433                                         CTextureFile    *text= safe_cast<CTextureFile*>(Materials[i].getTexture(stage));
+00434                                         text->setFileName(AsyncTextures[i].TextureNames[stage]);
+00435                                         // clear string space
+00436                                         AsyncTextures[i].TextureNames[stage].clear();
+00437                                 }
+00438                         }
+00439                 }
+00440         }
+00441 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::enableCastShadowMap bool  state  )  [inherited]
+
+ + + + + +
+   + + +

+By default, map shadow casting is disabled. This enabled shadow for this model. Fails if the model don't support dynamic Map Shadow Casting (eg landscape) Dervier note: createShadowMap() and deleteShadowMap() is called here. +

+Definition at line 1335 of file transform.cpp. +

+References NL3D::CTransform::canCastShadowMap(), NL3D::CTransform::createShadowMap(), NL3D::CTransform::deleteShadowMap(), NL3D::CTransform::getShadowMap(), NL3D::CTransform::IsFinalShadowMapCaster, NL3D::CTransform::modelCanCastShadowMap(), nlassert, and NL3D::CTransform::setStateFlag(). +

+

01336 {
+01337         bool    precState= canCastShadowMap();
+01338 
+01339         if(modelCanCastShadowMap()) 
+01340                 setStateFlag(IsFinalShadowMapCaster, state);
+01341         else
+01342                 setStateFlag(IsFinalShadowMapCaster, false);
+01343 
+01344         // if just enabled, create the shadowMap
+01345         if(canCastShadowMap() && !precState)
+01346         {
+01347                 createShadowMap();
+01348                 // The user must have created it.
+01349                 nlassert(getShadowMap());
+01350         }
+01351         // if just disabled, free ressource
+01352         else if(!canCastShadowMap() && precState)
+01353         {
+01354                 deleteShadowMap();
+01355         }
+01356 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::enableReceiveShadowMap bool  state  )  [inline, inherited]
+
+ + + + + +
+   + + +

+By default, map shadow receiving is disabled. This enabled shadow for this model. Fails if the model don't support dynamic Map Shadow Receiving (eg Particle system) +

+Definition at line 475 of file transform.h. +

+References NL3D::CTransform::IsFinalShadowMapReceiver, NL3D::CTransform::modelCanReceiveShadowMap(), and NL3D::CTransform::setStateFlag(). +

+Referenced by NL3D::CLandscapeUser::enableReceiveShadowMap(). +

+

00475 {if(modelCanReceiveShadowMap()) setStateFlag(IsFinalShadowMapReceiver, state);}
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransform::forceCompute  )  [protected, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 1359 of file transform.cpp. +

+References NL3D::CTransform::_FatherBoneId, NL3D::CTransform::_FatherSkeletonModel, NL3D::CTransform::_HrcParent, NL3D::CSkeletonModel::forceComputeBone(), NL3D::CTransform::update(), and NL3D::CTransform::updateWorldMatrixFromFather(). +

+Referenced by NL3D::CParticleSystemManager::processAnimate(). +

+

01360 {
+01361         // if father is a skeleton, force to compute the bone we are sticked to
+01362         if (_FatherSkeletonModel)
+01363         {
+01364                 _FatherSkeletonModel->forceComputeBone(_FatherBoneId);
+01365         }
+01366         else
+01367         {
+01368                 // force to compûte the father
+01369                 if (_HrcParent)
+01370                 {
+01371                         _HrcParent->forceCompute();
+01372                 }
+01373         }
+01374         // compute
+01375         update();
+01376         updateWorldMatrixFromFather();
+01377 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransform::freeze  )  [inherited]
+
+ + + + + +
+   + + +

+freeze the preceding position of the model. Do not use, special code for cluster. This inform the scene that preceding position setuped by user is "frozen". ie at next render(), this object won't be added to the "object moving list" (usefull for cluster mgt). The "frozen" state is disabled (at render() time) if:

    +
  • change in position (directly or indireclty, such as animation) is performed after the freeze().
  • the "frozen" state of a father is not enabled (or disabled by a change in position of him :) ).
+ +

+Definition at line 367 of file transform.cpp. +

+References NL3D::CTransform::_Frozen, and NL3D::CTransform::update(). +

+Referenced by NL3D::CInstanceGroup::addToSceneWhenAllShapesLoaded(), and NL3D::CScene::initDefaultRoots(). +

+

00368 {
+00369         // First, update the model
+00370         // _Frozen state is disabled here (in CTransform::update()).
+00371         update();
+00372 
+00373         // Then flag the frozen state.
+00374         _Frozen= true;
+00375 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransform::freezeHRC  )  [inherited]
+
+ + + + + +
+   + + +

+freeze the HRC so the WorldMatrix computed at next render() will be kept for long, and the model won't either be tested in HRC (which is still expensive, even if the worldmatrix doesn't need to be recomputed). The model won't either be validated. It is suposed to not change at all. Also, if it is not a son of a CCluster, it may be accelerated during Cliping (with CQuadGridClipManager).

+NB: the model won't be tested in HRC anymore. calling freezeHRC() on a model in a hierarchy without calling it to the root of the hierarchy will result in that the model won't be validated nor be HRC traversed. To be simplier, you should freezeHRC() all the models of a hierarchy, from base root to leaves.

+NB: if the hierarchy of this object must change, or if the object must moves, you must call unfreezeHRC() first, and you should do this for all the parents of this model. +

+Definition at line 385 of file transform.cpp. +

+References NL3D::CTransform::_FreezeHRCState, NL3D::CTransform::_Frozen, NL3D::CTransform::_TransformDirty, NL3D::CTransform::FreezeHRCStateDisabled, NL3D::CTransform::FreezeHRCStateRequest, NL3D::CTransform::QuadGridClipEnabled, and NL3D::CTransform::setStateFlag(). +

+Referenced by NL3D::CInstanceGroup::freezeHRC(). +

+

00386 {
+00387         // if disabled, say we are ready to validate our worldMatrix for long.
+00388         if(_FreezeHRCState==FreezeHRCStateDisabled)
+00389         {
+00390                 _FreezeHRCState= FreezeHRCStateRequest;
+00391                 setStateFlag(QuadGridClipEnabled, true);
+00392 
+00393                 /* If the transform is not frozen (ie staticaly inserted in a cluster),
+00394                         We must be sure it will be tested against QuadGridClipManager at next ClipTrav pass.
+00395                         => must make this object a "moving object" at next render=> dirt _LocalMatrixDate.
+00396                 */
+00397                 if(!_Frozen)
+00398                 {
+00399                         _TransformDirty= true;
+00400                 }
+00401         }
+00402 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::CTransform::freezeStaticLightSetup CPointLight pointLight[NL3D_MAX_LIGHT_CONTRIBUTION],
uint  numPointLights,
uint8  sunContribution,
CPointLight frozenAmbientlight
[inherited]
+
+ + + + + +
+   + + +

+Freeze and set the Static Light Setup. Called by CInstanceGroup::addToScene() NB: it calls resetLighting() first. NB: nlassert(numPointLights<=NL3D_MAX_LIGHT_CONTRIBUTION) +

+Definition at line 1028 of file transform.cpp. +

+References NL3D::CTransform::_LightContribution, NL3D::CLightContribution::Factor, NL3D::CLightContribution::FrozenAmbientLight, NL3D::CLightContribution::FrozenStaticLightSetup, NL3D::CTransform::IsNeedUpdateFrozenStaticLightSetup, NL3D_MAX_LIGHT_CONTRIBUTION, nlassert, NL3D::CLightContribution::NumFrozenStaticLight, NL3D::CLightContribution::PointLight, NL3D::CTransform::resetLighting(), NL3D::CTransform::setStateFlag(), NL3D::CLightContribution::SunContribution, uint, and uint8. +

+

01030 {
+01031         nlassert(numPointLights <= NL3D_MAX_LIGHT_CONTRIBUTION);
+01032 
+01033         // resetLighting() first.
+01034         resetLighting();
+01035 
+01036         // Enable StaticLightSetup.
+01037         _LightContribution.FrozenStaticLightSetup= true;
+01038         _LightContribution.NumFrozenStaticLight= numPointLights;
+01039         _LightContribution.SunContribution= sunContribution;
+01040         // setup the FrozenAmbientLight
+01041         _LightContribution.FrozenAmbientLight= frozenAmbientlight;
+01042         // Setup other pointLights
+01043         uint i;
+01044         for(i=0;i<numPointLights;i++)
+01045         {
+01046                 // set the light
+01047                 _LightContribution.PointLight[i]= pointLight[i];
+01048                 // Enable at max.
+01049                 _LightContribution.Factor[i]= 255;
+01050                 // Compute static AttFactor Later because don't have WorlPosition of the model here!!
+01051                 setStateFlag(IsNeedUpdateFrozenStaticLightSetup, true);
+01052 
+01053                 // Do NOT set the iterator, because it is a staticLight.
+01054         }
+01055         // End the list
+01056         if(i<NL3D_MAX_LIGHT_CONTRIBUTION)
+01057                 _LightContribution.PointLight[i]= NULL;
+01058 }
+
+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::CTransform::generateShadowMap const CVector lightDir  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+For Casters. Display the Shadow to the "Auxiliary Driver". This method should only write to AlphaBuffer (since RGB may be the current rendered scene!), with Alpha==1 when pixel is shadowed. The ShadowMapManager has already cleared the AlphaBuffer to black, and has already enabled alpha write only. The ShadowMapManager has already setuped Viewport/Scissor as its convenience. The extra blurring is a work of the ShadowMapManager (which blurs multiple shadows in a same pass) NB: you can overwrite the current driver frustum/ViewMatrix/modelMatrix without backuping it (ShadowMapManager work) +

+Reimplemented in NL3D::CMeshInstance, and NL3D::CSkeletonModel. +

+Definition at line 492 of file transform.h. +

+Referenced by NL3D::CShadowMapManager::renderGenerate(). +

+

00492 {}
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransformShape::getAABBox NLMISC::CAABBox bbox  )  const [virtual, inherited]
+
+ + + + + +
+   + + +

+Get the untransformed AABBox of the mesh. NULL (gtSize()==0) if no mesh. +

+Reimplemented from NL3D::CTransform. +

+Reimplemented in NL3D::CParticleSystemModel. +

+Definition at line 83 of file transform_shape.cpp. +

+References NLMISC::CAABBox::setCenter(), NLMISC::CAABBox::setHalfSize(), and NL3D::CTransformShape::Shape. +

+Referenced by NL3D::CTransformShape::getLightHotSpotInWorld(), NL3D::CInstanceUser::getShapeAABBox(), NL3D::CQuadGridClipManager::linkModel(), and NL3D::CClipTrav::traverse(). +

+

00084 {
+00085         if(Shape)
+00086         {
+00087                 Shape->getAABBox(bbox);
+00088         }
+00089         else
+00090         {
+00091                 bbox.setCenter(CVector::Null);
+00092                 bbox.setHalfSize(CVector::Null);
+00093         }
+00094 }
+
+

+ + + + +
+ + + + + + + + + +
CSkeletonModel* NL3D::CTransform::getAncestorSkeletonModel  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 207 of file transform.h. +

+References NL3D::CTransform::_AncestorSkeletonModel. +

+Referenced by NL3D::CParticleSystemManager::processAnimate(). +

+

00207 { return _AncestorSkeletonModel; }
+
+

+ + + + +
+ + + + + + + + + +
float NL3D::CMeshBaseInstance::getAsyncTextureDistance  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+if true, the instance is said in "AsyncTextureMode". Ie user must fill AsyncTextures field with name of the textures to load. At each startAsyncTextureLoading(), the system start to load async them. Then, isAsyncTextureReady() should be test each frame, to know if loading has completed. By default, AsyncTextureMode=false. When it swap from false to true, each texture file in Materials are replaced with "blank.tga", and true fileNames are copied into AsyncTextures. When it swap from true to false, the inverse is applied. NB: calling enableAsyncTextureMode(true) calls setAsyncTextureDirty(true) +

+Definition at line 179 of file mesh_base_instance.h. +

+References NL3D::CMeshBaseInstance::_AsyncTextureDistance. +

+Referenced by NL3D::CInstanceUser::getAsyncTextureDistance(). +

+

00179 {return _AsyncTextureDistance;}
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
sint NL3D::CMeshBaseInstance::getAsyncTextureId uint  matId,
uint  stage
const [inherited]
+
+ + + + + +
+   + + +

+Get an AynscTextureId. ret -1 if not found, or not a textureFile. NB: the id returned is the one in _CurrentAsyncTexture it the valid ones (thoses loaded or being loaded) Can be used for some (non deleting) request to the AsyncTextureManager +

+Definition at line 547 of file mesh_base_instance.cpp. +

+References NL3D::CMeshBaseInstance::_CurrentAsyncTextures, sint, and uint. +

+Referenced by NL3D::CSkeletonModel::computeLodTexture(). +

+

00548 {
+00549         if(matId>=_CurrentAsyncTextures.size())
+00550                 return -1;
+00551         if(!_CurrentAsyncTextures[matId].isTextureFile(stage))
+00552                 return -1;
+00553         return _CurrentAsyncTextures[matId].TextIds[stage];
+00554 }
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CMeshBaseInstance::getAsyncTextureMode  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+if true, the instance is said in "AsyncTextureMode". Ie user must fill AsyncTextures field with name of the textures to load. At each startAsyncTextureLoading(), the system start to load async them. Then, isAsyncTextureReady() should be test each frame, to know if loading has completed. By default, AsyncTextureMode=false. When it swap from false to true, each texture file in Materials are replaced with "blank.tga", and true fileNames are copied into AsyncTextures. When it swap from true to false, the inverse is applied. NB: calling enableAsyncTextureMode(true) calls setAsyncTextureDirty(true) +

+Definition at line 162 of file mesh_base_instance.h. +

+References NL3D::CMeshBaseInstance::_AsyncTextureMode. +

+Referenced by NL3D::CSkeletonModel::computeLodTexture(), NL3D::CInstanceUser::getAsyncTextureMode(), NL3D::CInstanceMaterialUser::getTextureFileName(), NL3D::CInstanceMaterialUser::setTextureFileName(), and NL3D::CMeshBaseInstance::startAsyncTextureLoading(). +

+

00162 {return _AsyncTextureMode;}
+
+

+ + + + +
+ + + + + + + + + +
std::vector<CAnimatedMorph>* NL3D::CMeshBaseInstance::getBlendShapeFactors  )  [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 129 of file mesh_base_instance.h. +

+References NL3D::CMeshBaseInstance::_AnimatedMorphFactor. +

+Referenced by NL3D::CMeshMRMGeom::render(), NL3D::CMeshGeom::render(), NL3D::CMeshMRMGeom::renderSkin(), NL3D::CMeshGeom::renderSkin(), and NL3D::CMeshMRMGeom::renderSkinGroupGeom(). +

+

00130         {
+00131                 return &_AnimatedMorphFactor;
+00132         }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CMeshBaseInstance::getBlendShapeName uint32  nBlendShapeNb,
std::string &  BlendShapeName
[inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 146 of file mesh_base_instance.cpp. +

+References NL3D::CMeshBaseInstance::_AnimatedMorphFactor, and uint32. +

+Referenced by NL3D::CInstanceGroup::getBlendShapes(). +

+

00147 {
+00148         if (nBlendShapeNb >= _AnimatedMorphFactor.size())
+00149                 return;
+00150         BlendShapeName = _AnimatedMorphFactor[nBlendShapeNb].getName();
+00151 }
+
+

+ + + + +
+ + + + + + + + + +
CChannelMixer* NL3D::CTransform::getChannelMixer  )  const [inline, protected, inherited]
+
+ + + + + +
+   + + +

+get the channelMixer owned by the transform. return result of a refPtr => may be NULL. +

+Definition at line 641 of file transform.h. +

+Referenced by NL3D::CSkeletonModel::computeCurrentBBox(), NL3D::CMeshBaseInstance::traverseHrc(), and NL3D::CSkeletonModel::updateBoneToCompute(). +

+

00641 {return _ChannelMixer;}
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CTransform::getChannelMixerOwnerShip  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 257 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), and NL3D::CTransform::IsDeleteChannelMixer. +

+Referenced by NL3D::CTransform::registerToChannelMixer(), and NL3D::CTransform::~CTransform(). +

+

00257 { return getStateFlag(IsDeleteChannelMixer)!=0; }
+
+

+ + + + +
+ + + + + + + + + +
CInstanceGroup* NL3D::CTransform::getClusterSystem  )  [inline, inherited]
+
+ + + + + +
+   + + +

+ +

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

+References NL3D::CTransform::_ClusterSystem. +

+Referenced by NL3D::CScene::findCameraClusterSystemFromRay(), and NL3D::CClipTrav::traverse(). +

+

00320 { return _ClusterSystem; }
+
+

+ + + + +
+ + + + + + + + + + +
ITrack * NL3D::CMeshBaseInstance::getDefaultTrack uint  valueId  )  [virtual, inherited]
+
+ + + + + +
+   + + +

+Default Track Values. +

+ +

+Reimplemented from NL3D::CTransform. +

+Definition at line 97 of file mesh_base_instance.cpp. +

+References NL3D::CMeshBase::getDefaultPivot(), NL3D::CMeshBase::getDefaultPos(), NL3D::CMeshBase::getDefaultRotEuler(), NL3D::CMeshBase::getDefaultRotQuat(), NL3D::CMeshBase::getDefaultScale(), nlstop, and uint. +

+

00098 {
+00099         // Pointer on the CMeshBase
+00100         CMeshBase* pMesh=(CMeshBase*)(IShape*)Shape;
+00101 
+00102         // Switch the value
+00103         switch (valueId)
+00104         {
+00105         case CTransform::PosValue:                      
+00106                 return pMesh->getDefaultPos();
+00107         case CTransform::RotEulerValue:         
+00108                 return pMesh->getDefaultRotEuler();
+00109         case CTransform::RotQuatValue:          
+00110                 return pMesh->getDefaultRotQuat();
+00111         case CTransform::ScaleValue:            
+00112                 return pMesh->getDefaultScale();
+00113         case CTransform::PivotValue:            
+00114                 return pMesh->getDefaultPivot();
+00115         default:
+00116                 // Problem, new values ?
+00117                 nlstop;
+00118         };
+00119         return NULL;
+00120 }
+
+

+ + + + +
+ + + + + + + + + +
float NL3D::CTransformShape::getDistMax  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 135 of file transform_shape.h. +

+Referenced by NL3D::CQuadGridClipCluster::addModel(), NL3D::CTransformShape::clip(), and NL3D::CInstanceUser::getDistMax(). +

+

00135 { return _DistMax; }    
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CTransform::getForceClipRoot  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 538 of file transform.h. +

+References NL3D::CTransform::ForceClipRoot, and NL3D::CTransform::getStateFlag(). +

+Referenced by NL3D::CTransformUser::getForceClipRoot(). +

+

00538 { return getStateFlag(ForceClipRoot) != 0; }    
+
+

+ + + + +
+ + + + + + + + + +
const CLightContribution& NL3D::CTransform::getLightContribution  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Return the current light contribution of this model +

+Definition at line 373 of file transform.h. +

+References NL3D::CTransform::_LightContribution. +

+Referenced by NL3D::CShadowMapManager::computeShadowColors(), and NL3D::CShadowMapManager::computeShadowDirection(). +

+

00373 { return _LightContribution; }  
+
+

+ + + + +
+ + + + + + + + + +
CLightContribution& NL3D::CTransformShape::getLightContribution  )  [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Reimplemented in NL3D::CMeshMultiLodInstance. +

+Definition at line 155 of file transform_shape.h. +

+Referenced by NL3D::CTransformShape::traverseRender(), and NL3D::CParticleSystemModel::traverseRender(). +

+

00155 { return _LightContribution;}
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CTransformShape::getLightHotSpotInWorld CVector modelPos,
float &  modelRadius
const [virtual, inherited]
+
+ + + + + +
+   + + +

+get the HotSpot of the model for Light computation. For models with global attenuation, this is the point taken for attenuation computes. NB: should return the current world position. NB: return also the modelRadius (only for bigLightable) Default to NULL. +

+Reimplemented from NL3D::CTransform. +

+Reimplemented in NL3D::CSkeletonModel. +

+Definition at line 316 of file transform_shape.cpp. +

+References NL3D::CTransformShape::getAABBox(), NLMISC::CMatrix::getPos(), NLMISC::CAABBox::getRadius(), NL3D::CTransform::getWorldMatrix(), and NL3D::CTransform::isBigLightable(). +

+

00317 {
+00318         /*
+00319         // get the untransformed bbox from the model.
+00320         CAABBox         bbox;
+00321         getAABBox(bbox);
+00322         // get transformed center pos of bbox
+00323         modelPos= getWorldMatrix() * bbox.getCenter();
+00324         // If the model is a big lightable, must take radius from aabbox, else suppose 0 radius.
+00325         if(isBigLightable())
+00326         {
+00327                 // get size of the bbox (bounding sphere)
+00328                 modelRadius= bbox.getRadius();
+00329         }
+00330         else
+00331         {
+00332                 // Assume 0 radius => faster computeLinearAttenuation()
+00333                 modelRadius= 0;
+00334         }
+00335         */
+00336 
+00337         // This method works well for Big Trees.
+00338         // TODO: generalize, saving a LightHotSpot per shape.
+00339 
+00340         // get pos of object. Ie the hotSpot is the pivot.
+00341         modelPos= getWorldMatrix().getPos();
+00342         // If the model is a big lightable, must take radius from aabbox, else suppose 0 radius.
+00343         if(isBigLightable())
+00344         {
+00345                 // get the untransformed bbox from the model.
+00346                 CAABBox         bbox;
+00347                 getAABBox(bbox);
+00348                 // get size of the bbox (bounding sphere)
+00349                 modelRadius= bbox.getRadius();
+00350         }
+00351         else
+00352         {
+00353                 // Assume 0 radius => faster computeLinearAttenuation()
+00354                 modelRadius= 0;
+00355         }
+00356 
+00357 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CMeshBaseInstance::getLightMapName uint32  nLightMapNb,
std::string &  LightMapName
[inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 131 of file mesh_base_instance.cpp. +

+References NL3D::CMeshBase::_LightInfos, and uint32. +

+Referenced by NL3D::CInstanceGroup::getLights(). +

+

00132 {
+00133         CMeshBase* pMesh=(CMeshBase*)(IShape*)Shape;
+00134         if( nLightMapNb >= pMesh->_LightInfos.size() )
+00135                 return;
+00136         LightMapName = pMesh->_LightInfos[nLightMapNb].AnimatedLight;
+00137 }
+
+

+ + + + +
+ + + + + + + + + +
const std::string & NL3D::CTransform::getLoadBalancingGroup  )  const [inherited]
+
+ + + + + +
+   + + +

+Get the load Balancing group of a model. see setLoadBalancingGroup(). +

+Definition at line 532 of file transform.cpp. +

+References NL3D::CTransform::_LoadBalancingGroup, and NL3D::CLoadBalancingGroup::Name. +

+

00533 {
+00534         // get the group name
+00535         return _LoadBalancingGroup->Name;
+00536 }
+
+

+ + + + +
+ + + + + + + + + + +
CMaterial * NL3D::CMeshBaseInstance::getMaterial uint  materialId  )  [virtual, inherited]
+
+ + + + + +
+   + + +

+Get a material of the transform shape +

+Reimplemented from NL3D::CTransformShape. +

+Definition at line 361 of file mesh_base_instance.cpp. +

+References uint. +

+

00362 {
+00363         return &(Materials[materialId]);
+00364 }
+
+

+ + + + +
+ + + + + + + + + + +
const CMaterial * NL3D::CMeshBaseInstance::getMaterial uint  materialId  )  const [virtual, inherited]
+
+ + + + + +
+   + + +

+Get a material of the transform shape +

+Reimplemented from NL3D::CTransformShape. +

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

+References uint. +

+

00355 {
+00356         return &(Materials[materialId]);
+00357 }
+
+

+ + + + +
+ + + + + + + + + +
const CMatrix& NL3D::ITransformable::getMatrix  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Get the matrix, compute her if necessary (work in all modes). +

+ +

+Definition at line 76 of file transformable.h. +

+References NL3D::ITransformable::updateMatrix(). +

+Referenced by NL3D::CInstanceGroup::addToSceneWhenAllShapesLoaded(), NL3D::CCamera::buildCameraPyramid(), NL3D::CBone::compute(), NL3D::CWaterShape::createInstance(), NL3D::CWaterModel::getAttenuatedHeight(), NL3D::CTransformableUser::getMatrix(), NL3D::CCloudScape::render(), NL3D::CMeshMultiLod::renderCoarseMesh(), and NL3D::CTransform::update(). +

+

00076 {updateMatrix(); return _LocalMatrix;}
+
+

+ + + + +
+ + + + + + + + + +
uint64 NL3D::ITransformable::getMatrixDate  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+return the last date of computed matrix. updateMatrix() if necessary. +

+Definition at line 90 of file transformable.h. +

+References NL3D::ITransformable::_LocalMatrixDate, uint64, and NL3D::ITransformable::updateMatrix(). +

+Referenced by NL3D::CWaterModel::updateDiffuseMapMatrix(). +

+

00091         {
+00092                 updateMatrix();
+00093                 return _LocalMatrixDate;
+00094         }
+
+

+ + + + +
+ + + + + + + + + +
CRGBA NL3D::CTransform::getMeanColor  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+see setMeanColor() +

+ +

+Definition at line 437 of file transform.h. +

+References NL3D::CTransform::_MeanColor. +

+

00437 {return _MeanColor;}
+
+

+ + + + +
+ + + + + + + + + +
const CMRMLevelDetail * NL3D::CMeshMRMSkinnedInstance::getMRMLevelDetail  )  const [protected, virtual]
+
+ + + + + +
+   + + +

+Change MRM Distance setup. See CMeshBaseInstance::changeMRMDistanceSetup() +

+Reimplemented from NL3D::CTransformShape. +

+Definition at line 176 of file mesh_mrm_skinned_instance.cpp. +

+References NL3D::CMeshMRMSkinnedGeom::getLevelDetail(), and NL3D::CMeshMRMSkinned::getMeshGeom(). +

+

00177 {
+00178         if(Shape)
+00179         {
+00180                 CMeshMRMSkinned *meshMrm= safe_cast<CMeshMRMSkinned*>((IShape*)Shape);
+00181                 return &meshMrm->getMeshGeom().getLevelDetail();
+00182         }
+00183         else
+00184                 return NULL;
+00185 }
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CMeshBaseInstance::getNbBlendShape  )  [inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 140 of file mesh_base_instance.cpp. +

+References NL3D::CMeshBaseInstance::_AnimatedMorphFactor, and uint32. +

+Referenced by NL3D::CInstanceGroup::getBlendShapes(). +

+

00141 {
+00142         return _AnimatedMorphFactor.size();
+00143 }
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CMeshBaseInstance::getNbLightMap  )  [inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 124 of file mesh_base_instance.cpp. +

+References NL3D::CMeshBase::_LightInfos, and uint32. +

+Referenced by NL3D::CInstanceGroup::getLights(). +

+

00125 {
+00126         CMeshBase* pMesh=(CMeshBase*)(IShape*)Shape;
+00127         return pMesh->_LightInfos.size();
+00128 }
+
+

+ + + + +
+ + + + + + + + + +
uint NL3D::CMeshBaseInstance::getNumMaterial  )  const [virtual, inherited]
+
+ + + + + +
+   + + +

+Get the count of material in this transform shape +

+Reimplemented from NL3D::CTransformShape. +

+Definition at line 347 of file mesh_base_instance.cpp. +

+References uint. +

+

00348 {
+00349         return Materials.size ();
+00350 }
+
+

+ + + + +
+ + + + + + + + + + +
float NL3D::CTransformShape::getNumTriangles float  distance  )  [virtual, inherited]
+
+ + + + + +
+   + + +

+get an approximation of the number of triangles this instance want render for a fixed distance.

+

Parameters:
+ + +
distance is the distance of the shape from the eye.
+
+
Returns:
the approximate number of triangles this instance will render at this distance. This number can be a float. The function MUST be decreasing or constant with the distance but don't have to be continus.
+ +

+Reimplemented in NL3D::CMeshMultiLodInstance, NL3D::CParticleSystemModel, and NL3D::CSkeletonModel. +

+Definition at line 75 of file transform_shape.cpp. +

+References NL3D::CTransformShape::Shape. +

+Referenced by NL3D::CTransformShape::traverseLoadBalancingPass0(). +

+

00076 {
+00077         // Call shape method
+00078         return Shape->getNumTriangles (distance);
+00079 }
+
+

+ + + + +
+ + + + + + + + + +
float NL3D::CTransformShape::getNumTrianglesAfterLoadBalancing  )  [inline, inherited]
+
+ + + + + +
+   + + +

+get an approximation of the number of triangles this instance should render. This method is valid only for IShape classes (in render()), after LoadBalancing traversal is performed. NB: It is not guaranted that this instance will render those number of triangles. +

+Definition at line 111 of file transform_shape.h. +

+References NL3D::CTransformShape::_NumTrianglesAfterLoadBalancing. +

+Referenced by NL3D::CParticleSystemModel::doAnimate(), NL3D::CMeshMRMSkinned::profileSceneRender(), NL3D::CMeshMRM::profileSceneRender(), NL3D::CMeshMRMSkinned::render(), NL3D::CMeshMRM::render(), NL3D::CSkeletonModel::renderSkins(), NL3D::CMeshMRM::supportMeshBlockRendering(), and NL3D::CMeshMultiLodInstance::traverseLoadBalancing(). +

+

00111 {return _NumTrianglesAfterLoadBalancing;}
+
+

+ + + + +
+ + + + + + + + + +
uint NL3D::CTransform::getOrderingLayer  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Get the ordering layer. +

+ +

+Definition at line 187 of file transform.h. +

+References NL3D::CTransform::_OrderingLayer, and uint. +

+Referenced by NL3D::CTransformUser::getOrderingLayer(), and NL3D::CRenderTrav::traverse(). +

+

00187 { return _OrderingLayer; }
+
+

+ + + + +
+ + + + + + + + + +
CScene* NL3D::CTransform::getOwnerScene  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+get the scene which has created us +

+ +

+Definition at line 105 of file transform.h. +

+References NL3D::CTransform::_OwnerScene. +

+Referenced by NL3D::CLandscape::addZone(), NL3D::CWaterModel::clip(), NL3D::CTransformShape::clip(), NL3D::CLandscapeModel::clipAndRenderLandscape(), NL3D::CWaterModel::computeClippedPoly(), NL3D::CSkeletonModel::computeDisplayLodCharacterPriority(), NL3D::CSkeletonModel::computeLodTexture(), NL3D::CWaterModel::computeSimpleClippedPoly(), NL3D::CSkeletonModel::createShadowMap(), NL3D::CMeshInstance::createShadowMap(), NL3D::CSkeletonModel::detachSkeletonSon(), NL3D::CParticleSystemModel::doAnimate(), NL3D::CWaterModel::doSimpleRender(), NL3D::CTargetAnimCtrl::execute(), NL3D::CSkeletonModel::generateShadowMap(), NL3D::CMeshInstance::generateShadowMap(), NL3D::CMeshMultiLodInstance::getCoarseMeshLighting(), NL3D::CTransform::initModel(), NL3D::CSkeletonModel::initModel(), NL3D::CPointLightModel::initModel(), NL3D::CLandscapeModel::initModel(), NL3D::CParticleSystemModel::insertInVisibleList(), NL3D::CMeshMultiLod::instanciateCoarseMeshSpace(), NL3D::CQuadGridClipManager::linkModel(), NL3D::CQuadGridClipManager::profile(), NL3D::CTransformShape::profileRender(), NL3D::CLandscapeModel::receiveShadowMap(), NL3D::CCluster::recursTraverseClip(), NL3D::CMeshBaseInstance::releaseCurrentAsyncTextures(), NL3D::CSegRemanence::render(), NL3D::CMeshMultiLod::render(), NL3D::CMeshMRMSkinnedGeom::render(), NL3D::CMeshMRMGeom::render(), NL3D::CMeshGeom::render(), NL3D::CSkeletonModel::renderCLod(), NL3D::CMeshMultiLod::renderCoarseMesh(), NL3D::CSkeletonModel::renderIntoSkeletonShadowMap(), NL3D::CMeshInstance::renderIntoSkeletonShadowMap(), NL3D::CSkeletonModel::renderShadowSkins(), NL3D::CMeshMRMGeom::renderSkin(), NL3D::CMeshGeom::renderSkin(), NL3D::CMeshMRMSkinnedGeom::renderSkinGroupGeom(), NL3D::CMeshMRMGeom::renderSkinGroupGeom(), NL3D::CMeshMRMSkinnedGeom::renderSkinGroupPrimitives(), NL3D::CMeshMRMGeom::renderSkinGroupPrimitives(), NL3D::CMeshMRMSkinnedGeom::renderSkinGroupSpecularRdrPass(), NL3D::CMeshMRMGeom::renderSkinGroupSpecularRdrPass(), NL3D::CSkeletonModel::renderSkinList(), NL3D::CSkeletonModel::renderSkins(), NL3D::CQuadGridClipManager::reset(), NL3D::CTransform::setLoadBalancingGroup(), NL3D::CSkeletonModel::setLodCharacterShape(), NL3D::CMeshBaseInstance::startAsyncTextureLoading(), NL3D::CWaveMakerModel::traverseAnimDetail(), NL3D::CSkeletonModel::traverseAnimDetail(), NL3D::CSegRemanence::traverseAnimDetail(), NL3D::CParticleSystemModel::traverseAnimDetail(), NL3D::CMeshBaseInstance::traverseAnimDetail(), NL3D::CTransform::traverseAnimDetailWithoutUpdateWorldMatrix(), NL3D::CTransform::traverseClip(), NL3D::CQuadGridClipManager::traverseClip(), NL3D::CParticleSystemModel::traverseClip(), NL3D::CLandscapeModel::traverseClip(), NL3D::CMeshBaseInstance::traverseHrc(), NL3D::CLandscapeModel::traverseHrc(), NL3D::CTransform::traverseLight(), NL3D::CPointLightModel::traverseLight(), NL3D::CTransformShape::traverseLoadBalancing(), NL3D::CMeshMultiLodInstance::traverseLoadBalancing(), NL3D::CTransformShape::traverseLoadBalancingPass0(), NL3D::CWaterModel::traverseRender(), NL3D::CVegetableBlendLayerModel::traverseRender(), NL3D::CTransformShape::traverseRender(), NL3D::CMeshInstance::traverseRender(), NL3D::CLandscapeModel::traverseRender(), NL3D::CFlareModel::traverseRender(), NL3D::CTransform::unfreezeHRC(), NL3D::CTransform::update(), NL3D::CTransform::updateClipTravForAncestorSkeleton(), NL3D::CQuadGridClipManager::updateClustersFromCamera(), NL3D::CSkeletonModel::updateShadowMap(), NL3D::CMeshInstance::updateShadowMap(), NL3D::CTransform::updateWorld(), NL3D::CSkeletonModel::~CSkeletonModel(), and NL3D::CTransform::~CTransform(). +

+

00105 {return _OwnerScene;}
+
+

+ + + + +
+ + + + + + + + + +
CVector NL3D::ITransformable::getPivot  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Work only in Rot* mode (nlassert). +

+ +

+Definition at line 255 of file transformable.h. +

+References NL3D::ITransformable::_Pivot, nlassert, NL3D::ITransformable::RotEuler, NL3D::ITransformable::RotQuat, and NL3D::CAnimatedValueBlendable< T >::Value. +

+

00256         {
+00257                 nlassert(_Mode==RotEuler || _Mode==RotQuat);
+00258                 return _Pivot.Value;
+00259         }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::ITransformable::getPivot CVector pivot  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Work only in Rot* mode (nlassert). +

+ +

+Definition at line 224 of file transformable.h. +

+References NL3D::ITransformable::_Pivot, nlassert, NL3D::ITransformable::RotEuler, NL3D::ITransformable::RotQuat, and NL3D::CAnimatedValueBlendable< T >::Value. +

+Referenced by NL3D::CTransformableUser::getPivot(). +

+

00225         {
+00226                 nlassert(_Mode==RotEuler || _Mode==RotQuat);
+00227                 pivot= _Pivot.Value;
+00228         }
+
+

+ + + + +
+ + + + + + + + + +
const char * NL3D::ITransformable::getPivotValueName  )  [static, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 117 of file transformable.cpp. +

+Referenced by NL3D::ITransformable::getValueName(). +

+

00118 {
+00119         return "pivot";
+00120 }
+
+

+ + + + +
+ + + + + + + + + + +
CVector NL3D::ITransformable::getPos void   )  [inline, inherited]
+
+ + + + + +
+   + + +

+Work only in Rot* mode(nlassert). +

+ +

+Definition at line 231 of file transformable.h. +

+References nlassert, NL3D::ITransformable::RotEuler, NL3D::ITransformable::RotQuat, and NL3D::CAnimatedValueBlendable< T >::Value. +

+Referenced by NL3D::CSkeletonModel::generateShadowMap(), NL3D::CWaterModel::getHeight(), NL3D::CSkeletonModel::renderIntoSkeletonShadowMap(), NL3D::CMeshInstance::renderIntoSkeletonShadowMap(), and NL3D::CPointLightModel::traverseLight(). +

+

00232         {
+00233                 nlassert(_Mode==RotEuler || _Mode==RotQuat);
+00234                 return _Pos.Value;
+00235         }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::ITransformable::getPos CVector pos  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Work only in Rot* mode(nlassert). +

+ +

+Definition at line 200 of file transformable.h. +

+References nlassert, NL3D::ITransformable::RotEuler, NL3D::ITransformable::RotQuat, and NL3D::CAnimatedValueBlendable< T >::Value. +

+Referenced by NL3D::CTransformableUser::getPos(), NL3D::CInstanceGroup::getPos(), and NL3D::CPSLight::step(). +

+

00201         {
+00202                 nlassert(_Mode==RotEuler || _Mode==RotQuat);
+00203                 pos= _Pos.Value;
+00204         }
+
+

+ + + + +
+ + + + + + + + + +
const char * NL3D::ITransformable::getPosValueName  )  [static, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 97 of file transformable.cpp. +

+Referenced by NL3D::ITransformable::getValueName(). +

+

00098 {
+00099         return "pos";
+00100 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::getReceiverBBox CAABBox bbox  )  [virtual, inherited]
+
+ + + + + +
+   + + +

+For receivers. get the World Instance bbox that includes the receiver. +

+Reimplemented in NL3D::CLandscapeModel. +

+Definition at line 1328 of file transform.cpp. +

+References NLMISC::CAABBox::setCenter(), and NLMISC::CAABBox::setHalfSize(). +

+Referenced by NL3D::CShadowMapManager::addShadowReceiver(). +

+

01329 {
+01330         bbox.setCenter(CVector::Null);
+01331         bbox.setHalfSize(CVector::Null);
+01332 }
+
+

+ + + + +
+ + + + + + + + + +
virtual const CMatrix& NL3D::CTransform::getReceiverRenderWorldMatrix  )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+For receivers. Retrieve the WorldMatrix of the model used for IDriver::render(). By default it returns getWorldMatrix(). The exception is the Landscape and his "ZBuffer Problem" management. +

+Reimplemented in NL3D::CLandscapeModel. +

+Definition at line 511 of file transform.h. +

+References NL3D::CTransform::getWorldMatrix(). +

+Referenced by NL3D::CShadowMapManager::renderProject(). +

+

00511 {return getWorldMatrix();}
+
+

+ + + + +
+ + + + + + + + + +
const sint& NLMISC::CRefCount::getRefCount  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 70 of file smart_ptr.h. +

+References NLMISC::CRefCount::crefs, and sint. +

+

00071         {
+00072                 return  crefs;
+00073         }
+
+

+ + + + +
+ + + + + + + + + +
CVector NL3D::ITransformable::getRotEuler  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Work only in RotEuler mode(nlassert). +

+ +

+Definition at line 237 of file transformable.h. +

+References NL3D::ITransformable::_RotEuler, nlassert, NL3D::ITransformable::RotEuler, and NL3D::CAnimatedValueBlendable< T >::Value. +

+

00238         {
+00239                 nlassert(_Mode==RotEuler);
+00240                 return _RotEuler.Value;
+00241         }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::ITransformable::getRotEuler CVector rot  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Work only in RotEuler mode(nlassert). +

+ +

+Definition at line 206 of file transformable.h. +

+References NL3D::ITransformable::_RotEuler, nlassert, NL3D::ITransformable::RotEuler, and NL3D::CAnimatedValueBlendable< T >::Value. +

+Referenced by NL3D::CTransformableUser::getRotEuler(). +

+

00207         {
+00208                 nlassert(_Mode==RotEuler);
+00209                 rot= _RotEuler.Value;
+00210         }
+
+

+ + + + +
+ + + + + + + + + +
const char * NL3D::ITransformable::getRotEulerValueName  )  [static, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 102 of file transformable.cpp. +

+Referenced by NL3D::ITransformable::getValueName(). +

+

00103 {
+00104         return "roteuler";
+00105 }
+
+

+ + + + +
+ + + + + + + + + +
CMatrix::TRotOrder NL3D::ITransformable::getRotOrder  )  [inline, inherited]
+
+ + + + + +
+   + + +

+get the current rotorder (information vlaid only when RotEuler mode). +

+ +

+Definition at line 194 of file transformable.h. +

+References NL3D::ITransformable::_RotOrder. +

+Referenced by NL3D::CTransformableUser::getRotOrder(). +

+

00195         {
+00196                 return _RotOrder;
+00197         }
+
+

+ + + + +
+ + + + + + + + + +
CQuat NL3D::ITransformable::getRotQuat  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Work only in RotQuat mode (nlassert). +

+ +

+Definition at line 243 of file transformable.h. +

+References NL3D::ITransformable::_RotQuat, nlassert, NL3D::ITransformable::RotQuat, and NL3D::CAnimatedValueBlendable< T >::Value. +

+

00244         {
+00245                 nlassert(_Mode==RotQuat);
+00246                 return _RotQuat.Value;
+00247         }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::ITransformable::getRotQuat CQuat quat  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Work only in RotQuat mode (nlassert). +

+ +

+Definition at line 212 of file transformable.h. +

+References NL3D::ITransformable::_RotQuat, nlassert, NL3D::ITransformable::RotQuat, and NL3D::CAnimatedValueBlendable< T >::Value. +

+Referenced by NL3D::CTransformableUser::getRotQuat(), and NL3D::CInstanceGroup::getRotQuat(). +

+

00213         {
+00214                 nlassert(_Mode==RotQuat);
+00215                 quat= _RotQuat.Value;
+00216         }
+
+

+ + + + +
+ + + + + + + + + +
const char * NL3D::ITransformable::getRotQuatValueName  )  [static, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 107 of file transformable.cpp. +

+Referenced by NL3D::ITransformable::getValueName(). +

+

00108 {
+00109         return "rotquat";
+00110 }
+
+

+ + + + +
+ + + + + + + + + + +
CVector NL3D::ITransformable::getScale void   )  [inline, inherited]
+
+ + + + + +
+   + + +

+Work only in Rot* mode (nlassert). +

+ +

+Definition at line 249 of file transformable.h. +

+References nlassert, NL3D::ITransformable::RotEuler, NL3D::ITransformable::RotQuat, and NL3D::CAnimatedValueBlendable< T >::Value. +

+

00250         {
+00251                 nlassert(_Mode==RotEuler || _Mode==RotQuat);
+00252                 return _Scale.Value;
+00253         }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::ITransformable::getScale CVector scale  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Work only in Rot* mode (nlassert). +

+ +

+Definition at line 218 of file transformable.h. +

+References nlassert, NL3D::ITransformable::RotEuler, NL3D::ITransformable::RotQuat, and NL3D::CAnimatedValueBlendable< T >::Value. +

+Referenced by NL3D::CBone::compute(), and NL3D::CTransformableUser::getScale(). +

+

00219         {
+00220                 nlassert(_Mode==RotEuler || _Mode==RotQuat);
+00221                 scale= _Scale.Value;
+00222         }
+
+

+ + + + +
+ + + + + + + + + +
const char * NL3D::ITransformable::getScaleValueName  )  [static, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 112 of file transformable.cpp. +

+Referenced by NL3D::ITransformable::getValueName(). +

+

00113 {
+00114         return "scale";
+00115 }
+
+

+ + + + +
+ + + + + + + + + +
virtual CShadowMap* NL3D::CTransform::getShadowMap  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+get The shadow Map result for receveing. If NULL, nothing is displayed. +

+Reimplemented in NL3D::CMeshInstance, and NL3D::CSkeletonModel. +

+Definition at line 495 of file transform.h. +

+Referenced by NL3D::CClipTrav::clipSkeletonShadowMaps(), NL3D::CTransform::enableCastShadowMap(), NL3D::CShadowMapManager::renderGenerate(), NL3D::CShadowMapManager::renderProject(), and NL3D::CShadowMapManager::selectShadowMapsToGenerate(). +

+

00495 {return NULL;}
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CTransform::getShowWhenLODSticked  )  const [inline, protected, inherited]
+
+ + + + + +
+   + + +

+Test if obj must be displayed when sticked to an object displayed as a LOD (example: sword in hand of a character displayed as a LOD state). +

+ +

+Definition at line 680 of file transform.h. +

+References NL3D::CTransform::_ForceCLodSticked. +

+Referenced by NL3D::CParticleSystemModel::traverseClip(). +

+

00680 { return _ForceCLodSticked; }
+
+

+ + + + +
+ + + + + + + + + +
CSkeletonModel* NL3D::CTransform::getSkeletonModel  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Get the skeleton model. Returnr NULL in normal mode. +

+ +

+Definition at line 205 of file transform.h. +

+References NL3D::CTransform::_FatherSkeletonModel. +

+Referenced by NL3D::CMeshMRMSkinnedGeom::render(), NL3D::CMeshMRMGeom::render(), NL3D::CMeshGeom::render(), NL3D::CMeshMRMSkinnedGeom::renderShadowSkinGeom(), NL3D::CMeshMRMGeom::renderShadowSkinGeom(), NL3D::CMeshMRMGeom::renderSkin(), NL3D::CMeshGeom::renderSkin(), NL3D::CMeshMRMSkinnedGeom::renderSkinGroupGeom(), NL3D::CMeshMRMGeom::renderSkinGroupGeom(), and NL3D::CTransformShape::traverseLoadBalancingPass0(). +

+

00205 {return _FatherSkeletonModel;}
+
+

+ + + + +
+ + + + + + + + + +
const std::vector< NLMISC::CBSphere > * NL3D::CMeshMRMSkinnedInstance::getSkinBoneSphere  )  const [protected, virtual]
+
+ + + + + +
+   + + +

+Called for more precise clipping. +

+ +

+Reimplemented from NL3D::CTransform. +

+Definition at line 137 of file mesh_mrm_skinned_instance.cpp. +

+References NL3D::CMeshMRMSkinned::computeBonesId(), NL3D::CMeshMRMSkinned::getMeshGeom(), and NL3D::CMeshMRMSkinnedGeom::getSkinBoneSphere(). +

+

00138 {
+00139         // Get a pointer on the shape
+00140         CMeshMRMSkinned *pMesh = NLMISC::safe_cast<CMeshMRMSkinned *>((IShape*)Shape);
+00141 
+00142         // Recompute the id, and skin spheres, if needed
+00143         pMesh->computeBonesId (_FatherSkeletonModel);
+00144 
+00145         // get it.
+00146         return &pMesh->getMeshGeom().getSkinBoneSphere();
+00147 }
+
+

+ + + + +
+ + + + + + + + + +
const std::vector< sint32 > * NL3D::CMeshMRMSkinnedInstance::getSkinBoneUsage  )  const [protected, virtual]
+
+ + + + + +
+   + + +

+Called for lod character coloring. +

+ +

+Reimplemented from NL3D::CTransform. +

+Definition at line 123 of file mesh_mrm_skinned_instance.cpp. +

+References NL3D::CMeshMRMSkinned::computeBonesId(), NL3D::CMeshMRMSkinned::getMeshGeom(), and NL3D::CMeshMRMSkinnedGeom::getSkinBoneUsage(). +

+

00124 {
+00125         // Get a pointer on the shape
+00126         CMeshMRMSkinned *pMesh = NLMISC::safe_cast<CMeshMRMSkinned *>((IShape*)Shape);
+00127 
+00128         // Recompute the id, if needed
+00129         pMesh->computeBonesId (_FatherSkeletonModel);
+00130 
+00131         // get ids.
+00132         return &pMesh->getMeshGeom().getSkinBoneUsage();
+00133 }
+
+

+ + + + +
+ + + + + + + + + +
TTransformMode NL3D::ITransformable::getTransformMode  )  [inline, inherited]
+
+ + + + + +
+   + + +

+get the current transform mode. +

+ +

+Definition at line 189 of file transformable.h. +

+References NL3D::ITransformable::TTransformMode. +

+Referenced by NL3D::CTargetAnimCtrl::execute(), and NL3D::CTransformableUser::getTransformMode(). +

+

00190         {
+00191                 return _Mode;
+00192         }
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CTransform::getUserClipping  )  const [inherited]
+
+ + + + + +
+   + + +

+Return the user clipping state. +

+ +

+Definition at line 1316 of file transform.cpp. +

+References NL3D::CTransform::getStateFlag(), and NL3D::CTransform::UserClipping. +

+Referenced by NL3D::CTransformUser::getUserClipping(). +

+

01317 {
+01318         return getStateFlag(UserClipping) != 0;
+01319 }
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CTransform::getUserLightable  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Get the UserLightable flag. +

+Definition at line 347 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), and NL3D::CTransform::IsUserLightable. +

+Referenced by NL3D::CTransformUser::getUserLightable(). +

+

00347 {return getStateFlag(IsUserLightable)!=0;}
+
+

+ + + + +
+ + + + + + + + + + +
IAnimatedValue * NL3D::ITransformable::getValue uint  valueId  )  [virtual, inherited]
+
+ + + + + +
+   + + +

+From IAnimatable. +

+ +

+Implements NL3D::IAnimatable. +

+Reimplemented in NL3D::CCamera, and NL3D::CParticleSystemModel. +

+Definition at line 58 of file transformable.cpp. +

+References NL3D::ITransformable::_Pivot, NL3D::ITransformable::_RotEuler, NL3D::ITransformable::_RotQuat, nlstop, NL3D::ITransformable::PivotValue, NL3D::ITransformable::PosValue, NL3D::ITransformable::RotEulerValue, NL3D::ITransformable::RotQuatValue, NL3D::ITransformable::ScaleValue, and uint. +

+

00059 {
+00060         // what value ?
+00061         switch (valueId)
+00062         {
+00063         case PosValue:                  return &_Pos;
+00064         case RotEulerValue:             return &_RotEuler;
+00065         case RotQuatValue:              return &_RotQuat;
+00066         case ScaleValue:                return &_Scale;
+00067         case PivotValue:                return &_Pivot;
+00068         }
+00069 
+00070         // No, only ITrnasformable values!
+00071         nlstop;
+00072         // Deriver note: else call BaseClass::getValue(valueId);
+00073 
+00074         return NULL;
+00075 }
+
+

+ + + + +
+ + + + + + + + + + +
const char * NL3D::ITransformable::getValueName uint  valueId  )  const [virtual, inherited]
+
+ + + + + +
+   + + +

+From IAnimatable. +

+ +

+Implements NL3D::IAnimatable. +

+Reimplemented in NL3D::CCamera, and NL3D::CParticleSystemModel. +

+Definition at line 77 of file transformable.cpp. +

+References NL3D::ITransformable::getPivotValueName(), NL3D::ITransformable::getPosValueName(), NL3D::ITransformable::getRotEulerValueName(), NL3D::ITransformable::getRotQuatValueName(), NL3D::ITransformable::getScaleValueName(), nlstop, NL3D::ITransformable::PivotValue, NL3D::ITransformable::PosValue, NL3D::ITransformable::RotEulerValue, NL3D::ITransformable::RotQuatValue, NL3D::ITransformable::ScaleValue, and uint. +

+

00078 {
+00079         // what value ?
+00080         switch (valueId)
+00081         {
+00082         case PosValue:                  return getPosValueName ();
+00083         case RotEulerValue:             return getRotEulerValueName();
+00084         case RotQuatValue:              return getRotQuatValueName();
+00085         case ScaleValue:                return getScaleValueName();
+00086         case PivotValue:                return getPivotValueName();
+00087         }
+00088 
+00089         // No, only ITrnasformable values!
+00090         nlstop;
+00091         // Deriver note: else call BaseClass::getValueName(valueId);
+00092 
+00093         return "";
+00094 }
+
+

+ + + + +
+ + + + + + + + + +
CHrcTrav::TVisibility NL3D::CTransform::getVisibility  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Get the local visibility state. +

+ +

+Definition at line 203 of file transform.h. +

+References NL3D::CTransform::Visibility. +

+Referenced by NL3D::CTransformUser::getVisibility(), NL3D::CParticleSystemManager::processAnimate(), renderSkin(), NL3D::CMeshMRMInstance::renderSkin(), NL3D::CMeshInstance::renderSkin(), NL3D::CParticleSystemModel::traverseAnimDetail(), and NL3D::CSkeletonModel::updateSkinRenderLists(). +

+

00203 {return Visibility;}
+
+

+ + + + +
+ + + + + + + + + +
const CMatrix& NL3D::CTransform::getWorldMatrix  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Get the worldMatrix that is computed at last Hrc pass +

+Definition at line 299 of file transform.h. +

+Referenced by NL3D::CMeshMRMGeom::activeInstance(), NL3D::CMeshGeom::activeInstance(), NL3D::CLightingManager::addDynamicLight(), NL3D::CCamera::buildCameraPyramid(), NL3D::CParticleSystemModel::checkAgainstPyramid(), NL3D::CTransformShape::clip(), NL3D::CClipTrav::clipSkeletonShadowMaps(), NL3D::CWaterModel::computeClippedPoly(), NL3D::CSkeletonModel::computeDisplayLodCharacterPriority(), NL3D::CShadowMapManager::computeShadowDirection(), NL3D::CWaterModel::computeSimpleClippedPoly(), NL3D::CMeshInstance::computeWorldBBoxForShadow(), NL3D::CParticleSystemModel::doAnimate(), NL3D::CWaterModel::doSimpleRender(), NL3D::CTargetAnimCtrl::execute(), NL3D::CSkeletonModel::generateShadowMap(), NL3D::CMeshInstance::generateShadowMap(), NL3D::CTransformShape::getLightHotSpotInWorld(), NL3D::CTransform::getReceiverRenderWorldMatrix(), NL3D::CLightingManager::insertStaticLightedModel(), NL3D::CQuadGridClipManager::linkModel(), NL3D::CParticleSystemManager::processAnimate(), NL3D::CParticleSystemModel::refreshRscDeletion(), NL3D::CParticleSystemShape::render(), NL3D::CMeshMRMSkinnedGeom::render(), NL3D::CMeshMRMGeom::render(), NL3D::CMeshGeom::render(), NL3D::CSkeletonModel::renderCLod(), NL3D::CSkeletonModel::renderIntoSkeletonShadowMap(), NL3D::CMeshInstance::renderIntoSkeletonShadowMap(), NL3D::CMeshMultiLod::renderMeshGeom(), NL3D::CShadowMapManager::renderProject(), NL3D::CMeshMRMGeom::renderSkin(), NL3D::CMeshGeom::renderSkin(), NL3D::CSkeletonModel::renderSkins(), NL3D::CSegRemanence::samplePos(), NL3D::CShadowMapManager::selectShadowMapsToGenerate(), NL3D::CMeshVPWindTree::setupPerInstanceConstants(), NL3D::CRenderTrav::traverse(), NL3D::CClipTrav::traverse(), NL3D::CWaveMakerModel::traverseAnimDetail(), NL3D::CSkeletonModel::traverseAnimDetail(), NL3D::CParticleSystemModel::traverseClip(), NL3D::CTransform::traverseLight(), NL3D::CPointLightModel::traverseLight(), NL3D::CTransformShape::traverseLoadBalancingPass0(), NL3D::CWaterModel::traverseRender(), NL3D::CFlareModel::traverseRender(), and NL3D::CWaterModel::updateDiffuseMapMatrix(). +

+

00299 {return _WorldMatrix;}
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransform::heritVisibility  )  [inherited]
+
+ + + + + +
+   + + +

+herit the visibility from his father. (default behavior). +

+ +

+Definition at line 287 of file transform.cpp. +

+References NL3D::CTransform::_FatherSkeletonModel, NL3D::CTransform::_TransformDirty, NL3D::CSkeletonModel::dirtSkinRenderLists(), NL3D::CTransform::isSkinned(), nlassert, and NL3D::CTransform::Visibility. +

+Referenced by NL3D::CTransformUser::heritVisibility(). +

+

00288 {
+00289         // Optim: do nothing if already set
+00290         if(Visibility!= CHrcTrav::Herit)
+00291         {
+00292                 _TransformDirty= true;
+00293                 Visibility= CHrcTrav::Herit;
+00294                 // If skinned, then must inform skeleton parent that it must recompute skin render/animDetail lists
+00295                 if(isSkinned())
+00296                 {
+00297                         nlassert(_FatherSkeletonModel);
+00298                         _FatherSkeletonModel->dirtSkinRenderLists();
+00299                 }
+00300         }
+00301 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransform::hide  )  [inherited]
+
+ + + + + +
+   + + +

+Hide the object and his sons. +

+ +

+Definition at line 223 of file transform.cpp. +

+References NL3D::CTransform::_FatherSkeletonModel, NL3D::CTransform::_TransformDirty, NL3D::CSkeletonModel::dirtSkinRenderLists(), NL3D::CTransform::isSkinned(), nlassert, and NL3D::CTransform::Visibility. +

+Referenced by NL3D::CTransformUser::hide(), NL3D::CLandscapeUser::hide(), NL3D::CPSMesh::newElement(), and NL3D::CPSMesh::updatePos(). +

+

00224 {
+00225         // Optim: do nothing if already set
+00226         if(Visibility!= CHrcTrav::Hide)
+00227         {
+00228                 _TransformDirty= true;
+00229                 Visibility= CHrcTrav::Hide;
+00230                 // If skinned, then must inform skeleton parent that it must recompute skin render/animDetail lists
+00231                 if(isSkinned())
+00232                 {
+00233                         nlassert(_FatherSkeletonModel);
+00234                         _FatherSkeletonModel->dirtSkinRenderLists();
+00235                 }
+00236         }
+00237 }
+
+

+ + + + +
+ + + + + + + + + + +
CTransform * NL3D::CTransform::hrcGetChild uint  index  )  const [inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 1202 of file transform.cpp. +

+References NL3D::CTransform::_HrcSons, index, nlassert, NL3D::CFastPtrList< CTransform >::size(), and uint. +

+Referenced by NL3D::CTransform::traverseHrc(), NL3D::CRootModel::traverseHrc(), NL3D::CAnimDetailTrav::traverseHrcRecurs(), and NL3D::CTransform::~CTransform(). +

+

01203 {
+01204         nlassert(index < _HrcSons.size());
+01205         return (const_cast<CTransform*>(this))->_HrcSons.begin()[index];
+01206 }
+
+

+ + + + +
+ + + + + + + + + +
uint NL3D::CTransform::hrcGetNumChildren  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 220 of file transform.h. +

+References NL3D::CTransform::_HrcSons, NL3D::CFastPtrList< CTransform >::size(), and uint. +

+Referenced by NL3D::CTransform::traverseHrc(), NL3D::CRootModel::traverseHrc(), NL3D::CAnimDetailTrav::traverseHrcRecurs(), and NL3D::CTransform::~CTransform(). +

+

00220 {return _HrcSons.size();}
+
+

+ + + + +
+ + + + + + + + + +
CTransform* NL3D::CTransform::hrcGetParent  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 218 of file transform.h. +

+References NL3D::CTransform::_HrcParent. +

+Referenced by NL3D::CMeshBaseInstance::traverseHrc(), and NL3D::CTransform::updateWorldMatrixFromFather(). +

+

00218 {return _HrcParent;}
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::hrcLinkSon CTransform son  )  [inherited]
+
+ + + + + +
+   + + +

+link son to this in Hierarchy traversal NB: link does nothing if the son node is HRC frozen +

+Definition at line 1151 of file transform.cpp. +

+References NL3D::CTransform::_FreezeHRCState, NL3D::CTransform::_HrcNode, NL3D::CTransform::_HrcParent, NL3D::CTransform::_HrcParentUnfreeze, NL3D::CTransform::_HrcSons, NL3D::CTransform::_WorldDate, NL3D::CTransform::hrcUnlink(), and NL3D::CFastPtrList< CTransform >::insert(). +

+Referenced by NL3D::CInstanceGroup::addToSceneWhenAllShapesLoaded(), NL3D::CScene::createModel(), NL3D::CSkeletonModel::detachSkeletonSon(), NL3D::CInstanceGroup::linkRoot(), NL3D::CTransform::setForceClipRoot(), NL3D::CSkeletonModel::stickObjectEx(), and NL3D::CTransform::unfreezeHRC(). +

+

01152 {
+01153         if(!son)
+01154                 return;
+01155 
+01156         // If not unfrozen, can't link
+01157         if (son->_FreezeHRCState != CTransform::FreezeHRCStateDisabled)
+01158                 return;
+01159 
+01160         // no-op if already me.
+01161         if(son->_HrcParent==this)
+01162                 return;
+01163 
+01164         // unlink from anyone
+01165         son->hrcUnlink();
+01166 
+01167         // link son to me
+01168         _HrcSons.insert(son, &son->_HrcNode);
+01169         
+01170         // link me to son
+01171         son->_HrcParent= this;
+01172         
+01173         // Backup parent
+01174         son->_HrcParentUnfreeze= this;
+01175         
+01176         // my son should recompute his worldMatrix!
+01177         son->_WorldDate= -1;
+01178 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransform::hrcUnlink  )  [inherited]
+
+ + + + + +
+   + + +

+unlink this from any Father in Hrc. No-op if no parent NB: unlink does nothing if the node is HRC frozen +

+Definition at line 1181 of file transform.cpp. +

+References NL3D::CTransform::_HrcNode, NL3D::CTransform::_HrcParent, NL3D::CTransform::_HrcParentUnfreeze, NL3D::CTransform::_WorldDate, NL3D::CTransform::ForceClipRoot, NL3D::CTransform::getStateFlag(), nlassert, and NL3D::CFastPtrListNode::unlink(). +

+Referenced by NL3D::CSkeletonModel::bindSkin(), NL3D::CTransform::hrcLinkSon(), NL3D::CScene::initDefaultRoots(), NL3D::CScene::initQuadGridClipManager(), NL3D::CTransform::setForceClipRoot(), NL3D::CTransform::update(), and NL3D::CTransform::~CTransform(). +

+

01182 {
+01183         // no-op if already NULL
+01184         if(_HrcParent==NULL)
+01185                 return;
+01186 
+01187         // if ForceClipRoot flag is set, then the fx can't be linked elsewhere in the hierarchy
+01188         nlassert(!getStateFlag(ForceClipRoot));
+01189 
+01190         // unlink my parent from me.
+01191         _HrcNode.unlink();
+01192 
+01193         // unlink me from parent
+01194         _HrcParent= NULL;
+01195         _HrcParentUnfreeze= NULL;
+01196 
+01197         // I should recompute my worldMatrix (well not usefull since not linked, but still do it...)
+01198         _WorldDate= -1;
+01199 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CMeshBaseInstance::initAnimatedLightIndex const CScene scene  )  [inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 316 of file mesh_base_instance.cpp. +

+References NL3D::CMeshBaseInstance::_AnimatedLightmap, NL3D::CMeshBase::_LightInfos, NL3D::CMeshBase::CLightMapInfoList::AnimatedLight, count, NL3D::CScene::getAnimatedLightNameToIndex(), and uint. +

+Referenced by NL3D::CScene::createInstance(). +

+

00317 {
+00318         /* Scan lightmaps used by the shape, and for each, bind the transform shape to an 
+00319          * animated lightmap index from the scene. This index will be used at runtime to 
+00320          * get quickly a lightmap factor. This index is not set in the CShape because
+00321          * the CShape can be used with several CScene.
+00322          */
+00323 
+00324         // For each lightmap in the shape
+00325         CMeshBase *pMB = static_cast<CMeshBase*> (static_cast<IShape*> (Shape));
+00326         const uint count = pMB->_LightInfos.size ();
+00327         uint i;
+00328 
+00329         // Resize the index array
+00330         _AnimatedLightmap.resize (count);
+00331 
+00332         for (i=0; i<count; i++)
+00333         {
+00334                 // The light info
+00335                 CMeshBase::CLightMapInfoList &lightInfo = pMB->_LightInfos[i];
+00336 
+00337                 // Get the lightmap info
+00338                 _AnimatedLightmap[i] = scene.getAnimatedLightNameToIndex (lightInfo.AnimatedLight);
+00339         }
+00340 
+00341         // Must be traversed in AnimDetail, even if no channel mixer registered
+00342         CTransform::setIsForceAnimDetail (count != 0);
+00343 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransform::initModel  )  [virtual, inherited]
+
+ + + + + +
+   + + +

+Extra init for a model. this method is called by the framework at the very end of CScene::createModel() Warning! if the model is a CTransformShape, then when initModel() is called, Shape and other related member/setup of IShape::createInstance() are not yet done (because createModel() is called at the begining in createInstance()).

+Because initModel() is called at the very end, deriver could implement anything like creating other models, but not deleting this model...

+Default behavior is to do nothing. +

+Reimplemented in NL3D::CLandscapeModel, NL3D::CPointLightModel, and NL3D::CSkeletonModel. +

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

+References NL3D::CTransform::_LoadBalancingGroup, NL3D::CLoadBalancingTrav::getDefaultGroup(), NL3D::CScene::getLoadBalancingTrav(), and NL3D::CTransform::getOwnerScene(). +

+Referenced by NL3D::CScene::createModel(). +

+

00215 {
+00216         // assign me to the default group
+00217         _LoadBalancingGroup= getOwnerScene()->getLoadBalancingTrav().getDefaultGroup();
+00218 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CMeshMRMSkinnedInstance::initRenderFilterType  )  [protected]
+
+ + + + + +
+   + + +

+ +

+Definition at line 227 of file mesh_mrm_skinned_instance.cpp. +

+References NL3D::CMeshMRMSkinned::getMeshGeom(), and NL3D::CMeshMRMSkinnedGeom::hasMeshVertexProgram(). +

+Referenced by NL3D::CMeshMRMSkinned::createInstance(). +

+

00228 {
+00229         if(Shape)
+00230         {
+00231                 // If the Shape has a VP or not...
+00232                 CMeshMRMSkinned *pMesh = NLMISC::safe_cast<CMeshMRMSkinned *>((IShape*)Shape);
+00233 
+00234                 if( pMesh->getMeshGeom().hasMeshVertexProgram() )
+00235                         _RenderFilterType= UScene::FilterMeshMRMVP;
+00236                 else
+00237                         _RenderFilterType= UScene::FilterMeshMRMNoVP;
+00238         }
+00239 }
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CTransform::isAnimDetailable  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+non-zero if the model is animDetailable (ie added to the animDetail list if visible) +

+ +

+Definition at line 440 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), NL3D::CTransform::IsAnimDetailable, and uint32. +

+Referenced by NL3D::CClipTrav::clipSkeletonShadowMaps(), NL3D::CTransform::traverseClip(), and NL3D::CSkeletonModel::updateSkinRenderLists(). +

+

00440 {return getStateFlag(IsAnimDetailable);}
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CMeshBaseInstance::isAsyncTextureDirty  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+see dirtAsyncTextureState() +

+ +

+Definition at line 187 of file mesh_base_instance.h. +

+References NL3D::CMeshBaseInstance::_AsyncTextureDirty. +

+Referenced by NL3D::CInstanceUser::isAsyncTextureDirty(). +

+

00187 {return _AsyncTextureDirty;}
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CMeshBaseInstance::isAsyncTextureReady  )  [inherited]
+
+ + + + + +
+   + + +

+return true if all the async textures of the instances are uploaded. if was not ready before, this swap the return always true if not in async texture mode, or if startAsyncTextureLoading() has not been called since last enableAsyncTextureMode(true) +

+Definition at line 507 of file mesh_base_instance.cpp. +

+References NL3D::CMeshBaseInstance::_AsyncTextureReady, NL3D::CMeshBaseInstance::_AsyncTextureToLoadRefCount, NL3D::CMeshBaseInstance::_CurrentAsyncTextures, NL3D::IDRV_MAT_MAXTEXTURES, NL3D::ITexture::releaseDriverSetup(), NL3D::CTextureFile::setFileName(), and uint. +

+Referenced by NL3D::CInstanceUser::isAsyncTextureReady(). +

+

00508 {
+00509         // if ok, just quit
+00510         if(_AsyncTextureReady)
+00511                 return true;
+00512 
+00513         // test if async loading ended
+00514         if(_AsyncTextureToLoadRefCount==0)
+00515         {
+00516                 // must copy all fileNames into the actual Texture Files. Those are the valid ones now!
+00517                 for(uint i=0;i<_CurrentAsyncTextures.size();i++)
+00518                 {
+00519                         for(uint stage=0;stage<IDRV_MAT_MAXTEXTURES;stage++)
+00520                         {
+00521                                 if(_CurrentAsyncTextures[i].IsTextureFile[stage])
+00522                                 {
+00523                                         // copy the texture name into the texture file.
+00524                                         CTextureFile    *text= safe_cast<CTextureFile*>(Materials[i].getTexture(stage));
+00525                                         // Since the texture is really uploaded in the driver, the true driver Texture Id will
+00526                                         // be bound to this texture.
+00527                                         text->setFileName(_CurrentAsyncTextures[i].TextureNames[stage]);
+00528                                         /* Since driver setup will only occurs when object become visible, it is a good idea to release
+00529                                            Old driver info, because it may points to old driver texture data (eg: old shared textureFile).
+00530                                            thus doing so release VRAM Texture Memory
+00531                                         */
+00532                                         text->releaseDriverSetup();
+00533                                 }
+00534                         }
+00535                 }
+00536 
+00537                 // Ok, we are now ready.
+00538                 _AsyncTextureReady= true;
+00539                 return true;
+00540         }
+00541         else
+00542                 return false;
+00543 }
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CTransform::isBigLightable  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+non-zero if the lighting Manager must take into account the bbox of the transform. Default behavior is false. Deriver must call setIsBigLightable() at initialisation to change it. +

+Definition at line 365 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), NL3D::CTransform::IsBigLightable, and uint32. +

+Referenced by NL3D::CTransformShape::getLightHotSpotInWorld(). +

+

00365 {return getStateFlag(IsBigLightable);}
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CTransform::isClipVisible  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+tells if the transform has been clipped in the clip traversal. +

+Definition at line 313 of file transform.h. +

+References NL3D::CTransform::_Visible. +

+Referenced by NL3D::CClipTrav::clipSkeletonShadowMaps(), NL3D::CSkeletonModel::computeDisplayLodCharacterPriority(), NL3D::CSkeletonModel::computeRenderedBBox(), NL3D::CTransformUser::getLastClippedState(), NL3D::CSkeletonModel::isBoneComputed(), NL3D::CParticleSystemManager::processAnimate(), NL3D::CTransform::traverseClip(), NL3D::CParticleSystemModel::traverseClip(), and NL3D::CPointLightModel::traverseLight(). +

+

00314         {
+00315                 return _Visible;
+00316         }
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CTransform::isCluster  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+non-zero if the CTransform can be casted to a CCluster +

+ +

+Definition at line 451 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), NL3D::CTransform::IsCluster, and uint32. +

+Referenced by NL3D::CClipTrav::traverse(). +

+

00451 {return getStateFlag(IsCluster);}
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CTransform::isGeneratingShadowMap  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+true if the instance cast shadow. By default false +

+ +

+Definition at line 515 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), and NL3D::CTransform::IsGeneratingShadowMap. +

+Referenced by NL3D::CClipTrav::clipSkeletonShadowMaps(), and NL3D::CSkeletonModel::traverseAnimDetail(). +

+

00515 {return getStateFlag(IsGeneratingShadowMap)!=0;}
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CTransform::isHrcVisible  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+tells if the transform has been determined as visible in the hrc traversal +

+Reimplemented in NL3D::CPointLightModel. +

+Definition at line 306 of file transform.h. +

+References NL3D::CTransform::_WorldVis. +

+Referenced by NL3D::CClipTrav::clipSkeletonShadowMaps(), NL3D::CSkeletonModel::computeWorldBBoxForShadow(), NL3D::CMeshInstance::computeWorldBBoxForShadow(), NL3D::CTransformUser::getLastWorldVisState(), NL3D::CSkeletonModel::renderIntoSkeletonShadowMap(), NL3D::CMeshInstance::renderIntoSkeletonShadowMap(), and NL3D::CSkeletonModel::traverseAnimDetail(). +

+

00307         {
+00308                 return _WorldVis;
+00309         }
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CTransform::isLightable  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+true if the model can be lighted (such as CMeshBaseInstance) Default behavior is false. Deriver must use setIsLightable(true) method if the instance can be lighted.

Returns:
0 if getUserLightable() is false, or if the model can't be lighted at all. else return a non-zero value
+ +

+Definition at line 337 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), NL3D::CTransform::IsFinalLightable, and uint32. +

+Referenced by NL3D::CClipTrav::clipSkeletonShadowMaps(), NL3D::CTransform::traverseClip(), NL3D::CTransformShape::traverseRender(), NL3D::CTransform::unfreezeHRC(), NL3D::CTransform::update(), and NL3D::CTransform::updateWorld(). +

+

00337 {return getStateFlag(IsFinalLightable);}
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CTransformShape::isLinkToQuadCluster  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+true if the model is linked to a quadCluster +

+ +

+Definition at line 141 of file transform_shape.h. +

+References NL3D::CTransformShape::_QuadClusterListNode, and NL3D::CFastPtrListNode::isLinked(). +

+

00141 {return _QuadClusterListNode.isLinked();}
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CTransform::isLoadBalancable  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+non-zero if the model is loadBalancable (ie added to the loadBalancing list if visible) +

+ +

+Definition at line 442 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), NL3D::CTransform::IsLoadBalancable, and uint32. +

+Referenced by NL3D::CTransform::traverseClip(). +

+

00442 {return getStateFlag(IsLoadBalancable);}
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CTransform::isMeshBaseInstance  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+non-zero if the CTransform can be casted to a CMeshBaseInstance +

+ +

+Definition at line 447 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), NL3D::CTransform::IsMeshBaseInstance, and uint32. +

+Referenced by NL3D::CInstanceUser::enableAsyncTextureMode(), NL3D::CInstanceUser::getAsyncTextureDistance(), NL3D::CInstanceUser::getAsyncTextureMode(), NL3D::CInstanceUser::isAsyncTextureDirty(), NL3D::CInstanceUser::isAsyncTextureReady(), NL3D::CInstanceUser::setAsyncTextureDirty(), NL3D::CInstanceUser::setAsyncTextureDistance(), and NL3D::CInstanceUser::startAsyncTextureLoading(). +

+

00447 {return getStateFlag(IsMeshBaseInstance);}
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CTransform::isNeedUpdateFrozenStaticLightSetup  )  const [inline, protected, inherited]
+
+ + + + + +
+   + + +

+non-zero if the object has a FrozenStaticLightSetup not correclty updated. +

+ +

+Definition at line 631 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), NL3D::CTransform::IsNeedUpdateFrozenStaticLightSetup, and uint32. +

+Referenced by NL3D::CTransform::traverseLight(). +

+

00631 {return getStateFlag(IsNeedUpdateFrozenStaticLightSetup);}
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CTransform::isNeedUpdateLighting  )  const [inline, protected, inherited]
+
+ + + + + +
+   + + +

+non-zero if the object needs to updatelighting. +

+ +

+Definition at line 629 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), NL3D::CTransform::IsNeedUpdateLighting, and uint32. +

+Referenced by NL3D::CTransform::resetLighting(), and NL3D::CTransform::traverseLight(). +

+

00629 {return getStateFlag(IsNeedUpdateLighting);}
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CTransform::isOpaque  )  [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 173 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), and uint32. +

+Referenced by NL3D::CTransformUser::isOpaque(), NL3D::CRenderTrav::traverse(), and NL3D::CSkeletonModel::updateSkinRenderLists(). +

+

00173 { return getStateFlag(IsOpaque); }
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CTransform::isQuadGridClipEnabled  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+special feature for CQuadGridClipManager. return a non-zero value if true +

+Definition at line 294 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), NL3D::CTransform::QuadGridClipEnabled, and uint32. +

+Referenced by NL3D::CClipTrav::traverse(). +

+

00294 {return getStateFlag(QuadGridClipEnabled);}
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CTransform::isRenderable  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+non-zero if the model is renderable (ie something may appear on screen) +

+ +

+Definition at line 444 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), NL3D::CTransform::IsRenderable, and uint32. +

+Referenced by NL3D::CTransform::traverseClip(). +

+

00444 {return getStateFlag(IsRenderable);}
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CTransform::isSkeleton  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+return non-zero if I am a skeleton. if yes, static_cast<CSkeletonModel*> may be used +

+ +

+Definition at line 421 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), NL3D::CTransform::IsSkeleton, and uint32. +

+Referenced by NL3D::CSkeletonModel::forceComputeBone(), and NL3D::CAnimDetailTrav::traverse(). +

+

00421 {return getStateFlag(IsSkeleton);}
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CMeshMRMSkinnedInstance::isSkinnable  )  const [protected, virtual]
+
+ + + + + +
+   + + +

+I can be skinned if the mesh is. +

+ +

+Reimplemented from NL3D::CTransform. +

+Definition at line 151 of file mesh_mrm_skinned_instance.cpp. +

+

00152 {
+00153         // true if the mesh is skinned
+00154         return true;
+00155 }
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CTransform::isSkinned  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+non-zero if the model is skinned onto a skeleton. +

+ +

+Definition at line 423 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), NL3D::CTransform::IsSkinned, and uint32. +

+Referenced by NL3D::CSkeletonModel::detachSkeletonSon(), NL3D::CTransform::heritVisibility(), NL3D::CTransform::hide(), NL3D::CTransform::registerToChannelMixer(), NL3D::CMeshMRMSkinnedGeom::render(), NL3D::CMeshMRMGeom::render(), NL3D::CMeshGeom::render(), NL3D::CMeshMRMGeom::renderSkin(), NL3D::CMeshGeom::renderSkin(), NL3D::CMeshMRMSkinnedGeom::renderSkinGroupGeom(), NL3D::CMeshMRMGeom::renderSkinGroupGeom(), NL3D::CTransform::setIsForceAnimDetail(), NL3D::CTransform::setOpacity(), NL3D::CTransform::setTransparency(), NL3D::CTransform::show(), NL3D::CTransform::updateWorldMatrixFromFather(), and NL3D::CTransform::~CTransform(). +

+

00423 {return getStateFlag(IsSkinned);}
+
+

+ + + + +
+ + + + + + + + + +
virtual bool NL3D::CTransformShape::isStarted  )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+ +

+Reimplemented in NL3D::CSegRemanence. +

+Definition at line 132 of file transform_shape.h. +

+Referenced by NL3D::CInstanceUser::isStarted(). +

+

00132 { return false; }
+
+

+ + + + +
+ + + + + + + + + + +
uint32 NL3D::IAnimatable::isTouched uint  valueId  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Return non 0 int if the value as been touched else 0.

+

Parameters:
+ + +
valueId is the animated value ID in the object we want to test the touch flag. or it may be an OwnerBit.
+
+ +

+Definition at line 184 of file animatable.h. +

+References NL3D::IAnimatable::_BitSet, uint, and uint32. +

+Referenced by NL3D::CParticleSystemModel::doAnimate(), NL3D::ITransformable::needCompute(), NL3D::IAnimatable::propagateTouch(), and NL3D::CAnimatedMaterial::update(). +

+

00185         {
+00186                 return _BitSet&(1<<valueId);
+00187         }
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CTransform::isTransformShape  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+non-zero if the CTransform can be casted to a CTransformShape +

+ +

+Definition at line 449 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), NL3D::CTransform::IsTransformShape, and uint32. +

+Referenced by NL3D::CTransform::updateWorld(). +

+

00449 {return getStateFlag(IsTransformShape);}
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CTransform::isTransparent  )  [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 174 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), and uint32. +

+Referenced by NL3D::CTransformUser::isTransparent(), NL3D::CRenderTrav::traverse(), and NL3D::CSkeletonModel::updateSkinRenderLists(). +

+

00174 { return getStateFlag(IsTransparent); }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::ITransformable::lookAt const CVector eye,
const CVector target,
float  roll = 0.f
[inherited]
+
+ + + + + +
+   + + +

+Setup Matrix by the lookAt method. Work only in DirectMatrix mode and RotQuat mode (not euler...).

+

Parameters:
+ + + + +
eye is the coordinate of the object.
target is the point the object look at.
roll is the roll angle in radian along the object's Y axis.
+
+ +

+Definition at line 169 of file transformable.cpp. +

+References NL3D::ITransformable::DirectMatrix, NLMISC::CMatrix::getPos(), NLMISC::CMatrix::getRot(), NLMISC::CMatrix::identity(), nlassert, NLMISC::CVector::normalize(), NLMISC::CMatrix::rotateY(), NL3D::ITransformable::RotQuat, NL3D::ITransformable::setMatrix(), NL3D::ITransformable::setPivot(), NL3D::ITransformable::setPos(), NLMISC::CMatrix::setPos(), NLMISC::CMatrix::setRot(), NL3D::ITransformable::setRotQuat(), and NL3D::ITransformable::setScale(). +

+Referenced by NL3D::CTransformableUser::lookAt(), and NL3D::CCamera::update(). +

+

00170 {
+00171         nlassert(_Mode==RotQuat || _Mode==DirectMatrix);
+00172 
+00173         // Roll matrix
+00174         CMatrix rollMT;
+00175         rollMT.identity();
+00176         if (roll!=0.f)
+00177                 rollMT.rotateY (roll);
+00178 
+00179         // Make the target base
+00180         CVector j=target;
+00181         j-=eye;
+00182         j.normalize();
+00183         CVector i=j^CVector (0,0,1.f);
+00184         CVector k=i^j;
+00185         k.normalize();
+00186         i=j^k;
+00187         i.normalize();
+00188 
+00189         // Make the target matrix
+00190         CMatrix targetMT;
+00191         targetMT.identity();
+00192         targetMT.setRot (i, j, k);
+00193         targetMT.setPos (eye);
+00194 
+00195         // Compose matrix
+00196         targetMT*=rollMT;
+00197 
+00198         // Set the matrix
+00199         if(_Mode==DirectMatrix)
+00200                 setMatrix (targetMT);
+00201         else
+00202         {
+00203                 // transfrom to quaternion mode.
+00204                 setScale(CVector(1,1,1));
+00205                 setPivot(CVector::Null);
+00206                 setPos(targetMT.getPos());
+00207                 setRotQuat(targetMT.getRot());
+00208         }
+00209 }
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CTransform::modelCanCastShadowMap  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+true if the model provide a method to support shadowMap generation +

+ +

+Definition at line 480 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), NL3D::CTransform::IsShadowMapCaster, and uint32. +

+Referenced by NL3D::CTransform::enableCastShadowMap(). +

+

00480 {return getStateFlag(IsShadowMapCaster);}
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CTransform::modelCanReceiveShadowMap  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+true if the model provide a method to support shadowMap receiving +

+ +

+Definition at line 482 of file transform.h. +

+References NL3D::CTransform::getStateFlag(), NL3D::CTransform::IsShadowMapReceiver, and uint32. +

+Referenced by NL3D::CTransform::enableReceiveShadowMap(). +

+

00482 {return getStateFlag(IsShadowMapReceiver);}
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransformShape::profileRender  )  [virtual, inherited]
+
+ + + + + +
+   + + +

+Called at RenderTrav to profile current render. no-op per default. +

+ +

+Reimplemented from NL3D::CTransform. +

+Definition at line 248 of file transform_shape.cpp. +

+References NL3D::CTransform::getOwnerScene(), NL3D::CScene::getRenderTrav(), NL3D::CRenderTrav::isCurrentPassOpaque(), and NL3D::CTransformShape::Shape. +

+

00249 {
+00250         // profile the shape.
+00251         if(Shape)
+00252         {
+00253                 CRenderTrav                     &rdrTrav= getOwnerScene()->getRenderTrav();
+00254                 bool                            currentPassOpaque= rdrTrav.isCurrentPassOpaque();
+00255 
+00256                 Shape->profileSceneRender( &rdrTrav, this, currentPassOpaque );
+00257         }
+00258 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void NL3D::CTransform::receiveShadowMap CShadowMap shadowMap,
const CVector casterPos,
const CMaterial shadowMat
[inline, virtual, inherited]
+
+ + + + + +
+   + + +

+For receivers. Modulate the Object with a ShadowMap. The model shoud render in the scene driver a version of its geometry simplified, and modulate the background with shadowColor.

Parameters:
+ + + +
casterPos the world position of the caster model.
shadowMat a correclty setuped material with good ShadowColor, ready to be rendered.
+
+ +

+Reimplemented in NL3D::CLandscapeModel. +

+Definition at line 506 of file transform.h. +

+Referenced by NL3D::CShadowMapManager::renderProject(). +

+

00506 {}
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CMeshMRMSkinnedInstance::registerBasic  )  [static]
+
+ + + + + +
+   + + +

+Call at the begining of the program, to register the model. +

+ +

+Reimplemented from NL3D::CMeshBaseInstance. +

+Definition at line 62 of file mesh_mrm_skinned_instance.cpp. +

+References NL3D::MeshBaseInstanceId, and NL3D::MeshMRMSkinnedInstanceId. +

+

00063 {
+00064         CScene::registerModel(MeshMRMSkinnedInstanceId, MeshBaseInstanceId, CMeshMRMSkinnedInstance::creator);
+00065 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CMeshBaseInstance::registerToChannelMixer CChannelMixer chanMixer,
const std::string &  prefix
[virtual, inherited]
+
+ + + + + +
+   + + +

+register transform channels (in global anim mode).

See also:
setChannelMixerOwnerShip
+ +

+Reimplemented from NL3D::CTransform. +

+Definition at line 76 of file mesh_base_instance.cpp. +

+References NL3D::CMeshBaseInstance::_AnimatedMorphFactor, getName(), and uint32. +

+Referenced by NL3D::CScene::createInstance(). +

+

00077 {
+00078         uint32 i;
+00079         CTransformShape::registerToChannelMixer(chanMixer, prefix);
+00080 
+00081         // Add any materials.
+00082         for (i = 0; i < _AnimatedMaterials.size(); i++)
+00083         {
+00084                 // append material  matname.*
+00085                 _AnimatedMaterials[i].registerToChannelMixer(chanMixer, prefix + _AnimatedMaterials[i].getMaterialName() + ".");
+00086         }
+00087 
+00088         // Add any morph
+00089         for (i = 0; i < _AnimatedMorphFactor.size(); i++)
+00090         {
+00091                 _AnimatedMorphFactor[i].registerToChannelMixer(chanMixer, prefix + _AnimatedMorphFactor[i].getName());
+00092         }
+00093 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
virtual void NL3D::CTransform::renderIntoSkeletonShadowMap CSkeletonModel rootSkeleton,
CMaterial castMat
[inline, virtual, inherited]
+
+ + + + + +
+   + + +

+Special For Skeleton Caster. Render into the AuxDriver the mesh, within the current setuped Frustum/ViewMatrix. no-op by default, or if hidden in HRC!!

Parameters:
+ + +
rootSkeleton the skeleton which is currently rendering its shadowMap
+
+ +

+Reimplemented in NL3D::CMeshInstance, and NL3D::CSkeletonModel. +

+Definition at line 527 of file transform.h. +

+Referenced by NL3D::CSkeletonModel::renderIntoSkeletonShadowMap(). +

+

00527 {}
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
sint NL3D::CMeshMRMSkinnedInstance::renderShadowSkinGeom uint  remainingVertices,
uint8 vbDest
[protected, virtual]
+
+ + + + + +
+   + + +

+Called for more precise clipping. +

+ +

+Reimplemented from NL3D::CTransform. +

+Definition at line 255 of file mesh_mrm_skinned_instance.cpp. +

+References NL3D::CMeshMRMSkinned::getMeshGeom(), NL3D::CMeshMRMSkinnedGeom::renderShadowSkinGeom(), sint, uint, and uint8. +

+

00256 {
+00257         // Get a pointer on the shape
+00258         CMeshMRMSkinned         *pMesh = NLMISC::safe_cast<CMeshMRMSkinned *>((IShape*)Shape);
+00259         // render the meshGeom
+00260         CMeshMRMSkinnedGeom     &meshGeom= const_cast<CMeshMRMSkinnedGeom&>(pMesh->getMeshGeom ());
+00261         return meshGeom.renderShadowSkinGeom(this, remainingVertices, vbDest);
+00262 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::CMeshMRMSkinnedInstance::renderShadowSkinPrimitives CMaterial castMat,
IDriver drv,
uint  baseVertex
[protected, virtual]
+
+ + + + + +
+   + + +

+Called for more precise clipping. +

+ +

+Reimplemented from NL3D::CTransform. +

+Definition at line 265 of file mesh_mrm_skinned_instance.cpp. +

+References NL3D::CMeshMRMSkinned::getMeshGeom(), NL3D::CMeshMRMSkinnedGeom::renderShadowSkinPrimitives(), and uint. +

+

00266 {
+00267         // Get a pointer on the shape
+00268         CMeshMRMSkinned         *pMesh = NLMISC::safe_cast<CMeshMRMSkinned *>((IShape*)Shape);
+00269         // render the meshGeom
+00270         CMeshMRMSkinnedGeom     &meshGeom= const_cast<CMeshMRMSkinnedGeom&>(pMesh->getMeshGeom ());
+00271         meshGeom.renderShadowSkinPrimitives(this, castMat, drv, baseVertex);
+00272 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CMeshMRMSkinnedInstance::renderSkin float  alphaMRM  )  [protected, virtual]
+
+ + + + + +
+   + + +

+Implementation of the renderSkin. +

+ +

+Reimplemented from NL3D::CTransform. +

+Definition at line 159 of file mesh_mrm_skinned_instance.cpp. +

+References NL3D::CMeshMRMSkinned::getMeshGeom(), NL3D::CTransform::getVisibility(), and NL3D::CMeshMRMSkinnedGeom::renderSkin(). +

+

00160 {
+00161         // Don't setup lighting or matrix in Skin. Done by the skeleton
+00162 
+00163         if(Shape && getVisibility() != CHrcTrav::Hide)
+00164         {
+00165                 // Get a pointer on the shape
+00166                 CMeshMRMSkinned *pMesh = NLMISC::safe_cast<CMeshMRMSkinned *>((IShape*)Shape);
+00167 
+00168                 // render the meshGeom
+00169                 CMeshMRMSkinnedGeom     &meshGeom= const_cast<CMeshMRMSkinnedGeom&>(pMesh->getMeshGeom ());
+00170                 meshGeom.renderSkin( this, alphaMRM );
+00171         }
+00172 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
sint NL3D::CMeshMRMSkinnedInstance::renderSkinGroupGeom float  alphaMRM,
uint  remainingVertices,
uint8 dest
[protected, virtual]
+
+ + + + + +
+   + + +

+Called for more precise clipping. +

+ +

+Reimplemented from NL3D::CTransform. +

+Definition at line 199 of file mesh_mrm_skinned_instance.cpp. +

+References NL3D::CMeshMRMSkinned::getMeshGeom(), NL3D::CMeshMRMSkinnedGeom::renderSkinGroupGeom(), sint, uint, and uint8. +

+

00200 {
+00201         // Get a pointer on the shape
+00202         CMeshMRMSkinned         *pMesh = NLMISC::safe_cast<CMeshMRMSkinned *>((IShape*)Shape);
+00203         // render the meshGeom
+00204         CMeshMRMSkinnedGeom     &meshGeom= const_cast<CMeshMRMSkinnedGeom&>(pMesh->getMeshGeom ());
+00205         return meshGeom.renderSkinGroupGeom(this, alphaMRM, remainingVertices, dest);
+00206 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::CMeshMRMSkinnedInstance::renderSkinGroupPrimitives uint  baseVertex,
std::vector< CSkinSpecularRdrPass > &  specularRdrPasses,
uint  skinIndex
[protected, virtual]
+
+ + + + + +
+   + + +

+Called for more precise clipping. +

+ +

+Reimplemented from NL3D::CTransform. +

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

+References NL3D::CMeshMRMSkinned::getMeshGeom(), NL3D::CMeshMRMSkinnedGeom::renderSkinGroupPrimitives(), and uint. +

+

00209 {
+00210         // Get a pointer on the shape
+00211         CMeshMRMSkinned         *pMesh = NLMISC::safe_cast<CMeshMRMSkinned *>((IShape*)Shape);
+00212         // render the meshGeom
+00213         CMeshMRMSkinnedGeom     &meshGeom= const_cast<CMeshMRMSkinnedGeom&>(pMesh->getMeshGeom ());
+00214         meshGeom.renderSkinGroupPrimitives(this, baseVertex, specularRdrPasses, skinIndex);
+00215 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CMeshMRMSkinnedInstance::renderSkinGroupSpecularRdrPass uint  rdrPassId  )  [protected, virtual]
+
+ + + + + +
+   + + +

+Called for more precise clipping. +

+ +

+Reimplemented from NL3D::CTransform. +

+Definition at line 217 of file mesh_mrm_skinned_instance.cpp. +

+References NL3D::CMeshMRMSkinned::getMeshGeom(), NL3D::CMeshMRMSkinnedGeom::renderSkinGroupSpecularRdrPass(), and uint. +

+

00218 {
+00219         // Get a pointer on the shape
+00220         CMeshMRMSkinned         *pMesh = NLMISC::safe_cast<CMeshMRMSkinned *>((IShape*)Shape);
+00221         // render the meshGeom
+00222         CMeshMRMSkinnedGeom     &meshGeom= const_cast<CMeshMRMSkinnedGeom&>(pMesh->getMeshGeom ());
+00223         meshGeom.renderSkinGroupSpecularRdrPass(this, rdrPassId);
+00224 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransform::resetLighting  )  [inherited]
+
+ + + + + +
+   + + +

+reset lights which influence this models. NB: the model is removed from all lights's list (except FrozenStaticLightSetup). Called by light rendering.

+NB: the model is NOT removed from LightingManager (with eraseStaticLightedModel()). +

+Definition at line 988 of file transform.cpp. +

+References NL3D::CTransform::_LightContribution, NL3D::CLightContribution::FrozenStaticLightSetup, NL3D::CTransform::IsNeedUpdateLighting, NL3D::CTransform::isNeedUpdateLighting(), NL3D_MAX_LIGHT_CONTRIBUTION, NL3D::CLightContribution::NumFrozenStaticLight, NL3D::CLightContribution::PointLight, NL3D::CPointLight::removeLightedModel(), NL3D::CTransform::setStateFlag(), NL3D::CLightContribution::TransformIterator, and uint. +

+Referenced by NL3D::CLightingManager::addDynamicLight(), NL3D::CTransform::freezeStaticLightSetup(), NL3D::CPointLight::resetLightedModels(), NL3D::CTransform::unfreezeStaticLightSetup(), NL3D::CTransform::updateWorld(), and NL3D::CTransform::~CTransform(). +

+

00989 {
+00990         // if the model is already isNeedUpdateLighting, his light setup is reseted.
+00991         // so no need to reset again
+00992         if(isNeedUpdateLighting())
+00993                 return;
+00994 
+00995 
+00996         // For all light not in FrozenStaticLightSetup, remove me from their list
+00997         uint    startLight= 0;
+00998         if(_LightContribution.FrozenStaticLightSetup)
+00999         {
+01000                 startLight= _LightContribution.NumFrozenStaticLight;
+01001         }
+01002 
+01003         // for all light in the list, remove me from their list.
+01004         for(uint i=startLight; i<NL3D_MAX_LIGHT_CONTRIBUTION; i++)
+01005         {
+01006                 CPointLight             *pl= _LightContribution.PointLight[i];
+01007                 // if end of list, break.
+01008                 if(!pl)
+01009                         break;
+01010                 else
+01011                 {
+01012                         // remove me from this light.
+01013                         pl->removeLightedModel(_LightContribution.TransformIterator[i]);
+01014                 }
+01015         }
+01016         // empty the list.
+01017         if(startLight<NL3D_MAX_LIGHT_CONTRIBUTION)
+01018                 _LightContribution.PointLight[startLight]= NULL;
+01019 
+01020 
+01021         // the model needs to update his lighting.
+01022         setStateFlag(IsNeedUpdateLighting, true);
+01023         
+01024 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::IAnimatable::resize uint  count  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Change value count, bit are set to 0

+

Parameters:
+ + +
count is the new value count.
+
+ +

+Definition at line 195 of file animatable.h. +

+References count, nlassert, and uint. +

+

00196         {
+00197                 // with the "uint32 _BitSet" implementation, juste check the size is correct
+00198                 nlassert(count<=32);
+00199         }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CMeshBaseInstance::selectTextureSet uint  id  )  [inherited]
+
+ + + + + +
+   + + +

+If there are selectable texture in this mesh shape, this replace the matching material instances with the right texture If getAsyncTextureMode()==true, then this replace the AsyncTexture fileNames, instead of the Materials file Names. +

+Definition at line 268 of file mesh_base_instance.cpp. +

+References NL3D::CMeshBaseInstance::_AsyncTextureMode, NL3D::CMeshBaseInstance::AsyncTextures, NL3D::ITexture::buildNonSelectableVersion(), NL3D::CTextureFile::getFileName(), NL3D::CMeshBase::getMaterial(), NL3D::CMeshBase::getNbMaterial(), NL3D::CMaterial::getTexture(), NL3D::IDRV_MAT_MAXTEXTURES, NL3D::ITexture::isSelectable(), nlassert, NL3D::CMeshBaseInstance::setAsyncTextureDirty(), and uint. +

+Referenced by NL3D::CMeshBase::instanciateMeshBase(). +

+

00269 {
+00270         nlassert(Shape);
+00271         CMeshBase *mb = NLMISC::safe_cast<CMeshBase *>((IShape *) Shape);
+00272         const uint numMat = mb->getNbMaterial();
+00273         nlassert(numMat == Materials.size());
+00274         // see which material are selectable
+00275         for(uint k = 0; k < numMat; ++k)
+00276         {
+00277                 CMaterial &mat = mb->getMaterial(k);
+00278                 for(uint l = 0; l < IDRV_MAT_MAXTEXTURES; ++l)
+00279                 {
+00280                         if (mat.getTexture(l) && mat.getTexture(l)->isSelectable())
+00281                         {
+00282                                 // use a smartPtr so the textFile will be released if just used to set the name for AsyncTextures.
+00283                                 CSmartPtr<ITexture>             texNSV= mat.getTexture(l)->buildNonSelectableVersion(id);
+00284 
+00285                                 // std case: just replace the texture.
+00286                                 if(!_AsyncTextureMode)
+00287                                 {
+00288                                         Materials[k].setTexture(l, texNSV);
+00289                                 }
+00290                                 // Async case
+00291                                 else
+00292                                 {
+00293                                         // If texture file, must copy the texture name
+00294                                         if(AsyncTextures[k].IsTextureFile[l])
+00295                                         {
+00296                                                 CTextureFile    *textFile= safe_cast<CTextureFile*>((ITexture*)texNSV);
+00297                                                 AsyncTextures[k].TextureNames[l]= textFile->getFileName();
+00298                                         }
+00299                                         // else replace the texture.
+00300                                         else
+00301                                                 Materials[k].setTexture(l, texNSV);
+00302                                 }
+00303                         }
+00304                 }
+00305         }
+00306 
+00307         // Flag the instance as AsyncTextureDirty if in this mode
+00308         if(_AsyncTextureMode)
+00309         {
+00310                 setAsyncTextureDirty(true);
+00311         }
+00312 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CMeshMRMSkinnedInstance::setApplySkin bool  state  )  [protected, virtual]
+
+ + + + + +
+   + + +

+Called when the skin is applied on the skeleton. +

+ +

+Reimplemented from NL3D::CTransform. +

+Definition at line 83 of file mesh_mrm_skinned_instance.cpp. +

+References clearRawSkinCache(), clearShiftedTriangleCache(), NL3D::CMeshMRMSkinned::computeBonesId(), and NL3D::CMeshMRMSkinned::updateSkeletonUsage(). +

+

00084 {
+00085         // Call parents method
+00086         CMeshBaseInstance::setApplySkin (state);
+00087 
+00088         // Get a pointer on the shape
+00089         CMeshMRMSkinned *pMesh = NLMISC::safe_cast<CMeshMRMSkinned *>((IShape*)Shape);
+00090 
+00091         // Recompute the id
+00092         if (state)
+00093         {
+00094                 pMesh->computeBonesId (_FatherSkeletonModel);
+00095         }
+00096 
+00097         // update the skeleton usage according to the mesh.
+00098         pMesh->updateSkeletonUsage(_FatherSkeletonModel, state);
+00099 
+00100         // If unbinded, clean all the cache.
+00101         if(state==false)
+00102         {
+00103                 clearRawSkinCache();
+00104                 clearShiftedTriangleCache();
+00105         }
+00106 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CMeshBaseInstance::setAsyncTextureDirty bool  flag  )  [inline, inherited]
+
+ + + + + +
+   + + +

+User is free to flag this state, to know if startAsyncTextureLoading() should be called. Internal system don't use this flag. Default is false +

+Definition at line 185 of file mesh_base_instance.h. +

+References NL3D::CMeshBaseInstance::_AsyncTextureDirty. +

+Referenced by NL3D::CMeshBaseInstance::enableAsyncTextureMode(), NL3D::CMeshBaseInstance::selectTextureSet(), NL3D::CInstanceUser::setAsyncTextureDirty(), and NL3D::CInstanceMaterialUser::setTextureFileName(). +

+

00185 {_AsyncTextureDirty= flag;}
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CMeshBaseInstance::setAsyncTextureDistance float  dist  )  [inline, inherited]
+
+ + + + + +
+   + + +

+For Lod of texture, and load balancing, set the approximate distance of the instance to the camera. +

+Definition at line 178 of file mesh_base_instance.h. +

+References NL3D::CMeshBaseInstance::_AsyncTextureDistance. +

+Referenced by NL3D::CInstanceUser::setAsyncTextureDistance(). +

+

00178 {_AsyncTextureDistance= dist;}
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CMeshBaseInstance::setBlendShapeFactor const std::string &  BlendShapeName,
float  rFactor
[inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 154 of file mesh_base_instance.cpp. +

+References NL3D::CMeshBaseInstance::_AnimatedMorphFactor, and uint32. +

+Referenced by NL3D::CInstanceGroup::setBlendShapeFactor(). +

+

00155 {
+00156         for (uint32 i = 0; i < _AnimatedMorphFactor.size(); ++i)
+00157                 if (BlendShapeName == _AnimatedMorphFactor[i].getName())
+00158                 {
+00159                         _AnimatedMorphFactor[i].setFactor (rFactor);
+00160                 }
+00161 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setChannelMixerOwnerShip bool  enable = true  )  [inline, inherited]
+
+ + + + + +
+   + + +

+This force gives this object ownership of the channel mixer it is registered to, so it will delete it when the dtor is called. It should be called AFTER this object has been registered to a channel mixer, because a new registration will broke the ownership. This is useful for automatic animations, when there's no owner of the channel mixer that could delete it. +

+Definition at line 256 of file transform.h. +

+References NL3D::CTransform::IsDeleteChannelMixer, and NL3D::CTransform::setStateFlag(). +

+Referenced by NL3D::CScene::createInstance(), and NL3D::CTransform::registerToChannelMixer(). +

+

00256 { setStateFlag(IsDeleteChannelMixer, enable); }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setClusterSystem CInstanceGroup pCS  )  [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 912 of file transform.h. +

+References NL3D::CTransform::_ClusterSystem, NL3D::CTransform::ForceClipRoot, NL3D::CTransform::getStateFlag(), and nlassert. +

+Referenced by NL3D::CScene::findCameraClusterSystemFromRay(), and NL3D::CTransform::setForceClipRoot(). +

+

00913 {
+00914         if (pCS != NULL)
+00915         {
+00916                 nlassert(!getStateFlag(ForceClipRoot)); // the transform must be linked to the root, and have not cluster system when this flag is set
+00917         }
+00918         _ClusterSystem = pCS;
+00919 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransformShape::setDistMax float  distMax  )  [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 137 of file transform_shape.h. +

+Referenced by NL3D::CScene::createInstance(), and NL3D::CInstanceUser::setDistMax(). +

+

00137 { _DistMax = distMax; }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setDontUnfreezeChildren bool  val  )  [inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 378 of file transform.cpp. +

+References NL3D::CTransform::_DontUnfreezeChildren. +

+Referenced by NL3D::CInstanceGroup::createRoot(). +

+

00379 {
+00380         _DontUnfreezeChildren = val;
+00381 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::IAnimatable::setFather IAnimatable father,
uint  fatherOwnerBit
[inline, inherited]
+
+ + + + + +
+   + + +

+Say which (if any) IAnimatable owns this one. This is important for Touch propagation. By this system, Fathers and ancestors know if they must check their sons (isTouched() return true).

+

Parameters:
+ + + +
father the father we must inform of our update.
fatherOwnerBit What bit of father we must set when we are updated
+
+ +

+Definition at line 153 of file animatable.h. +

+References NL3D::IAnimatable::_Father, NL3D::IAnimatable::_FatherOwnerBit, NL3D::IAnimatable::propagateTouch(), and uint. +

+Referenced by NL3D::CMeshBase::instanciateMeshBase(), and NL3D::CSegRemanence::setAnimatedMaterial(). +

+

00154         {
+00155                 _Father= father; _FatherOwnerBit= fatherOwnerBit;
+00156 
+00157                 // propagate the touch to the fathers.
+00158                 propagateTouch();
+00159         }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::IAnimatable::setFlag uint  valueId  )  [inline, protected, inherited]
+
+ + + + + +
+   + + +

+This method set a bit in the bitset. +

+ +

+Definition at line 239 of file animatable.h. +

+References NL3D::IAnimatable::_BitSet, and uint. +

+Referenced by NL3D::IAnimatable::propagateTouch(), and NL3D::IAnimatable::touch(). +

+

00240         {
+00241                 _BitSet|= (1<<valueId);
+00242         }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setForceClipRoot bool  forceClipRoot  )  [inherited]
+
+ + + + + +
+   + + +

+Force the transform to always be attached to the root As a consequence, it can't be inserted into a cluster system (even the root cluster) and is thus always visible when in the frustum (not clusterized) NB : any call to setClusterSystem will cause an assertion when the flag is set NB : any call to hrcUnlink will cause an assertion when the flag is set (must remain linked to the root) +

+Definition at line 1380 of file transform.cpp. +

+References NL3D::CTransform::_OwnerScene, NL3D::CTransform::ForceClipRoot, NL3D::CScene::getRoot(), NL3D::CTransform::getStateFlag(), NL3D::CTransform::hrcLinkSon(), NL3D::CTransform::hrcUnlink(), NL3D::CTransform::setClusterSystem(), and NL3D::CTransform::setStateFlag(). +

+Referenced by NL3D::CTransformUser::setForceClipRoot(). +

+

01381 {
+01382         if (forceClipRoot == (getStateFlag(ForceClipRoot) != 0)) return;
+01383         if (forceClipRoot)
+01384         {
+01385                 // unlink from previous father and link to the root
+01386                 hrcUnlink();
+01387                 if (_OwnerScene)
+01388                 {
+01389                         _OwnerScene->getRoot()->hrcLinkSon(this);
+01390                 }
+01391                 setClusterSystem(NULL);
+01392         }
+01393         setStateFlag(ForceClipRoot, forceClipRoot);
+01394 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setGeneratingShadowMap bool  state  )  [inline, inherited]
+
+ + + + + +
+   + + +

+For ShadowMapManager. true if the model is rendering its ShadowMap this frame. +

+ +

+Definition at line 514 of file transform.h. +

+References NL3D::CTransform::canCastShadowMap(), NL3D::CTransform::IsGeneratingShadowMap, and NL3D::CTransform::setStateFlag(). +

+Referenced by NL3D::CShadowMapManager::addShadowCasterGenerate(). +

+

00514 {if(canCastShadowMap()) setStateFlag(IsGeneratingShadowMap, state);}
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setIsBigLightable bool  val  )  [protected, inherited]
+
+ + + + + +
+   + + +

+Deriver must use this method with true to indicate the model is a big lightable. +

+ +

+Definition at line 574 of file transform.cpp. +

+References NL3D::CTransform::IsBigLightable, and NL3D::CTransform::setStateFlag(). +

+Referenced by NL3D::CMeshBase::instanciateMeshBase(). +

+

00575 {
+00576         setStateFlag(IsBigLightable, val);
+00577 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setIsCluster bool  val  )  [inline, protected, inherited]
+
+ + + + + +
+   + + +

+For CCluster only. +

+ +

+Definition at line 671 of file transform.h. +

+References NL3D::CTransform::IsCluster, and NL3D::CTransform::setStateFlag(). +

+

00671 {setStateFlag(IsCluster, val);}
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setIsForceAnimDetail bool  val  )  [protected, inherited]
+
+ + + + + +
+   + + +

+Deriver must use this method with true if the model must be AnimDetail-ed whatever registerToChannelMixer() has been called or not +

+Definition at line 590 of file transform.cpp. +

+References NL3D::CTransform::_FatherSkeletonModel, NL3D::CSkeletonModel::dirtSkinRenderLists(), NL3D::CTransform::getStateFlag(), NL3D::CTransform::IsAnimDetailable, NL3D::CTransform::IsForceAnimDetail, NL3D::CTransform::isSkinned(), nlassert, and NL3D::CTransform::setStateFlag(). +

+

00591 {
+00592         setStateFlag(IsForceAnimDetail, val );
+00593 
+00594         // Update flag, if we must be inserted in AnimDetail
+00595         setStateFlag(IsAnimDetailable, _ChannelMixer || getStateFlag(IsForceAnimDetail) );
+00596 
+00597         // If skinned, then must inform skeleton parent that it must recompute skin render/animDetail lists
+00598         if(isSkinned())
+00599         {
+00600                 nlassert(_FatherSkeletonModel);
+00601                 _FatherSkeletonModel->dirtSkinRenderLists();
+00602         }
+00603 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setIsLightable bool  val  )  [protected, inherited]
+
+ + + + + +
+   + + +

+Deriver must use this method with true to indicate the model support lighting. +

+ +

+Definition at line 552 of file transform.cpp. +

+References NL3D::CTransform::getStateFlag(), NL3D::CTransform::IsFinalLightable, NL3D::CTransform::IsLightable, NL3D::CTransform::IsUserLightable, and NL3D::CTransform::setStateFlag(). +

+Referenced by NL3D::CMeshBase::instanciateMeshBase(). +

+

00553 {
+00554         setStateFlag(IsLightable, val);
+00555         // update IsFinalLightable
+00556         setStateFlag(IsFinalLightable, (getStateFlag(IsLightable) && getStateFlag(IsUserLightable)) );
+00557 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setIsLoadbalancable bool  val  )  [protected, inherited]
+
+ + + + + +
+   + + +

+Deriver must use this method with true to indicate the model support loadBalancing. +

+ +

+Definition at line 605 of file transform.cpp. +

+References NL3D::CTransform::IsLoadBalancable, and NL3D::CTransform::setStateFlag(). +

+

00606 {
+00607         setStateFlag(IsLoadBalancable, val );
+00608 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setIsMeshBaseInstance bool  val  )  [inline, protected, inherited]
+
+ + + + + +
+   + + +

+For CMeshBaseInstance only. +

+ +

+Definition at line 667 of file transform.h. +

+References NL3D::CTransform::IsMeshBaseInstance, and NL3D::CTransform::setStateFlag(). +

+

00667 {setStateFlag(IsMeshBaseInstance, val);}
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setIsRenderable bool  val  )  [protected, inherited]
+
+ + + + + +
+   + + +

+Deriver must use this method with true to indicate the model can be rendered. "can be rendered" means if object has to be inserted in RenderTrav list. eg: a mesh must be inserted in a render list, but not a light, or a NULL transform. The default is false. +

+Definition at line 568 of file transform.cpp. +

+References NL3D::CTransform::IsRenderable, and NL3D::CTransform::setStateFlag(). +

+

00569 {
+00570         setStateFlag(IsRenderable, val);
+00571 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setIsShadowMapCaster bool  val  )  [inline, protected, inherited]
+
+ + + + + +
+   + + +

+ShadowMap. +

+ +

+Definition at line 674 of file transform.h. +

+References NL3D::CTransform::IsShadowMapCaster, and NL3D::CTransform::setStateFlag(). +

+

00674 {setStateFlag(IsShadowMapCaster, val);}
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setIsShadowMapReceiver bool  val  )  [inline, protected, inherited]
+
+ + + + + +
+   + + +

+Deriver must use this method with true to indicate the model is a big lightable. +

+ +

+Definition at line 675 of file transform.h. +

+References NL3D::CTransform::IsShadowMapReceiver, and NL3D::CTransform::setStateFlag(). +

+

00675 {setStateFlag(IsShadowMapReceiver, val);}
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setIsSkeleton bool  val  )  [protected, inherited]
+
+ + + + + +
+   + + +

+For CSkeletonModel only. +

+ +

+Definition at line 579 of file transform.cpp. +

+References NL3D::CTransform::IsSkeleton, and NL3D::CTransform::setStateFlag(). +

+

00580 {
+00581         setStateFlag(IsSkeleton, val);
+00582 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setIsTransformShape bool  val  )  [inline, protected, inherited]
+
+ + + + + +
+   + + +

+For CTransformShape only. +

+ +

+Definition at line 669 of file transform.h. +

+References NL3D::CTransform::IsTransformShape, and NL3D::CTransform::setStateFlag(). +

+

00669 {setStateFlag(IsTransformShape, val);}
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setLoadBalancingGroup const std::string &  group  )  [inherited]
+
+ + + + + +
+   + + +

+Change the load Balancing group of a model. Every models are in a special LoadBalancingGroup. NB: the group is created if did not exist. NB: if models are skinned, it is their Skeleton which drive the group

+By default, models lies in the "Default" group, but Skeletons for skinning and ParticlesSystems which are in "Skin" and "Fx" group respectively. The "Default" group is special because it is not balanced (ie models are only degraded from their distance to camera) +

+Definition at line 522 of file transform.cpp. +

+References NL3D::CTransform::_LoadBalancingGroup, NL3D::CScene::getLoadBalancingTrav(), NL3D::CLoadBalancingTrav::getOrCreateGroup(), and NL3D::CTransform::getOwnerScene(). +

+Referenced by NL3D::CSkeletonShape::createInstance(), NL3D::CSegRemanenceShape::createInstance(), and NL3D::CParticleSystemShape::createInstance(). +

+

00523 {
+00524         // Get the traversal.
+00525         CLoadBalancingTrav      &trav= getOwnerScene()->getLoadBalancingTrav();
+00526         // get the group from trav (create if needed), and set it.
+00527         _LoadBalancingGroup= trav.getOrCreateGroup(group);
+00528 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setLogicInfo ILogicInfo logicInfo  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Set the LogicInfo for this transfrom, eg to retrieve statc light information, see ILogicInfo. Ptr is kept in CTransfrom, so should call setLogicInfo(NULL) before to clean up. +

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

+References NL3D::CTransform::_LogicInfo. +

+Referenced by NL3D::CTransformUser::setLogicInfo(). +

+

00389 {_LogicInfo= logicInfo;}
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::ITransformable::setMatrix const CMatrix mat  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Work only in DirecTMatrix mode (nlassert). +

+ +

+Definition at line 174 of file transformable.h. +

+References NL3D::ITransformable::_LocalMatrixDate, NL3D::ITransformable::DirectMatrix, and nlassert. +

+Referenced by NL3D::ITransformable::lookAt(), and NL3D::CTransformableUser::setMatrix(). +

+

00175         {
+00176                 nlassert(_Mode==DirectMatrix);
+00177                 _LocalMatrix= mat;
+00178                 // The matrix has changed.
+00179                 _LocalMatrixDate++;
+00180         }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setMeanColor CRGBA  color  )  [inherited]
+
+ + + + + +
+   + + +

+set the Mean color of the transform. The mean color can be used for many purpose, such as drawing objects if the textures are not loaded. It is used also for Lod Character. Default color is (255,255,255) +

+Definition at line 540 of file transform.cpp. +

+References NL3D::CTransform::_MeanColor. +

+

00541 {
+00542         // if the color is different from prec
+00543         if(color!=_MeanColor)
+00544         {
+00545                 // change it.
+00546                 _MeanColor= color;
+00547         }
+00548 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setOpacity bool  v  )  [inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 255 of file transform.cpp. +

+References NL3D::CTransform::_FatherSkeletonModel, NL3D::CSkeletonModel::dirtSkinRenderLists(), NL3D::CTransform::getStateFlag(), NL3D::CTransform::isSkinned(), nlassert, NL3D::CTransform::setStateFlag(), and v. +

+Referenced by NL3D::CFlareModel::CFlareModel(), NL3D::CParticleSystemModel::CParticleSystemModel(), NL3D::CSkeletonModel::CSkeletonModel(), NL3D::CVegetableBlendLayerModel::CVegetableBlendLayerModel(), NL3D::CWaterModel::CWaterModel(), NL3D::CMeshBase::instanciateMeshBase(), NL3D::CTransformUser::setOpacity(), NL3D::CMeshMultiLodInstance::traverseLoadBalancing(), NL3D::CSegRemanence::updateOpacityFromShape(), and NL3D::CParticleSystemModel::updateOpacityInfos(). +

+

00256 { 
+00257         bool bTmp = getStateFlag(IsOpaque) == 0 ? false : true;
+00258         if (bTmp != v)
+00259         {
+00260                 setStateFlag(IsOpaque, v);
+00261                 if(isSkinned())
+00262                 {
+00263                         nlassert(_FatherSkeletonModel);
+00264                         _FatherSkeletonModel->dirtSkinRenderLists();
+00265                 }
+00266         }
+00267 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setOrderingLayer uint  layer  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Set the current layer for this transform. Typically, this is used to sort transparent objects. Isn't used with solid objects. For now : Layer 0 is for underwater Layer 1 is for water surfaces Layer 2 is for object above water +

+Definition at line 184 of file transform.h. +

+References NL3D::CTransform::_OrderingLayer, and uint. +

+Referenced by NL3D::CWaterModel::CWaterModel(), and NL3D::CTransformUser::setOrderingLayer(). +

+

00184 { _OrderingLayer = layer; }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::ITransformable::setPivot float  x,
float  y,
float  z
[inline, inherited]
+
+ + + + + +
+   + + +

+Work only in Rot* mode (nlassert). +

+ +

+Definition at line 169 of file transformable.h. +

+References NL3D::ITransformable::setPivot(), x, y, and z. +

+

00170         {
+00171                 setPivot(CVector(x, y, z));
+00172         }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::ITransformable::setPivot const CVector pivot  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Work only in Rot* mode (nlassert). +

+ +

+Definition at line 162 of file transformable.h. +

+References NL3D::ITransformable::_Pivot, nlassert, NL3D::ITransformable::PivotValue, NL3D::ITransformable::RotEuler, NL3D::ITransformable::RotQuat, NL3D::IAnimatable::touch(), and NL3D::CAnimatedValueBlendable< T >::Value. +

+Referenced by NL3D::ITransformable::lookAt(), NL3D::CTransformableUser::setPivot(), and NL3D::ITransformable::setPivot(). +

+

00163         {
+00164                 nlassert(_Mode==RotEuler || _Mode==RotQuat);
+00165                 _Pivot.Value= pivot;
+00166                 touch(PivotValue, OwnerBit);
+00167         }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::ITransformable::setPos float  x,
float  y,
float  z
[inline, inherited]
+
+ + + + + +
+   + + +

+Work only in Rot* mode(nlassert). +

+ +

+Definition at line 121 of file transformable.h. +

+References NL3D::ITransformable::setPos(), x, y, and z. +

+

00122         {
+00123                 setPos(CVector(x,y,z));
+00124         }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::ITransformable::setPos const CVector pos  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Work only in Rot* mode(nlassert). +

+ +

+Definition at line 114 of file transformable.h. +

+References nlassert, NL3D::ITransformable::PosValue, NL3D::ITransformable::RotEuler, NL3D::ITransformable::RotQuat, NL3D::IAnimatable::touch(), and NL3D::CAnimatedValueBlendable< T >::Value. +

+Referenced by NL3D::CCamera::build(), NL3D::ITransformable::lookAt(), NL3D::CTransformableUser::setPos(), NL3D::ITransformable::setPos(), NL3D::CInstanceGroup::setPos(), and NL3D::CPSLight::step(). +

+

00115         {
+00116                 nlassert(_Mode==RotEuler || _Mode==RotQuat);
+00117                 _Pos.Value= pos;
+00118                 touch(PosValue, OwnerBit);
+00119         }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::ITransformable::setRotEuler float  rotX,
float  rotY,
float  rotZ
[inline, inherited]
+
+ + + + + +
+   + + +

+Work only in RotEuler mode(nlassert). +

+ +

+Definition at line 133 of file transformable.h. +

+References NL3D::ITransformable::setRotEuler(). +

+

00134         {
+00135                 setRotEuler(CVector(rotX, rotY, rotZ));
+00136         }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::ITransformable::setRotEuler const CVector rot  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Work only in RotEuler mode(nlassert). +

+ +

+Definition at line 126 of file transformable.h. +

+References NL3D::ITransformable::_RotEuler, nlassert, NL3D::ITransformable::RotEuler, NL3D::ITransformable::RotEulerValue, NL3D::IAnimatable::touch(), and NL3D::CAnimatedValueBlendable< T >::Value. +

+Referenced by NL3D::CTransformableUser::setRotEuler(), and NL3D::ITransformable::setRotEuler(). +

+

00127         {
+00128                 nlassert(_Mode==RotEuler);
+00129                 _RotEuler.Value= rot;
+00130                 touch(RotEulerValue, OwnerBit);
+00131         }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::ITransformable::setRotQuat const CQuat quat  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Work only in RotQuat mode (nlassert). +

+ +

+Definition at line 138 of file transformable.h. +

+References NL3D::ITransformable::_RotQuat, nlassert, NL3D::ITransformable::RotQuat, NL3D::ITransformable::RotQuatValue, NL3D::IAnimatable::touch(), and NL3D::CAnimatedValueBlendable< T >::Value. +

+Referenced by NL3D::CTargetAnimCtrl::execute(), NL3D::ITransformable::lookAt(), NL3D::CTransformableUser::setRotQuat(), and NL3D::CInstanceGroup::setRotQuat(). +

+

00139         {
+00140                 nlassert(_Mode==RotQuat);
+00141                 _RotQuat.Value= quat;
+00142                 touch(RotQuatValue, OwnerBit);
+00143         }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::ITransformable::setScale float  scale  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Work only in Rot* mode (nlassert). +

+ +

+Definition at line 157 of file transformable.h. +

+References NL3D::ITransformable::setScale(). +

+

00158         {
+00159                 setScale(CVector(scale, scale, scale));
+00160         }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::ITransformable::setScale float  scaleX,
float  scaleY,
float  scaleZ
[inline, inherited]
+
+ + + + + +
+   + + +

+Work only in Rot* mode (nlassert). +

+ +

+Definition at line 152 of file transformable.h. +

+References NL3D::ITransformable::setScale(). +

+

00153         {
+00154                 setScale(CVector(scaleX, scaleY, scaleZ));
+00155         }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::ITransformable::setScale const CVector scale  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Work only in Rot* mode (nlassert). +

+ +

+Definition at line 145 of file transformable.h. +

+References nlassert, NL3D::ITransformable::RotEuler, NL3D::ITransformable::RotQuat, NL3D::ITransformable::ScaleValue, NL3D::IAnimatable::touch(), and NL3D::CAnimatedValueBlendable< T >::Value. +

+Referenced by NL3D::ITransformable::lookAt(), NL3D::CTransformableUser::setScale(), and NL3D::ITransformable::setScale(). +

+

00146         {
+00147                 nlassert(_Mode==RotEuler || _Mode==RotQuat);
+00148                 _Scale.Value= scale;
+00149                 touch(ScaleValue, OwnerBit);
+00150         }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::ITransformable::setTransformMode TTransformMode  mode,
CMatrix::TRotOrder  ro = CMatrix::ZXY
[inline, inherited]
+
+ + + + + +
+   + + +

+Change the transform mode. Components or matrix are not reseted. +

+ +

+Definition at line 100 of file transformable.h. +

+References NL3D::ITransformable::_RotOrder, NL3D::ITransformable::PosValue, and NL3D::IAnimatable::touch(). +

+Referenced by NL3D::CCamera::build(), NL3D::CCamera::enableTargetAnimation(), NL3D::CPSMesh::newElement(), NL3D::CTransformableUser::setTransformMode(), and NL3D::CPSMesh::updatePos(). +

+

00101         {
+00102                 _Mode= mode;
+00103                 _RotOrder= ro;
+00104                 // just for information.
+00105                 touch(PosValue, OwnerBit);
+00106         }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setTransparency bool  v  )  [inherited]
+
+ + + + + +
+   + + +

+Accessors for opacity/transparency +

+Definition at line 240 of file transform.cpp. +

+References NL3D::CTransform::_FatherSkeletonModel, NL3D::CSkeletonModel::dirtSkinRenderLists(), NL3D::CTransform::getStateFlag(), NL3D::CTransform::isSkinned(), nlassert, NL3D::CTransform::setStateFlag(), and v. +

+Referenced by NL3D::CFlareModel::CFlareModel(), NL3D::CParticleSystemModel::CParticleSystemModel(), NL3D::CSkeletonModel::CSkeletonModel(), NL3D::CVegetableBlendLayerModel::CVegetableBlendLayerModel(), NL3D::CWaterModel::CWaterModel(), NL3D::CMeshBase::instanciateMeshBase(), NL3D::CTransformUser::setTransparency(), NL3D::CMeshMultiLodInstance::traverseLoadBalancing(), NL3D::CSegRemanence::updateOpacityFromShape(), NL3D::CParticleSystemModel::updateOpacityInfos(), and NL3D::CSkeletonModel::updateSkinRenderLists(). +

+

00241 { 
+00242         bool bTmp = getStateFlag(IsTransparent) == 0 ? false : true;
+00243         if (bTmp != v)
+00244         {
+00245                 setStateFlag(IsTransparent, v);
+00246                 if(isSkinned())
+00247                 {
+00248                         nlassert(_FatherSkeletonModel);
+00249                         _FatherSkeletonModel->dirtSkinRenderLists();
+00250                 }
+00251         }
+00252 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CTransformShape::setupCurrentLightContribution CLightContribution lightContrib,
bool  useLocalAtt
[protected, inherited]
+
+ + + + + +
+   + + +

+For deriver who wants to setup their own current lightContribution setup (as skeleton). Must call changeLightSetup() so change are effectively made in driver +

+Definition at line 98 of file transform_shape.cpp. +

+References NL3D::CTransformShape::_CurrentLightContribution, and NL3D::CTransformShape::_CurrentUseLocalAttenuation. +

+Referenced by NL3D::CSkeletonModel::renderSkins(). +

+

00099 {
+00100         _CurrentLightContribution= lightContrib;
+00101         _CurrentUseLocalAttenuation= useLocalAtt;
+00102 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setUserClipping bool  enable  )  [inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 1310 of file transform.cpp. +

+References NL3D::CTransform::setStateFlag(), and NL3D::CTransform::UserClipping. +

+Referenced by NL3D::CTransformUser::setUserClipping(). +

+

01311 {
+01312         setStateFlag (UserClipping, enable);
+01313 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setUserLightable bool  enable  )  [inherited]
+
+ + + + + +
+   + + +

+Set the UserLightable flag. if false, isLightable() will always return false. Doing this, user can disable lighting on a model which may be interesting for speed. Default behavior is UserLightable==true. +

+Definition at line 559 of file transform.cpp. +

+References NL3D::CTransform::getStateFlag(), NL3D::CTransform::IsFinalLightable, NL3D::CTransform::IsLightable, NL3D::CTransform::IsUserLightable, and NL3D::CTransform::setStateFlag(). +

+Referenced by NL3D::CTransformUser::setUserLightable(). +

+

00560 {
+00561         setStateFlag(IsUserLightable, enable);
+00562         // update IsFinalLightable
+00563         setStateFlag(IsFinalLightable, (getStateFlag(IsLightable) && getStateFlag(IsUserLightable)) );
+00564 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CTransform::setWorldMatrix const CMatrix mat  )  [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 302 of file transform.h. +

+Referenced by NL3D::CParticleSystemManager::processAnimate(). +

+

00302 { _WorldMatrix = mat;}
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransform::show  )  [inherited]
+
+ + + + + +
+   + + +

+Show the objet and his sons. +

+ +

+Definition at line 271 of file transform.cpp. +

+References NL3D::CTransform::_FatherSkeletonModel, NL3D::CTransform::_TransformDirty, NL3D::CSkeletonModel::dirtSkinRenderLists(), NL3D::CTransform::isSkinned(), nlassert, and NL3D::CTransform::Visibility. +

+Referenced by NL3D::CTransformUser::show(), and NL3D::CLandscapeUser::show(). +

+

00272 {
+00273         // Optim: do nothing if already set
+00274         if(Visibility!= CHrcTrav::Show)
+00275         {
+00276                 _TransformDirty= true;
+00277                 Visibility= CHrcTrav::Show;
+00278                 // If skinned, then must inform skeleton parent that it must recompute skin render/animDetail lists
+00279                 if(isSkinned())
+00280                 {
+00281                         nlassert(_FatherSkeletonModel);
+00282                         _FatherSkeletonModel->dirtSkinRenderLists();
+00283                 }
+00284         }
+00285 }
+
+

+ + + + +
+ + + + + + + + + +
virtual void NL3D::CTransformShape::start  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+ +

+Reimplemented in NL3D::CSegRemanence. +

+Definition at line 128 of file transform_shape.h. +

+Referenced by NL3D::CInstanceUser::start(). +

+

00128 {};
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CMeshBaseInstance::startAsyncTextureLoading const NLMISC::CVector position  )  [inherited]
+
+ + + + + +
+   + + +

+Start to load all textures in AsyncTextures array (if needed) NB: old setup is kept in Material => instance is still rendered with "coherent" textures, until new textures are ready no op if not in async texture mode. +

+Definition at line 445 of file mesh_base_instance.cpp. +

+References NL3D::CMeshBaseInstance::_AsyncTextureReady, NL3D::CMeshBaseInstance::_CurrentAsyncTextures, NL3D::CAsyncTextureManager::addTextureRef(), NL3D::CMeshBaseInstance::AsyncTextures, NL3D::CScene::getAsyncTextureManager(), NL3D::CMeshBaseInstance::getAsyncTextureMode(), NL3D::CTransform::getOwnerScene(), NL3D::IDRV_MAT_MAXTEXTURES, NL3D::CMeshBaseInstance::releaseCurrentAsyncTextures(), and uint. +

+Referenced by NL3D::CInstanceUser::startAsyncTextureLoading(). +

+

00446 {
+00447         if(!getAsyncTextureMode())
+00448                 return;
+00449 
+00450         // If the async texutre manager is not setuped in the scene, abort.
+00451         CAsyncTextureManager    *asyncTextMgr= getOwnerScene()->getAsyncTextureManager();
+00452         if(!asyncTextMgr)
+00453                 return;
+00454 
+00455         uint    i;
+00456 
+00457 
+00458         /* for all new texture names to load, add them to the manager
+00459                 NB: done first before release because of RefCount Management (in case of same texture name).
+00460         */
+00461         for(i=0;i<AsyncTextures.size();i++)
+00462         {
+00463                 for(uint stage=0;stage<IDRV_MAT_MAXTEXTURES;stage++)
+00464                 {
+00465                         if(AsyncTextures[i].IsTextureFile[stage])
+00466                         {
+00467                                 uint    id;
+00468                                 id= asyncTextMgr->addTextureRef(AsyncTextures[i].TextureNames[stage], this, position);
+00469                                 AsyncTextures[i].TextIds[stage]= id;
+00470                         }
+00471                 }
+00472         }
+00473 
+00474         /* For all old textures (0 for the first time...), release them.
+00475         */
+00476         releaseCurrentAsyncTextures();
+00477 
+00478         // OK! bkup the setup
+00479         _CurrentAsyncTextures= AsyncTextures;
+00480 
+00481         // texture async is not ready.
+00482         _AsyncTextureReady= false;
+00483 }
+
+

+ + + + +
+ + + + + + + + + +
virtual void NL3D::CTransformShape::stop  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+ +

+Reimplemented in NL3D::CSegRemanence. +

+Definition at line 130 of file transform_shape.h. +

+Referenced by NL3D::CInstanceUser::stop(). +

+

00130 {};
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CMeshMRMSkinnedInstance::supportShadowSkinGrouping  )  const [protected, virtual]
+
+ + + + + +
+   + + +

+Called for more precise clipping. +

+ +

+Reimplemented from NL3D::CTransform. +

+Definition at line 243 of file mesh_mrm_skinned_instance.cpp. +

+References NL3D::CMeshMRMSkinned::getMeshGeom(), and NL3D::CMeshMRMSkinnedGeom::supportShadowSkinGrouping(). +

+

00244 {
+00245         if(Shape)
+00246         {
+00247                 CMeshMRMSkinned *meshMrm= safe_cast<CMeshMRMSkinned*>((IShape*)Shape);
+00248                 return  meshMrm->getMeshGeom().supportShadowSkinGrouping();
+00249         }
+00250         else
+00251                 return false;
+00252 }
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CMeshMRMSkinnedInstance::supportSkinGrouping  )  const [protected, virtual]
+
+ + + + + +
+   + + +

+Called for more precise clipping. +

+ +

+Reimplemented from NL3D::CTransform. +

+Definition at line 188 of file mesh_mrm_skinned_instance.cpp. +

+References NL3D::CMeshMRMSkinned::getMeshGeom(), and NL3D::CMeshMRMSkinnedGeom::supportSkinGrouping(). +

+

00189 {
+00190         if(Shape)
+00191         {
+00192                 CMeshMRMSkinned *meshMrm= safe_cast<CMeshMRMSkinned*>((IShape*)Shape);
+00193                 return  meshMrm->getMeshGeom().supportSkinGrouping();
+00194         }
+00195         else
+00196                 return false;
+00197 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::IAnimatable::touch uint  valueId,
uint  ownerValueId
[inline, inherited]
+
+ + + + + +
+   + + +

+Touch a value because it has been modified.

+

Parameters:
+ + + +
valueId is the animated value ID in the object we want to touch.
ownerValueId is the bit of the IAnimatable part which owns this animated value.
+
+ +

+Definition at line 168 of file animatable.h. +

+References NL3D::IAnimatable::propagateTouch(), NL3D::IAnimatable::setFlag(), and uint. +

+Referenced by NL3D::CChannelMixer::eval(), NL3D::CChannelMixer::evalSingleChannel(), NL3D::CParticleSystemModel::reallocRsc(), NL3D::CChannelMixer::refreshList(), NL3D::CCamera::setFov(), NL3D::ITransformable::setPivot(), NL3D::ITransformable::setPos(), NL3D::CCamera::setRoll(), NL3D::ITransformable::setRotEuler(), NL3D::ITransformable::setRotQuat(), NL3D::ITransformable::setScale(), NL3D::CCamera::setTargetPos(), NL3D::ITransformable::setTransformMode(), and NL3D::CParticleSystemInstanceUser::setUserParam(). +

+

00169         {
+00170                 // Set the bit
+00171                 setFlag(valueId);
+00172                 // Set the owner bit
+00173                 setFlag(ownerValueId);
+00174 
+00175                 // propagate the touch to the fathers.
+00176                 propagateTouch();
+00177         }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CMeshBaseInstance::traverseAnimDetail  )  [virtual, inherited]
+
+ + + + + +
+   + + +

+this do :

+ +

+Reimplemented from NL3D::CTransform. +

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

+References NL3D::CMeshBaseInstance::_AnimatedLightmap, NL3D::CMeshBase::_LightInfos, NL3D::CScene::getAnimatedLightFactor(), NL3D::CScene::getLightmapGroupColor(), NL3D::CTransform::getOwnerScene(), NL3D::CMeshBase::CLightMapInfoList::LightGroup, nlassert, sint, NL3D::CMeshBase::CLightMapInfoList::StageList, and uint. +

+

00215 {
+00216         CMeshBase                       *mb = NLMISC::safe_cast<CMeshBase *>((IShape *) Shape);
+00217 
+00218         CTransformShape::traverseAnimDetail();
+00219 
+00220         
+00221         // update animated materials.
+00222         // test if animated materials must be updated.
+00223         if(IAnimatable::isTouched(CMeshBaseInstance::OwnerBit))
+00224         {
+00225                 // must test / update all AnimatedMaterials.
+00226                 for(uint i=0;i<_AnimatedMaterials.size();i++)
+00227                 {
+00228                         // This test and update the pointed material.
+00229                         _AnimatedMaterials[i].update();
+00230                 }
+00231 
+00232                 IAnimatable::clearFlag(CMeshBaseInstance::OwnerBit);
+00233         }
+00234 
+00235         // Lightmap automatic animation
+00236 
+00237         // Animated lightmap must have the same size than shape info lightmap.
+00238         const uint count0 = _AnimatedLightmap.size();
+00239         const uint count1 = mb->_LightInfos.size ();
+00240         nlassert (count0 == count1);
+00241         if (count0 == count1)
+00242         {
+00243                 for ( uint i = 0; i < count0; ++i )
+00244                 {
+00245                         CMeshBase::CLightMapInfoList &groupInfo = mb->_LightInfos[i];
+00246                         std::list<CMeshBase::CLightMapInfoList::CMatStage>::iterator ite = groupInfo.StageList.begin ();
+00247                         while (ite != groupInfo.StageList.end ())
+00248                         {
+00249                                 sint animatedLightmap = _AnimatedLightmap[i];
+00250                                 if (animatedLightmap != -1)
+00251                                 {
+00252                                         CRGBA factor = getOwnerScene ()->getAnimatedLightFactor (animatedLightmap, groupInfo.LightGroup);
+00253                                         Materials[ite->MatId].setLightMapFactor ( ite->StageId, factor );
+00254                                 }
+00255                                 else
+00256                                 {
+00257                                         CRGBA factor = getOwnerScene ()->getLightmapGroupColor (groupInfo.LightGroup);
+00258                                         Materials[ite->MatId].setLightMapFactor ( ite->StageId, factor );
+00259                                 }
+00260                                 ite++;
+00261                         }
+00262                 }
+00263         }
+00264 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransform::traverseAnimDetailWithoutUpdateWorldMatrix  )  [protected, inherited]
+
+ + + + + +
+   + + +

+traverse without updatin WorldMatrixFromFather:

    +
  • animdetail if the model channelmixer is not NULL, and if model not clipped
+ +

+Definition at line 938 of file transform.cpp. +

+References NL3D::CChannelMixer::eval(), and NL3D::CTransform::getOwnerScene(). +

+Referenced by NL3D::CTransform::traverseAnimDetail(). +

+

00939 {
+00940         // AnimDetail behavior: animate only if not clipped.
+00941         // NB: no need to test because of VisibilityList use.
+00942 
+00943         // test if the refptr is NULL or not (RefPtr).
+00944         CChannelMixer   *chanmix= _ChannelMixer;
+00945         if(chanmix)
+00946         {
+00947                 // eval detail!!
+00948                 chanmix->eval(true, getOwnerScene()->getAnimDetailTrav().CurrentDate);
+00949         }
+00950 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransform::traverseClip  )  [virtual, inherited]
+
+ + + + + +
+   + + +

+The base traverseClip method. The behavior is to:

    +
  • test if _WorldVis is visible.
  • test if is clipped with clip() OR IF SKELETON MODEL, USE SKELETON MODEL clip!!
  • if visible and not clipped, set _Visible=true (else false). and
      +
    • add the CTransform* to the ClipTrav list
    +
  • if _Visible==true, and renderable, add it to the RenderTraversal: RenderTrav->addRenderModel(model);
  • always traverseSons(), to clip the sons.
+ +

+Reimplemented in NL3D::CCluster, NL3D::CLandscapeModel, NL3D::CParticleSystemModel, NL3D::CQuadGridClipManager, and NL3D::CRootModel. +

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

+References NL3D::CTransform::_AncestorSkeletonModel, NL3D::CTransform::_ClipDate, NL3D::CTransform::_FatherSkeletonModel, NL3D::CTransform::_ForceCLodSticked, NL3D::CTransform::_RenderFilterType, NL3D::CTransform::_StateFlags, NL3D::CTransform::_Visible, NL3D::CTransform::_WorldVis, NL3D::CLightTrav::addLightedModel(), NL3D::CRenderTrav::addRenderModel(), NL3D::CLoadBalancingTrav::addVisibleModel(), NL3D::CAnimDetailTrav::addVisibleModel(), NL3D::CClipTrav::addVisibleModel(), NL3D::CTransform::clip(), NL3D::CTransform::clipGetChild(), NL3D::CTransform::clipGetNumChildren(), NL3D::CClipTrav::CurrentDate, NL3D::CScene::getAnimDetailTrav(), NL3D::CScene::getClipTrav(), NL3D::CScene::getFilterRenderFlags(), NL3D::CScene::getLightTrav(), NL3D::CScene::getLoadBalancingTrav(), NL3D::CTransform::getOwnerScene(), NL3D::CScene::getRenderTrav(), NL3D::CTransform::isAnimDetailable(), NL3D::CTransform::isClipVisible(), NL3D::CSkeletonModel::isDisplayedAsLodCharacter(), NL3D::CTransform::isLightable(), NL3D::CTransform::isLoadBalancable(), NL3D::CTransform::isRenderable(), num, uint, and NL3D::CTransform::UserClipping. +

+Referenced by NL3D::CCluster::recursTraverseClip(), NL3D::CClipTrav::traverse(), NL3D::CRootModel::traverseClip(), and NL3D::CParticleSystemModel::traverseClip(). +

+

00807 {
+00808         // disable H_AUTO, because slowdown when lot of models (eg 1000-2000 tested in forest)
+00809         //H_AUTO( NL3D_TransformClip );
+00810 
+00811         CScene                  *scene= getOwnerScene();
+00812         CClipTrav               &clipTrav= scene->getClipTrav();
+00813 
+00814         if ((_ClipDate == clipTrav.CurrentDate) && _Visible)
+00815                 return;
+00816         _ClipDate = clipTrav.CurrentDate;
+00817 
+00818         // clip: update Visible flag.
+00819         _Visible= false;
+00820         // if at least visible.
+00821         if(_WorldVis)
+00822         {
+00823                 // If linked to a SkeletonModel anywhere in the hierarchy, don't clip, and use skeleton model clip result.
+00824                 // This works because we are sons of a special node which is not in the clip traversal, and
+00825                 // which is traversed at end of the traversal.
+00826                 if( _AncestorSkeletonModel!=NULL )
+00827                 {
+00828                         _Visible= _AncestorSkeletonModel->isClipVisible();
+00829                         // Special test: if we are sticked to a skeletonModel, and if we are still visible, maybe we don't have to
+00830                         if(_Visible && _FatherSkeletonModel)
+00831                         {
+00832                                 // if our skeletonModel father is displayed with a Lod, maybe we are not to be displayed
+00833                                 if(_FatherSkeletonModel->isDisplayedAsLodCharacter())
+00834                                 {
+00835                                         // We are visible only if we where sticked to the skeleton with forceCLod==true.
+00836                                         // This is also true if we are actually a skeletonModel
+00837                                         if(!_ForceCLodSticked)
+00838                                                 // otherWise we are not visible. eg: this is the case of skins and some sticked object
+00839                                                 _Visible= false;
+00840                                 }
+00841                         }
+00842                 }
+00843                 // else, clip.
+00844                 else
+00845                 {
+00846                         // If the instance is not filtered
+00847                         if(scene->getFilterRenderFlags() & _RenderFilterType)
+00848                         {
+00849                                 // User cliping enabled ?
+00850                                 if (_StateFlags & UserClipping)
+00851                                         _Visible= true;
+00852                                 else
+00853                                         _Visible= clip();
+00854                         }
+00855                 }
+00856         }
+00857 
+00858         // if visible, add to list.
+00859         if(_Visible)
+00860         {
+00861                 // add this model to the visibility list.
+00862                 clipTrav.addVisibleModel(this);
+00863 
+00864                 // Has not an ancestor skeleton model?
+00865                 if( _AncestorSkeletonModel==NULL )
+00866                 {
+00867                         // If needed, insert the model in the lighted list.
+00868                         // don't insert if has an ancestorSkeletonModel, because in this case, result is driven by 
+00869                         // the _LightContribution of the _AncestorSkeletonModel.
+00870                         if( isLightable() )
+00871                                 scene->getLightTrav().addLightedModel(this);
+00872 
+00873                         // If needed, insert the model in the animDetail list.
+00874                         // don't insert if has an ancestoreSkeletonModel, because in this case, this ancestore will 
+00875                         // animDetail through the hierarchy...
+00876                         if( isAnimDetailable() )
+00877                                 scene->getAnimDetailTrav().addVisibleModel(this);
+00878                 }
+00879 
+00880                 // If needed, Add it to the loadBalancing trav
+00881                 if( isLoadBalancable() )
+00882                         scene->getLoadBalancingTrav().addVisibleModel(this);
+00883 
+00884                 // If needed, insert the model in the render list.
+00885                 if( isRenderable() )
+00886                         scene->getRenderTrav().addRenderModel(this);
+00887         }
+00888 
+00889         // Traverse the Clip sons.
+00890         uint    num= clipGetNumChildren();
+00891         for(uint i=0;i<num;i++)
+00892                 clipGetChild(i)->traverseClip();
+00893 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CMeshBaseInstance::traverseHrc  )  [virtual, inherited]
+
+ + + + + +
+   + + +

+this do :

+ +

+We perform wrapping ourselves. We avoid using a playlist, to not create one more obj.

+Eval non detail animation +

+Reimplemented from NL3D::CTransform. +

+Definition at line 164 of file mesh_base_instance.cpp. +

+References NL3D::CChannelMixer::eval(), NL3D::CMeshBase::getAutoAnim(), NL3D::CAnimation::getBeginTime(), NL3D::CTransform::getChannelMixer(), NL3D::CScene::getCurrentTime(), NL3D::CAnimation::getEndTime(), NL3D::CTransform::getOwnerScene(), NL3D::CChannelMixer::getSlotAnimation(), NL3D::CTransform::hrcGetParent(), NL3D::CChannelMixer::setSlotTime(), NL3D::TAnimationTime, uint, and NL3D::CTransform::unfreezeHRC(). +

+

00165 {
+00166         CMeshBase                       *mb = NLMISC::safe_cast<CMeshBase *>((IShape *) Shape);
+00167 
+00168         // if the base instance uses automatic animations, we must also setup the date of the channel mixer controlling this object
+00169         if (mb->getAutoAnim())
+00170         {
+00171                 // Unfreeze HRC for those models
+00172                 CTransform *node = this;
+00173                 while (node)
+00174                 {
+00175                         node->unfreezeHRC();
+00176                         node = node->hrcGetParent();
+00177                 }
+00178 
+00179                 // setup the channel mixer date
+00180                 CChannelMixer *chanMix = getChannelMixer();
+00181                 if (chanMix)
+00182                 {
+00183                         const CAnimation *anim = chanMix->getSlotAnimation(0);
+00187                         if (anim)
+00188                         {
+00189                                 // Animation offset are setuped before clipping, they will be used for detail too.
+00190                                 float animLenght = anim->getEndTime() - anim->getBeginTime();
+00191                                 if (animLenght > 0)
+00192                                 {
+00193                                         float currTime = (TAnimationTime) getOwnerScene()->getCurrentTime();
+00194                                         float startTime = (uint) (currTime / animLenght) * animLenght;
+00195                                         // Set the channel mixer date using the global date of the scene
+00196                                         chanMix->setSlotTime(0, anim->getBeginTime() + currTime - startTime);
+00197                                 }
+00198                                 else
+00199                                 {
+00200                                         chanMix->setSlotTime(0, anim->getBeginTime());
+00201                                 }
+00202 
+00205                                 chanMix->eval(false);
+00206                         }
+00207                 }
+00208         }
+00209 
+00210         CTransformShape::traverseHrc();
+00211 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransform::traverseLight  )  [virtual, inherited]
+
+ + + + + +
+   + + +

+traverse the lightedModel per default: recompute LightContribution is isLightable() +

+ +

+Reimplemented in NL3D::CPointLightModel, NL3D::CQuadGridClipManager, and NL3D::CRootModel. +

+Definition at line 1080 of file transform.cpp. +

+References NL3D::CTransform::_LightContribution, NL3D::CTransform::_LogicInfo, NL3D::CLightContribution::AttFactor, NL3D::CPointLight::computeLinearAttenuation(), NL3D::CLightingManager::computeModelLightContributions(), NL3D::CTransform::getAABBox(), NLMISC::CAABBox::getCenter(), NL3D::CScene::getLightTrav(), NL3D::CTransform::getOwnerScene(), NL3D::CPointLight::getPosition(), NL3D::CTransform::getWorldMatrix(), NL3D::CTransform::isNeedUpdateFrozenStaticLightSetup(), NL3D::CTransform::isNeedUpdateLighting(), NL3D::CLightTrav::LightingManager, NL3D::CLightContribution::NumFrozenStaticLight, NLMISC::OptFastFloor(), NL3D::CLightContribution::PointLight, NL3D::CTransform::setStateFlag(), sint, uint, and uint8. +

+

01081 {
+01082         // if the model do not need to update his lighting, just skip.
+01083         if(!isNeedUpdateLighting())
+01084                 return;
+01085 
+01086 
+01087         // If a freezeStaticLightSetup() has been called on this model recently.
+01088         if(isNeedUpdateFrozenStaticLightSetup())
+01089         {
+01090                 // Now, the correct matrix is computed.
+01091                 // get the untransformed bbox from the model.
+01092                 CAABBox         bbox;
+01093                 getAABBox(bbox);
+01094                 // get transformed center pos of bbox
+01095                 CVector worldModelPos= getWorldMatrix() * bbox.getCenter();
+01096 
+01097                 // So we can compute AttFactor for each static light influencing this static object
+01098                 uint    numPointLights= _LightContribution.NumFrozenStaticLight;
+01099                 for(uint i=0;i<numPointLights;i++)
+01100                 {
+01101                         const CPointLight       *pl= _LightContribution.PointLight[i];
+01102                         // don't worry about the precision of floor, because of *255.
+01103                         float   distToModel= (pl->getPosition() - worldModelPos).norm();
+01104                         sint    attFactor= NLMISC::OptFastFloor( 255 * pl->computeLinearAttenuation(worldModelPos, distToModel) );
+01105                         _LightContribution.AttFactor[i]= (uint8)attFactor;
+01106                 }
+01107 
+01108                 // clean.
+01109                 setStateFlag(CTransform::IsNeedUpdateFrozenStaticLightSetup, false);
+01110         }
+01111 
+01112 
+01113         // see CTransform::clip(), here I am Lightable(), and I have no _AncestorSkeletonModel
+01114         // So I am sure that I really need to recompute my ModelLightContributions.
+01115         getOwnerScene()->getLightTrav().LightingManager.computeModelLightContributions(this,
+01116                 _LightContribution, _LogicInfo);
+01117 
+01118         // done!
+01119         setStateFlag(CTransform::IsNeedUpdateLighting, false);
+01120 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransformShape::traverseLoadBalancing  )  [virtual, inherited]
+
+ + + + + +
+   + + +

+no-op by default +

+ +

+Reimplemented from NL3D::CTransform. +

+Reimplemented in NL3D::CMeshMultiLodInstance. +

+Definition at line 262 of file transform_shape.cpp. +

+References NL3D::CScene::getLoadBalancingTrav(), NL3D::CLoadBalancingTrav::getLoadPass(), NL3D::CTransform::getOwnerScene(), NL3D::CTransformShape::traverseLoadBalancingPass0(), and NL3D::CTransformShape::traverseLoadBalancingPass1(). +

+

00263 {
+00264         CLoadBalancingTrav              &loadTrav= getOwnerScene()->getLoadBalancingTrav();
+00265         if(loadTrav.getLoadPass()==0)
+00266                 traverseLoadBalancingPass0();
+00267         else
+00268                 traverseLoadBalancingPass1();
+00269 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransformShape::traverseRender  )  [virtual, inherited]
+
+ + + + + +
+   + + +

+no-op by default +

+ +

+Reimplemented from NL3D::CTransform. +

+Reimplemented in NL3D::CFlareModel, NL3D::CMeshInstance, NL3D::CParticleSystemModel, NL3D::CSkeletonModel, and NL3D::CWaterModel. +

+Definition at line 178 of file transform_shape.cpp. +

+References NL3D::CTransformShape::_CurrentLightContribution, NL3D::CTransformShape::_CurrentUseLocalAttenuation, NL3D::CMeshBlockManager::addInstance(), NL3D::CTransformShape::changeLightSetup(), NL3D::CRenderTrav::getDriver(), NL3D::CTransformShape::getLightContribution(), NL3D::CTransform::getOwnerScene(), NL3D::CScene::getRenderTrav(), H_AUTO, NL3D::CRenderTrav::isCurrentPassOpaque(), NL3D::CTransform::isLightable(), NL3D::CRenderTrav::MeshBlockManager, NL3D_MEM_INSTANCE, and NL3D::CTransformShape::Shape. +

+

00179 {
+00180         NL3D_MEM_INSTANCE
+00181         H_AUTO( NL3D_TrShape_Render );
+00182 
+00183 
+00184         // Compute the current lighting setup for this instance
+00185         //===================
+00186 
+00187 
+00188         // if the transform is lightable (ie not a fully lightmaped model), setup lighting
+00189         if(isLightable())
+00190         {
+00191                 // useLocalAttenuation for this shape ??
+00192                 if(Shape)
+00193                         _CurrentUseLocalAttenuation= Shape->useLightingLocalAttenuation ();
+00194                 else
+00195                         _CurrentUseLocalAttenuation= false;
+00196 
+00197                 // the std case is to take my model lightContribution
+00198                 if(_AncestorSkeletonModel==NULL)
+00199                         _CurrentLightContribution= &getLightContribution();
+00200                 // but if skinned/sticked (directly or not) to a skeleton, take its.
+00201                 else
+00202                         _CurrentLightContribution= &((CTransformShape*)_AncestorSkeletonModel)->getLightContribution();
+00203         }
+00204         // else must disable the lightSetup
+00205         else
+00206         {
+00207                 // setting NULL will disable all lights
+00208                 _CurrentLightContribution= NULL;
+00209                 _CurrentUseLocalAttenuation= false;
+00210         }
+00211 
+00212 
+00213         // render the shape.
+00214         //=================
+00215         if(Shape)
+00216         {
+00217                 CRenderTrav                     &rdrTrav= getOwnerScene()->getRenderTrav();
+00218                 bool                            currentPassOpaque= rdrTrav.isCurrentPassOpaque();
+00219 
+00220                 // shape must be rendered in a CMeshBlockManager ??
+00221                 float polygonCount;
+00222                 IMeshGeom       *meshGeom= NULL;
+00223                 // true only if in pass opaque
+00224                 if( currentPassOpaque )
+00225                         meshGeom= Shape->supportMeshBlockRendering(this, polygonCount);
+00226 
+00227                 // if ok, add the meshgeom to the block manager.
+00228                 if(meshGeom)
+00229                 {
+00230                         CMeshBaseInstance       *inst= safe_cast<CMeshBaseInstance*>(this);
+00231                         rdrTrav.MeshBlockManager.addInstance(meshGeom, inst, polygonCount);
+00232                 }
+00233                 // else render it.
+00234                 else
+00235                 {
+00236                         // setup the lighting
+00237                         changeLightSetup( &rdrTrav );
+00238 
+00239                         // render the shape.
+00240                         IDriver                         *drv= rdrTrav.getDriver();
+00241                         Shape->render( drv, this, currentPassOpaque );
+00242                 }
+00243         }
+00244 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransform::unfreezeHRC  )  [inherited]
+
+ + + + + +
+   + + +

+see freezeHRC(). +

+Definition at line 406 of file transform.cpp. +

+References NL3D::CTransform::_FreezeHRCState, NL3D::CTransform::_HrcParent, NL3D::CTransform::_HrcParentUnfreeze, NL3D::CTransform::_LightedModelIt, NL3D::CLightingManager::eraseStaticLightedModel(), NL3D::CTransform::FreezeHRCStateDisabled, NL3D::CScene::getLightTrav(), NL3D::CTransform::getOwnerScene(), NL3D::CScene::getRoot(), NL3D::CTransform::hrcLinkSon(), NL3D::CTransform::isLightable(), NL3D::CLightTrav::LightingManager, NL3D::CTransform::linkToUpdateList(), nlassert, NL3D::CTransform::QuadGridClipEnabled, NL3D::CTransform::setStateFlag(), and NL3D::CTransform::unlinkFromQuadCluster(). +

+Referenced by NL3D::CSkeletonModel::bindSkin(), NL3D::CMeshBaseInstance::traverseHrc(), and NL3D::CInstanceGroup::unfreezeHRC(). +

+

00407 {
+00408         // if this model is no HRC frozen disabled
+00409         if(_FreezeHRCState!=FreezeHRCStateDisabled)
+00410         {
+00411                 // if model correctly frozen.
+00412                 if(_FreezeHRCState == CTransform::FreezeHRCStateEnabled )
+00413                 {
+00414                         // Should not be linked : can't link after a freezeHRC
+00415                         nlassert (_HrcParent == NULL);
+00416 
+00417                         // Set as unfreeze else, hrcLinkSon doesn't work
+00418                         _FreezeHRCState= FreezeHRCStateDisabled;
+00419 
+00420                         // Link this model to the previous HRC parent.
+00421                         if (_HrcParentUnfreeze)
+00422                                 _HrcParentUnfreeze->hrcLinkSon( this );
+00423                         else
+00424                                 getOwnerScene()->getRoot()->hrcLinkSon( this );
+00425 
+00426                         // Link this object to the validateList.
+00427                         linkToUpdateList();
+00428 
+00429                         // if lightable()
+00430                         if( isLightable() )
+00431                         {
+00432                                 CLightTrav      &lightTrav= getOwnerScene()->getLightTrav();
+00433                                 // Lighting: must remove the object from the quadGrid.
+00434                                 // NB: works if _LightedModelIt==NULL. result is that _LightedModelIt= NULL.
+00435                                 _LightedModelIt= lightTrav.LightingManager.eraseStaticLightedModel(_LightedModelIt);
+00436                         }
+00437 
+00438                 }
+00439                 else
+00440                         _FreezeHRCState= FreezeHRCStateDisabled;
+00441 
+00442                 // unlink me from any QuadCluster, and disable QuadCluster
+00443                 unlinkFromQuadCluster();
+00444                 setStateFlag(QuadGridClipEnabled, false);
+00445         }
+00446 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransform::unfreezeStaticLightSetup  )  [inherited]
+
+ + + + + +
+   + + +

+unFreeze the Static Light Setup. Must be called if static pointLights are deleted. NB: it calls resetLighting() first. NB: do not need to call it if pointLights and this transform are deleted at same time. +

+Definition at line 1061 of file transform.cpp. +

+References NL3D::CTransform::_LightContribution, NL3D::CLightContribution::FrozenAmbientLight, NL3D::CLightContribution::FrozenStaticLightSetup, NL3D::CTransform::IsNeedUpdateFrozenStaticLightSetup, NL3D::CLightContribution::NumFrozenStaticLight, NL3D::CLightContribution::PointLight, NL3D::CTransform::resetLighting(), and NL3D::CTransform::setStateFlag(). +

+Referenced by NL3D::CInstanceGroup::removeFromScene(). +

+

01062 {
+01063         // resetLighting() first.
+01064         resetLighting();
+01065 
+01066         // Disable StaticLightSetup.
+01067         _LightContribution.FrozenStaticLightSetup= false;
+01068         _LightContribution.NumFrozenStaticLight= 0;
+01069         // End the list
+01070         _LightContribution.PointLight[0]= NULL;
+01071         // No more FrozenAmbientLight
+01072         _LightContribution.FrozenAmbientLight= NULL;
+01073 
+01074         // Don't need to update StaticLightSetup since no more exist.
+01075         setStateFlag(IsNeedUpdateFrozenStaticLightSetup, false);
+01076 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransformShape::unlinkFromQuadCluster  )  [protected, virtual, inherited]
+
+ + + + + +
+   + + +

+special feature for CQuadGridClipManager. remove from it. +

+ +

+Reimplemented from NL3D::CTransform. +

+Definition at line 133 of file transform_shape.cpp. +

+References NL3D::CTransformShape::_QuadClusterListNode, and NL3D::CFastPtrListNode::unlink(). +

+

00134 {
+00135         // if linked to a quadGridClipCluster, unlink it
+00136         _QuadClusterListNode.unlink();
+00137 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransform::update  )  [virtual, inherited]
+
+ + + + + +
+   + + +

+This function update the model (called by CScene::updateModels()) Deriver Must :

    +
  • call BaseClass::update() (eg: CTransform::update()).
  • test if something is different (eg: animation modification). Then update Model information (eg compute new Matrix).
+

+The default behavior is to update transform Matrix etc... +

+Reimplemented in NL3D::CCamera. +

+Definition at line 450 of file transform.cpp. +

+References NL3D::CTransform::_FreezeHRCState, NL3D::CTransform::_Frozen, NL3D::CTransform::_LastTransformableMatrixDate, NL3D::CTransform::_LightedModelIt, NL3D::CTransform::_LocalDate, NL3D::CTransform::_LocalMatrix, NL3D::CTransform::_LocalVis, NL3D::CTransform::_TransformDirty, NL3D::CHrcTrav::CurrentDate, NL3D::CLightingManager::eraseStaticLightedModel(), NL3D::CScene::getHrcTrav(), NL3D::CScene::getLightTrav(), NL3D::ITransformable::getMatrix(), NL3D::CTransform::getOwnerScene(), NL3D::CTransform::hrcUnlink(), NL3D::CLightingManager::insertStaticLightedModel(), NL3D::CTransform::isLightable(), NL3D::CLightTrav::LightingManager, NL3D::CTransform::unlinkFromUpdateList(), and NL3D::CTransform::Visibility. +

+Referenced by NL3D::CTransform::forceCompute(), NL3D::CTransform::freeze(), and NL3D::CScene::updateModels(). +

+

00451 {
+00452         // test if the matrix has been changed in ITransformable.
+00453         if(ITransformable::compareMatrixDate(_LastTransformableMatrixDate))
+00454         {
+00455                 _LastTransformableMatrixDate= ITransformable::getMatrixDate();
+00456                 _TransformDirty= true;
+00457         }
+00458 
+00459         // update the freezeHRC state.
+00460         if(_FreezeHRCState != CTransform::FreezeHRCStateDisabled)
+00461         {
+00462                 // if the model request to be frozen in HRC
+00463                 if(_FreezeHRCState == CTransform::FreezeHRCStateRequest )
+00464                 {
+00465                         // Wait for next Hrc traversal to compute good _WorldMatrix for this model and his sons.
+00466                         // Also, next Hrc traversal will insert the model in the LightingManager quadGrid (if lightable)
+00467                         _FreezeHRCState = CTransform::FreezeHRCStateReady;
+00468                 }
+00469                 // if the model is ready to be frozen in HRC, then do it!!
+00470                 else if( _FreezeHRCState == CTransform::FreezeHRCStateReady )
+00471                 {
+00472                         // Unlink this model.
+00473                         hrcUnlink();
+00474 
+00475                         // unLink this object from the validateList. NB: the list will still be correclty parsed.
+00476                         unlinkFromUpdateList();
+00477 
+00478                         // if lightable, the model is inserted in a quadgrid to update his lighting only when
+00479                         // dynamicLights touch him (since himself is static).
+00480                         if( isLightable() )
+00481                         {
+00482                                 CLightTrav      &lightTrav= getOwnerScene()->getLightTrav();
+00483                                 // Lighting: must reinsert the object from the quadGrid.
+00484                                 // NB: works if _LightedModelIt==NULL. result is that _LightedModelIt= NULL.
+00485                                 _LightedModelIt= lightTrav.LightingManager.eraseStaticLightedModel(_LightedModelIt);
+00486                                 // insert in the quadgrid.
+00487                                 _LightedModelIt= lightTrav.LightingManager.insertStaticLightedModel(this);
+00488                         }
+00489 
+00490                         // Now this model won't be tested for validation nor for worldMatrix update. End!!
+00491                         _FreezeHRCState = CTransform::FreezeHRCStateEnabled;
+00492                 }
+00493         }
+00494 
+00495         // update _LocalMatrix
+00496         if(_TransformDirty)
+00497         {
+00498                 // update the local matrix.
+00499                 _LocalMatrix= getMatrix();
+00500                 _LocalVis= Visibility;
+00501                 // update the date of the local matrix.
+00502                 _LocalDate= getOwnerScene()->getHrcTrav().CurrentDate;
+00503 
+00504                 // The transform has been modified. Hence, it is no more frozen.
+00505                 _Frozen= false;
+00506 
+00507                 // ok!
+00508                 _TransformDirty= false;
+00509         }
+00510 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransform::updateClipTravForAncestorSkeleton  )  [protected, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 748 of file transform.cpp. +

+References NL3D::CTransform::_AncestorSkeletonModel, NL3D::CTransform::_ClipLinkedInSonsOfAncestorSkeletonModelGroup, NL3D::CTransform::clipAddChild(), NL3D::CTransform::clipGetNumParents(), NL3D::CTransform::clipGetParent(), NL3D::CTransform::clipUnlinkFromAll(), NL3D::CScene::getClipTrav(), NL3D::CTransform::getOwnerScene(), NL3D::CScene::getRoot(), and NL3D::CScene::SonsOfAncestorSkeletonModelGroup. +

+Referenced by NL3D::CTransform::updateWorld(). +

+

00749 {
+00750         CClipTrav               &clipTrav= getOwnerScene()->getClipTrav();
+00751 
+00752         // If I have an ancestor Skeleton Model, I must be binded in ClipTrav to the SonsOfAncestorSkeletonModelGroup
+00753         if(_AncestorSkeletonModel && !_ClipLinkedInSonsOfAncestorSkeletonModelGroup)
+00754         {
+00755                 // must unlink from ALL olds models.
+00756                 clipUnlinkFromAll();
+00757 
+00758                 // And link to SonsOfAncestorSkeletonModelGroup.
+00759                 getOwnerScene()->SonsOfAncestorSkeletonModelGroup->clipAddChild(this);
+00760 
+00761                 // update the flag.
+00762                 _ClipLinkedInSonsOfAncestorSkeletonModelGroup= true;
+00763         }
+00764 
+00765 
+00766         // else I must be binded to the standard Root.
+00767         if(!_AncestorSkeletonModel && _ClipLinkedInSonsOfAncestorSkeletonModelGroup)
+00768         {
+00769                 // verify first I am really still linked to the SonsOfAncestorSkeletonModelGroup.
+00770                 // This test is important, because link may have changed for any reason (portals, clipManager....).
+00771                 if( clipGetNumParents() == 1 && clipGetParent(0)==getOwnerScene()->SonsOfAncestorSkeletonModelGroup )
+00772                 {
+00773                         // must unlink from ALL olds models.
+00774                         clipUnlinkFromAll();
+00775                         // and now, link to std root.
+00776                         getOwnerScene()->getRoot()->clipAddChild(this);
+00777                 }
+00778 
+00779                 // update the flag
+00780                 _ClipLinkedInSonsOfAncestorSkeletonModelGroup= false;
+00781         }
+00782 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransform::updateWorld  )  [protected, inherited]
+
+ + + + + +
+   + + +

+Update the world state according to the parent world state and the local states. +

+ +

+Definition at line 663 of file transform.cpp. +

+References NL3D::CTransform::_AncestorSkeletonModel, NL3D::CTransform::_DontUnfreezeChildren, NL3D::CTransform::_FatherSkeletonModel, NL3D::CTransform::_Frozen, NL3D::CTransform::_HrcParent, NL3D::CTransform::_LightContribution, NL3D::CTransform::_LocalDate, NL3D::CTransform::_LocalMatrix, NL3D::CTransform::_LocalVis, NL3D::CHrcTrav::_MovingObjects, NL3D::CTransform::_WorldDate, NL3D::CTransform::_WorldMatrix, NL3D::CTransform::_WorldVis, NL3D::CHrcTrav::CurrentDate, NL3D::CTransform::ForceClipRoot, NL3D::CLightContribution::FrozenStaticLightSetup, NL3D::CScene::getHrcTrav(), NL3D::CTransform::getOwnerScene(), NL3D::CTransform::getStateFlag(), NL3D::CTransform::isLightable(), NL3D::CTransform::isTransformShape(), NL3D::CTransform::resetLighting(), and NL3D::CTransform::updateClipTravForAncestorSkeleton(). +

+Referenced by NL3D::CTransform::traverseHrc(). +

+

00664 {
+00665         const   CMatrix         *pFatherWM;
+00666         bool                            visFather;
+00667 
+00668         // If not root case, link to Fahter.
+00669         if(_HrcParent)
+00670         {
+00671                 pFatherWM= &(_HrcParent->_WorldMatrix);
+00672                 visFather= _HrcParent->_WorldVis;
+00673 
+00674                 // if _HrcParent is not frozen (for any reason), disable us!
+00675 
+00676                 if (!_HrcParent->_Frozen && !_HrcParent->_DontUnfreezeChildren)
+00677                         _Frozen= false;
+00678 
+00679                 // herit _AncestorSkeletonModel
+00680                 if (_HrcParent->_AncestorSkeletonModel)
+00681                         // If my father has an _AncestorSkeletonModel, get it.
+00682                         _AncestorSkeletonModel= _HrcParent->_AncestorSkeletonModel;
+00683                 else
+00684                         // else I have an ancestor skel model if I am sticked/binded directly to a skeleton model.
+00685                         _AncestorSkeletonModel= _FatherSkeletonModel;
+00686         }
+00687         // else, default!!
+00688         else
+00689         {
+00690                 pFatherWM= &(CMatrix::Identity);
+00691                 visFather= true;
+00692 
+00693                 // at the root of the hierarchy, we have no parent, hence no FatherSkeletonModel nor _AncestorSkeletonModel.
+00694                 _AncestorSkeletonModel= NULL;
+00695 
+00696                 // NB: Root is Frozen by essence :), so don't modify the frozen state here.
+00697         }
+00698 
+00699         // Combine matrix
+00700         if(_LocalDate>_WorldDate || (_HrcParent && _HrcParent->_WorldDate>_WorldDate) )
+00701         {
+00702                 // Must recompute the world matrix.  ONLY IF I AM NOT SKINNED/STICKED TO A SKELETON in the hierarchy!
+00703                 if( _AncestorSkeletonModel==NULL )
+00704                 {
+00705                         _WorldMatrix=  *pFatherWM * _LocalMatrix;
+00706                         _WorldDate= getOwnerScene()->getHrcTrav().CurrentDate;
+00707 
+00708                         // Add the model to the moving object list, only if I am a transform shape
+00709                         if (!_Frozen && isTransformShape() && !getStateFlag(ForceClipRoot))
+00710                                 getOwnerScene()->getHrcTrav()._MovingObjects.push_back (static_cast<CTransformShape*>(this));
+00711                 }
+00712         }
+00713 
+00714         // Update dynamic lighting.
+00715         /*
+00716                 If the model is not frozen in StaticLight, then must update lighting each frame.
+00717                 Even if the object doesn't move, a new dynamic light may enter in its aera. Hence we must test
+00718                 it in the light quadrid. StaticLight-ed Objects don't need it because they are inserted in a special quadgrid, 
+00719                 where dynamics lights touch all StaticLight-ed object to force their computing
+00720 
+00721                 NB: not done if _AncestorSkeletonModel!=NULL. no need because  in this case, 
+00722                 result is driven by the _LightContribution of the _AncestorSkeletonModel.
+00723         */
+00724         if( !_LightContribution.FrozenStaticLightSetup && _AncestorSkeletonModel==NULL )
+00725         {
+00726                 // if the model is lightable reset lighting
+00727                 if( isLightable() )
+00728                         resetLighting();
+00729         }
+00730 
+00731         // Combine visibility.
+00732         switch(_LocalVis)
+00733         {
+00734                 case CHrcTrav::Herit: _WorldVis= visFather; break;
+00735                 case CHrcTrav::Hide: _WorldVis= false; break;
+00736                 case CHrcTrav::Show: _WorldVis= true; break;
+00737                 default: break;
+00738         }
+00739 
+00740 
+00741         // If I have an ancestor Skeleton Model, I must be binded in ClipTrav to the SonsOfAncestorSkeletonModelGroup
+00742         updateClipTravForAncestorSkeleton();
+00743 
+00744 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CTransform::updateWorldMatrixFromFather  )  [protected, inherited]
+
+ + + + + +
+   + + +

+For Skeleton Object Stick. update the wolrd matrix. no-op if skinned. no-op if no AcnestorSkeletonModel. use standard father WorldMatrix if !_FatherSkeletonModel else get the correct boneId WorldMatrix from _FatherSkeletonModel +

+Definition at line 905 of file transform.cpp. +

+References NL3D::CTransform::_AncestorSkeletonModel, NL3D::CTransform::_FatherBoneId, NL3D::CTransform::_FatherSkeletonModel, NL3D::CTransform::_LocalMatrix, NL3D::CTransform::_WorldMatrix, NL3D::CSkeletonModel::Bones, NL3D::CTransform::hrcGetParent(), and NL3D::CTransform::isSkinned(). +

+Referenced by NL3D::CTransform::forceCompute(), and NL3D::CTransform::traverseAnimDetail(). +

+

00906 {
+00907         // If I am not skinned, and If I have a skeleton ancestor
+00908         if(!isSkinned() && _AncestorSkeletonModel )
+00909         {
+00910                 // Compute the HRC _WorldMatrix.
+00911                 // if I am not sticked.
+00912                 if(!_FatherSkeletonModel)
+00913                 {
+00914                         // get the normal father worldMatrix in Hrc.
+00915                         CTransform      *fatherTransform= hrcGetParent();
+00916                         // if exist
+00917                         if(fatherTransform)
+00918                         {
+00919                                 const CMatrix &parentWM= fatherTransform->_WorldMatrix;
+00920                                 // combine worldMatrix
+00921                                 _WorldMatrix= parentWM * _LocalMatrix;
+00922                         }
+00923                         else
+00924                                 _WorldMatrix= _LocalMatrix;
+00925                 }
+00926                 else
+00927                 {
+00928                         // get the worldMatrix of the bone if I am sticked.
+00929                         const CMatrix &parentWM= _FatherSkeletonModel->Bones[_FatherBoneId].getWorldMatrix();
+00930                         // combine worldMatrix
+00931                         _WorldMatrix= parentWM * _LocalMatrix;
+00932                 }
+00933         }
+00934 }
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CTransform::useMergedPointLight  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+return true if the current light contribution of this model use a MergedPointLight +

+Definition at line 369 of file transform.h. +

+References NL3D::CTransform::_LightContribution, and NL3D::CLightContribution::UseMergedPointLight. +

+

00369 {return _LightContribution.UseMergedPointLight;}
+
+


Friends And Related Function Documentation

+

+ + + + +
+ + +
friend class CMeshMRMSkinned [friend] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 123 of file mesh_mrm_skinned_instance.h.

+

+ + + + +
+ + +
friend class CMeshMRMSkinnedGeom [friend] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 124 of file mesh_mrm_skinned_instance.h.

+

+ + + + +
+ + +
friend struct CPtrInfo [friend, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 67 of file smart_ptr.h.

+


Field Documentation

+

+ + + + +
+ + +
CSkeletonModel* NL3D::CTransform::_AncestorSkeletonModel [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 851 of file transform.h. +

+Referenced by NL3D::CClipTrav::clipSkeletonShadowMaps(), NL3D::CTransform::CTransform(), NL3D::CTransform::getAncestorSkeletonModel(), NL3D::CAnimDetailTrav::traverse(), NL3D::CTransform::traverseClip(), NL3D::CTransform::updateClipTravForAncestorSkeleton(), NL3D::CTransform::updateWorld(), and NL3D::CTransform::updateWorldMatrixFromFather().

+

+ + + + +
+ + +
sint64 NL3D::CTransform::_ClipDate [protected, inherited] +
+
+ + + + + +
+   + + +

+date of last traverseClip() +

+ +

+Definition at line 865 of file transform.h. +

+Referenced by NL3D::CTransform::CTransform(), and NL3D::CTransform::traverseClip().

+

+ + + + +
+ + +
bool NL3D::CTransform::_ClipLinkedInSonsOfAncestorSkeletonModelGroup [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 849 of file transform.h. +

+Referenced by NL3D::CSkeletonModel::bindSkin(), NL3D::CTransform::CTransform(), and NL3D::CTransform::updateClipTravForAncestorSkeleton().

+

+ + + + +
+ + +
bool NL3D::CTransform::_DontUnfreezeChildren [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 848 of file transform.h. +

+Referenced by NL3D::CTransform::CTransform(), NL3D::CTransform::setDontUnfreezeChildren(), and NL3D::CTransform::updateWorld().

+

+ + + + +
+ + +
uint NL3D::CTransform::_FatherBoneId [protected, inherited] +
+
+ + + + + +
+   + + +

+Deriver must change this method if isSkinnable(). It return a list of sphere relative to each bone of the father skeleton. Use with getSkinBoneUsage() to know to wich bone this sphere apply NB: if a sphere radius is -1, it means that the bone is not used (for any reason...) default is to return NULL. +

+Definition at line 618 of file transform.h. +

+Referenced by NL3D::CSkeletonModel::computeCLodVertexAlpha(), NL3D::CSkeletonModel::detachSkeletonSon(), NL3D::CTransform::forceCompute(), NL3D::CSkeletonModel::stickObjectEx(), and NL3D::CTransform::updateWorldMatrixFromFather().

+

+ + + + +
+ + +
CSkeletonModel* NL3D::CTransform::_FatherSkeletonModel [protected, inherited] +
+
+ + + + + +
+   + + +

+Deriver must change this method if isSkinnable(). It return a list of sphere relative to each bone of the father skeleton. Use with getSkinBoneUsage() to know to wich bone this sphere apply NB: if a sphere radius is -1, it means that the bone is not used (for any reason...) default is to return NULL. +

+Definition at line 616 of file transform.h. +

+Referenced by NL3D::CSkeletonModel::bindSkin(), NL3D::CTransform::CTransform(), NL3D::CSkeletonModel::detachSkeletonSon(), NL3D::CTransform::forceCompute(), NL3D::CSkeletonModel::forceComputeBone(), NL3D::CTransform::getSkeletonModel(), NL3D::CTransform::heritVisibility(), NL3D::CTransform::hide(), NL3D::CTransform::registerToChannelMixer(), NL3D::CTransform::setIsForceAnimDetail(), NL3D::CTransform::setOpacity(), NL3D::CTransform::setTransparency(), NL3D::CTransform::show(), NL3D::CSkeletonModel::stickObjectEx(), NL3D::CTransform::traverseClip(), NL3D::CTransform::updateWorld(), NL3D::CTransform::updateWorldMatrixFromFather(), and NL3D::CTransform::~CTransform().

+

+ + + + +
+ + +
bool NL3D::CTransform::_Frozen [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 847 of file transform.h. +

+Referenced by NL3D::CTransform::CTransform(), NL3D::CTransform::freeze(), NL3D::CTransform::freezeHRC(), NL3D::CTransform::update(), and NL3D::CTransform::updateWorld().

+

+ + + + +
+ + +
sint NL3D::CTransform::_IndexInVisibleList [protected, inherited] +
+
+ + + + + +
+   + + +

+date of last traverseClip() +

+ +

+Definition at line 869 of file transform.h. +

+Referenced by NL3D::CClipTrav::addVisibleModel(), NL3D::CTransform::CTransform(), and NL3D::CTransform::~CTransform().

+

+ + + + +
+ + +
CLightContribution NL3D::CTransform::_LightContribution [protected, inherited] +
+
+ + + + + +
+   + + +

+The contribution of all lights. This enlarge the struct only of approx 15%. +

+ +

+Definition at line 626 of file transform.h. +

+Referenced by NL3D::CTransform::freezeStaticLightSetup(), NL3D::CTransform::getLightContribution(), NL3D::CSkeletonModel::renderSkins(), NL3D::CTransform::resetLighting(), NL3D::CTransform::traverseLight(), NL3D::CTransform::unfreezeStaticLightSetup(), NL3D::CTransform::updateWorld(), and NL3D::CTransform::useMergedPointLight().

+

+ + + + +
+ + +
CLightingManager::CQGItLightedModel NL3D::CTransform::_LightedModelIt [protected, inherited] +
+
+ + + + + +
+   + + +

+each transform may be in a quadGird of lighted models (see CLightingManager) +

+ +

+Definition at line 634 of file transform.h. +

+Referenced by NL3D::CTransform::unfreezeHRC(), NL3D::CTransform::update(), and NL3D::CTransform::~CTransform().

+

+ + + + +
+ + +
CLoadBalancingGroup* NL3D::CTransform::_LoadBalancingGroup [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 894 of file transform.h. +

+Referenced by NL3D::CTransform::CTransform(), NL3D::CTransform::getLoadBalancingGroup(), NL3D::CTransform::initModel(), and NL3D::CTransform::setLoadBalancingGroup().

+

+ + + + +
+ + +
sint64 NL3D::CTransform::_LocalDate [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 841 of file transform.h. +

+Referenced by NL3D::CTransform::CTransform(), NL3D::CTransform::update(), and NL3D::CTransform::updateWorld().

+

+ + + + +
+ + +
CMatrix NL3D::CTransform::_LocalMatrix [protected, inherited] +
+
+ + + + + +
+   + + +

+Hrc IN variables. +

+ +

+Reimplemented from NL3D::ITransformable. +

+Definition at line 839 of file transform.h. +

+Referenced by NL3D::CTransform::CTransform(), NL3D::CTransform::update(), NL3D::CTransform::updateWorld(), and NL3D::CTransform::updateWorldMatrixFromFather().

+

+ + + + +
+ + +
CHrcTrav::TVisibility NL3D::CTransform::_LocalVis [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 840 of file transform.h. +

+Referenced by NL3D::CTransform::CTransform(), NL3D::CTransform::update(), and NL3D::CTransform::updateWorld().

+

+ + + + +
+ + +
CRawSkinnedNormalCache* NL3D::CMeshMRMSkinnedInstance::_RawSkinCache [private] +
+
+ + + + + +
+   + + +

+Used by CMeshMRMSkinnedGeom. This a cache for skinning objects, for skinning optimisation. +

+ +

+Definition at line 127 of file mesh_mrm_skinned_instance.h. +

+Referenced by NL3D::CMeshMRMSkinnedGeom::renderSkinGroupGeom(), NL3D::CMeshMRMSkinnedGeom::updateRawSkinNormal(), and NL3D::CMeshMRMSkinnedGeom::updateShiftedTriangleCache().

+

+ + + + +
+ + +
uint32 NL3D::CTransform::_RenderFilterType [protected, inherited] +
+
+ + + + + +
+   + + +

+State for renderFiltering. Default is 0xFFFFFFFF (always displayed) Deriver work to change this value +

+Definition at line 830 of file transform.h. +

+Referenced by NL3D::CTransform::CTransform(), and NL3D::CTransform::traverseClip().

+

+ + + + +
+ + +
CShiftedTriangleCache* NL3D::CMeshMRMSkinnedInstance::_ShiftedTriangleCache [private] +
+
+ + + + + +
+   + + +

+Used by CMeshMRMSkinnedGeom. This a cache for skinning objects, for skinning optimisation. +

+ +

+Definition at line 132 of file mesh_mrm_skinned_instance.h. +

+Referenced by NL3D::CMeshMRMSkinnedGeom::renderSkinGroupPrimitives(), NL3D::CMeshMRMSkinnedGeom::renderSkinGroupSpecularRdrPass(), and NL3D::CMeshMRMSkinnedGeom::updateShiftedTriangleCache().

+

+ + + + +
+ + +
bool NL3D::CTransform::_Visible [protected, inherited] +
+
+ + + + + +
+   + + +

+set to true is the object is visible (not clipped). +

+ +

+Definition at line 867 of file transform.h. +

+Referenced by NL3D::CTransform::CTransform(), NL3D::CTransform::isClipVisible(), and NL3D::CTransform::traverseClip().

+

+ + + + +
+ + +
float NL3D::CMeshBaseInstance::_VPWindTreePhase [inherited] +
+
+ + + + + +
+   + + +

+CMeshVPWindTree instance specific part. +

+ +

+Definition at line 254 of file mesh_base_instance.h. +

+Referenced by NL3D::CMeshVPWindTree::initInstance(), and NL3D::CMeshVPWindTree::setupPerInstanceConstants().

+

+ + + + +
+ + +
sint64 NL3D::CTransform::_WorldDate [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 845 of file transform.h. +

+Referenced by NL3D::CTransform::CTransform(), NL3D::CTransform::hrcLinkSon(), NL3D::CTransform::hrcUnlink(), and NL3D::CTransform::updateWorld().

+

+ + + + +
+ + +
CMatrix NL3D::CTransform::_WorldMatrix [protected, inherited] +
+
+ + + + + +
+   + + +

+Hrc OUT variables. +

+ +

+Definition at line 843 of file transform.h. +

+Referenced by NL3D::CTransform::updateWorld(), and NL3D::CTransform::updateWorldMatrixFromFather().

+

+ + + + +
+ + +
bool NL3D::CTransform::_WorldVis [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 844 of file transform.h. +

+Referenced by NL3D::CTransform::CTransform(), NL3D::CTransform::isHrcVisible(), NL3D::CTransform::traverseClip(), and NL3D::CTransform::updateWorld().

+

+ + + + +
+ + +
std::vector<CAsyncTextureBlock> NL3D::CMeshBaseInstance::AsyncTextures [inherited] +
+
+ + + + + +
+   + + +

+For Aynsc Texture Loading. This has the same size as Materials. User can fill here the name of the texture he want to async load. WARNING: once AsyncTextureMode is set, Material's Texture fields should not be modified, else undefined results +

+Definition at line 82 of file mesh_base_instance.h. +

+Referenced by NL3D::CInstanceUser::CInstanceUser(), NL3D::CMeshBaseInstance::enableAsyncTextureMode(), NL3D::CMeshBase::instanciateMeshBase(), NL3D::CMeshBaseInstance::selectTextureSet(), and NL3D::CMeshBaseInstance::startAsyncTextureLoading().

+

+ + + + +
+ + +
sint NLMISC::CRefCount::crefs [mutable, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 79 of file smart_ptr.h. +

+Referenced by NLMISC::CRefCount::CRefCount(), NLMISC::CRefCount::getRefCount(), and NLMISC::CRefCount::~CRefCount().

+

+ + + + +
+ + +
std::vector<CMaterial> NL3D::CMeshBaseInstance::Materials [inherited] +
+
+ + + + + +
+   + + +

+The list of materials, copied from the mesh. Each CMeshBaseInstance has those materials, so they can be animated or modified for each instance. By default, they are copied from the Mesh. +

+Definition at line 75 of file mesh_base_instance.h. +

+Referenced by NL3D::CInstanceUser::CInstanceUser(), NL3D::CSkeletonModel::computeLodTexture(), NL3D::CMeshBase::instanciateMeshBase(), NL3D::CMeshMRMSkinnedGeom::profileSceneRender(), NL3D::CMeshMRMGeom::profileSceneRender(), NL3D::CMeshGeom::profileSceneRender(), NL3D::CMeshMRMSkinnedGeom::render(), NL3D::CMeshMRMGeom::render(), NL3D::CMeshGeom::render(), NL3D::CMeshMRMGeom::renderPass(), NL3D::CMeshGeom::renderPass(), NL3D::CMeshMRMGeom::renderSkin(), NL3D::CMeshGeom::renderSkin(), NL3D::CMeshMRMSkinnedGeom::renderSkinGroupPrimitives(), NL3D::CMeshMRMGeom::renderSkinGroupPrimitives(), NL3D::CMeshMRMSkinnedGeom::renderSkinGroupSpecularRdrPass(), and NL3D::CMeshMRMGeom::renderSkinGroupSpecularRdrPass().

+

+ + + + +
+ + +
CRefCount::CPtrInfo NLMISC::CRefCount::NullPtrInfo [static, inherited] +
+
+ + + + + +
+   + + +

+ +

+Referenced by NLMISC::CRefCount::CRefCount().

+

+ + + + +
+ + +
CPtrInfo* NLMISC::CRefCount::pinfo [mutable, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 80 of file smart_ptr.h. +

+Referenced by NLMISC::CRefCount::CRefCount(), and NLMISC::CRefCount::~CRefCount().

+

+ + + + +
+ + +
CSmartPtr<IShape> NL3D::CTransformShape::Shape [inherited] +
+
+ + + + + +
+   + + +

+The shape, the object instancied. +

+ +

+Definition at line 72 of file transform_shape.h. +

+Referenced by NL3D::CTransformShape::clip(), NL3D::CSkeletonModel::computeLodTexture(), NL3D::CWaveMakerShape::createInstance(), NL3D::CWaterShape::createInstance(), NL3D::CSkeletonShape::createInstance(), NL3D::IShape::createInstance(), NL3D::CSegRemanenceShape::createInstance(), NL3D::CScene::createInstance(), NL3D::CParticleSystemShape::createInstance(), NL3D::CMeshMultiLod::createInstance(), NL3D::CMeshMRMSkinned::createInstance(), NL3D::CMeshMRM::createInstance(), NL3D::CMesh::createInstance(), NL3D::CFlareShape::createInstance(), NL3D::CScene::deleteInstance(), NL3D::CTransformShape::getAABBox(), NL3D::CTransformShape::getNumTriangles(), NL3D::CSkeletonUser::getShapeDistMax(), NL3D::CInstanceUser::getShapeDistMax(), NL3D::CTransformShape::profileRender(), NL3D::CSkeletonUser::setShapeDistMax(), NL3D::CInstanceUser::setShapeDistMax(), and NL3D::CTransformShape::traverseRender().

+


The documentation for this class was generated from the following files: +
Generated on Tue Mar 16 06:55:08 2004 for NeL by + +doxygen +1.3.6
+ + -- cgit v1.2.1