NL3D::CSegRemanenceShape Class Reference

#include <seg_remanence_shape.h>

Inheritance diagram for NL3D::CSegRemanenceShape:

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

Detailed Description

Shape for the remanence of a segment (sword stroke ..)

NB this doesn't support material with animated texture matrix (texture matrix is used internally)

Author:
Nicolas Vizerie

Nevrax France

Date:
2002

Definition at line 65 of file seg_remanence_shape.h.

Public Member Functions

virtual bool clip (const std::vector< CPlane > &pyramid, const CMatrix &worldMatrix)
virtual void getAABBox (NLMISC::CAABBox &bbox) const
 from IShape

CMaterialBasegetAnimatedMaterial () const
 Get animated material or NULL if none.

virtual std::string getClassName ()=0
NLMISC::CVector getCorner (uint corner) const
float getDistMax () const
const CMaterialgetMaterial () const
 Get material.

uint32 getNumCorners () const
uint32 getNumSlices () const
const sintgetRefCount () const
float getRollupRatio () const
float getSliceTime () const
bool getTextureShifting () const
 Test whether there is texture shifting at the start of the animation.

virtual void profileSceneRender (CRenderTrav *rdrTrav, CTransformShape *trans, bool opaquePass)
void setAnimatedMaterial (const std::string &name)
 Force animated material. This can be called only once.

void setBBox (const NLMISC::CAABBox &bbox)
void setCorner (uint corner, const NLMISC::CVector &value)
void setDistMax (float distMax)
void setMaterial (const CMaterial &mat)
void setNumCorners (uint numCorners)
void setNumSlices (uint32 numSlices)
void setRollupRatio (float ratio)
void setSliceTime (float sliceTime)
void setTextureShifting (bool on=true)
 CSegRemanenceShape (const CSegRemanenceShape &other)
 CSegRemanenceShape ()
 NLMISC_DECLARE_CLASS (CSegRemanenceShape)
CSegRemanenceShapeoperator= (const CSegRemanenceShape &other)
virtual void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
 ~CSegRemanenceShape ()
access default tracks.
CTrackDefaultVectorgetDefaultPos ()
CTrackDefaultQuatgetDefaultRotQuat ()
CTrackDefaultVectorgetDefaultScale ()

Data Fields

sint crefs
CPtrInfo * pinfo

Static Public Attributes

CPtrInfo NullPtrInfo

Protected Member Functions

from IShape
virtual CTransformShapecreateInstance (CScene &scene)
virtual void flushTextures (IDriver &driver, uint selectedTexture)
virtual float getNumTriangles (float distance)
virtual void render (IDriver *drv, CTransformShape *trans, bool opaquePass)

Protected Attributes

float _DistMax
 Default to -1.


Private Types

typedef std::vector< CVectorTCornerVect

Private Member Functions

void copyFromOther (const CSegRemanenceShape &other)
void setupMaterial ()
void setupVBnPB ()

Private Attributes

CMaterialBase_AnimatedMat
NLMISC::CAABBoxExt _BBox
 For clipping.

TCornerVect _Corners
CTrackDefaultVector _DefaultPos
CTrackDefaultQuat _DefaultRotQuat
CTrackDefaultVector _DefaultScale
bool _GeomTouched
CMaterial _Mat
bool _MatTouched
uint32 _NumSlices
CPrimitiveBlock _PB
float _RollUpRatio
float _SliceTime
bool _TextureShifting
CVertexBuffer _VB

Friends

struct CPtrInfo


Member Typedef Documentation

typedef std::vector<CVector> NL3D::CSegRemanenceShape::TCornerVect [private]
 

Definition at line 165 of file seg_remanence_shape.h.


Constructor & Destructor Documentation

NL3D::CSegRemanenceShape::CSegRemanenceShape  ) 
 

default ctor : a seg from (0, 0, 0) to (0, 0, 1) A default bbox is set (from (-3, -3, -3) to (3, 3, 3))

