From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/a02538.html | 2817 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2817 insertions(+) create mode 100644 docs/doxygen/nel/a02538.html (limited to 'docs/doxygen/nel/a02538.html') diff --git a/docs/doxygen/nel/a02538.html b/docs/doxygen/nel/a02538.html new file mode 100644 index 00000000..1cabe8b2 --- /dev/null +++ b/docs/doxygen/nel/a02538.html @@ -0,0 +1,2817 @@ + + +NeL: NL3D::CFlareShape class Reference + + + +
+

NL3D::CFlareShape Class Reference

#include <flare_shape.h> +

+

Inheritance diagram for NL3D::CFlareShape: +

+ +NL3D::IShape +NLMISC::CRefCount +NLMISC::IStreamable +NLMISC::IClassable + +

Detailed Description

+shape for a flare
Author:
Nicolas Vizerie

+Nevrax France

+
Date:
2001
+ +

+ +

+Definition at line 53 of file flare_shape.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

virtual bool clip (const std::vector< CPlane > &pyramid, const CMatrix &worldMatrix)
 inherited from IShape

virtual CTransformShapecreateInstance (CScene &scene)
 inherited from IShape

void enableDazzle (bool enable=true)
 enable dazzle when the flare is near the center of the screen

virtual void flushTextures (IDriver &driver, uint selectedTexture)
 inherited from ishape

virtual void getAABBox (NLMISC::CAABBox &bbox) const
 inherited from IShape

bool getAttenuable (void) const
 check wether radial :attenuation is on

float getAttenuationRange (void) const
 get the attenuation range

virtual std::string getClassName ()=0
NLMISC::CRGBA getColor (void) const
 get the color of flares

float getDazzleAttenuationRange (void) const
 get the attenuation range of Dazzle

NLMISC::CRGBA getDazzleColor (void) const
float getDistMax () const
bool getFirstFlareKeepSize (void) const
 test wether the first flare keep its real size

bool getFlareAtInfiniteDist (void) const
 test wether the flare is at the infinite

float getFlareSpacing (void) const
float getMaxViewDist (void) const
 get the max view dist

float getMaxViewDistRatio (void) const
 get the max view dist ratio

virtual float getNumTriangles (float distance)
 inherited from ishape

TAnimationTime getPersistence (void) const
const sintgetRefCount () const
float getRelativePos (uint index) const
 get the relative pos of the nth flare

float getSize (uint index) const
const ITexturegetTexture (uint index) const
 get the texture used by the flare (const version)

ITexturegetTexture (uint index)
bool hasDazzle (void) const
 check wether dazzle is enabled

 NLMISC_DECLARE_CLASS (CFlareShape)
virtual void profileSceneRender (CRenderTrav *rdrTrav, CTransformShape *trans, bool opaquePass)
virtual void render (IDriver *drv, CTransformShape *trans, bool opaquePass)
 inherited from IShape. Does nothing. A new traverseRender() was set for that

void setAttenuable (bool enable=true)
 force radial attenuation of the flares

void setAttenuationRange (float range)
 set the range for attenuation

void setColor (NLMISC::CRGBA col)
 set the color of flares

