#include <u_point_light.h>
Inheritance diagram for NL3D::UPointLight:
Nevrax France
Definition at line 45 of file u_point_light.h.
Public Types | |
enum | TTransformMode { DirectMatrix = 0, RotEuler, RotQuat, TransformModeCount } |
enum | TVisibility { Show = 0, Hide, Herit, VisibilityCount } |
The visibility flag. In the root case, Herit means Show. More... | |
Public Member Functions | |
virtual void | enableSpotlight (bool enable)=0 |
virtual NLMISC::CRGBA | getAmbient () const=0 |
Get the ambient color of the light. | |
virtual float | getAttenuationBegin () const=0 |
get the begin radius of the attenuation. | |
virtual float | getAttenuationEnd () const=0 |
get the end radius of the attenuation. | |
virtual const CVector & | getDeltaPosToSkeletonWhenOutOfFrustum () const=0 |
see setDeltaPosToSkeletonWhenOutOfFrustum() | |
virtual NLMISC::CRGBA | getDiffuse () const=0 |
Get the diffuse color of the light. | |
virtual bool | getForceClipRoot () const=0 |
virtual bool | getLastClippedState () const=0 |
Return true if the object was rendered during the last Scene->rendere(). return false else (ie clipped). | |
virtual void | getLastParentClusters (std::vector< CCluster * > &clusters) const=0 |
Fill a list of cluster that contain this tranform. This is valid after the clip traversal. | |
virtual const CMatrix & | getLastWorldMatrixComputed () const=0 |
virtual bool | getLastWorldVisState () const=0 |
Return true if the object was determined as Visible in Hrc during the last Scene->rendere(). NB: interesting only if Herit. else can use getVisibility(). | |
virtual uint | getOrderingLayer () const=0 |
Get the ordering layer. | |
virtual NLMISC::CRGBA | getSpecular () const=0 |
Get the specular color of the light. | |
virtual float | getSpotAngleBegin () const=0 |
get the begin radius of the SpotAngles. | |
virtual float | getSpotAngleEnd () const=0 |
get the end radius of the SpotAngles. | |
virtual bool | isSpotlight () const=0 |
Is Spotlight enabled? | |
virtual void | setAmbient (NLMISC::CRGBA ambient)=0 |
Set the ambient color of the light. Default to Black. | |
virtual void | setColor (NLMISC::CRGBA color)=0 |
Set the diffuse and specular color of the light to the same value. don't modify _Ambient. | |
virtual void | setDeltaPosToSkeletonWhenOutOfFrustum (const CVector &deltaPos)=0 |
virtual void | setDiffuse (NLMISC::CRGBA diffuse)=0 |
Set the diffuse color of the light. Default to White. | |
virtual void | setForceClipRoot (bool forceClipRoot)=0 |
virtual void | setLogicInfo (ILogicInfo *logicInfo)=0 |
virtual void | setOrderingLayer (uint layer)=0 |
virtual void | setSpecular (NLMISC::CRGBA specular)=0 |
Set the specular color of the light. Default to White. | |
virtual void | setupAttenuation (float attenuationBegin, float attenuationEnd)=0 |
virtual void | setupSpotAngle (float spotAngleBegin, float spotAngleEnd)=0 |
Protected Member Functions | |
Object | |
UPointLight () | |
virtual | ~UPointLight () |
|
Definition at line 66 of file u_transformable.h.
00067 { 00068 DirectMatrix=0, // DirectMatrixMode . 00069 RotEuler, // Matrix is computed from sperated composantes, with euler rotation. 00070 RotQuat, // Matrix is computed from sperated composantes, with quat rotation (default). 00071 00072 TransformModeCount 00073 }; |
|
The visibility flag. In the root case, Herit means Show.
Definition at line 68 of file u_transform.h.
00069 { 00070 Show=0, // The model is shown in the hierarchy 00071 Hide, // The model is hidden in the hierarchy 00072 Herit, // The model herit the visibilty from his father 00073 00074 VisibilityCount 00075 }; |
|
Definition at line 51 of file u_point_light.h.
00051 {} |
|
Definition at line 52 of file u_point_light.h.
00052 {} |
|
true if the instance cast shadow. By default false
Implemented in NL3D::CTransformUser. |
|
true if the instance receive shadow. By default false
Implemented in NL3D::CTransformUser. |
|
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) Implemented in NL3D::CTransformUser. |
|
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) Implemented in NL3D::CTransformUser. |
|
Setup SpotLight. SpotLight is disabled by default. The direction of the spot is lead by the J vector of the UPointLight WorldMatrix Implemented in NL3D::CPointLightUser. |
|
Optimisation: 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. NB: the model won't be tested in HRC only if this model is a "root" For maximum optimisation, 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. Implemented in NL3D::CTransformUser. |
|
Get the ambient color of the light.
Implemented in NL3D::CPointLightUser. |
|
get the begin radius of the attenuation.
Implemented in NL3D::CPointLightUser. |
|
get the end radius of the attenuation.
Implemented in NL3D::CPointLightUser. |
|
Implemented in NL3D::CTransformUser. |
|
see setDeltaPosToSkeletonWhenOutOfFrustum()
Implemented in NL3D::CPointLightUser. |
|
Get the diffuse color of the light.
Implemented in NL3D::CPointLightUser. |
|
Implemented in NL3D::CTransformUser. |
|
Return true if the object was rendered during the last Scene->rendere(). return false else (ie clipped).
Implemented in NL3D::CTransformUser. |
|
Fill a list of cluster that contain this tranform. This is valid after the clip traversal.
Implemented in NL3D::CTransformUser. |
|
get the last world matrix computed in last render(). NB: this WM is computed in last render() only if the object was not clipped. So use it wisely. use getLastClippedState() to konw if the object was visible in last render(). Implemented in NL3D::CTransformUser. |
|
Return true if the object was determined as Visible in Hrc during the last Scene->rendere(). NB: interesting only if Herit. else can use getVisibility().
Implemented in NL3D::CTransformUser. |
|
Get the load Balancing group of a model. see setLoadBalancingGroup(). Implemented in NL3D::CTransformUser. |
|
Get the matrix, compute her if necessary (work in all modes).
Implemented in NL3D::CTransformableUser. Referenced by NL3D::CDriverUser::setMatrixMode3D(). |
|
see setMeanColor()
Implemented in NL3D::CTransformUser. |
|
Get the ordering layer.
Implemented in NL3D::CTransformUser. |
|
Work only in Rot* mode (nlassert).
Implemented in NL3D::CTransformableUser. |
|
Work only in Rot* mode (nlassert).
Implemented in NL3D::CTransformableUser. |
|
Definition at line 55 of file transformable_user.cpp. References NL3D_MEM_TRANSFORMABLE.
00056 { 00057 NL3D_MEM_TRANSFORMABLE 00058 return ITransformable::getPivotValueName(); 00059 } |
|
Work only in Rot* mode(nlassert).
Implemented in NL3D::CTransformableUser. |
|
Work only in Rot* mode(nlassert).
Implemented in NL3D::CTransformableUser. |
|
Definition at line 35 of file transformable_user.cpp. References NL3D_MEM_TRANSFORMABLE.
00036 { 00037 NL3D_MEM_TRANSFORMABLE 00038 return ITransformable::getPosValueName (); 00039 } |
|
Work only in RotEuler mode(nlassert).
Implemented in NL3D::CTransformableUser. |
|
Work only in RotEuler mode(nlassert).
Implemented in NL3D::CTransformableUser. |
|
Definition at line 40 of file transformable_user.cpp. References NL3D_MEM_TRANSFORMABLE.
00041 { 00042 NL3D_MEM_TRANSFORMABLE 00043 return ITransformable::getRotEulerValueName(); 00044 } |
|
get the current rotorder (information vlaid only when RotEuler mode).
Implemented in NL3D::CTransformableUser. |
|
Work only in RotQuat mode (nlassert).
Implemented in NL3D::CTransformableUser. |
|
Work only in RotQuat mode (nlassert).
Implemented in NL3D::CTransformableUser. |
|
Definition at line 45 of file transformable_user.cpp. References NL3D_MEM_TRANSFORMABLE.
00046 { 00047 NL3D_MEM_TRANSFORMABLE 00048 return ITransformable::getRotQuatValueName(); 00049 } |
|
Work only in Rot* mode (nlassert).
Implemented in NL3D::CTransformableUser. |
|
Work only in Rot* mode (nlassert).
Implemented in NL3D::CTransformableUser. |
|
Definition at line 50 of file transformable_user.cpp. References NL3D_MEM_TRANSFORMABLE.
00051 { 00052 NL3D_MEM_TRANSFORMABLE 00053 return ITransformable::getScaleValueName(); 00054 } |
|
Get the specular color of the light.
Implemented in NL3D::CPointLightUser. |
|
get the begin radius of the SpotAngles.
Implemented in NL3D::CPointLightUser. |
|
get the end radius of the SpotAngles.
Implemented in NL3D::CPointLightUser. |
|
get the current transform mode.
Implemented in NL3D::CTransformableUser. |
|
Return the user clipping state.
Implemented in NL3D::CTransformUser. |
|
Get the UserLightable flag. Implemented in NL3D::CTransformUser. |
|
Get the local visibility state.
Implemented in NL3D::CTransformUser. |
|
herit the visibility from his father. (default behavior).
Implemented in NL3D::CTransformUser. |
|
Hide the object and his sons.
Implemented in NL3D::CTransformUser. |
|
Implemented in NL3D::CTransformUser. |
|
Is Spotlight enabled?
Implemented in NL3D::CPointLightUser. |
|
Implemented in NL3D::CTransformUser. |
|
Setup Matrix by the lookAt method. Work only in DirectMatrix mode and RotQuat mode (not euler...).
Implemented in NL3D::CTransformableUser. |
|
Hierarchy edit. unlink this from oldparent, and make this be a son of newFather. if this was already a son of newFather, no-op.
Implemented in NL3D::CTransformUser. |
|
Set the ambient color of the light. Default to Black.
Implemented in NL3D::CPointLightUser. |
|
Implemented in NL3D::CTransformUser. |
|
Set the diffuse and specular color of the light to the same value. don't modify _Ambient.
Implemented in NL3D::CPointLightUser. |
|
setup the deltaPosToSkeletonWhenOutOfFrustum When a light is sticked to a skeleton, and if this skeleton is clipped, then the position of the light can't be computed correctly without animating the skeleton. To allow good position of the light, and to avoid recomputing the skeleton even if it is clipped, the light position is set to skeletonMatrix * this "deltaPosToSkeletonWhenOutOfFrustum". Default is (0, 0, 1.5). You may change this according to the approximate size of the skeleton (dwarf or giant), and you must take into account any mount (horse etc...). eg for a man on a elephant, a good value would be (0,0,5) :) Implemented in NL3D::CPointLightUser. |
|
Set the diffuse color of the light. Default to White.
Implemented in NL3D::CPointLightUser. |
|
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 be ignored (must remain unclesterized) NB : any call to parent will be ignored (must remain linked to the root) Implemented in NL3D::CTransformUser. |
|
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) Implemented in NL3D::CTransformUser. |
|
Set the LogicInfo for this transfrom, eg to retrieve statc light information, see ILogicInfo. Ptr is kept in UTransfrom, so should call setLogicInfo(NULL) before to clean up. Implemented in NL3D::CTransformUser. |
|
Work only in DirecTMatrix mode (nlassert).
Implemented in NL3D::CTransformableUser. |
|
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) Implemented in NL3D::CTransformUser. |
|
Implemented in NL3D::CTransformUser. |
|
Set the current ordering 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 Implemented in NL3D::CTransformUser. |
|
Work only in Rot* mode (nlassert).
Definition at line 108 of file u_transformable.h. References NL3D::UTransformable::setPivot().
00108 {setPivot(CVector(px, py, pz));} |
|
Work only in Rot* mode (nlassert).
Implemented in NL3D::CTransformableUser. Referenced by NL3D::UTransformable::setPivot(). |
|
Work only in Rot* mode(nlassert).
Definition at line 86 of file u_transformable.h. References NL3D::UTransformable::setPos().
00086 {setPos(CVector(px, py, pz));} |
|
Work only in Rot* mode(nlassert).
Implemented in NL3D::CTransformableUser. Referenced by NL3D::UTransformable::setPos(). |
|
Work only in RotEuler mode(nlassert).
Definition at line 90 of file u_transformable.h. References NL3D::UTransformable::setRotEuler().
00090 {setRotEuler(CVector(rx, ry, rz));} |
|
Work only in RotEuler mode(nlassert).
Implemented in NL3D::CTransformableUser. Referenced by NL3D::UTransformable::setRotEuler(). |
|
Work only in RotQuat mode (nlassert). Build a quaternion from a forward direction (a J vector). the roll is determined with help of the vector up vup... vectors do not need to be noramlized. Implemented in NL3D::CTransformableUser. |
|
Work only in RotQuat mode (nlassert). Build a quaternion from a forward direction (a J vector). there is no roll... jdir do not need to be noramlized. Implemented in NL3D::CTransformableUser. |
|
Work only in RotQuat mode (nlassert).
Implemented in NL3D::CTransformableUser. |
|
Work only in Rot* mode (nlassert).
Definition at line 104 of file u_transformable.h. References NL3D::UTransformable::setScale().
00104 {setScale(CVector(sx, sy, sz));} |
|
Work only in Rot* mode (nlassert).
Implemented in NL3D::CTransformableUser. Referenced by NL3D::UTransformable::setScale(). |
|
Set the specular color of the light. Default to White.
Implemented in NL3D::CPointLightUser. |
|
Change the transform mode. Components or matrix are not reseted.
Implemented in NL3D::CTransformableUser. |
|
Implemented in NL3D::CTransformUser. |
|
setup the attenuation of the light. if (0,0) attenuation is disabled. clamp(attenuationBegin,0 , +oo) and clamp(attenuationEnd, attenuationBegin, +oo) By default, attenuation is 10-30. PERFORMANCE WARNING: big lights (disabled attenuation and big attenuationEnd) slow down performances. (by experience, with a factor of 2). Implemented in NL3D::CPointLightUser. |
|
setup the spot AngleBegin and AngleEnd that define spot attenuation of the light. Usefull only if SpotLight NB: clamp(angleBegin, 0, PI); clamp(angleEnd, angleBegin, PI); Default is PI/4, PI/2 Implemented in NL3D::CPointLightUser. |
|
Return the user clipping state.
Implemented in NL3D::CTransformUser. |
|
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. NB: most of models don't need it. For example models with LightMaps are by default Lighing-disabled. Default behavior is UserLightable==true. Implemented in NL3D::CTransformUser. |
|
Show the objet and his sons.
Implemented in NL3D::CTransformUser. |
|
see freezeHRC(). Implemented in NL3D::CTransformUser. |