Definition at line 41 of file seg_remanence_shape.cpp.

References NLMISC::CAABBoxExt::setCenter(), NLMISC::CAABBoxExt::setHalfSize(), and setNumCorners().

00041                                        : _GeomTouched(true),
00042                                                                                    _MatTouched(true),
00043                                                                                    _TextureShifting(true),
00044                                                                                    _NumSlices(8),
00045                                                                                    _SliceTime(0.05f),
00046                                                                                    _RollUpRatio(1.f),
00047                                                                                    _AnimatedMat(NULL)
00048 {
00049         _BBox.setCenter(NLMISC::CVector::Null);
00050         _BBox.setHalfSize(NLMISC::CVector(3, 3, 3));
00051         setNumCorners(2);
00052 }

NL3D::CSegRemanenceShape::~CSegRemanenceShape  ) 
 

Definition at line 282 of file seg_remanence_shape.cpp.

References _AnimatedMat.

00283 {
00284         delete _AnimatedMat;
00285 }

NL3D::CSegRemanenceShape::CSegRemanenceShape const CSegRemanenceShape other  ) 
 

Definition at line 265 of file seg_remanence_shape.cpp.

References copyFromOther().

00265                                                                       : IShape(other), _AnimatedMat(NULL)
00266 {
00267         copyFromOther(other);
00268 }


Member Function Documentation

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

clip this shape with a pyramid. the pyramid is given in world space.The world matrix of the object is given.

Parameters:
pyramid the clipping polytope, planes are normalized.
worldMatrix the world matrix of the instance.
Returns:
true if the object is visible, false otherwise. The default behavior is to return true (never clipped).

Reimplemented from NL3D::IShape.

Definition at line 312 of file seg_remanence_shape.cpp.

References NLMISC::CBSphere::applyTransform(), NLMISC::CBSphere::Center, NLMISC::CAABBoxExt::getCenter(), NLMISC::CAABBoxExt::getRadius(), NLMISC::CBSphere::Radius, and sint.

00313 {
00314         // Speed Clip: clip just the sphere.
00315         NLMISC::CBSphere        localSphere(_BBox.getCenter(), _BBox.getRadius());
00316         NLMISC::CBSphere        worldSphere;
00317 
00318         // transform the sphere in WorldMatrix (with nearly good scale info).
00319         localSphere.applyTransform(worldMatrix, worldSphere);
00320 
00321         // if out of only plane, entirely out.
00322         for(sint i=0;i<(sint)pyramid.size();i++)
00323         {
00324                 // We are sure that pyramid has normalized plane normals.
00325                 // if SpherMax OUT return false.
00326                 float   d= pyramid[i]*worldSphere.Center;
00327                 if(d>worldSphere.Radius)
00328                         return false;
00329         }
00330         return true;
00331 }

void NL3D::CSegRemanenceShape::copyFromOther const CSegRemanenceShape other  )  [private]
 

Definition at line 288 of file seg_remanence_shape.cpp.

References _AnimatedMat, _BBox, _Corners, _GeomTouched, _Mat, _MatTouched, _NumSlices, _PB, _RollUpRatio, _SliceTime, _TextureShifting, and _VB.

Referenced by CSegRemanenceShape(), and operator=().

00289 {
00290         if (&other == this) return;
00291         CMaterialBase *otherAnimatedMat = other._AnimatedMat != NULL ? new CMaterialBase(*other._AnimatedMat)
00292                                                                                                                                  : NULL;
00293         delete _AnimatedMat;
00294         _AnimatedMat = otherAnimatedMat;
00295 
00296         _GeomTouched     = other._GeomTouched;
00297         _MatTouched      = other._MatTouched; 
00298         _TextureShifting = other._TextureShifting;      
00299         _NumSlices       = other._NumSlices;
00300         _SliceTime       = other._SliceTime;
00301         _Corners                 = other._Corners;      
00302         _Mat             = other._Mat;
00303         _VB              = other._VB;
00304         _PB              = other._PB;
00305         _BBox                    = other._BBox; 
00306         _RollUpRatio     = other._RollUpRatio;  
00307 }