void setDazzleAttenuationRange (float range)
void setDazzleColor (NLMISC::CRGBA col)
void setDistMax (float distMax)
void setFirstFlareKeepSize (bool enable=true)
 force the first flare to keep its real size (e.g the isze on screen doesn't remains constant)

void setFlareAtInfiniteDist (bool enabled=true)
void setFlareSpacing (float spacing)
 set the flares spacing

void setMaxViewDist (float dist)
void setMaxViewDistRatio (float ratio)
void setPersistence (TAnimationTime persistence)
 set the persistence of this shape, in second (the time it takes to fade from white to black)

void setRelativePos (uint index, float pos)
void setSize (uint index, float size)
void setTexture (uint index, ITexture *tex)
Object
 CFlareShape ()
 Constructor.

void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
 serial this shape

access default tracks.
CTrackDefaultVectorgetDefaultPos ()

Data Fields

CTrackDefaultVector _DefaultPos
 Transform default tracks.

sint crefs
CPtrInfo * pinfo

Static Public Attributes

CPtrInfo NullPtrInfo

Protected Attributes

bool _Attenuable
float _AttenuationRange
NLMISC::CRGBA _Color
float _DazzleAttenuationRange
NLMISC::CRGBA _DazzleColor
bool _DazzleEnabled
float _DistMax
 Default to -1.

bool _FirstFlareKeepSize
bool _InfiniteDist
float _MaxViewDist
float _MaxViewDistRatio
TAnimationTime _Persistence
float _Pos [MaxFlareNum]
float _Size [MaxFlareNum]
float _Spacing
NLMISC::CSmartPtr< ITexture_Tex [MaxFlareNum]

Friends

class CFlareModel
struct CPtrInfo
+


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + +
NL3D::CFlareShape::CFlareShape  ) 
+
+ + + + + +
+   + + +

+Constructor. +

+ +

+Definition at line 39 of file flare_shape.cpp. +

+References NL3D::MaxFlareNum, NL3D::IShape::setDistMax(), NL3D::CTrackDefaultBlendable< CVector >::setValue(), and uint. +

+

00039                           : _Color(NLMISC::CRGBA::White),
+00040                                                           _DazzleColor(NLMISC::CRGBA::Black),
+00041                                                           _Persistence(1),
+00042                                                           _Spacing(1),
+00043                                                           _Attenuable(false),
+00044                                                           _AttenuationRange (1.0f),                                                       
+00045                                                           _FirstFlareKeepSize(false),
+00046                                                           _DazzleEnabled(false),
+00047                                                           _DazzleAttenuationRange(0.f),                                                   
+00048                                                           _MaxViewDistRatio (0.9f),
+00049                                                           _InfiniteDist(false)
+00050 {
+00051         // init default pos
+00052         for (uint k = 0; k < MaxFlareNum; ++k)
+00053         {
+00054                 _Tex [k]  = NULL;
+00055                 _Size[k]  = 1.f;
+00056                 _Pos[k]   = k * (1.f / MaxFlareNum);
+00057         }
+00058         _DefaultPos.setValue(CVector::Null);
+00059         setDistMax(1000);
+00060 }
+
+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
bool NL3D::CFlareShape::clip const std::vector< CPlane > &  pyramid,
const CMatrix worldMatrix
[virtual]
+
+ + + + + +
+   + + +

+inherited from IShape +

+ +

+Reimplemented from NL3D::IShape. +

+Definition at line 120 of file flare_shape.cpp. +

+References NLMISC::CMatrix::getPos(). +

+

00121 {               
+00122         // compute flare pos in world basis : 
+00123         const NLMISC::CVector pos = worldMatrix.getPos();
+00124         for (std::vector<NLMISC::CPlane>::const_iterator it = pyramid.begin(); it != pyramid.end(); ++it)
+00125         {
+00126                 if ((*it) * pos > 0) return false;
+00127         }
+00128         return true;
+00129 }
+
+

+ + + + +
+ + + + + + + + + + +
CTransformShape * NL3D::CFlareShape::createInstance CScene scene  )  [virtual]
+
+ + + + + +
+   + + +

+inherited from IShape +

+ +

+Reimplemented from NL3D::IShape. +

+Definition at line 100 of file flare_shape.cpp. +

+References NL3D::CFlareModel::_Scene, NL3D::CAnimatedValueVector, NL3D::CScene::createModel(), NL3D::FlareModelClassId, NL3D::CTrackDefaultBlendable< CVector >::getValue(), and NL3D::CTransformShape::Shape. +

+

00101 {
+00102         CFlareModel *fm = NLMISC::safe_cast<CFlareModel *>(scene.createModel(FlareModelClassId) );
+00103         fm->Shape = this;       
+00104         fm->_Scene = &scene;
+00105         // set default pos
+00106         fm->ITransformable::setPos( ((CAnimatedValueVector&)_DefaultPos.getValue()).Value  );
+00107         return fm;
+00108 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CFlareShape::enableDazzle bool  enable = true  )  [inline]
+
+ + + + + +
+   + + +

