NL3D::CTransform Class Reference

A basic node which provide an animatable matrix (ITransformable). More...

#include <transform.h>

Inherits NL3D::ITransformable.

Inherited by NL3D::CCamera, NL3D::CCluster, NL3D::CLandscapeModel, NL3D::CPointLightModel, NL3D::CQuadGridClipManager, NL3D::CRootModel, NL3D::CTransformShape, and NL3D::CVegetableBlendLayerModel.

List of all members.

Classes

struct  CClipNode

Public Member Functions

CScenegetOwnerScene () const
 get the scene which has created us
virtual class UTransformbuildMatchingUserInterfaceObject ()
void setTransparency (bool v)
 Accessors for opacity/transparency.
void setOpacity (bool v)
void setBypassLODOpacityFlag (bool bypass)
bool getBypassLODOpacityFlag () const
uint32 isOpaque ()
uint32 isTransparent ()
void setOrderingLayer (uint layer)
 Set the current layer for this transform.
uint getOrderingLayer () const
 Get the ordering layer.
void setTransparencyPriority (uint8 priority)
 Set priority for transparent ordering. When sorting before drawing, priority is taken in account before distance, so.
uint8 getTransparencyPriority () const
void hide ()
 Hide the object and his sons.
void show ()
 Show the objet and his sons.
void setUserClipping (bool enable)
bool getUserClipping () const
 Return the user clipping state.
void heritVisibility ()
 herit the visibility from his father. (default behavior).
CHrcTrav::TVisibility getVisibility ()
 Get the local visibility state.
CSkeletonModelgetSkeletonModel () const
 Get the skeleton model. Returnr NULL in normal mode.
CSkeletonModelgetAncestorSkeletonModel () const
void setChannelMixerOwnerShip (bool enable=true)
 This force gives this object ownership of the channel mixer it is registered to, so it will delete it when the dtor is called.
bool getChannelMixerOwnerShip () const
void freeze ()
 freeze the preceding position of the model.
void setDontUnfreezeChildren (bool val)
void freezeHRC ()
 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).
void unfreezeHRC ()
 see freezeHRC().
uint32 isQuadGridClipEnabled () const
 special feature for CQuadGridClipManager.
const CMatrixgetWorldMatrix () const
 Get the worldMatrix that is computed at last Hrc pass.
void setWorldMatrix (const CMatrix &mat)
bool isHrcVisible () const
 tells if the transform has been determined as visible in the hrc traversal
bool isClipVisible () const
 tells if the transform has been clipped in the clip traversal.
void setClusterSystem (CInstanceGroup *pCS)
CInstanceGroupgetClusterSystem ()
void setLogicInfo (ILogicInfo *logicInfo)
 Set the LogicInfo for this transfrom, eg to retrieve statc light information, see ILogicInfo.
virtual void getAABBox (NLMISC::CAABBox &bbox) const
 Get the untransformed AABBox of the transform.
void setForceClipRoot (bool forceClipRoot)
 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).
bool getForceClipRoot () const
virtual bool isFlare () const
void setSSSWO (bool state)
 Don't use, used by CSkeletonSpawnScript to indicate that the WorldMatrix of this object is special.
bool getSSSWO () const
Hierarchy linking



void hrcLinkSon (CTransform *son)
 link son to this in Hierarchy traversal NB: link does nothing if the son node is HRC frozen
void hrcUnlink ()
 unlink this from any Father in Hrc.
CTransformhrcGetParent () const
uint hrcGetNumChildren () const
CTransformhrcGetChild (uint index) const
Clip linking



void clipAddChild (CTransform *son)
void clipDelChild (CTransform *son)
void clipUnlinkFromAll ()
uint clipGetNumParents () const
CTransformclipGetParent (uint index) const
uint clipGetNumChildren () const
CTransformclipGetChild (uint index) const
Derived from ITransformable.



virtual ITrackgetDefaultTrack (uint valueId)
 Default Track Values are identity (pos,pivot= 0, scale= 1, rots=0).
virtual void registerToChannelMixer (CChannelMixer *chanMixer, const std::string &prefix)
 register transform channels (in global anim mode).
ShadowMapping

NB: It is the deriver work to call CRenderTrav::getShadowMapManager().addShadowReceiver() or CRenderTrav::getShadowMapManager().addShadowCaster(), typically in traverseHRC() or in traverseRender() NB: when _AncestorSkeletonModel!=NULL, the shadowMapCaster should not be Added.

NB: Deriver must also implement createShadowMap() and deleteShadowMap() protected callBacks, if it supports CastShadowMaping



void enableCastShadowMap (bool state)
 By default, map shadow casting is disabled.
bool canCastShadowMap () const
 true if the instance cast shadow. By default false
void enableReceiveShadowMap (bool state)
 By default, map shadow receiving is disabled.
bool canReceiveShadowMap () const
 true if the instance receive shadow. By default false
uint32 modelCanCastShadowMap () const
 true if the model provide a method to support shadowMap generation
uint32 modelCanReceiveShadowMap () const
 true if the model provide a method to support shadowMap receiving
virtual void generateShadowMap (const CVector &)
 For Casters.
virtual CShadowMapgetShadowMap ()
 get The shadow Map result for receveing.
virtual void getReceiverBBox (CAABBox &bbox)
 For receivers.
virtual void receiveShadowMap (CShadowMap *, const CVector &, const CMaterial &)
 For receivers.
virtual const CMatrixgetReceiverRenderWorldMatrix () const
 For receivers.
void setGeneratingShadowMap (bool state)
 For ShadowMapManager. true if the model is rendering its ShadowMap this frame.
bool isGeneratingShadowMap () const
virtual bool computeWorldBBoxForShadow (NLMISC::CAABBox &)
 Special For Skeleton Caster.
virtual void renderIntoSkeletonShadowMap (CSkeletonModel *, CMaterial &)
 Special For Skeleton Caster.
void setShadowMapDirectionZThreshold (float zthre)
 To limit some problems when the light direction is too on the XY axis.
float getShadowMapDirectionZThreshold () const
void setShadowMapMaxDepth (float depth)
 To limit some problems with interior, a limit of shadow depth by caster can be given.
float getShadowMapMaxDepth () const

Static Public Member Functions

static void registerBasic ()
 Call at the begining of the program, to register the model.

Protected Member Functions

 CTransform ()
 Constructor The deriver should do a TouchObs.resize(Last), to ensure he resize the BitSet correctly.
virtual ~CTransform ()
 Destructor.
virtual void unlinkFromQuadCluster ()
 special feature for CQuadGridClipManager. called at unfreezeHRC(). Used by CTransformShape.
CChannelMixergetChannelMixer () const
 get the channelMixer owned by the transform.
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 forceCompute ()
Model Feature initialisation.



void setIsLightable (bool val)
 Deriver must use this method with true to indicate the model support lighting.
void setIsRenderable (bool val)
 Deriver must use this method with true to indicate the model can be rendered.
void setIsBigLightable (bool val)
 Deriver must use this method with true to indicate the model is a big lightable.
void setIsSkeleton (bool val)
 For CSkeletonModel only.
void setIsForceAnimDetail (bool val)
 Deriver must use this method with true if the model must be AnimDetail-ed whatever registerToChannelMixer() has been called or not.
void setIsLoadbalancable (bool val)
 Deriver must use this method with true to indicate the model support loadBalancing.
void setIsMeshBaseInstance (bool val)
 For CMeshBaseInstance only.
void setIsTransformShape (bool val)
 For CTransformShape only.
void setIsCluster (bool val)
 For CCluster only.
void setIsShadowMapCaster (bool val)
 ShadowMap.
void setIsShadowMapReceiver (bool val)
AnimDetail Traversal



void updateWorldMatrixFromFather ()
 For Skeleton Object Stick.
void traverseAnimDetailWithoutUpdateWorldMatrix ()
 traverse without updatin WorldMatrixFromFather:

  • animdetail if the model channelmixer is not NULL, and if model not clipped

ShadowMap



virtual void createShadowMap ()
 To implement for ShadowCaster support.
virtual void deleteShadowMap ()
 To implement for ShadowCaster support. typically free the shadowMap + MUST call unregisterShadowCasterToList().

Protected Attributes

uint32 _RenderFilterType
 State for renderFiltering.
Clip Traversal



sint64 _ClipDate
 date of last traverseClip()
sint _IndexInVisibleList
bool _Visible
 set to true is the object is visible (not clipped).
Render Traversal