CTransformShape * NL3D::CSegRemanenceShape::createInstance CScene scene  )  [protected, virtual]
 

create an instance of this shape. The instance may be a CTransformShape, or a specialized version of it. The default behavior is to createModel() a CTransformShape, and just assign to it the Shape.

Parameters:
scene the scene used to createModel().
Returns:
the specialized instance for this shape.

Reimplemented from NL3D::IShape.

Definition at line 150 of file seg_remanence_shape.cpp.

References _AnimatedMat, NL3D::CAnimatedValueQuat, NL3D::CAnimatedValueVector, NL3D::CScene::createModel(), NL3D::CTrackDefaultBlendable< CQuat >::getValue(), NL3D::CTrackDefaultBlendable< CVector >::getValue(), NL3D::CSegRemanence::setAnimatedMaterial(), NL3D::CTransform::setLoadBalancingGroup(), NL3D::CAnimatedMaterial::setMaterial(), NL3D::CSegRemanence::setSliceTime(), NL3D::CSegRemanence::setupFromShape(), and NL3D::CTransformShape::Shape.

00151 {       
00152         CSegRemanence *sr = NLMISC::safe_cast<CSegRemanence *>(scene.createModel(NL3D::SegRemanenceShapeId) );
00153         sr->Shape = this;
00154         CAnimatedMaterial *aniMat = NULL;
00155         if (_AnimatedMat)
00156         {
00157                 aniMat = new CAnimatedMaterial(_AnimatedMat);
00158                 aniMat->setMaterial(&_Mat);             
00159         }
00160         sr->setAnimatedMaterial(aniMat);
00161         sr->setupFromShape();
00162         // SegRemanence are added to the "Fx" Load Balancing Group.
00163         sr->setLoadBalancingGroup("Fx");
00164         
00165         sr->ITransformable::setPos( ((CAnimatedValueVector&)_DefaultPos.getValue()).Value  );
00166         sr->ITransformable::setRotQuat( ((CAnimatedValueQuat&)_DefaultRotQuat.getValue()).Value  );
00167         sr->ITransformable::setScale( ((CAnimatedValueVector&)_DefaultScale.getValue()).Value  );
00168 
00169         sr->setSliceTime(_SliceTime);
00170 
00171         return sr;
00172 }

void NL3D::CSegRemanenceShape::flushTextures IDriver driver,
uint  selectedTexture
[protected, virtual]
 

flush textures used by this shape.

Implements NL3D::IShape.

Definition at line 144 of file seg_remanence_shape.cpp.

References NL3D::CMaterial::flushTextures(), and uint.

00145 {
00146         _Mat.flushTextures(driver, selectedTexture);
00147 }

virtual void NL3D::CSegRemanenceShape::getAABBox NLMISC::CAABBox bbox  )  const [inline, virtual]
 

from IShape

Reimplemented from NL3D::IShape.

Definition at line 127 of file seg_remanence_shape.h.

References NLMISC::CAABBoxExt::getAABBox().

00127 { bbox = _BBox.getAABBox(); }

CMaterialBase* NL3D::CSegRemanenceShape::getAnimatedMaterial  )  const [inline]
 

Get animated material or NULL if none.

Definition at line 132 of file seg_remanence_shape.h.

References _AnimatedMat.

00132 { return _AnimatedMat; }

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::CVector NL3D::CSegRemanenceShape::getCorner uint  corner  )  const
 

Definition at line 109 of file seg_remanence_shape.cpp.

References _Corners, nlassert, and uint.

Referenced by NL3D::CSegRemanence::samplePos().

00110 {
00111         nlassert(corner < _Corners.size());
00112         return _Corners[corner];
00113 }

CTrackDefaultVector* NL3D::CSegRemanenceShape::getDefaultPos  )  [inline]
 