+enable dazzle when the flare is near the center of the screen +

+ +

+Definition at line 208 of file flare_shape.h. +

+References _DazzleEnabled. +

+

00208 { _DazzleEnabled = enable; }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CFlareShape::flushTextures IDriver driver,
uint  selectedTexture
[virtual]
+
+ + + + + +
+   + + +

+inherited from ishape +

+ +

+Implements NL3D::IShape. +

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

+References NL3D::MaxFlareNum, NL3D::IDriver::setupTexture(), and uint. +

+

00141 {
+00142         // Flush each texture
+00143         for (uint tex=0; tex<MaxFlareNum; tex++)
+00144         {
+00145                 if (_Tex[tex] != NULL)
+00146                 {
+00147                         // Select the good texture
+00148                         _Tex[tex]->selectTexture (selectedTexture);
+00149 
+00150                         // Flush texture
+00151                         driver.setupTexture (*_Tex[tex]);
+00152                 }
+00153         }
+00154 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CFlareShape::getAABBox NLMISC::CAABBox bbox  )  const [virtual]
+
+ + + + + +
+   + + +

+inherited from IShape +

+ +

+Reimplemented from NL3D::IShape. +

+Definition at line 132 of file flare_shape.cpp. +

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

+

00133 {
+00134         // the flare himself is a point
+00135         bbox.setCenter(CVector::Null);
+00136         bbox.setHalfSize(CVector::Null);
+00137 }
+
+

+ + + + +
+ + + + + + + + + + +
bool NL3D::CFlareShape::getAttenuable void   )  const [inline]
+
+ + + + + +
+   + + +

+check wether radial :attenuation is on +

+ +

+Definition at line 192 of file flare_shape.h. +

+References _Attenuable. +

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

+

00192 { return _Attenuable;   }
+
+

+ + + + +
+ + + + + + + + + + +
float NL3D::CFlareShape::getAttenuationRange void   )  const [inline]
+
+ + + + + +
+   + + +

+get the attenuation range +

+ +

+Definition at line 198 of file flare_shape.h. +

+References _AttenuationRange. +

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

+

00198 { return _AttenuationRange; }
+
+

+ + + + +
+ + + + + + + + + +
virtual std::string NLMISC::IClassable::getClassName  )  [pure virtual, inherited]
+
+ + + + + +
+   + + +

+ +

+Implemented in NLAIAGENT::CNumericIndex, NLAIC::IPointerGestion, NLAIC::CIdentType, and CAutomataDesc. +

+Referenced by NLMISC::CClassRegistry::checkObject(), and NL3D::GetTextureSize().

+

+ + + + +
+ + + + + + + + + + +
NLMISC::CRGBA NL3D::CFlareShape::getColor void   )  const [inline]
+
+ + + + + +
+   + + +

+get the color of flares +

+ +

+Definition at line 154 of file flare_shape.h. +

+References _Color. +

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

+

00155         { 
+00156                 return _Color; 
+00157         }
+
+

+ + + + +
+ + + + + + + + + + +
float NL3D::CFlareShape::getDazzleAttenuationRange void   )  const [inline]
+
+ + + + + +
+   + + +

+get the attenuation range of Dazzle +

+ +

+Definition at line 230 of file flare_shape.h. +

+References _DazzleAttenuationRange. +

+

00230 { return _DazzleAttenuationRange; }
+
+

+ + + + +
+ + + + + + + + + + +
NLMISC::CRGBA NL3D::CFlareShape::getDazzleColor void   )  const [inline]
+
+ + + + + +
+   + + +

+get Dazzle color

See also:
enableDazzle()
+ +

+Definition at line 221 of file flare_shape.h. +

+References _DazzleColor. +

+

00221 { return _DazzleColor; }
+
+

