CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

csMeshObject Class Reference

This is an abstract implementation of iMeshObject. More...

#include <cstool/meshobjtmpl.h>

Inheritance diagram for csMeshObject:

iMeshObject iBase csNewParticleSystem List of all members.

Public Member Functions

 csMeshObject (iEngine *engine)
 Constructor.
virtual ~csMeshObject ()
 Destructor.
virtual iMeshObjectFactoryGetFactory () const =0
 See imesh/object.h for specification.
virtual csPtr< iMeshObjectClone ()
 See imesh/object.h for specification.
virtual csFlagsGetFlags ()
 See imesh/object.h for specification.
virtual csRenderMesh ** GetRenderMeshes (int &num, iRenderView *, iMovable *, uint32)
 See imesh/object.h for specification.
virtual void SetVisibleCallback (iMeshObjectDrawCallback *cb)
 See imesh/object.h for specification.
virtual iMeshObjectDrawCallbackGetVisibleCallback () const
 See imesh/object.h for specification.
virtual void NextFrame (csTicks current_time, const csVector3 &pos)
 See imesh/object.h for specification.
virtual void HardTransform (const csReversibleTransform &t)
 See imesh/object.h for specification.
virtual bool SupportsHardTransform () const
 See imesh/object.h for specification.
virtual bool HitBeamOutline (const csVector3 &start, const csVector3 &end, csVector3 &isect, float *pr)
 See imesh/object.h for specification.
virtual bool HitBeamObject (const csVector3 &start, const csVector3 &end, csVector3 &isect, float *pr, int *polygon_idx=0)
 See imesh/object.h for specification.
virtual void SetLogicalParent (iBase *logparent)
 See imesh/object.h for specification.
virtual iBaseGetLogicalParent () const
 See imesh/object.h for specification.
virtual iObjectModelGetObjectModel ()
 See imesh/object.h for specification.
virtual bool SetColor (const csColor &color)
 See imesh/object.h for specification.
virtual bool GetColor (csColor &color) const
 See imesh/object.h for specification.
virtual bool SetMaterialWrapper (iMaterialWrapper *material)
 See imesh/object.h for specification.
virtual iMaterialWrapperGetMaterialWrapper () const
 See imesh/object.h for specification.
virtual void InvalidateMaterialHandles ()
 see imesh/object.h for specification.
virtual void PositionChild (iMeshObject *child, csTicks current_time)
 see imesh/object.h for specification.
virtual void GetObjectBoundingBox (csBox3 &bbox)
 See igeom/objmodel.h for specification.
virtual void SetObjectBoundingBox (const csBox3 &bbox)
 See igeom/objmodel.h for specification.
virtual void GetRadius (csVector3 &radius, csVector3 &center)
 See igeom/objmodel.h for specification.

Protected Member Functions

void WantToDie ()
 Tell the engine that this object wants to be deleted.

Protected Attributes

csRef< iMeshObjectDrawCallbackVisCallback
 the drawing callback
iBaseLogParent
 logical parent (usually the wrapper object from the engine)
iEngineEngine
 pointer to the engine if available (@ temporary)
csFlags flags
 Flags.
csBox3 boundingbox
 The bounding box.

Detailed Description

This is an abstract implementation of iMeshObject.

It can be used to write custom mesh object implementations more easily. Currently it supports the following common functions of mesh objects:

Definition at line 64 of file meshobjtmpl.h.


Constructor & Destructor Documentation

csMeshObject::csMeshObject iEngine engine  ) 
 

Constructor.

virtual csMeshObject::~csMeshObject  )  [virtual]
 

Destructor.


Member Function Documentation

virtual csPtr<iMeshObject> csMeshObject::Clone  )  [inline, virtual]
 

See imesh/object.h for specification.

The default implementation does nothing and returns 0.

Implements iMeshObject.

Definition at line 104 of file meshobjtmpl.h.

virtual bool csMeshObject::GetColor csColor color  )  const [virtual]
 

See imesh/object.h for specification.

The default implementation does not support a base color.

Implements iMeshObject.

virtual iMeshObjectFactory* csMeshObject::GetFactory  )  const [pure virtual]
 

See imesh/object.h for specification.

There is no default implementation for this method.

Implements iMeshObject.

Implemented in csNewParticleSystem.

virtual csFlags& csMeshObject::GetFlags  )  [inline, virtual]
 

See imesh/object.h for specification.

Implements iMeshObject.

Definition at line 109 of file meshobjtmpl.h.

virtual iBase* csMeshObject::GetLogicalParent  )  const [virtual]
 

See imesh/object.h for specification.

This function is handled completely in csMeshObject.

Implements iMeshObject.

virtual iMaterialWrapper* csMeshObject::GetMaterialWrapper  )  const [virtual]
 

See imesh/object.h for specification.

The default implementation does not support a material.

Implements iMeshObject.

Reimplemented in csNewParticleSystem.