uint8 _IndexLSBInRenderList
LoadBalancing Traversal



CLoadBalancingGroup_LoadBalancingGroup

Private Types

enum  TFreezeHRCState { FreezeHRCStateDisabled = 0, FreezeHRCStateRequest, FreezeHRCStateReady, FreezeHRCStateEnabled }

Static Private Member Functions

static CTransformcreator ()

Private Attributes

CHrcTrav::TVisibility Visibility
CScene_OwnerScene
NLMISC::CRefPtr< CChannelMixer_ChannelMixer
uint64 _LastTransformableMatrixDate
NLMISC::CRefPtr< CInstanceGroup_ClusterSystem
TFreezeHRCState _FreezeHRCState
uint8 _OrderingLayer
uint8 _TransparencyPriority
bool _ForceCLodSticked: 1
bool _TransformDirty: 1
 true if need to compute transform
bool _SupportFastIntersect: 1
ILogicInfo_LogicInfo
 See ILogicInfo. Used for lighting. default is NULL.
CRGBA _MeanColor
 see setMeanColor()
std::list< CTransform * >::iterator _ItShadowCasterInScene
 For Shadow Caster registration to list.
float _ShadowMapDirectionZThreshold
 For Shadow Casters.
float _ShadowMapMaxDepth

Static Private Attributes

static CTrackDefaultVector DefaultPos
static CTrackDefaultVector DefaultPivot
static CTrackDefaultVector DefaultRotEuler
static CTrackDefaultQuat DefaultRotQuat
static CTrackDefaultVector DefaultScale

Friends

class CSkeletonModel
class CScene
class CClipTrav
class CAnimDetailTrav
class CRenderTrav

State Flag mgt (boolean compression)



enum  TState {
  IsAnimDetailable = 0x0001, IsLoadBalancable = 0x0002, IsLightable = 0x0004, IsRenderable = 0x0008,
  IsTransparent = 0x0010, IsOpaque = 0x0020, QuadGridClipEnabled = 0x0040, IsUserLightable = 0x0080,
  IsFinalLightable = 0x0100, IsBigLightable = 0x0200, IsNeedUpdateLighting = 0x0400, IsNeedUpdateFrozenStaticLightSetup,
  IsSkeleton = 0x1000, IsSkinned = 0x2000, IsDeleteChannelMixer = 0x4000, IsForceAnimDetail = 0x8000,
  IsMeshBaseInstance = 0x10000, IsTransformShape = 0x20000, IsCluster = 0x40000, UserClipping = 0x80000,
  IsShadowMapCaster = 0x100000, IsFinalShadowMapCaster = 0x200000, IsShadowMapReceiver = 0x400000, IsFinalShadowMapReceiver = 0x800000,
  IsGeneratingShadowMap = 0x1000000, ForceClipRoot = 0x2000000, ClusterSystemAuto = 0x4000000, SSSWO = 0x8000000,
  BypassLODOpacity = 0x10000000
}
 

State Flags.

More...
uint32 _StateFlags
 Flags for the General State of the Transform. They are both static or dynamic flags.
void setStateFlag (uint32 mask, bool val)
 This is used to set Static or dynamic flags. val must take 0 or 1.
uint32 getStateFlag (uint32 mask) const
 return a non zero-value if state is set.

Hrc / Clip hierarchy.



CFastPtrListNode _HrcNode
CFastPtrList< CTransform_HrcSons
CTransform_HrcParent
NLMISC::CRefPtr< CTransform_HrcParentUnfreeze
CFastPtrList< CTransform_ClipSons
std::vector< CClipNode * > _ClipParents
bool clipHasParent (CTransform *parent)
void clipDelFromParent (CTransform *parent)

Model updating/traversing features



CTransform_PrecModelToUpdate
CTransform_NextModelToUpdate
virtual void update ()
 This function update the model (called by CScene::updateModels()) Deriver Must :


virtual void initModel ()
 Extra init for a model.
virtual void traverseHrc ()
 Each method is called in its associated traversal.
virtual void traverseClip ()
 The base traverseClip method.
virtual void traverseAnimDetail ()
 call updateWorldMatrixFromFather(), then traverseAnimDetailWithoutUpdateWorldMatrix()
virtual void traverseLoadBalancing ()
 no-op by default
virtual void traverseLight ()
 traverse the lightedModel per default: recompute LightContribution is isLightable()
virtual void traverseRender ()
 no-op by default
virtual bool clip ()
 clip method called by traverseClip(). deafult is always visible
virtual void profileRender ()
 Called at RenderTrav to profile current render. no-op per default.
void linkToUpdateList ()
void unlinkFromUpdateList ()

Skinning Behavior.



CSkeletonModel_FatherSkeletonModel
uint _FatherBoneId
uint32 isSkeleton () const
 return non-zero if I am a skeleton. if yes, static_cast<CSkeletonModel*> may be used
uint32 isSkinned () const
 non-zero if the model is skinned onto a skeleton.
virtual bool getSkinBoneBBox (NLMISC::CAABBox &, uint)
 Called for edition purpose (slow call O(NVertex)) It return the BBox (local to the Bone at its bind pos) of all of the vertices of this mesh that are bound to this bone NB: the instance must be skinned to the skeleton instance, BUT the result is not modified by current bone world matrix (eg: no current scale influence).
virtual bool isSkinnable () const
 Deriver must change this method if the model can be skinned. called rarely.
virtual void setApplySkin (bool state)
 Deriver must change this method if isSkinnable().
virtual const std::vector
< sint32 > * 
getSkinBoneUsage () const
 Deriver must change this method if isSkinnable().
virtual const std::vector
< NLMISC::CBSphere > * 
getSkinBoneSphere () const
 Deriver must change this method if isSkinnable().
virtual void renderSkin (float)
 Deriver must change this method if isSkinnable().
virtual bool supportSkinGrouping () const
 Deriver may support SkinGrouping if isSkinnable().
virtual sint renderSkinGroupGeom (float, uint, uint8 *)
 if supportSkinGrouping(), called to transform the VBuffer, and store it into dest.
virtual void renderSkinGroupPrimitives (uint, std::vector< CSkinSpecularRdrPass > &, uint)
 if supportSkinGrouping(), called to render the primitives of the already skinned vertices (VB activated in the driver) Optionnaly, fill specRdrPasses with specular rdrPass to sort (used for specular grouping).
virtual void renderSkinGroupSpecularRdrPass (uint)
 Render a specific specular renderPass returned by renderSkinGroupPrimitives.
virtual bool supportShadowSkinGrouping () const
 Special Skinning For ShadowMapping.
virtual sint renderShadowSkinGeom (uint, uint8 *)
virtual void renderShadowSkinPrimitives (CMaterial &, IDriver *, uint)
virtual bool supportIntersectSkin () const
 Special use of skinning to compute intersection of a ray with it.
virtual bool intersectSkin (const CMatrix &, float &, float &, bool)



CLightContribution _LightContribution
 name Lighting Behavior.
CLightingManager::CQGItLightedModel _LightedModelIt
 each transform may be in a quadGird of lighted models (see CLightingManager)
void resetLighting ()
 name Lighting Behavior.
uint32 isLightable () const
 true if the model can be lighted (such as CMeshBaseInstance) Default behavior is false.
void setUserLightable (bool enable)
 Set the UserLightable flag.
bool getUserLightable () const
 Get the UserLightable flag.
void freezeStaticLightSetup (CPointLight *pointLight[NL3D_MAX_LIGHT_CONTRIBUTION], uint numPointLights, uint8 sunContribution, CPointLight *frozenAmbientlight)
 Freeze and set the Static Light Setup.
void unfreezeStaticLightSetup ()
 unFreeze the Static Light Setup.
uint32 isBigLightable () const
 non-zero if the lighting Manager must take into account the bbox of the transform.
bool useMergedPointLight () const
 return true if the current light contribution of this model use a MergedPointLight
const CLightContributiongetLightContribution () const
 Return the current light contribution of this model.
virtual void getLightHotSpotInWorld (CVector &modelPos, float &modelRadius) const
 get the HotSpot of the model for Light computation.
void setLoadBalancingGroup (const std::string &group)
 name Load Balancing Behavior.
const std::string & getLoadBalancingGroup () const
 Get the load Balancing group of a model.
void setMeanColor (CRGBA color)
 name Misc
CRGBA getMeanColor () const
 see setMeanColor()
uint32 isAnimDetailable () const
 non-zero if the model is animDetailable (ie added to the animDetail list if visible)
