|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CPointLightModel Class ReferenceThis model is a dynamic light.
More...
#include <point_light_model.h>
Inheritance diagram for NL3D::CPointLightModel:
List of all members.
Detailed Description
This model is a dynamic light.
It handles a PointLight, where Pos is the worldPos updated by CScene at each render(). CPointLightModel are linked to the LightModelRoot in the LightTrav. It can handles SpotLight too, see PointLight.
Hrc: Lights herit CTransform so they can be put in hierarchy, even sticked to a skeleton. They can be hide, moved etc... (default CTransform). Clip: Lights are always in frustum, not renderable (default CTransform). Light: lightModels are not lightables (ie they can't be lighted). (default CTransform). the observer is specialised.
PERFORMANCE WARNING: big lights (disabled attenuation and big attenuationEnd) slow down performances. (by experience, with a factor of 2).
-
Author:
-
Lionel Berenguier , Nevrax France
-
Date:
-
2001
Definition at line 63 of file point_light_model.h.
Constructor & Destructor Documentation
NL3D::CPointLightModel::CPointLightModel |
( |
|
) |
[protected] |
|
NL3D::CPointLightModel::~CPointLightModel |
( |
|
) |
[protected, virtual] |
|
Member Function Documentation
IModel* NL3D::CPointLightModel::creator |
( |
|
) |
[inline, static, private] |
|
const CVector & NL3D::CPointLightModel::getDeltaPosToSkeletonWhenOutOfFrustum |
( |
|
) |
const |
|
void NL3D::CPointLightModel::initModel |
( |
|
) |
[protected, virtual] |
|
bool NL3D::CPointLightModel::isClipVisible |
( |
|
) |
const [inline, private] |
|
bool NL3D::CPointLightModel::isHrcVisible |
( |
|
) |
const [inline, private] |
|
void NL3D::CPointLightModel::registerBasic |
( |
|
) |
[static] |
|
void NL3D::CPointLightModel::setDeltaPosToSkeletonWhenOutOfFrustum |
( |
const CVector & |
deltaPos |
) |
|
|
|
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) :)
Definition at line 74 of file point_light_model.cpp.
References _DeltaPosToSkeletonWhenOutOfFrustum. |
Friends And Related Function Documentation
friend class CPointLightModelLightObs [friend]
|
|
Member Data Documentation
CVector NL3D::CPointLightModel::_DeltaPosToSkeletonWhenOutOfFrustum [private]
|
|
CVector NL3D::CPointLightModel::_LastWorldSpotDirectionWhenOutOfFrustum [private]
|
|
|
Same problem as _DeltaPosToSkeletonWhenOutOfFrustum, but this one is computed at each Visible frame.
And we interpolate between actual direction and backuped direction when the spot become visible (5 frames, hardcoded)
Definition at line 142 of file point_light_model.h. |
float NL3D::CPointLightModel::_TimeFromLastClippedSpotDirection [private]
|
|
|
The pointLight setup (color/attenuation).
Do not use PointLight.Pos to setup the position. Use the CTransform interface to set the position. To enable SpotLight, use PointLight.setType(), and use PointLight.setSpotAngle() but don't use PointLight.setSpotDirection to setup the direction. The direction of the spotLight is driven by the J vector of the Transform WorldMatrix.
Definition at line 78 of file point_light_model.h. |
The documentation for this class was generated from the following files:
|
|