|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CPSRibbonBase Class ReferenceBase class for ribbons.
More...
#include <ps_ribbon_base.h>
Inheritance diagram for NL3D::CPSRibbonBase:
List of all members.
Public Types |
enum | TRibbonMode { VariableSize = 0,
FixedSize,
RibbonModeLast
} |
enum | TInterpolationMode { Linear = 0,
Hermitte,
InterpModeLast
} |
Public Methods |
void | setLODDegradation (float percent) |
| Allow degradation of ribbons with distance of the system (may not be suited when theit paths have wicked angles). More...
|
float | getLODDegradation () const |
|
| CPSRibbonBase () |
virtual void | serial (NLMISC::IStream &f) throw (NLMISC::EStream) |
| serialisation. Derivers must override this, and call their parent version. More...
|
|
void | setRibbonMode (TRibbonMode mode) |
| NB : a fixed size isn't applied with parametric motion. More...
|
TRibbonMode | getRibbonMode () const |
void | setInterpolationMode (TInterpolationMode mode) |
TInterpolationMode | getInterpolationMode () const |
|
void | setTailNbSeg (uint32 nbSegs) |
| set the number of segments used with this particle. In this case, it can't be lower than 2. More...
|
uint32 | getTailNbSeg (void) const |
| get the number of segments used with this particle. More...
|
void | setSegDuration (TAnimationTime ellapsedTime) |
| Set how many seconds need a seg to be traversed. More...
|
TAnimationTime | getSegDuration (void) const |
void | setRibbonLength (float length) |
| The the length in meter of the ribbon. More...
|
float | getRibbonLength () const |
Protected Methods |
virtual void | newElement (CPSLocated *emitterLocated, uint32 emitterIndex) |
| inherited from CPSLocatedBindable. More...
|
virtual void | deleteElement (uint32 index) |
| inherited from CPSLocatedBindable. More...
|
virtual void | resize (uint32 size) |
| inherited from CPSLocatedBindable. More...
|
virtual void | motionTypeChanged (bool parametric) |
| called when the motion type has changed, this allow us to draw smoother ribbons when parametric anim is used. More...
|
void | computeRibbon (uint index, NLMISC::CVector *dest, uint stride=sizeof(NLMISC::CVector)) |
| Get position of the i-th ribbon and store them in a table of vector. More...
|
void | updateGlobals () |
| Called each time the time of the system change in order to update the ribbons positions. More...
|
void | updateLOD () |
| must be called for the lod to apply (updates UsedNbSegs). More...
|
void | initDateVect () |
void | resetFromOwner () |
Protected Attributes |
uint32 | _NbSegs |
TAnimationTime | _SegDuration |
bool | _Parametric |
uint32 | _UsedNbSegs |
| value to use after lod computation. More...
|
TAnimationTime | _UsedSegDuration |
float | _UsedSegLength |
Private Types |
typedef std::vector< NLMISC::CVector > | TPosVect |
typedef std::vector< float > | TFloatVect |
Private Methods |
void | resetSingleRibbon (uint index, const NLMISC::CVector &pos) |
void | dupRibbon (uint dest, uint src) |
| copy datas from one ribbon to another. More...
|
void | computeLinearRibbon (uint index, NLMISC::CVector *dest, uint stride=sizeof(NLMISC::CVector)) |
| Compute the ribbon points using linear interpolation between each sampling point. More...
|
void | computeLinearCstSizeRibbon (uint index, NLMISC::CVector *dest, uint stride=sizeof(NLMISC::CVector)) |
| The same as compute linear ribbon but try to make its length constant. More...
|
void | computeHermitteRibbon (uint index, NLMISC::CVector *dest, uint stride=sizeof(NLMISC::CVector)) |
| Compute the ribbon points using hermitte splines between each sampling point. More...
|
void | computeHermitteCstSizeRibbon (uint index, NLMISC::CVector *dest, uint stride=sizeof(NLMISC::CVector)) |
| Compute the ribbon points using hermitte splines between each sampling point, and make a rough approximation to get a constant lenght. More...
|
Private Attributes |
TPosVect | _Ribbons |
TFloatVect | _SamplingDate |
uint | _RibbonIndex |
TAnimationTime | _LastUpdateDate |
TRibbonMode | _RibbonMode |
TInterpolationMode | _InterpolationMode |
float | _RibbonLength |
float | _SegLength |
float | _LODDegradation |
Detailed Description
Base class for ribbons.
If can be used to compute ribbons trajectory. It can perform lagrange or linear interpolation. to get the ribbon shape. It can also be used to have fixed size ribbons. NB : Ribbons that don't herit from this are deprecated but may be kept for compatibility. -
Author:
-
Nicolas Vizerie , Nevrax France
-
Date:
-
2002
Definition at line 44 of file ps_ribbon_base.h.
Member Typedef Documentation
typedef std::vector<float> NL3D::CPSRibbonBase::TFloatVect [private]
|
|
typedef std::vector<NLMISC::CVector> NL3D::CPSRibbonBase::TPosVect [private]
|
|
Member Enumeration Documentation
enum NL3D::CPSRibbonBase::TInterpolationMode
|
|
enum NL3D::CPSRibbonBase::TRibbonMode
|
|
Constructor & Destructor Documentation
NL3D::CPSRibbonBase::CPSRibbonBase |
( |
|
) |
|
|
Member Function Documentation
|
Compute the ribbon points using hermitte splines between each sampling point, and make a rough approximation to get a constant lenght.
Definition at line 372 of file ps_ribbon_base.cpp.
References _NbSegs, _Parametric, _RibbonIndex, _Ribbons, _UsedNbSegs, _UsedSegLength, NL3D::BuildHermiteVector, NL3D::EndRibbonStorage, index, nlassert, and stride.
Referenced by computeRibbon. |
|
Compute the ribbon points using hermitte splines between each sampling point.
Definition at line 175 of file ps_ribbon_base.cpp.
References _NbSegs, _Parametric, _RibbonIndex, _Ribbons, _SamplingDate, _UsedNbSegs, _UsedSegDuration, NL3D::BuildHermiteVector, NL3D::EndRibbonStorage, index, nlassert, and stride.
Referenced by computeRibbon. |
|
The same as compute linear ribbon but try to make its length constant.
Definition at line 305 of file ps_ribbon_base.cpp.
References _NbSegs, _Parametric, _RibbonIndex, _Ribbons, _UsedNbSegs, _UsedSegLength, NL3D::BuildLinearVector, NL3D::EndRibbonStorage, index, nlassert, and stride.
Referenced by computeRibbon. |
|
Compute the ribbon points using linear interpolation between each sampling point.
Definition at line 240 of file ps_ribbon_base.cpp.
References _NbSegs, _Parametric, _RibbonIndex, _Ribbons, _SamplingDate, _UsedSegDuration, NL3D::BuildLinearVector, NL3D::EndRibbonStorage, index, nlassert, and stride.
Referenced by computeRibbon. |
|
Get position of the i-th ribbon and store them in a table of vector.
It uses the interpolation setting of this object. The dest tab must have at least nbSegs + 1 entries.
Definition at line 445 of file ps_ribbon_base.cpp.
References _RibbonMode, computeHermitteCstSizeRibbon, computeHermitteRibbon, computeLinearCstSizeRibbon, computeLinearRibbon, Hermitte, index, Linear, nlassert, stride, and VariableSize.
Referenced by NL3D::CPSTailDot::displayRibbons, NL3D::CPSRibbonLookAt::displayRibbons, and NL3D::CPSRibbon::displayRibbons. |
void NL3D::CPSRibbonBase::deleteElement |
( |
uint32 |
index |
) |
[protected, virtual] |
|
void NL3D::CPSRibbonBase::dupRibbon |
( |
uint |
dest, |
|
|
uint |
src |
|
) |
[private] |
|
float NL3D::CPSRibbonBase::getLODDegradation |
( |
|
) |
const [inline] |
|
float NL3D::CPSRibbonBase::getRibbonLength |
( |
|
) |
const [inline] |
|
TRibbonMode NL3D::CPSRibbonBase::getRibbonMode |
( |
|
) |
const [inline] |
|
TAnimationTime NL3D::CPSRibbonBase::getSegDuration |
( |
void |
|
) |
const [inline] |
|
uint32 NL3D::CPSRibbonBase::getTailNbSeg |
( |
void |
|
) |
const [inline, virtual] |
|
void NL3D::CPSRibbonBase::initDateVect |
( |
|
) |
[protected] |
|
void NL3D::CPSRibbonBase::motionTypeChanged |
( |
bool |
parametric |
) |
[protected, virtual] |
|
void NL3D::CPSRibbonBase::newElement |
( |
CPSLocated * |
emitterLocated, |
|
|
uint32 |
emitterIndex |
|
) |
[protected, virtual] |
|
void NL3D::CPSRibbonBase::resetFromOwner |
( |
|
) |
[protected] |
|
void NL3D::CPSRibbonBase::resetSingleRibbon |
( |
uint |
index, |
|
|
const NLMISC::CVector & |
pos |
|
) |
[private] |
|
void NL3D::CPSRibbonBase::resize |
( |
uint32 |
size |
) |
[protected, virtual] |
|
void NL3D::CPSRibbonBase::setLODDegradation |
( |
float |
percent |
) |
[inline] |
|
|
Allow degradation of ribbons with distance of the system (may not be suited when theit paths have wicked angles).
-
Parameters:
-
percent |
1 mean no degradation, 0 mean nothing will be draw when the system is at its max dist. 1 is the default |
Definition at line 89 of file ps_ribbon_base.h.
References _LODDegradation, and nlassert. |
void NL3D::CPSRibbonBase::setRibbonLength |
( |
float |
length |
) |
|
|
|
The the length in meter of the ribbon.
This is used only if the ribbon mode is set to FixedSize. These kind of ribbon are usually slower than variable size ribbons. The default is one metter.
Definition at line 95 of file ps_ribbon_base.cpp.
References _NbSegs, _RibbonLength, _SegLength, and nlassert. |
void NL3D::CPSRibbonBase::setRibbonMode |
( |
TRibbonMode |
mode |
) |
|
|
void NL3D::CPSRibbonBase::setSegDuration |
( |
TAnimationTime |
ellapsedTime |
) |
|
|
void NL3D::CPSRibbonBase::setTailNbSeg |
( |
uint32 |
nbSegs |
) |
[virtual] |
|
void NL3D::CPSRibbonBase::updateGlobals |
( |
|
) |
[protected] |
|
|
Called each time the time of the system change in order to update the ribbons positions.
Definition at line 139 of file ps_ribbon_base.cpp.
References _LastUpdateDate, _NbSegs, NL3D::CPSLocatedBindable::_Owner, _Parametric, _RibbonIndex, _Ribbons, _SamplingDate, _SegDuration, NL3D::EndRibbonStorage, nlassert, and NL3D::TAnimationTime.
Referenced by NL3D::CPSTailDot::step, NL3D::CPSRibbonLookAt::step, and NL3D::CPSRibbon::step. |
void NL3D::CPSRibbonBase::updateLOD |
( |
|
) |
[protected] |
|
Member Data Documentation
float NL3D::CPSRibbonBase::_LODDegradation [private]
|
|
uint32 NL3D::CPSRibbonBase::_NbSegs [protected]
|
|
|
Definition at line 97 of file ps_ribbon_base.h.
Referenced by computeHermitteCstSizeRibbon, computeHermitteRibbon, computeLinearCstSizeRibbon, computeLinearRibbon, dupRibbon, NL3D::CPSTailDot::getMaxNumFaces, NL3D::CPSRibbonLookAt::getMaxNumFaces, NL3D::CPSRibbon::getMaxNumFaces, getTailNbSeg, initDateVect, resetSingleRibbon, resize, setRibbonLength, setTailNbSeg, updateGlobals, and updateLOD. |
bool NL3D::CPSRibbonBase::_Parametric [protected]
|
|
|
Definition at line 99 of file ps_ribbon_base.h.
Referenced by computeHermitteCstSizeRibbon, computeHermitteRibbon, computeLinearCstSizeRibbon, computeLinearRibbon, NL3D::CPSRibbonLookAt::displayRibbons, dupRibbon, motionTypeChanged, resetFromOwner, resetSingleRibbon, NL3D::CPSTailDot::step, NL3D::CPSRibbonLookAt::step, NL3D::CPSRibbon::step, and updateGlobals. |
uint NL3D::CPSRibbonBase::_RibbonIndex [private]
|
|
float NL3D::CPSRibbonBase::_RibbonLength [private]
|
|
TPosVect NL3D::CPSRibbonBase::_Ribbons [private]
|
|
TFloatVect NL3D::CPSRibbonBase::_SamplingDate [private]
|
|
float NL3D::CPSRibbonBase::_SegLength [private]
|
|
uint32 NL3D::CPSRibbonBase::_UsedNbSegs [protected]
|
|
|
value to use after lod computation.
Definition at line 127 of file ps_ribbon_base.h.
Referenced by computeHermitteCstSizeRibbon, computeHermitteRibbon, computeLinearCstSizeRibbon, NL3D::CPSTailDot::displayRibbons, NL3D::CPSRibbonLookAt::displayRibbons, NL3D::CPSRibbon::displayRibbons, NL3D::CPSTailDot::getNumRibbonsInVB, NL3D::CPSRibbonLookAt::getNumRibbonsInVB, NL3D::CPSRibbon::getNumRibbonsInVB, NL3D::CPSTailDot::getVBnPB, NL3D::CPSRibbonLookAt::getVBnPB, NL3D::CPSRibbon::getVBnPB, and updateLOD. |
float NL3D::CPSRibbonBase::_UsedSegLength [protected]
|
|
The documentation for this class was generated from the following files:
|
|