uint32 isLoadBalancable () const
 non-zero if the model is loadBalancable (ie added to the loadBalancing list if visible)
uint32 isRenderable () const
 non-zero if the model is renderable (ie something may appear on screen)
uint32 isMeshBaseInstance () const
 non-zero if the CTransform can be casted to a CMeshBaseInstance
uint32 isTransformShape () const
 non-zero if the CTransform can be casted to a CTransformShape
uint32 isCluster () const
 non-zero if the CTransform can be casted to a CCluster
bool supportFastIntersect () const
 true if the transform support fast intersection (fastIntersect() works) For now, supports


virtual bool fastIntersect (const NLMISC::CVector &, const NLMISC::CVector &, float &, float &, bool)
 test if the transform intersect the ray (p0, dir).
void enableFastIntersectSupport (bool enable)
 internal only: used by CMeshBase
uint32 isNeedUpdateLighting () const
 non-zero if the object needs to updatelighting.
uint32 isNeedUpdateFrozenStaticLightSetup () const
 non-zero if the object has a FrozenStaticLightSetup not correclty updated.

Hrc Traversal



CMatrix _LocalMatrix
 Hrc IN variables.
CHrcTrav::TVisibility _LocalVis
sint64 _LocalDate
CMatrix _WorldMatrix
 Hrc OUT variables.
sint64 _WorldDate
bool _WorldVis
bool _Frozen
bool _DontUnfreezeChildren
bool _ClipLinkedInSonsOfAncestorSkeletonModelGroup
CSkeletonModel_AncestorSkeletonModel
void updateWorld ()
 Update the world state according to the parent world state and the local states.
void updateClipTravForAncestorSkeleton ()

Detailed Description

A basic node which provide an animatable matrix (ITransformable).

May be derived for each node who want to support such a scheme (CCamera, CLight, CInstance ... )

CTransform ALWAYS herit scale from fathers! (joints skeleton may not...) (nbyoyo: else, this breaks the update() system).

CTransform Default tracks are identity (derived class may change this).

CTransform by default IS NOT RENDERABLE. ie never inserted in renderList. Deriver should call setIsRenderable(true) to make the model renderable

CTransform by default IS NOT ANIMDETAIL-able. ie never inserted in anim detail list. It is automatically inserted in anim detail list if registerToChannelMixer() is called. Deriver should call setIsForceAnimdetail(true) to make the model always anim-detail-ed

CTransform by default IS NOT LOADBALANCE-able. ie never inserted into list for LoadBlancing. Deriver should call setIsLoadbalancable(true) to support this traversal.

Author:
Lionel Berenguier
Nevrax France
Date:
2000

Definition at line 97 of file transform.h.


Member Enumeration Documentation

Enumerator:
FreezeHRCStateDisabled 
FreezeHRCStateRequest 
FreezeHRCStateReady 
FreezeHRCStateEnabled 

Definition at line 820 of file transform.h.

enum NL3D::CTransform::TState [private]

State Flags.

Enumerator:
IsAnimDetailable 
IsLoadBalancable 
IsLightable 
IsRenderable 
IsTransparent 
IsOpaque 
QuadGridClipEnabled 
IsUserLightable 
IsFinalLightable 
IsBigLightable 
IsNeedUpdateLighting 
IsNeedUpdateFrozenStaticLightSetup 
IsSkeleton 
IsSkinned 
IsDeleteChannelMixer 
IsForceAnimDetail 
IsMeshBaseInstance 
IsTransformShape 
IsCluster 
UserClipping 
IsShadowMapCaster 
IsFinalShadowMapCaster 
IsShadowMapReceiver 
IsFinalShadowMapReceiver 
IsGeneratingShadowMap 
ForceClipRoot 
ClusterSystemAuto 
SSSWO 
BypassLODOpacity 

Definition at line 853 of file transform.h.


Constructor & Destructor Documentation

NL3D::CTransform::CTransform (  )  [protected]
NL3D::CTransform::~CTransform (  )  [protected, virtual]

Member Function Documentation

UTransform * NL3D::CTransform::buildMatchingUserInterfaceObject (  )  [virtual]

Definition at line 1457 of file transform.cpp.

bool NL3D::CTransform::canCastShadowMap (  )  const [inline]

true if the instance cast shadow. By default false

Definition at line 511 of file transform.h.

References getStateFlag(), and IsFinalShadowMapCaster.

Referenced by NL3D::CClipTrav::clipShadowCasters(), enableCastShadowMap(), and setGeneratingShadowMap().

bool NL3D::CTransform::canReceiveShadowMap (  )  const [inline]

true if the instance receive shadow. By default false

Definition at line 518 of file transform.h.

References getStateFlag(), and IsFinalShadowMapReceiver.

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

virtual bool NL3D::CTransform::clip (  )  [inline, virtual]

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

Reimplemented in NL3D::CCluster, NL3D::CLandscapeModel, NL3D::CParticleSystemModel, NL3D::CTransformShape, NL3D::CVegetableBlendLayerModel, and NL3D::CWaterModel.

Definition at line 154 of file transform.h.

Referenced by traverseClip().

void NL3D::CTransform::clipAddChild ( CTransform son  ) 
void NL3D::CTransform::clipDelChild ( CTransform son  ) 
void NL3D::CTransform::clipDelFromParent ( CTransform parent  )  [private]

Definition at line 1346 of file transform.cpp.

References _ClipParents.

Referenced by clipDelChild(), and clipUnlinkFromAll().

CTransform * NL3D::CTransform::clipGetChild ( uint  index  )  const
uint NL3D::CTransform::clipGetNumChildren (  )  const [inline]
uint NL3D::CTransform::clipGetNumParents (  )  const [inline]
CTransform * NL3D::CTransform::clipGetParent ( uint  index  )  const
bool NL3D::CTransform::clipHasParent ( CTransform parent  )  [private]

Definition at line 1333 of file transform.cpp.

References _ClipParents.

Referenced by clipAddChild().

void NL3D::CTransform::clipUnlinkFromAll (  ) 
virtual bool NL3D::CTransform::computeWorldBBoxForShadow ( NLMISC::CAABBox  )  [inline, virtual]

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 562 of file transform.h.

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

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

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() MUST call registerShadowCasterToList()

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

Definition at line 1004 of file transform.h.

Referenced by enableCastShadowMap().

static CTransform* NL3D::CTransform::creator (  )  [inline, static, private]
virtual void NL3D::CTransform::deleteShadowMap (  )  [inline, protected, virtual]

To implement for ShadowCaster support. typically free the shadowMap + MUST call unregisterShadowCasterToList().

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

Definition at line 1006 of file transform.h.

Referenced by enableCastShadowMap().

void NL3D::CTransform::enableCastShadowMap ( bool  state  ) 

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 1395 of file transform.cpp.

References canCastShadowMap(), createShadowMap(), deleteShadowMap(), getShadowMap(), IsFinalShadowMapCaster, modelCanCastShadowMap(), nlassert, and setStateFlag().

void NL3D::CTransform::enableFastIntersectSupport ( bool  enable  )  [inline]

internal only: used by CMeshBase

Definition at line 492 of file transform.h.

References _SupportFastIntersect.

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

void NL3D::CTransform::enableReceiveShadowMap ( bool  state  )  [inline]

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 516 of file transform.h.

References IsFinalShadowMapReceiver, modelCanReceiveShadowMap(), and setStateFlag().

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

virtual bool NL3D::CTransform::fastIntersect ( const NLMISC::CVector ,
const NLMISC::CVector ,
float ,
float ,
bool   
) [inline, virtual]

test if the transform intersect the ray (p0, dir).