Definition at line 148 of file seg_remanence_shape.h.

Referenced by NL3D::CSegRemanence::getDefaultTrack().

00148 {return &_DefaultPos;}          

CTrackDefaultQuat* NL3D::CSegRemanenceShape::getDefaultRotQuat  )  [inline]
 

Definition at line 149 of file seg_remanence_shape.h.

Referenced by NL3D::CSegRemanence::getDefaultTrack().

00149 {return &_DefaultRotQuat;}

CTrackDefaultVector* NL3D::CSegRemanenceShape::getDefaultScale  )  [inline]
 

Definition at line 150 of file seg_remanence_shape.h.

Referenced by NL3D::CSegRemanence::getDefaultTrack().

00150 {return &_DefaultScale;}                

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;}

const CMaterial& NL3D::CSegRemanenceShape::getMaterial  )  const [inline]
 

Get material.

Definition at line 90 of file seg_remanence_shape.h.

Referenced by NL3D::CSegRemanence::updateOpacityFromShape().

00090 { return _Mat; }

uint32 NL3D::CSegRemanenceShape::getNumCorners  )  const [inline]
 

Definition at line 108 of file seg_remanence_shape.h.

References _Corners, and uint32.

Referenced by NL3D::CSegRemanence::setupFromShape().

00108 { return _Corners.size(); }     

uint32 NL3D::CSegRemanenceShape::getNumSlices  )  const [inline]
 

Definition at line 97 of file seg_remanence_shape.h.

References _NumSlices, and uint32.

Referenced by NL3D::CSegRemanence::render(), and NL3D::CSegRemanence::setupFromShape().

00097 { return _NumSlices; }

float NL3D::CSegRemanenceShape::getNumTriangles float  distance  )  [protected, virtual]
 

get an approximation of the number of triangles this instance will render for a fixed distance. return 0 if do not support degradation.

Implements NL3D::IShape.

Definition at line 176 of file seg_remanence_shape.cpp.

References _NumSlices.

00177 {
00178         return (float) (_NumSlices * 2);
00179 }

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::CSegRemanenceShape::getRollupRatio  )  const [inline]
 

Definition at line 141 of file seg_remanence_shape.h.

References _RollUpRatio.

Referenced by NL3D::CSegRemanence::render().

00141 { return _RollUpRatio; }

float NL3D::CSegRemanenceShape::getSliceTime  )  const [inline]
 

Definition at line 99 of file seg_remanence_shape.h.

00099 { return _SliceTime; }

bool NL3D::CSegRemanenceShape::getTextureShifting  )  const [inline]
 

Test whether there is texture shifting at the start of the animation.

Definition at line 124 of file seg_remanence_shape.h.

References _TextureShifting.

Referenced by NL3D::CSegRemanence::restart().

00124 { return _TextureShifting; }      

NL3D::CSegRemanenceShape::NLMISC_DECLARE_CLASS CSegRemanenceShape   ) 
 

CSegRemanenceShape & NL3D::CSegRemanenceShape::operator= const CSegRemanenceShape other  ) 
 

Definition at line 271 of file seg_remanence_shape.cpp.

References copyFromOther().

00272 {
00273         if (&other != this)
00274         {       
00275                 copyFromOther(other);
00276                 (IShape &) *this = (IShape &) other; // copy base part  
00277         }
00278         return *this;
00279 }

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 {}

void NL3D::CSegRemanenceShape::render IDriver drv,
CTransformShape trans,
bool  opaquePass
[protected, virtual]
 

render() this shape in a driver, with the specified TransformShape information. CTransfromShape call this method in the render traversal. if opaquePass render the opaque materials else render the transparent materials.

Implements NL3D::IShape.

Definition at line 125 of file seg_remanence_shape.cpp.

References _PB, NL3D::CMaterial::getBlend(), NL3D::CSegRemanence::isStarted(), NL3D::CSegRemanence::render(), setupMaterial(), and setupVBnPB().

