#include <shape.h>
Inheritance diagram for NL3D::IShape:
Serialisation of a shape MUST be done with ISTREAM::serialPolyPtr.
DERIVER RULES:
Nevrax France
Definition at line 71 of file shape.h.
Public Member Functions | |
virtual bool | clip (const std::vector< CPlane > &pyramid, const CMatrix &worldMatrix) |
virtual CTransformShape * | createInstance (CScene &scene) |
virtual void | flushTextures (IDriver &driver, uint selectedTexture)=0 |
virtual void | getAABBox (NLMISC::CAABBox &bbox) const |
virtual std::string | getClassName ()=0 |
float | getDistMax () const |
const sint & | getRefCount () const |
IShape () | |
Constructor. | |
virtual void | profileSceneRender (CRenderTrav *rdrTrav, CTransformShape *trans, bool opaquePass) |
virtual void | render (IDriver *drv, CTransformShape *trans, bool opaquePass)=0 |
virtual void | serial (IStream &f)=0 |
void | setDistMax (float distMax) |
virtual | ~IShape () |
Dtor. | |
Data Fields | |
sint | crefs |
CPtrInfo * | pinfo |
Static Public Attributes | |
CPtrInfo | NullPtrInfo |
Protected Attributes | |
float | _DistMax |
Default to -1. | |
Friends | |
struct | CPtrInfo |
|
Constructor.
Definition at line 59 of file shape.cpp.
00060 { 00061 _DistMax= -1; 00062 } |
|
Dtor.
Definition at line 78 of file shape.h.
00078 {} |
|
clip this shape with a pyramid. the pyramid is given in world space.The world matrix of the object is given.
Reimplemented in NL3D::CFlareShape, NL3D::CMesh, NL3D::CMeshMRM, NL3D::CMeshMRMSkinned, NL3D::CMeshMultiLod, NL3D::CSegRemanenceShape, NL3D::CSkeletonShape, NL3D::CWaterShape, and NL3D::CWaveMakerShape. Definition at line 93 of file shape.h.
00093 {return true;} |
|
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.
Reimplemented in NL3D::CFlareShape, NL3D::CMesh, NL3D::CMeshMRM, NL3D::CMeshMRMSkinned, NL3D::CMeshMultiLod, NL3D::CParticleSystemShape, NL3D::CSegRemanenceShape, NL3D::CSkeletonShape, NL3D::CWaterShape, and NL3D::CWaveMakerShape. Definition at line 50 of file shape.cpp. References NL3D::CScene::createModel(), and NL3D::CTransformShape::Shape. Referenced by NL3D::CScene::createInstance(), and NL3D::CScene::updateWaitingInstances().
00051 { 00052 CTransformShape *mo= (CTransformShape*)scene.createModel(NL3D::TransformShapeId); 00053 mo->Shape= this; 00054 return mo; 00055 } |
|
flush textures used by this shape. Implemented in NL3D::CFlareShape, NL3D::CMeshBase, NL3D::CParticleSystemShape, NL3D::CSegRemanenceShape, NL3D::CSkeletonShape, NL3D::CWaterShape, and NL3D::CWaveMakerShape. Referenced by NL3D::CShapeBank::preLoadShapes(). |
|
return the bounding box of the shape. Default is to return Null bbox. Reimplemented in NL3D::CFlareShape, NL3D::CMesh, NL3D::CMeshMRM, NL3D::CMeshMRMSkinned, NL3D::CMeshMultiLod, NL3D::CParticleSystemShape, NL3D::CSegRemanenceShape, NL3D::CSkeletonShape, NL3D::CWaterShape, and NL3D::CWaveMakerShape. Definition at line 76 of file shape.cpp. References NLMISC::CAABBox::setCenter(), and NLMISC::CAABBox::setHalfSize().
00077 { 00078 bbox.setCenter(CVector::Null); 00079 bbox.setHalfSize(CVector::Null); 00080 } |
|
Implemented in NLAIAGENT::CNumericIndex, NLAIC::IPointerGestion, NLAIC::CIdentType, and CAutomataDesc. Referenced by NLMISC::CClassRegistry::checkObject(), and NL3D::GetTextureSize(). |
|
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;} |
|
get an approximation of the number of triangles this instance will render for a fixed distance. return 0 if do not support degradation. Implemented in NL3D::CFlareShape, NL3D::CMesh, NL3D::CMeshMRM, NL3D::CMeshMRMSkinned, NL3D::CMeshMultiLod, NL3D::CParticleSystemShape, NL3D::CSegRemanenceShape, NL3D::CSkeletonShape, NL3D::CWaterShape, and NL3D::CWaveMakerShape. |
|
Definition at line 70 of file smart_ptr.h. References NLMISC::CRefCount::crefs, and sint.
00071 { 00072 return crefs; 00073 } |
|
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 {} |
|
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. Implemented in NL3D::CFlareShape, NL3D::CMesh, NL3D::CMeshMRM, NL3D::CMeshMRMSkinned, NL3D::CMeshMultiLod, NL3D::CParticleSystemShape, NL3D::CSegRemanenceShape, NL3D::CSkeletonShape, NL3D::CWaterShape, and NL3D::CWaveMakerShape. |
|
|
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().
|
|
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.
Reimplemented in NL3D::CMesh, NL3D::CMeshMRM, NL3D::CMeshMRMSkinned, and NL3D::CMeshMultiLod. Definition at line 158 of file shape.h.
00158 {return NULL;}
|
|
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;} |
|
Definition at line 67 of file smart_ptr.h. |
|
Default to -1.
|
|
Definition at line 79 of file smart_ptr.h. Referenced by NLMISC::CRefCount::CRefCount(), NLMISC::CRefCount::getRefCount(), and NLMISC::CRefCount::~CRefCount(). |
|
Referenced by NLMISC::CRefCount::CRefCount(). |
|
Definition at line 80 of file smart_ptr.h. Referenced by NLMISC::CRefCount::CRefCount(), and NLMISC::CRefCount::~CRefCount(). |