+ + + + +
+ + + + + + + + + +
CTrackDefaultVector* NL3D::CFlareShape::getDefaultPos  )  [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 264 of file flare_shape.h. +

+

00264 {return &_DefaultPos;}
+
+

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

+return the DistMax where the shape is no more displayed. Default is to return -1, meaning DistMax = infinite. +

+Definition at line 112 of file shape.h. +

+

00112 {return _DistMax;}
+
+

+ + + + +
+ + + + + + + + + + +
bool NL3D::CFlareShape::getFirstFlareKeepSize void   )  const [inline]
+
+ + + + + +
+   + + +

+test wether the first flare keep its real size +

+ +

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

+References _FirstFlareKeepSize. +

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

+

00205 { return _FirstFlareKeepSize; }
+
+

+ + + + +
+ + + + + + + + + + +
bool NL3D::CFlareShape::getFlareAtInfiniteDist void   )  const [inline]
+
+ + + + + +
+   + + +

+test wether the flare is at the infinite +

+ +

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

+References _InfiniteDist. +

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

+

00256 { return _InfiniteDist; }
+
+

+ + + + +
+ + + + + + + + + + +
float NL3D::CFlareShape::getFlareSpacing void   )  const [inline]
+
+ + + + + +
+   + + +

+Get the flares spacing : A spacing of 1.f means thta the last flare will reach the center of the screen , a spacing of 0.5f means only the half way to the middle of the screen will be reached +

+Definition at line 168 of file flare_shape.h. +

+References _Spacing. +

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

+

00169         {
+00170                 return _Spacing;
+00171         }
+
+

+ + + + +
+ + + + + + + + + + +
float NL3D::CFlareShape::getMaxViewDist void   )  const [inline]
+
+ + + + + +
+   + + +

+get the max view dist +

+ +

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

+References _MaxViewDist. +

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

+

00239 { return _MaxViewDist; }
+
+

+ + + + +
+ + + + + + + + + + +
float NL3D::CFlareShape::getMaxViewDistRatio void   )  const [inline]
+
+ + + + + +
+   + + +

+get the max view dist ratio +

+ +

+Definition at line 247 of file flare_shape.h. +

+References _MaxViewDistRatio. +

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

+

00247 { return  _MaxViewDistRatio; }
+
+

+ + + + +
+ + + + + + + + + + +
float NL3D::CFlareShape::getNumTriangles float  distance  )  [virtual]
+
+ + + + + +
+   + + +

+inherited from ishape +

+ +

+Implements NL3D::IShape. +

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

+References count, NL3D::MaxFlareNum, and uint. +

+

00111 {
+00112         float count = 0;
+00113         for (uint k = 0; k < MaxFlareNum; ++k)
+00114         {
+00115         if (_Tex[k]) count += 2;
+00116         }
+00117         return count;
+00118 }
+
+

+ + + + +
+ + + + + + + + + + +
TAnimationTime NL3D::CFlareShape::getPersistence void   )  const [inline]
+
+ + + + + +
+   + + +

+get the persistence of this shape

See also:
setPersistence
+ +

+Definition at line 182 of file flare_shape.h. +

+References _Persistence, and NL3D::TAnimationTime. +

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

+

00183         { 
+00184                 return _Persistence; 
+00185         }
+
+

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

+ +

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

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

+

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

+ + + + +
+ + + + + + + + + + +
float NL3D::CFlareShape::getRelativePos uint  index  )  const [inline]
+
+ + + + + +
+   + + +

+get the relative pos of the nth flare +

+ +

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

+References index, NL3D::MaxFlareNum, nlassert, and uint. +

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

+

00142         {
+00143                 nlassert(index < MaxFlareNum);
+00144                 return _Pos[index];
+00145         }
+
+

+ + + + +
+ + + + + + + + + + +
float NL3D::CFlareShape::getSize uint  index  )  const [inline]
+
+ + + + + +
+   + + +

+get the size of the nth flare

Parameters:
+ + +
index the index of the flare to set. Value ranges from 0 to MaxFlareNum - 1
+
+ +

+Definition at line 125 of file flare_shape.h. +

+References index, and uint. +

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