Returns:
false if not supported/no triangles, else true if can do the test (even if don't intersect!) if intersect, dist2D=0, and distZ= Depth Distance if don't intersect, dist2D="nearest distance to the ray", and distZ=0
Parameters:
computeDist2D if false and don't intersect, then return dist2D=FLT_MAX, and distZ=0

Reimplemented in NL3D::CMeshBaseInstance, and NL3D::CSkeletonModel.

Definition at line 489 of file transform.h.

void NL3D::CTransform::forceCompute (  )  [protected]
void NL3D::CTransform::freeze (  ) 

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" (useful 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 384 of file transform.cpp.

References _Frozen, and update().

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

void NL3D::CTransform::freezeHRC (  ) 

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 402 of file transform.cpp.

References _FreezeHRCState, _Frozen, _TransformDirty, FreezeHRCStateDisabled, FreezeHRCStateRequest, QuadGridClipEnabled, and setStateFlag().

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

void NL3D::CTransform::freezeStaticLightSetup ( CPointLight pointLight[NL3D_MAX_LIGHT_CONTRIBUTION],
uint  numPointLights,
uint8  sunContribution,
CPointLight frozenAmbientlight 
)
virtual void NL3D::CTransform::generateShadowMap ( const CVector  )  [inline, virtual]

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 533 of file transform.h.

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

void NL3D::CTransform::getAABBox ( NLMISC::CAABBox bbox  )  const [virtual]

Get the untransformed AABBox of the transform.

NULL (gtCenter()= 0, gtSize()==0) by default.

Reimplemented in NL3D::CParticleSystemModel, and NL3D::CTransformShape.

Definition at line 531 of file transform.cpp.

References NLMISC::CVector::Null, NLMISC::CAABBox::setCenter(), and NLMISC::CAABBox::setHalfSize().

Referenced by traverseLight().

CSkeletonModel* NL3D::CTransform::getAncestorSkeletonModel (  )  const [inline]

Definition at line 219 of file transform.h.

References _AncestorSkeletonModel.

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

bool NL3D::CTransform::getBypassLODOpacityFlag (  )  const [inline]

Definition at line 176 of file transform.h.

References BypassLODOpacity, and getStateFlag().

Referenced by NL3D::CMeshMultiLodInstance::traverseLoadBalancing().

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

get the channelMixer owned by the transform.

return result of a refPtr => may be NULL.

Definition at line 720 of file transform.h.

References _ChannelMixer.

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

bool NL3D::CTransform::getChannelMixerOwnerShip (  )  const [inline]

Definition at line 269 of file transform.h.

References getStateFlag(), and IsDeleteChannelMixer.

Referenced by registerToChannelMixer(), and ~CTransform().

CInstanceGroup * NL3D::CTransform::getClusterSystem (  ) 
ITrack * NL3D::CTransform::getDefaultTrack ( uint  valueId  )  [virtual]
bool NL3D::CTransform::getForceClipRoot (  )  const [inline]

Definition at line 599 of file transform.h.

References ForceClipRoot, and getStateFlag().

Referenced by NL3D::UTransform::parent().

const CLightContribution& NL3D::CTransform::getLightContribution (  )  const [inline]

Return the current light contribution of this model.

Definition at line 386 of file transform.h.

References _LightContribution.

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

virtual void NL3D::CTransform::getLightHotSpotInWorld ( CVector modelPos,
float modelRadius 
) const [inline, virtual]

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 in NL3D::CSkeletonModel, and NL3D::CTransformShape.

Definition at line 394 of file transform.h.

References NLMISC::CVector::Null.

Referenced by NL3D::CLightingManager::computeModelLightContributions().

const std::string & NL3D::CTransform::getLoadBalancingGroup (  )  const

Get the load Balancing group of a model.

see setLoadBalancingGroup().

Definition at line 549 of file transform.cpp.

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

CRGBA NL3D::CTransform::getMeanColor (  )  const [inline]

see setMeanColor()

Definition at line 460 of file transform.h.

References _MeanColor.

Referenced by NL3D::CFlareModel::traverseRender().

uint NL3D::CTransform::getOrderingLayer (  )  const [inline]

Get the ordering layer.

Definition at line 192 of file transform.h.

References _OrderingLayer.

Referenced by NL3D::CRenderTrav::traverse().

CScene* NL3D::CTransform::getOwnerScene (  )  const [inline]

get the scene which has created us

Definition at line 104 of file transform.h.

References _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::CSkeletonModel::createShadowMap(), NL3D::CMeshInstance::createShadowMap(), NL3D::CSkeletonModel::deleteShadowMap(), NL3D::CMeshInstance::deleteShadowMap(), NL3D::CSkeletonModel::detachSkeletonSon(), NL3D::CParticleSystemModel::doAnimate(), NL3D::CSkeletonSpawnScript::evaluate(), NL3D::CTargetAnimCtrl::execute(), NL3D::CSkeletonModel::fastIntersect(), NL3D::CWaterModel::fillVBHard(), NL3D::CWaterModel::fillVBSoft(), NL3D::CSkeletonModel::generateShadowMap(), NL3D::CMeshInstance::generateShadowMap(), NL3D::CMeshMultiLodInstance::getCoarseMeshLighting(), NL3D::CWaterModel::getNumWantedVertices(), initModel(), NL3D::CSkeletonModel::initModel(), NL3D::CPointLightModel::initModel(), NL3D::CLandscapeModel::initModel(), NL3D::CParticleSystemModel::insertInVisibleList(), NL3D::CMeshMultiLod::instanciateCoarseMeshSpace(), NL3D::CWaterModel::link(), NL3D::UTransform::parent(), NL3D::CTransformShape::profileRender(), NL3D::CLandscapeModel::receiveShadowMap(), NL3D::CCluster::recursTraverseClip(), NL3D::CMeshBaseInstance::releaseCurrentAsyncTextures(), NL3D::CSegRemanence::render(), NL3D::CMeshMultiLod::render(), NL3D::CMeshMRMGeom::render(), NL3D::CMeshGeom::render(), NL3D::CLandscape::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::CSceneUser::setCam(), setLoadBalancingGroup(), NL3D::CSkeletonModel::setLodCharacterShape(), NL3D::CWaterModel::setupMaterialNVertexShader(), NL3D::CWaterModel::setupSimpleRender(), NL3D::CMeshBaseInstance::startAsyncTextureLoading(), NL3D::CWaveMakerModel::traverseAnimDetail(), NL3D::CSkeletonModel::traverseAnimDetail(), NL3D::CSegRemanence::traverseAnimDetail(), NL3D::CParticleSystemModel::traverseAnimDetail(), NL3D::CMeshBaseInstance::traverseAnimDetail(), traverseAnimDetailWithoutUpdateWorldMatrix(), traverseClip(), NL3D::CQuadGridClipManager::traverseClip(), NL3D::CParticleSystemModel::traverseClip(), NL3D::CLandscapeModel::traverseClip(), NL3D::CMeshBaseInstance::traverseHrc(), NL3D::CLandscapeModel::traverseHrc(), traverseLight(), NL3D::CPointLightModel::traverseLight(), NL3D::CTransformShape::traverseLoadBalancing(), NL3D::CMeshMultiLodInstance::traverseLoadBalancing(), NL3D::CTransformShape::traverseLoadBalancingPass0(), NL3D::CWaterModel::traverseRender(), NL3D::CVegetableBlendLayerModel::traverseRender(), NL3D::CTransformShape::traverseRender(), NL3D::CLandscapeModel::traverseRender(), NL3D::CFlareModel::traverseRender(), unfreezeHRC(), update(), updateClipTravForAncestorSkeleton(), NL3D::CQuadGridClipManager::updateClustersFromCamera(), NL3D::CSkeletonModel::updateShadowMap(), NL3D::CMeshInstance::updateShadowMap(), updateWorld(), NL3D::CSkeletonModel::~CSkeletonModel(), ~CTransform(), and NL3D::CWaterModel::~CWaterModel().

void NL3D::CTransform::getReceiverBBox ( CAABBox bbox  )  [virtual]

For receivers.

get the World Instance bbox that includes the receiver.

Reimplemented in NL3D::CLandscapeModel.

Definition at line 1388 of file transform.cpp.

References NLMISC::CVector::Null, NLMISC::CAABBox::setCenter(), and NLMISC::CAABBox::setHalfSize().

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

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

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 552 of file transform.h.

References getWorldMatrix().

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

virtual CShadowMap* NL3D::CTransform::getShadowMap (  )  [inline, virtual]
float NL3D::CTransform::getShadowMapDirectionZThreshold (  )  const [inline]
float NL3D::CTransform::getShadowMapMaxDepth (  )  const [inline]
bool NL3D::CTransform::getShowWhenLODSticked (  )  const [inline, protected]

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 759 of file transform.h.

References _ForceCLodSticked.

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

CSkeletonModel* NL3D::CTransform::getSkeletonModel (  )  const [inline]
virtual bool NL3D::CTransform::getSkinBoneBBox ( NLMISC::CAABBox ,
uint   
) [inline, virtual]

Called for edition purpose (slow call O(NVertex)) It return the BBox (local to the Bone at its bind pos) of all of the vertices of this mesh that are bound to this bone NB: the instance must be skinned to the skeleton instance, BUT the result is not modified by current bone world matrix (eg: no current scale influence).

Parameters:
boneId,: the id of the skeleton's bone (wich the instance is skinned to)
bbox,: the bbox (in bone basis) filled if return is true
Returns:
false if no vertices are bound to

Reimplemented in NL3D::CMeshMRMInstance, and NL3D::CMeshMRMSkinnedInstance.

Definition at line 446 of file transform.h.

virtual const std::vector<NLMISC::CBSphere>* NL3D::CTransform::getSkinBoneSphere (  )  const [inline, protected, virtual]

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.

Reimplemented in NL3D::CMeshInstance, NL3D::CMeshMRMInstance, and NL3D::CMeshMRMSkinnedInstance.

Definition at line 654 of file transform.h.

Referenced by NL3D::CSkeletonModel::updateSkinRenderLists().

virtual const std::vector<sint32>* NL3D::CTransform::getSkinBoneUsage (  )  const [inline, protected, virtual]

Deriver must change this method if isSkinnable().

It return the list of bone (correct skeleton index) used by the skins (NB: without the parents of the bone). NB: if an index is -1, it means that the skin bone has not been found in the skeleton (skip it) default is to return NULL.

Reimplemented in NL3D::CMeshInstance, NL3D::CMeshMRMInstance, and NL3D::CMeshMRMSkinnedInstance.

Definition at line 648 of file transform.h.

Referenced by NL3D::CSkeletonModel::computeCLodVertexAlpha(), and NL3D::CSkeletonModel::updateSkinRenderLists().

bool NL3D::CTransform::getSSSWO (  )  const [inline]

Definition at line 608 of file transform.h.

References getStateFlag(), and SSSWO.

uint32 NL3D::CTransform::getStateFlag ( uint32  mask  )  const [inline, private]
uint8 NL3D::CTransform::getTransparencyPriority (  )  const [inline]

Definition at line 199 of file transform.h.

References _TransparencyPriority.

Referenced by NL3D::CRenderTrav::traverse().

bool NL3D::CTransform::getUserClipping (  )  const

Return the user clipping state.

Definition at line 1376 of file transform.cpp.

References getStateFlag(), and UserClipping.

bool NL3D::CTransform::getUserLightable (  )  const [inline]

Get the UserLightable flag.

Definition at line 360 of file transform.h.

References getStateFlag(), and IsUserLightable.

CHrcTrav::TVisibility NL3D::CTransform::getVisibility (  )  [inline]
const CMatrix& NL3D::CTransform::getWorldMatrix (  )  const [inline]

Get the worldMatrix that is computed at last Hrc pass.

Definition at line 311 of file transform.h.

References _WorldMatrix.

Referenced by NL3D::CMeshMRMGeom::activeInstance(), NL3D::CMeshGeom::activeInstance(), NL3D::CLightingManager::addDynamicLight(), NL3D::CCamera::buildCameraPyramid(), NL3D::CCamera::buildCameraPyramidCorners(), NL3D::CParticleSystemModel::checkAgainstPyramid(), NL3D::CWaterModel::clip(), NL3D::CTransformShape::clip(), NL3D::CClipTrav::clipShadowCasters(), NL3D::CWaterModel::computeClippedPoly(), NL3D::CSkeletonModel::computeDisplayLodCharacterPriority(), NL3D::CShadowMapManager::computeShadowDirection(), NL3D::CMeshInstance::computeWorldBBoxForShadow(), NL3D::CParticleSystemModel::doAnimate(), NL3D::CTargetAnimCtrl::execute(), NL3D::CSkeletonModel::fastIntersect(), NL3D::CMeshBaseInstance::fastIntersect(), NL3D::CWaterModel::fillVBHard(), NL3D::CWaterModel::fillVBSoft(), NL3D::CSkeletonModel::generateShadowMap(), NL3D::CMeshInstance::generateShadowMap(), NL3D::CTransformShape::getLightHotSpotInWorld(), NL3D::CWaterModel::getNumWantedVertices(), 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::CFlareModel::setupOcclusionMeshMatrix(), NL3D::CMeshVPWindTree::setupPerInstanceConstants(), NL3D::CRenderTrav::traverse(), NL3D::CClipTrav::traverse(), NL3D::CWaveMakerModel::traverseAnimDetail(), NL3D::CSkeletonModel::traverseAnimDetail(), NL3D::CParticleSystemModel::traverseClip(), traverseLight(), NL3D::CPointLightModel::traverseLight(), NL3D::CTransformShape::traverseLoadBalancingPass0(), NL3D::CWaterModel::traverseRender(), NL3D::CFlareModel::traverseRender(), NL3D::CWaterModel::updateDiffuseMapMatrix(), and NL3D::CFlareModel::updateOcclusionQuery().

void NL3D::CTransform::heritVisibility (  ) 

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

Definition at line 304 of file transform.cpp.

References _FatherSkeletonModel, _TransformDirty, NL3D::CSkeletonModel::dirtSkinRenderLists(), NL3D::CHrcTrav::Herit, isSkinned(), nlassert, and Visibility.

void NL3D::CTransform::hide (  ) 
CTransform * NL3D::CTransform::hrcGetChild ( uint  index  )  const
uint NL3D::CTransform::hrcGetNumChildren (  )  const [inline]
CTransform* NL3D::CTransform::hrcGetParent (  )  const [inline]

Definition at line 230 of file transform.h.

References _HrcParent.

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

void NL3D::CTransform::hrcLinkSon ( CTransform son  ) 
void NL3D::CTransform::hrcUnlink (  ) 

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 1241 of file transform.cpp.

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

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

void NL3D::CTransform::initModel (  )  [virtual]

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 225 of file transform.cpp.

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

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

virtual bool NL3D::CTransform::intersectSkin ( const CMatrix ,
float ,
float ,
bool   
) [inline, protected, virtual]
uint32 NL3D::CTransform::isAnimDetailable (  )  const [inline]

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

Definition at line 463 of file transform.h.

References getStateFlag(), and IsAnimDetailable.

Referenced by NL3D::CClipTrav::clipShadowCasters(), traverseClip(), and NL3D::CSkeletonModel::updateSkinRenderLists().

uint32 NL3D::CTransform::isBigLightable (  )  const [inline]

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 378 of file transform.h.

References getStateFlag(), and IsBigLightable.

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

bool NL3D::CTransform::isClipVisible (  )  const [inline]
uint32 NL3D::CTransform::isCluster (  )  const [inline]

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

Definition at line 474 of file transform.h.

References getStateFlag(), and IsCluster.

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

virtual bool NL3D::CTransform::isFlare (  )  const [inline, virtual]

Reimplemented in NL3D::CFlareModel.

Definition at line 603 of file transform.h.

bool NL3D::CTransform::isGeneratingShadowMap (  )  const [inline]
bool NL3D::CTransform::isHrcVisible (  )  const [inline]
uint32 NL3D::CTransform::isLightable (  )  const [inline]

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 350 of file transform.h.

References getStateFlag(), and IsFinalLightable.

Referenced by NL3D::CClipTrav::clipShadowCasters(), NL3D::CParticleSystemModel::insertInVisibleList(), traverseClip(), NL3D::CTransformShape::traverseRender(), NL3D::CParticleSystemModel::traverseRender(), unfreezeHRC(), update(), and updateWorld().

uint32 NL3D::CTransform::isLoadBalancable (  )  const [inline]

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

Definition at line 465 of file transform.h.

References getStateFlag(), and IsLoadBalancable.

Referenced by traverseClip().

uint32 NL3D::CTransform::isMeshBaseInstance (  )  const [inline]
uint32 NL3D::CTransform::isNeedUpdateFrozenStaticLightSetup (  )  const [inline, protected]

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

Definition at line 710 of file transform.h.

References getStateFlag(), and IsNeedUpdateFrozenStaticLightSetup.

Referenced by traverseLight().

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

non-zero if the object needs to updatelighting.

Definition at line 708 of file transform.h.

References getStateFlag(), and IsNeedUpdateLighting.

Referenced by resetLighting(), and traverseLight().

uint32 NL3D::CTransform::isOpaque (  )  [inline]
uint32 NL3D::CTransform::isQuadGridClipEnabled (  )  const [inline]

special feature for CQuadGridClipManager.

return a non-zero value if true

Definition at line 306 of file transform.h.

References getStateFlag(), and QuadGridClipEnabled.

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

uint32 NL3D::CTransform::isRenderable (  )  const [inline]

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

Definition at line 467 of file transform.h.

References getStateFlag(), and IsRenderable.

Referenced by traverseClip().

uint32 NL3D::CTransform::isSkeleton (  )  const [inline]

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

Definition at line 434 of file transform.h.

References getStateFlag(), and IsSkeleton.

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

virtual bool NL3D::CTransform::isSkinnable (  )  const [inline, protected, virtual]

Deriver must change this method if the model can be skinned. called rarely.

Reimplemented in NL3D::CMeshInstance, NL3D::CMeshMRMInstance, and NL3D::CMeshMRMSkinnedInstance.

Definition at line 637 of file transform.h.

Referenced by NL3D::CSkeletonModel::bindSkin().

uint32 NL3D::CTransform::isSkinned (  )  const [inline]
uint32 NL3D::CTransform::isTransformShape (  )  const [inline]

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

Definition at line 472 of file transform.h.

References getStateFlag(), and IsTransformShape.

Referenced by updateWorld().

uint32 NL3D::CTransform::isTransparent (  )  [inline]
void NL3D::CTransform::linkToUpdateList (  )  [private]
uint32 NL3D::CTransform::modelCanCastShadowMap (  )  const [inline]

true if the model provide a method to support shadowMap generation

Definition at line 521 of file transform.h.

References getStateFlag(), and IsShadowMapCaster.

Referenced by enableCastShadowMap().

uint32 NL3D::CTransform::modelCanReceiveShadowMap (  )  const [inline]

true if the model provide a method to support shadowMap receiving

Definition at line 523 of file transform.h.

References getStateFlag(), and IsShadowMapReceiver.

Referenced by enableReceiveShadowMap().

void NL3D::CTransform::profileRender (  )  [virtual]

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

Reimplemented in NL3D::CLandscapeModel, NL3D::CQuadGridClipManager, and NL3D::CTransformShape.

Definition at line 1197 of file transform.cpp.

Referenced by NL3D::CRenderTrav::traverse().

virtual void NL3D::CTransform::receiveShadowMap ( CShadowMap ,
const CVector ,
const CMaterial  
) [inline, virtual]

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 547 of file transform.h.

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

void NL3D::CTransform::registerBasic (  )  [static]
void NL3D::CTransform::registerToChannelMixer ( CChannelMixer chanMixer,
const std::string &  prefix 
) [virtual]
virtual void NL3D::CTransform::renderIntoSkeletonShadowMap ( CSkeletonModel ,
CMaterial  
) [inline, virtual]

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.

Definition at line 568 of file transform.h.

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

virtual sint NL3D::CTransform::renderShadowSkinGeom ( uint  ,
uint8  
) [inline, protected, virtual]

Reimplemented in NL3D::CMeshMRMInstance, and NL3D::CMeshMRMSkinnedInstance.

Definition at line 682 of file transform.h.

virtual void NL3D::CTransform::renderShadowSkinPrimitives ( CMaterial ,
IDriver ,
uint   
) [inline, protected, virtual]

Reimplemented in NL3D::CMeshMRMInstance, and NL3D::CMeshMRMSkinnedInstance.

Definition at line 683 of file transform.h.

virtual void NL3D::CTransform::renderSkin ( float   )  [inline, protected, virtual]

Deriver must change this method if isSkinnable().

It renders the skin with current ctx of the skeletonModel SkeletonModel has already setuped the Light and the modelMatrix in the driver. If the skin is a MRM, it is the skeleton which drives the MRM level with alphaMRM: [0,1] default is nop

Reimplemented in NL3D::CMeshInstance, NL3D::CMeshMRMInstance, and NL3D::CMeshMRMSkinnedInstance.

Definition at line 660 of file transform.h.

virtual sint NL3D::CTransform::renderSkinGroupGeom ( float  ,
uint  ,
uint8  
) [inline, protected, virtual]

if supportSkinGrouping(), called to transform the VBuffer, and store it into dest.

Returns:
number of vertices added to the VBuffer, or -1 if > reaminingVertices

Reimplemented in NL3D::CMeshMRMInstance, and NL3D::CMeshMRMSkinnedInstance.

Definition at line 671 of file transform.h.

virtual void NL3D::CTransform::renderSkinGroupPrimitives ( uint  ,
std::vector< CSkinSpecularRdrPass > &  ,
uint   
) [inline, protected, virtual]

if supportSkinGrouping(), called to render the primitives of the already skinned vertices (VB activated in the driver) Optionnaly, fill specRdrPasses with specular rdrPass to sort (used for specular grouping).

Parameters:
baseVertex value to add to each PBlock index.

Reimplemented in NL3D::CMeshMRMInstance, and NL3D::CMeshMRMSkinnedInstance.

Definition at line 676 of file transform.h.

virtual void NL3D::CTransform::renderSkinGroupSpecularRdrPass ( uint   )  [inline, protected, virtual]

Render a specific specular renderPass returned by renderSkinGroupPrimitives.

Reimplemented in NL3D::CMeshMRMInstance, and NL3D::CMeshMRMSkinnedInstance.

Definition at line 678 of file transform.h.

void NL3D::CTransform::resetLighting (  ) 

name Lighting Behavior.

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 1046 of file transform.cpp.

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

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

void NL3D::CTransform::setApplySkin ( bool  state  )  [protected, virtual]

Deriver must change this method if isSkinnable().

called by CSkeletonModel::bindSkin() NB: _FatherSkeletonModel is valid when setApplySkin() is called The default behavior must be called: it sets the flag so isSkinned() return the good thing

Reimplemented in NL3D::CMeshInstance, NL3D::CMeshMRMInstance, and NL3D::CMeshMRMSkinnedInstance.

Definition at line 601 of file transform.cpp.

References IsSkinned, and setStateFlag().

Referenced by NL3D::CSkeletonModel::bindSkin(), and NL3D::CSkeletonModel::detachSkeletonSon().

void NL3D::CTransform::setBypassLODOpacityFlag ( bool  bypass  ) 

Definition at line 266 of file transform.cpp.

References BypassLODOpacity, and setStateFlag().

void NL3D::CTransform::setChannelMixerOwnerShip ( bool  enable = true  )  [inline]

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 268 of file transform.h.

References IsDeleteChannelMixer, and setStateFlag().

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

void NL3D::CTransform::setClusterSystem ( CInstanceGroup pCS  ) 
void NL3D::CTransform::setDontUnfreezeChildren ( bool  val  ) 

Definition at line 395 of file transform.cpp.

References _DontUnfreezeChildren.

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

void NL3D::CTransform::setForceClipRoot ( bool  forceClipRoot  ) 

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 1440 of file transform.cpp.

References _OwnerScene, ForceClipRoot, NL3D::CScene::getRoot(), getStateFlag(), hrcLinkSon(), hrcUnlink(), setClusterSystem(), and setStateFlag().

void NL3D::CTransform::setGeneratingShadowMap ( bool  state  )  [inline]

For ShadowMapManager. true if the model is rendering its ShadowMap this frame.

Definition at line 555 of file transform.h.

References canCastShadowMap(), IsGeneratingShadowMap, and setStateFlag().

void NL3D::CTransform::setIsBigLightable ( bool  val  )  [protected]

Deriver must use this method with true to indicate the model is a big lightable.

Definition at line 591 of file transform.cpp.

References IsBigLightable, and setStateFlag().

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

void NL3D::CTransform::setIsCluster ( bool  val  )  [inline, protected]

For CCluster only.

Definition at line 750 of file transform.h.

References IsCluster, and setStateFlag().

Referenced by NL3D::CCluster::CCluster().

void NL3D::CTransform::setIsForceAnimDetail ( bool  val  )  [protected]
void NL3D::CTransform::setIsLightable ( bool  val  )  [protected]

Deriver must use this method with true to indicate the model support lighting.

Definition at line 569 of file transform.cpp.

References getStateFlag(), IsFinalLightable, IsLightable, IsUserLightable, and setStateFlag().

Referenced by NL3D::CSkeletonModel::CSkeletonModel(), NL3D::CMeshBase::instanciateMeshBase(), and NL3D::CParticleSystemModel::updateLightingInfos().

void NL3D::CTransform::setIsLoadbalancable ( bool  val  )  [protected]

Deriver must use this method with true to indicate the model support loadBalancing.

Definition at line 622 of file transform.cpp.

References IsLoadBalancable, and setStateFlag().

Referenced by NL3D::CMeshInstance::CMeshInstance(), NL3D::CSkeletonModel::CSkeletonModel(), and NL3D::CTransformShape::CTransformShape().

void NL3D::CTransform::setIsMeshBaseInstance ( bool  val  )  [inline, protected]

For CMeshBaseInstance only.

Definition at line 746 of file transform.h.

References IsMeshBaseInstance, and setStateFlag().

Referenced by NL3D::CMeshBaseInstance::CMeshBaseInstance().

void NL3D::CTransform::setIsRenderable ( bool  val  )  [protected]

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 585 of file transform.cpp.

References IsRenderable, and setStateFlag().

Referenced by NL3D::CLandscapeModel::CLandscapeModel(), NL3D::CSkeletonModel::CSkeletonModel(), NL3D::CTransformShape::CTransformShape(), and NL3D::CVegetableBlendLayerModel::CVegetableBlendLayerModel().

void NL3D::CTransform::setIsShadowMapCaster ( bool  val  )  [inline, protected]

ShadowMap.

Definition at line 753 of file transform.h.

References IsShadowMapCaster, and setStateFlag().

Referenced by NL3D::CMeshInstance::CMeshInstance(), and NL3D::CSkeletonModel::CSkeletonModel().

void NL3D::CTransform::setIsShadowMapReceiver ( bool  val  )  [inline, protected]

Definition at line 754 of file transform.h.

References IsShadowMapReceiver, and setStateFlag().

Referenced by NL3D::CLandscapeModel::CLandscapeModel().

void NL3D::CTransform::setIsSkeleton ( bool  val  )  [protected]

For CSkeletonModel only.

Definition at line 596 of file transform.cpp.

References IsSkeleton, and setStateFlag().

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

void NL3D::CTransform::setIsTransformShape ( bool  val  )  [inline, protected]

For CTransformShape only.

Definition at line 748 of file transform.h.

References IsTransformShape, and setStateFlag().

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

void NL3D::CTransform::setLoadBalancingGroup ( const std::string &  group  ) 

name Load Balancing Behavior.

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 539 of file transform.cpp.

References _LoadBalancingGroup, NL3D::CScene::getLoadBalancingTrav(), NL3D::CLoadBalancingTrav::getOrCreateGroup(), and getOwnerScene().

Referenced by NL3D::CSkeletonShape::createInstance(), NL3D::CSegRemanenceShape::createInstance(), and NL3D::CParticleSystemShape::createInstance().

void NL3D::CTransform::setLogicInfo ( ILogicInfo logicInfo  )  [inline]

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 402 of file transform.h.

References _LogicInfo.

void NL3D::CTransform::setMeanColor ( CRGBA  color  ) 

name Misc

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 557 of file transform.cpp.

References _MeanColor.

void NL3D::CTransform::setOpacity ( bool  v  ) 
void NL3D::CTransform::setOrderingLayer ( uint  layer  )  [inline]

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 189 of file transform.h.

References _OrderingLayer.

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

void NL3D::CTransform::setShadowMapDirectionZThreshold ( float  zthre  ) 

To limit some problems when the light direction is too on the XY axis.

This method set an "angle" threshold for the shadow direction Actually, you give the minimum negative Z (not ang angle) the normalized shadow direction must have

Parameters:
zthre possible values are in [-1,1]. -1 force the direction to be (0,0,-1) in all case 0 means the z may be 0 (the direction is totaly XY), but at least the direction must go downward 1 means there is no restriction, the shadow direction can either be upward default is -0.5 (this implies a minimum angle of 30 degrees with the XY plane)

Definition at line 1463 of file transform.cpp.

References _ShadowMapDirectionZThreshold, and NLMISC::clamp().

void NL3D::CTransform::setShadowMapMaxDepth ( float  depth  ) 

To limit some problems with interior, a limit of shadow depth by caster can be given.

This is the length in the lightDir direction where the shadow can touch receivers. Can be used also to have some big objects that cast shadows further. Default to 8.0.

Definition at line 1470 of file transform.cpp.

References _ShadowMapMaxDepth.

void NL3D::CTransform::setSSSWO ( bool  state  )  [inline]

Don't use, used by CSkeletonSpawnScript to indicate that the WorldMatrix of this object is special.

Definition at line 607 of file transform.h.

References setStateFlag(), and SSSWO.

void NL3D::CTransform::setStateFlag ( uint32  mask,
bool  val 
) [inline, private]
void NL3D::CTransform::setTransparency ( bool  v  ) 
void NL3D::CTransform::setTransparencyPriority ( uint8  priority  )  [inline]

Set priority for transparent ordering. When sorting before drawing, priority is taken in account before distance, so.

Definition at line 198 of file transform.h.

References _TransparencyPriority.

void NL3D::CTransform::setUserClipping ( bool  enable  ) 

Definition at line 1370 of file transform.cpp.

References setStateFlag(), and UserClipping.

void NL3D::CTransform::setUserLightable ( bool  enable  ) 

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 576 of file transform.cpp.

References getStateFlag(), IsFinalLightable, IsLightable, IsUserLightable, and setStateFlag().

void NL3D::CTransform::setWorldMatrix ( const CMatrix mat  )  [inline]

Reimplemented in NL3D::CCluster.

Definition at line 314 of file transform.h.

References _WorldMatrix.

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

void NL3D::CTransform::show (  ) 
bool NL3D::CTransform::supportFastIntersect (  )  const [inline]

true if the transform support fast intersection (fastIntersect() works) For now, supports

Definition at line 482 of file transform.h.

References _SupportFastIntersect.

Referenced by NL3D::CMeshBaseInstance::fastIntersect().

virtual bool NL3D::CTransform::supportIntersectSkin (  )  const [inline, protected, virtual]

Special use of skinning to compute intersection of a ray with it.

Returns:
false if not supported/no triangles, else true if can do the test (even if don't intersect!) if intersect, dist2D=0, and distZ= Depth Distance if don't intersect, dist2D="nearest distance to the ray", and distZ=0
Parameters:
computeDist2D if false and don't intersect, then return dist2D=FLT_MAX, and distZ=0

Reimplemented in NL3D::CMeshInstance, NL3D::CMeshMRMInstance, and NL3D::CMeshMRMSkinnedInstance.

Definition at line 691 of file transform.h.

Referenced by NL3D::CSkeletonModel::fastIntersect(), and NL3D::CSkeletonModel::updateSkinRenderLists().

virtual bool NL3D::CTransform::supportShadowSkinGrouping (  )  const [inline, protected, virtual]

Special Skinning For ShadowMapping.

Reimplemented in NL3D::CMeshMRMInstance, and NL3D::CMeshMRMSkinnedInstance.

Definition at line 681 of file transform.h.

Referenced by NL3D::CSkeletonModel::renderShadowSkins().

virtual bool NL3D::CTransform::supportSkinGrouping (  )  const [inline, protected, virtual]

Deriver may support SkinGrouping if isSkinnable().

It renders the skin with current ctx of the skeletonModel, but torn in 2 pass: fillVB,a nd renderPrimitives Deriver may check NL3D_MESH_SKIN_MANAGER_VERTEXFORMAT and NL3D_MESH_SKIN_MANAGER_MAXVERTICES

Reimplemented in NL3D::CMeshMRMInstance, and NL3D::CMeshMRMSkinnedInstance.

Definition at line 667 of file transform.h.

Referenced by NL3D::CSkeletonModel::renderSkinList().

void NL3D::CTransform::traverseAnimDetail (  )  [virtual]
void NL3D::CTransform::traverseAnimDetailWithoutUpdateWorldMatrix (  )  [protected]

traverse without updatin WorldMatrixFromFather:

  • animdetail if the model channelmixer is not NULL, and if model not clipped

Definition at line 996 of file transform.cpp.

References _ChannelMixer, NL3D::CChannelMixer::eval(), and getOwnerScene().

Referenced by traverseAnimDetail(), and NL3D::CSkeletonModel::traverseAnimDetail().

void NL3D::CTransform::traverseClip (  )  [virtual]

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 850 of file transform.cpp.

References _AncestorSkeletonModel, _ClipDate, _FatherSkeletonModel, _ForceCLodSticked, _RenderFilterType, _StateFlags, _Visible, _WorldVis, NL3D::CLightTrav::addLightedModel(), NL3D::CRenderTrav::addRenderModel(), NL3D::CLoadBalancingTrav::addVisibleModel(), NL3D::CAnimDetailTrav::addVisibleModel(), NL3D::CClipTrav::addVisibleModel(), clip(), clipGetChild(), clipGetNumChildren(), NL3D::CClipTrav::CurrentDate, NL3D::CScene::getAnimDetailTrav(), NL3D::CScene::getClipTrav(), NL3D::CScene::getFilterRenderFlags(), NL3D::CScene::getLightTrav(), NL3D::CScene::getLoadBalancingTrav(), getOwnerScene(), NL3D::CScene::getRenderTrav(), isAnimDetailable(), isClipVisible(), NL3D::CSkeletonModel::isDisplayedAsLodCharacter(), isLightable(), isLoadBalancable(), isRenderable(), traverseClip(), and UserClipping.

Referenced by NL3D::CCluster::recursTraverseClip(), NL3D::CClipTrav::traverse(), traverseClip(), NL3D::CRootModel::traverseClip(), and NL3D::CParticleSystemModel::traverseClip().

void NL3D::CTransform::traverseHrc (  )  [virtual]
void NL3D::CTransform::traverseLight (  )  [virtual]
void NL3D::CTransform::traverseLoadBalancing (  )  [virtual]
void NL3D::CTransform::traverseRender (  )  [virtual]
void NL3D::CTransform::unfreezeHRC (  ) 
void NL3D::CTransform::unfreezeStaticLightSetup (  ) 

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 1120 of file transform.cpp.

References _LightContribution, NL3D::CLightContribution::FrozenAmbientLight, NL3D::CLightContribution::FrozenStaticLightSetup, IsNeedUpdateFrozenStaticLightSetup, NL3D::CLightContribution::NumFrozenStaticLight, NL3D::CLightContribution::PointLight, resetLighting(), and setStateFlag().

Referenced by NL3D::CInstanceGroup::removeFromScene().

virtual void NL3D::CTransform::unlinkFromQuadCluster (  )  [inline, protected, virtual]

special feature for CQuadGridClipManager. called at unfreezeHRC(). Used by CTransformShape.

Reimplemented in NL3D::CTransformShape.

Definition at line 631 of file transform.h.

Referenced by unfreezeHRC().

void NL3D::CTransform::unlinkFromUpdateList (  )  [private]
void NL3D::CTransform::update (  )  [virtual]
void NL3D::CTransform::updateClipTravForAncestorSkeleton (  )  [protected]
void NL3D::CTransform::updateWorld (  )  [protected]
void NL3D::CTransform::updateWorldMatrixFromFather (  )  [protected]

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 949 of file transform.cpp.

References _AncestorSkeletonModel, _FatherBoneId, _FatherSkeletonModel, _LocalMatrix, _WorldMatrix, NL3D::CSkeletonModel::Bones, NL3D::CSkeletonModel::getSSSWODir(), NL3D::CSkeletonModel::getSSSWOPos(), getStateFlag(), hrcGetParent(), NLMISC::CVector::I, isSkinned(), NLMISC::CVector::K, NLMISC::CMatrix::normalize(), NLMISC::CMatrix::setPos(), NLMISC::CMatrix::setRot(), SSSWO, and NLMISC::CMatrix::YZX.

Referenced by forceCompute(), traverseAnimDetail(), and NL3D::CSkeletonModel::traverseAnimDetail().

bool NL3D::CTransform::useMergedPointLight (  )  const [inline]

return true if the current light contribution of this model use a MergedPointLight

Definition at line 382 of file transform.h.

References _LightContribution, and NL3D::CLightContribution::UseMergedPointLight.


Friends And Related Function Documentation

friend class CAnimDetailTrav [friend]

Definition at line 769 of file transform.h.

friend class CClipTrav [friend]

Definition at line 768 of file transform.h.

friend class CRenderTrav [friend]

Definition at line 770 of file transform.h.

friend class CScene [friend]

Definition at line 767 of file transform.h.

friend class CSkeletonModel [friend]

Definition at line 766 of file transform.h.


Member Data Documentation

std::vector<CClipNode*> NL3D::CTransform::_ClipParents [private]

Definition at line 791 of file transform.h.

Referenced by clipAddChild(), clipGetChild(), clipGetNumChildren(), and ~CTransform().

Definition at line 817 of file transform.h.

Referenced by CTransform(), getClusterSystem(), and setClusterSystem().

Definition at line 944 of file transform.h.

Referenced by CTransform(), setDontUnfreezeChildren(), and updateWorld().

Definition at line 821 of file transform.h.

Referenced by CTransform(), freezeHRC(), hrcLinkSon(), unfreezeHRC(), and update().

Definition at line 943 of file transform.h.

Referenced by CTransform(), freeze(), freezeHRC(), update(), and updateWorld().

Definition at line 778 of file transform.h.

Referenced by hrcLinkSon(), and hrcUnlink().

Definition at line 781 of file transform.h.

Referenced by CTransform(), hrcLinkSon(), hrcUnlink(), and unfreezeHRC().

Definition at line 779 of file transform.h.

Referenced by hrcGetChild(), hrcGetNumChildren(), hrcLinkSon(), and ~CTransform().

Definition at line 963 of file transform.h.

Referenced by NL3D::CClipTrav::addVisibleModel(), CTransform(), and ~CTransform().

std::list<CTransform*>::iterator NL3D::CTransform::_ItShadowCasterInScene [private]

For Shadow Caster registration to list.

Definition at line 843 of file transform.h.

Referenced by NL3D::CScene::registerShadowCasterToList(), and NL3D::CScene::unregisterShadowCasterToList().

Definition at line 815 of file transform.h.

Referenced by CTransform(), and update().

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

Definition at line 713 of file transform.h.

Referenced by unfreezeHRC(), update(), and ~CTransform().

Definition at line 937 of file transform.h.

Referenced by CTransform(), update(), and updateWorld().

Hrc IN variables.

Reimplemented from NL3D::ITransformable.

Definition at line 935 of file transform.h.

Referenced by CTransform(), NL3D::CVegetableBlendLayerModel::setWorldPos(), update(), updateWorld(), and updateWorldMatrixFromFather().

Definition at line 936 of file transform.h.

Referenced by CTransform(), update(), NL3D::CParticleSystemModel::update(), and updateWorld().

See ILogicInfo. Used for lighting. default is NULL.

Definition at line 836 of file transform.h.

Referenced by CTransform(), setLogicInfo(), and traverseLight().

see setMeanColor()

Definition at line 840 of file transform.h.

Referenced by CTransform(), getMeanColor(), and setMeanColor().

Definition at line 823 of file transform.h.

Referenced by CTransform(), getOrderingLayer(), and setOrderingLayer().

Definition at line 801 of file transform.h.

Referenced by CTransform(), linkToUpdateList(), and unlinkFromUpdateList().

For Shadow Casters.

Definition at line 846 of file transform.h.

Referenced by CTransform(), getShadowMapDirectionZThreshold(), and setShadowMapDirectionZThreshold().

Definition at line 847 of file transform.h.

Referenced by CTransform(), getShadowMapMaxDepth(), and setShadowMapMaxDepth().

Flags for the General State of the Transform. They are both static or dynamic flags.

Definition at line 902 of file transform.h.

Referenced by CTransform(), getStateFlag(), setStateFlag(), and traverseClip().

true if need to compute transform

Definition at line 830 of file transform.h.

Referenced by CTransform(), freezeHRC(), heritVisibility(), hide(), show(), and update().

Definition at line 824 of file transform.h.

Referenced by CTransform(), getTransparencyPriority(), and setTransparencyPriority().

set to true is the object is visible (not clipped).

Definition at line 965 of file transform.h.

Referenced by CTransform(), NL3D::CParticleSystemModel::insertInVisibleList(), isClipVisible(), traverseClip(), and NL3D::CParticleSystemModel::traverseClip().

Definition at line 940 of file transform.h.

Referenced by CTransform(), hrcLinkSon(), hrcUnlink(), and updateWorld().

Definition at line 616 of file transform.h.

Referenced by getDefaultTrack().

Definition at line 615 of file transform.h.

Referenced by getDefaultTrack().

Definition at line 617 of file transform.h.

Referenced by getDefaultTrack().

Definition at line 618 of file transform.h.

Referenced by getDefaultTrack().

Definition at line 619 of file transform.h.

Referenced by getDefaultTrack().

Definition at line 613 of file transform.h.

Referenced by CTransform(), getVisibility(), heritVisibility(), hide(), show(), and update().


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

Generated on Thu Jan 7 08:30:12 2010 for NeL by  doxygen 1.6.1