00126 {
00127         if ((!opaquePass && _Mat.getBlend())
00128             || (opaquePass && !_Mat.getBlend())
00129            )
00130         {
00131                 CSegRemanence *sr = NLMISC::safe_cast<CSegRemanence *>(trans);
00132                 #ifndef DEBUG_SEG_REMANENCE_DISPLAY
00133                 if (!sr->isStarted()) return;   
00134                 #endif
00135                 setupVBnPB();
00136                 setupMaterial();                
00137                 //              
00138                 sr->render(drv, _VB, _PB, _Mat);                
00139         }
00140 }

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

Implements NLMISC::IStreamable.

Definition at line 55 of file seg_remanence_shape.cpp.

References sint.

00056 {
00057         // version 2 : added default tracks
00058         // version 1 : rollup ratio
00059         // version 0 : base version
00060 
00061         sint ver = f.serialVersion(2);
00062         f.serial(_NumSlices);
00063         f.serial(_SliceTime);
00064         f.serialCont(_Corners); 
00065         f.serial(_Mat); 
00066         f.serial(_BBox);
00067         f.serial(_TextureShifting);
00068         f.serialPtr(_AnimatedMat);
00069         if (f.isReading())
00070         {       
00071                 _GeomTouched = true;
00072                 _MatTouched  = true;
00073         }
00074         if (ver >= 1)
00075         {
00076                 f.serial(_RollUpRatio);
00077         }
00078         if (ver >= 2)
00079         {
00080                 f.serial(_DefaultPos);          
00081                 f.serial(_DefaultRotQuat);
00082                 f.serial(_DefaultScale);                
00083         }
00084 }

void NL3D::CSegRemanenceShape::setAnimatedMaterial const std::string &  name  ) 
 

Force animated material. This can be called only once.

Definition at line 254 of file seg_remanence_shape.cpp.

References _AnimatedMat, NL3D::CMaterialBase::Name, and nlassert.

00255 {
00256         nlassert(!name.empty());
00257         nlassert(_AnimatedMat == NULL);
00258         _AnimatedMat  = new CMaterialBase;
00259         _AnimatedMat->Name = name;
00260 }

void NL3D::CSegRemanenceShape::setBBox const NLMISC::CAABBox bbox  ) 
 

Set this shape bounding box NB: ideally the bbox should be computed per model, but practically, a fixed bbox suffice.

Definition at line 216 of file seg_remanence_shape.cpp.

00217 {
00218         _BBox = bbox;
00219 }

void NL3D::CSegRemanenceShape::setCorner uint  corner,
const NLMISC::CVector value
 

Definition at line 94 of file seg_remanence_shape.cpp.

References _Corners, nlassert, uint, and value.

00095 {
00096         nlassert(corner < _Corners.size());
00097         _Corners[corner] = value;
00098 }

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 NL3D::CFlareShape::CFlareShape().

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

void NL3D::CSegRemanenceShape::setMaterial const CMaterial mat  ) 
 

Set material. A double sided material is forced

Definition at line 222 of file seg_remanence_shape.cpp.

References _MatTouched.

00223 {
00224         _Mat = mat;
00225         _MatTouched = true;
00226 }

void NL3D::CSegRemanenceShape::setNumCorners uint  numCorners  ) 
 

Set the number of corners. By default it is 2 so you get a segment NB this invalidate previous calls to setCorner NB numCorners must be >= 2

Definition at line 116 of file seg_remanence_shape.cpp.

References _Corners, _GeomTouched, nlassert, and uint.

Referenced by CSegRemanenceShape().

00117 {
00118         nlassert(numCorners >= 2);
00119         _Corners.resize(numCorners);
00120         std::fill(_Corners.begin(), _Corners.end(), NLMISC::CVector::Null);
00121         _GeomTouched = true;
00122 }

void NL3D::CSegRemanenceShape::setNumSlices uint32  numSlices  ) 
 

Set the number of slices used to draw the remanence Should be >= 2