+

00126         { 
+00127                 return _Size[index]; 
+00128         }
+
+

+ + + + +
+ + + + + + + + + + +
const ITexture* NL3D::CFlareShape::getTexture uint  index  )  const [inline]
+
+ + + + + +
+   + + +

+get the texture used by the flare (const version) +

+ +

+Definition at line 107 of file flare_shape.h. +

+References index, NL3D::MaxFlareNum, nlassert, and uint. +

+

00108         { 
+00109                 nlassert(index < MaxFlareNum);
+00110                 return _Tex[index]; 
+00111         }
+
+

+ + + + +
+ + + + + + + + + + +
ITexture* NL3D::CFlareShape::getTexture uint  index  )  [inline]
+
+ + + + + +
+   + + +

+get the nth texture used by the flare.

Parameters:
+ + +
index the index of the flare to set. Value ranges from 0 to MaxFlareNum - 1
+
+ +

+Definition at line 100 of file flare_shape.h. +

+References index, NL3D::MaxFlareNum, nlassert, and uint. +

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

+

00101         { 
+00102                 nlassert(index < MaxFlareNum);
+00103                 return _Tex[index];
+00104         }
+
+

+ + + + +
+ + + + + + + + + + +
bool NL3D::CFlareShape::hasDazzle void   )  const [inline]
+
+ + + + + +
+   + + +

+check wether dazzle is enabled +

+ +

+Definition at line 211 of file flare_shape.h. +

+References _DazzleEnabled. +

+

00211 {  return _DazzleEnabled; }
+
+

+ + + + +
+ + + + + + + + + + +
NL3D::CFlareShape::NLMISC_DECLARE_CLASS CFlareShape   ) 
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void NL3D::IShape::profileSceneRender CRenderTrav rdrTrav,
CTransformShape trans,
bool  opaquePass
[inline, virtual, inherited]
+
+ + + + + +
+   + + +

+Profiling. Called in RenderPass if Current Frame profiled. No-Op by default Informations must be added in rdrTrav->Scene +

+Reimplemented in NL3D::CMesh, NL3D::CMeshMRM, NL3D::CMeshMRMSkinned, and NL3D::CMeshMultiLod. +

+Definition at line 123 of file shape.h. +

+

00123 {}
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void NL3D::CFlareShape::render IDriver drv,
CTransformShape trans,
bool  opaquePass
[inline, virtual]
+
+ + + + + +
+   + + +

+inherited from IShape. Does nothing. A new traverseRender() was set for that +

+ +

+Implements NL3D::IShape. +

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

+

00076 {}
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CFlareShape::serial NLMISC::IStream f  )  throw (NLMISC::EStream) [virtual]
+
+ + + + + +
+   + + +

+serial this shape +

+ +

+Implements NLMISC::IStreamable. +

+Definition at line 63 of file flare_shape.cpp. +

+References NL3D::MaxFlareNum, NL3D::ITexture::serial(), and uint. +

+

00064 {
+00065         int ver = f.serialVersion(3);
+00066         f.serial(_Color, _Persistence, _Spacing);       
+00067         f.serial(_Attenuable);
+00068         if (_Attenuable)
+00069         {
+00070                 f.serial(_AttenuationRange);
+00071         }
+00072         f.serial(_FirstFlareKeepSize);
+00073         for (uint k = 0; k < MaxFlareNum; ++k)
+00074         {
+00075                 ITexture *tex = _Tex[k];
+00076                 f.serialPolyPtr(tex);
+00077                 if (f.isReading())
+00078                 {
+00079                         _Tex[k] = tex;
+00080                 }
+00081                 f.serial(_Size[k], _Pos[k]);
+00082         }
+00083         f.serial(_InfiniteDist);
+00084         if (!_InfiniteDist)
+00085         {
+00086                 f.serial(_MaxViewDist, _MaxViewDistRatio);
+00087         }
+00088         f.serial(_DazzleEnabled);
+00089         if (_DazzleEnabled)
+00090         {
+00091                 f.serial(_DazzleColor, _DazzleAttenuationRange);
+00092         }
+00093         f.serial(_InfiniteDist);
+00094 
+00095         if (ver >= 2)
+00096                 f.serial( _DistMax );   
+00097 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CFlareShape::setAttenuable bool  enable = true  )  [inline]
+
+ + + + + +
+   + + +