virtual void csMeshObject::GetObjectBoundingBox csBox3 bbox  )  [virtual]
 

See igeom/objmodel.h for specification.

The default implementation returns an infinite bounding box.

Reimplemented in csNewParticleSystem.

virtual iObjectModel* csMeshObject::GetObjectModel  )  [inline, virtual]
 

See imesh/object.h for specification.

Implements iMeshObject.

Definition at line 184 of file meshobjtmpl.h.

virtual void csMeshObject::GetRadius csVector3 radius,
csVector3 center
[virtual]
 

See igeom/objmodel.h for specification.

The default implementation returns an infinite radius.

virtual csRenderMesh** csMeshObject::GetRenderMeshes int &  num,
iRenderView ,
iMovable ,
uint32 
[inline, virtual]
 

See imesh/object.h for specification.

The default implementation does nothing and always returns 0. @@ Note: in future it would be better that the default implementation does nothing as this function has to be implemented by mesh objects.

Implements iMeshObject.

Reimplemented in csNewParticleSystem.

Definition at line 117 of file meshobjtmpl.h.

virtual iMeshObjectDrawCallback* csMeshObject::GetVisibleCallback  )  const [virtual]
 

See imesh/object.h for specification.

This function is handled completely in csMeshObject.

Implements iMeshObject.

virtual void csMeshObject::HardTransform const csReversibleTransform t  )  [virtual]
 

See imesh/object.h for specification.

The default implementation does nothing.

Implements iMeshObject.

virtual bool csMeshObject::HitBeamObject const csVector3 start,
const csVector3 end,
csVector3 isect,
float *  pr,
int *  polygon_idx = 0
[virtual]
 

See imesh/object.h for specification.

The default implementation will always return a miss.

Implements iMeshObject.

virtual bool csMeshObject::HitBeamOutline const csVector3 start,
const csVector3 end,
csVector3 isect,
float *  pr
[virtual]
 

See imesh/object.h for specification.

The default implementation will always return a miss.

Implements iMeshObject.

virtual void csMeshObject::InvalidateMaterialHandles  )  [inline, virtual]
 

see imesh/object.h for specification.

The default implementation does nothing.

Implements iMeshObject.

Definition at line 214 of file meshobjtmpl.h.

virtual void csMeshObject::NextFrame csTicks  current_time,
const csVector3 pos
[virtual]
 

See imesh/object.h for specification.

The default implementation does nothing.

Implements iMeshObject.

Reimplemented in csNewParticleSystem.

virtual void csMeshObject::PositionChild iMeshObject child,
csTicks  current_time
[inline, virtual]
 

see imesh/object.h for specification.

The default implementation does nothing.

Implements iMeshObject.

Definition at line 220 of file meshobjtmpl.h.

virtual bool csMeshObject::SetColor const csColor color  )  [virtual]
 

See imesh/object.h for specification.

The default implementation does not support a base color.

Implements iMeshObject.

Reimplemented in csNewParticleSystem.

virtual void csMeshObject::SetLogicalParent iBase logparent  )  [virtual]
 

See imesh/object.h for specification.

This function is handled completely in csMeshObject.

Implements iMeshObject.

virtual bool csMeshObject::SetMaterialWrapper iMaterialWrapper material  )  [virtual]
 

See imesh/object.h for specification.

The default implementation does not support a material.

Implements iMeshObject.

Reimplemented in csNewParticleSystem.

virtual void csMeshObject::SetObjectBoundingBox const csBox3 bbox  )  [virtual]
 

See igeom/objmodel.h for specification.

Overrides the default bounding box.

Reimplemented in csNewParticleSystem.

virtual void csMeshObject::SetVisibleCallback iMeshObjectDrawCallback cb  )  [virtual]
 

See imesh/object.h for specification.

This function is handled completely in csMeshObject. The actual implementation just has to use the VisCallback variable to perform the callback.

Implements iMeshObject.

virtual bool csMeshObject::SupportsHardTransform  )  const [virtual]
 

See imesh/object.h for specification.

The default implementation returns false.

Implements iMeshObject.

void csMeshObject::WantToDie  )  [protected]
 

Tell the engine that this object wants to be deleted.


Member Data Documentation

csBox3 csMeshObject::boundingbox [protected]
 

The bounding box.

Definition at line 83 of file meshobjtmpl.h.

iEngine* csMeshObject::Engine [protected]
 

pointer to the engine if available (@ temporary)

@

Definition at line 74 of file meshobjtmpl.h.

csFlags csMeshObject::flags [protected]
 

Flags.

Definition at line 80 of file meshobjtmpl.h.

iBase* csMeshObject::LogParent [protected]
 

logical parent (usually the wrapper object from the engine)

Definition at line 71 of file meshobjtmpl.h.

csRef<iMeshObjectDrawCallback> csMeshObject::VisCallback [protected]
 

the drawing callback

Definition at line 68 of file meshobjtmpl.h.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.3.9.1