Definition at line 101 of file seg_remanence_shape.cpp.

References _GeomTouched, _NumSlices, nlassert, and uint32.

00102 {
00103         nlassert(numSlices >= 2);
00104         _NumSlices = numSlices; 
00105         _GeomTouched = true;
00106 }

void NL3D::CSegRemanenceShape::setRollupRatio float  ratio  ) 
 

When stop() is called, the fx doesn't disappear, it must rollup (a texture shifting is performed). This set the speed of rollup. 1 means it takes sliceTime * numSlice to unroll 0.5 means it takes 2 * sliceTime * numSlice to unroll and so on NB ratio must be > 0

Definition at line 236 of file seg_remanence_shape.cpp.

References _RollUpRatio, and nlassert.

00237 {
00238         nlassert(ratio > 0);
00239         _RollUpRatio = ratio;
00240 }

void NL3D::CSegRemanenceShape::setSliceTime float  sliceTime  ) 
 

Definition at line 87 of file seg_remanence_shape.cpp.

References nlassert.

00088 {
00089         nlassert(sliceTime > 0);
00090         _SliceTime = sliceTime; 
00091 }

void NL3D::CSegRemanenceShape::setTextureShifting bool  on = true  ) 
 

Enable texture shifting on the u coordinates at the start of the animation, so that the texture will 'unroll' until it is completly visible NB this apply on all texture stages, and clamps the U coordinates. NB the default is on

Definition at line 229 of file seg_remanence_shape.cpp.

References _MatTouched, and _TextureShifting.

00230 {
00231         _TextureShifting = on;
00232         _MatTouched = true;
00233 }

void NL3D::CSegRemanenceShape::setupMaterial  )  [private]
 

Definition at line 243 of file seg_remanence_shape.cpp.

References _MatTouched, NL3D::CMaterial::enableUserTexMat(), NL3D::CMaterial::getTexture(), NL3D::CMaterial::setDoubleSided(), NL3D::CMaterial::setLighting(), and NL3D::ITexture::setWrapS().

Referenced by render().

00244 {
00245         if (!_MatTouched) return;       
00246         _Mat.enableUserTexMat(0);
00247         if (_Mat.getTexture(0)) _Mat.getTexture(0)->setWrapS(ITexture::Clamp);  
00248         _Mat.setDoubleSided(true);
00249         _Mat.setLighting(false); // lighting not supported (the vb has no normals anyway..)
00250         _MatTouched = false;
00251 }

void NL3D::CSegRemanenceShape::setupVBnPB  )  [private]
 

Definition at line 183 of file seg_remanence_shape.cpp.

References _Corners, _GeomTouched, _NumSlices, _PB, NL3D::CPrimitiveBlock::setNumTri(), NL3D::CVertexBuffer::setNumVertices(), NL3D::CVertexBuffer::setTexCoord(), NL3D::CPrimitiveBlock::setTri(), NL3D::CVertexBuffer::setVertexFormat(), and uint.

Referenced by render().

00184 {
00185         if (!_GeomTouched) return;
00186 
00187         uint numCorners = _Corners.size();
00188         _VB.setVertexFormat(CVertexBuffer::PositionFlag | CVertexBuffer::TexCoord0Flag);
00189         _VB.setNumVertices(numCorners * (_NumSlices + 1));
00190         uint k, l;
00191         
00192         // set tex coords
00193         for(l = 0; l < numCorners; ++l)
00194         {               
00195                 for(k = 0; k <= _NumSlices; ++k)
00196                 {
00197                 
00198                         _VB.setTexCoord((_NumSlices + 1) * l + k, 0, (float) k / _NumSlices, (float) l / (numCorners - 1));
00199                 }
00200         }
00201         // create primitive block
00202         _PB.setNumTri(2 * (numCorners - 1) * _NumSlices);
00203         //
00204         for(l = 0; l < numCorners - 1; ++l)
00205         {
00206                 for(k = 0; k < _NumSlices; ++k)
00207                 {
00208                         _PB.setTri(2 * (l * _NumSlices + k), (_NumSlices + 1) * l + k,  (_NumSlices + 1) * (l + 1) + k + 1, (_NumSlices + 1) * (l + 1) + k);
00209                         _PB.setTri(2 * (l * _NumSlices + k) + 1, (_NumSlices + 1) * l + k, (_NumSlices + 1) * l + k + 1, (_NumSlices + 1) * (l + 1) + k + 1);
00210                 }
00211         }
00212         _GeomTouched = false;   
00213 }

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 struct CPtrInfo [friend, inherited]
 