+force radial attenuation of the flares +

+ +

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

+References _Attenuable. +

+

00189 { _Attenuable = enable; }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CFlareShape::setAttenuationRange float  range  )  [inline]
+
+ + + + + +
+   + + +

+set the range for attenuation +

+ +

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

+References _AttenuationRange, and range. +

+

00195 { _AttenuationRange = range; }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CFlareShape::setColor NLMISC::CRGBA  col  )  [inline]
+
+ + + + + +
+   + + +

+set the color of flares +

+ +

+Definition at line 148 of file flare_shape.h. +

+References _Color. +

+

00149         {               
+00150                 _Color = col; 
+00151         }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CFlareShape::setDazzleAttenuationRange float  range  )  [inline]
+
+ + + + + +
+   + + +

+Set Dazzle attenuation range. It is the same than with attenuationRange. 1 mean that the dazzle stops when the flare is at the border of screen. 0.5, for the half way between center and border etc .

See also:
enableDazzle()
+ +

+Definition at line 227 of file flare_shape.h. +

+References _DazzleAttenuationRange, and range. +

+

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CFlareShape::setDazzleColor NLMISC::CRGBA  col  )  [inline]
+
+ + + + + +
+   + + +

+set Dazzle color

See also:
enableDazzle()
+ +

+Definition at line 216 of file flare_shape.h. +

+References _DazzleColor. +

+

00216 { _DazzleColor = col; }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::IShape::setDistMax float  distMax  )  [inherited]
+
+ + + + + +
+   + + +

+setup the DistMax where the shape is no more displayed. Take effect only for the next created instances. setting <0 means -1 and so means DistMax = infinite. +

+Definition at line 66 of file shape.cpp. +

+Referenced by CFlareShape(). +

+

00067 {
+00068         _DistMax= distMax;
+00069         // normalize infinite setup.
+00070         if(distMax<0)
+00071                 _DistMax= -1;
+00072 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CFlareShape::setFirstFlareKeepSize bool  enable = true  )  [inline]
+
+ + + + + +
+   + + +

+force the first flare to keep its real size (e.g the isze on screen doesn't remains constant) +

+ +

+Definition at line 202 of file flare_shape.h. +

+References _FirstFlareKeepSize. +

+

00202 { _FirstFlareKeepSize = enable; }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CFlareShape::setFlareAtInfiniteDist bool  enabled = true  )  [inline]
+
+ + + + + +
+   + + +

+The flare is considered to be at the infinite. This mean that it is always drawn And that there's no attenuation with dist. The real flare must be created far from the camera for this to work. The defualt is false +

+Definition at line 253 of file flare_shape.h. +

+References _InfiniteDist. +

+

00253 { _InfiniteDist = enabled; }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CFlareShape::setFlareSpacing float  spacing  )  [inline]
+
+ + + + + +
+   + + +

+set the flares spacing +

+ +

+Definition at line 160 of file flare_shape.h. +

+References _Spacing. +

+

00161         {
+00162                 _Spacing = spacing;
+00163         }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CFlareShape::setMaxViewDist float  dist  )  [inline]
+
+ + + + + +
+   + + +

+set the maxViewDist for the flares The default is 1000 +

+Definition at line 235 of file flare_shape.h. +

+References _MaxViewDist. +

+

00235 { _MaxViewDist = dist; }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CFlareShape::setMaxViewDistRatio float  ratio  )  [inline]
+
+ + + + + +
+   + + +

+set a distance ratio. when dist / maxViewDist is above this ratio, the flares will start to fade The default is 0.9 +

+Definition at line 244 of file flare_shape.h. +

+References _MaxViewDistRatio. +

+

00244 { _MaxViewDistRatio = ratio; }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CFlareShape::setPersistence TAnimationTime  persistence  )  [inline]
+
+ + + + + +
+   + + +

+set the persistence of this shape, in second (the time it takes to fade from white to black) +

+ +

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

+References _Persistence, and NL3D::TAnimationTime. +

+

00175         {       
+00176                 _Persistence = persistence; 
+00177         }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CFlareShape::setRelativePos uint  index,
float  pos
[inline]
+
+ + + + + +
+   + + +

+set the relative position of the nth flares. The default goes linearly from 0 (which appear at the position of the flare) to 1 (which appears at the center of the screen when the flare spaving is set to 1

See also:
setFlareSpacing()
+ +

+Definition at line 134 of file flare_shape.h. +

+References index, NL3D::MaxFlareNum, nlassert, and uint. +

+

00135         {
+00136                 nlassert(index < MaxFlareNum);
+00137                 _Pos[index] = pos;
+00138         }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CFlareShape::setSize uint  index,
float  size
[inline]
+
+ + + + + +
+   + + +

+set the size of the nth flare flare

Parameters:
+ + +
index the index of the flare to set. Value ranges from 0 to MaxFlareNum - 1
+
+ +

+Definition at line 116 of file flare_shape.h. +

+References index, NL3D::MaxFlareNum, nlassert, size, and uint. +

+

00117         { 
+00118                 nlassert(index < MaxFlareNum);
+00119                 _Size[index]  = size; 
+00120         }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CFlareShape::setTexture uint  index,
ITexture tex
[inline]
+
+ + + + + +
+   + + +

+set a texture for the flare

Parameters:
+ + + +
index the index of the flare to set. Vaklue ranges from 0 to MaxFlareNum - 1
tex the texture to set. NULL removes the texture
+
+ +

+Definition at line 91 of file flare_shape.h. +

+References index, NL3D::MaxFlareNum, nlassert, and uint. +

+

00092         { 
+00093                 nlassert(index < MaxFlareNum);
+00094                 _Tex[index] = tex; 
+00095         }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
virtual IMeshGeom* NL3D::IShape::supportMeshBlockRendering CTransformShape trans,
float &  polygonCount
const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+return !NULL if this shape can support MeshBlock rendering for a special instance. NB: Mesh Block render cannot occurs if the Mesh is Skinned/MeshMorphed. NB: Mesh Block render can occurs only in Opaque pass NB: Mesh block render can occurs only for CMeshBase meshes.

Parameters:
+ + + +
trans the instance to take into account (meshMultiLod may return NULL in blend transition).
polygonCount the number of polygons to render for the meshGeom returned
+
+
Returns:
the meshgeom to render per block if OK, else NULL (default)
+ +

+Reimplemented in NL3D::CMesh, NL3D::CMeshMRM, NL3D::CMeshMRMSkinned, and NL3D::CMeshMultiLod. +

+Definition at line 158 of file shape.h. +

+

00158 {return NULL;}
+
+

+ + + + +
+ + + + + + + + + +
virtual bool NL3D::IShape::useLightingLocalAttenuation  )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+tells if the shape wants LocalAttenuation for RealTime lighting. Default is false +

+Reimplemented in NL3D::CMeshBase. +

+Definition at line 142 of file shape.h. +

+

00142 {return false;}
+
+


Friends And Related Function Documentation

+

+ + + + +
+ + +
friend class CFlareModel [friend] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 269 of file flare_shape.h.

+