Definition at line 67 of file smart_ptr.h.


Field Documentation

CMaterialBase* NL3D::CSegRemanenceShape::_AnimatedMat [private]
 

Definition at line 181 of file seg_remanence_shape.h.

Referenced by copyFromOther(), createInstance(), getAnimatedMaterial(), setAnimatedMaterial(), and ~CSegRemanenceShape().

NLMISC::CAABBoxExt NL3D::CSegRemanenceShape::_BBox [private]
 

For clipping.

Definition at line 180 of file seg_remanence_shape.h.

Referenced by copyFromOther().

TCornerVect NL3D::CSegRemanenceShape::_Corners [private]
 

Definition at line 174 of file seg_remanence_shape.h.

Referenced by copyFromOther(), getCorner(), getNumCorners(), setCorner(), setNumCorners(), and setupVBnPB().

CTrackDefaultVector NL3D::CSegRemanenceShape::_DefaultPos [private]
 

Definition at line 183 of file seg_remanence_shape.h.

CTrackDefaultQuat NL3D::CSegRemanenceShape::_DefaultRotQuat [private]
 

Definition at line 184 of file seg_remanence_shape.h.

CTrackDefaultVector NL3D::CSegRemanenceShape::_DefaultScale [private]
 

Definition at line 185 of file seg_remanence_shape.h.

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

Default to -1.

Definition at line 165 of file shape.h.

bool NL3D::CSegRemanenceShape::_GeomTouched [private]
 

Definition at line 167 of file seg_remanence_shape.h.

Referenced by copyFromOther(), setNumCorners(), setNumSlices(), and setupVBnPB().

CMaterial NL3D::CSegRemanenceShape::_Mat [private]
 

Definition at line 176 of file seg_remanence_shape.h.

Referenced by copyFromOther().

bool NL3D::CSegRemanenceShape::_MatTouched [private]
 

Definition at line 168 of file seg_remanence_shape.h.

Referenced by copyFromOther(), setMaterial(), setTextureShifting(), and setupMaterial().

uint32 NL3D::CSegRemanenceShape::_NumSlices [private]
 

Definition at line 171 of file seg_remanence_shape.h.

Referenced by copyFromOther(), getNumSlices(), getNumTriangles(), setNumSlices(), and setupVBnPB().

CPrimitiveBlock NL3D::CSegRemanenceShape::_PB [private]
 

Definition at line 178 of file seg_remanence_shape.h.

Referenced by copyFromOther(), render(), and setupVBnPB().

float NL3D::CSegRemanenceShape::_RollUpRatio [private]
 

Definition at line 173 of file seg_remanence_shape.h.

Referenced by copyFromOther(), getRollupRatio(), and setRollupRatio().

float NL3D::CSegRemanenceShape::_SliceTime [private]
 

Definition at line 172 of file seg_remanence_shape.h.

Referenced by copyFromOther().

bool NL3D::CSegRemanenceShape::_TextureShifting [private]
 

Definition at line 169 of file seg_remanence_shape.h.

Referenced by copyFromOther(), getTextureShifting(), and setTextureShifting().

CVertexBuffer NL3D::CSegRemanenceShape::_VB [private]
 

Definition at line 177 of file seg_remanence_shape.h.

Referenced by copyFromOther().

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 07:42:45 2004 for NeL by doxygen 1.3.6