+ + + + +
+ + +
friend struct CPtrInfo [friend, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 67 of file smart_ptr.h.

+


Field Documentation

+

+ + + + +
+ + +
bool NL3D::CFlareShape::_Attenuable [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 277 of file flare_shape.h. +

+Referenced by getAttenuable(), and setAttenuable().

+

+ + + + +
+ + +
float NL3D::CFlareShape::_AttenuationRange [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 278 of file flare_shape.h. +

+Referenced by getAttenuationRange(), and setAttenuationRange().

+

+ + + + +
+ + +
NLMISC::CRGBA NL3D::CFlareShape::_Color [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 271 of file flare_shape.h. +

+Referenced by getColor(), and setColor().

+

+ + + + +
+ + +
float NL3D::CFlareShape::_DazzleAttenuationRange [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 281 of file flare_shape.h. +

+Referenced by getDazzleAttenuationRange(), and setDazzleAttenuationRange().

+

+ + + + +
+ + +
NLMISC::CRGBA NL3D::CFlareShape::_DazzleColor [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 272 of file flare_shape.h. +

+Referenced by getDazzleColor(), and setDazzleColor().

+

+ + + + +
+ + +
bool NL3D::CFlareShape::_DazzleEnabled [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 280 of file flare_shape.h. +

+Referenced by enableDazzle(), and hasDazzle().

+

+ + + + +
+ + +
CTrackDefaultVector NL3D::CFlareShape::_DefaultPos +
+
+ + + + + +
+   + + +

+Transform default tracks. +

+ +

+Definition at line 259 of file flare_shape.h.

+

+ + + + +
+ + +
float NL3D::IShape::_DistMax [protected, inherited] +
+
+ + + + + +
+   + + +

+Default to -1. +

+ +

+Definition at line 165 of file shape.h.

+

+ + + + +
+ + +
bool NL3D::CFlareShape::_FirstFlareKeepSize [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 279 of file flare_shape.h. +

+Referenced by getFirstFlareKeepSize(), and setFirstFlareKeepSize().

+

+ + + + +
+ + +
bool NL3D::CFlareShape::_InfiniteDist [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 284 of file flare_shape.h. +

+Referenced by getFlareAtInfiniteDist(), and setFlareAtInfiniteDist().

+

+ + + + +
+ + +
float NL3D::CFlareShape::_MaxViewDist [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 282 of file flare_shape.h. +

+Referenced by getMaxViewDist(), and setMaxViewDist().

+

+ + + + +
+ + +
float NL3D::CFlareShape::_MaxViewDistRatio [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 283 of file flare_shape.h. +

+Referenced by getMaxViewDistRatio(), and setMaxViewDistRatio().

+

+ + + + +
+ + +
TAnimationTime NL3D::CFlareShape::_Persistence [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 275 of file flare_shape.h. +

+Referenced by getPersistence(), and setPersistence().

+

+ + + + +
+ + +
float NL3D::CFlareShape::_Pos[MaxFlareNum] [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 274 of file flare_shape.h.

+

+ + + + +
+ + +
float NL3D::CFlareShape::_Size[MaxFlareNum] [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 273 of file flare_shape.h.

+

+ + + + +
+ + +
float NL3D::CFlareShape::_Spacing [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 276 of file flare_shape.h. +

+Referenced by getFlareSpacing(), and setFlareSpacing().

+

+ + + + +
+ + +
NLMISC::CSmartPtr<ITexture> NL3D::CFlareShape::_Tex[MaxFlareNum] [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 270 of file flare_shape.h.

+

+ + + + +
+ + +
sint NLMISC::CRefCount::crefs [mutable, inherited] +
+
+ + + + + +
+   + + +

+ +

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

+Referenced by NLMISC::CRefCount::CRefCount(), NLMISC::CRefCount::getRefCount(), and NLMISC::CRefCount::~CRefCount().

+

+ + + + +
+ + +
CRefCount::CPtrInfo NLMISC::CRefCount::NullPtrInfo [static, inherited] +
+
+ + + + + +
+   + + +

+ +

+Referenced by NLMISC::CRefCount::CRefCount().

+

+ + + + +
+ + +
CPtrInfo* NLMISC::CRefCount::pinfo [mutable, inherited] +
+
+ + + + + +
+   + + +

+ +

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

+Referenced by NLMISC::CRefCount::CRefCount(), and NLMISC::CRefCount::~CRefCount().

+


The documentation for this class was generated from the following files: +
Generated on Tue Mar 16 06:46:56 2004 for NeL by + +doxygen +1.3.6
+ + -- cgit v1.2.1