CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

csMeshObject Class Reference

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

#include <meshobjtmpl.h>

Inheritance diagram for csMeshObject:

iMeshObject iBase List of all members.

Public Methods

 csMeshObject (iEngine *engine)
 Constructor. More...

virtual ~csMeshObject ()
 Destructor. More...

virtual iMeshObjectFactoryGetFactory () const=0
 See imesh/object.h for sepcification. More...

virtual bool DrawTest (iRenderView *rview, iMovable *movable)
 See imesh/object.h for sepcification. More...

virtual void UpdateLighting (iLight **lights, int num_lights, iMovable *movable)
 See imesh/object.h for sepcification. More...

virtual bool Draw (iRenderView *rview, iMovable *movable, csZBufMode zbufMode)=0
 See imesh/object.h for sepcification. More...

virtual void SetVisibleCallback (iMeshObjectDrawCallback *cb)
 See imesh/object.h for sepcification. More...

virtual iMeshObjectDrawCallbackGetVisibleCallback () const
 See imesh/object.h for sepcification. More...

virtual void NextFrame (csTicks current_time, const csVector3 &pos)
 See imesh/object.h for sepcification. More...

virtual void HardTransform (const csReversibleTransform &t)
 See imesh/object.h for sepcification. More...

virtual bool SupportsHardTransform () const
 See imesh/object.h for sepcification. More...

virtual bool HitBeamOutline (const csVector3 &start, const csVector3 &end, csVector3 &isect, float *pr)
 See imesh/object.h for sepcification. More...

virtual bool HitBeamObject (const csVector3 &start, const csVector3 &end, csVector3 &isect, float *pr)
 See imesh/object.h for sepcification. More...

virtual void SetLogicalParent (iBase *logparent)
 See imesh/object.h for sepcification. More...

virtual iBaseGetLogicalParent () const
 See imesh/object.h for sepcification. More...

virtual iObjectModelGetObjectModel ()
 See imesh/object.h for specification. More...

virtual bool SetColor (const csColor &color)
 See imesh/object.h for sepcification. More...

virtual bool GetColor (csColor &color) const
 See imesh/object.h for sepcification. More...

virtual bool SetMaterialWrapper (iMaterialWrapper *material)
 See imesh/object.h for sepcification. More...

virtual iMaterialWrapperGetMaterialWrapper () const
 See imesh/object.h for sepcification. More...

virtual void GetObjectBoundingBox (csBox3 &bbox, int type)
 See igeom/objmodel.h for specification. More...

virtual void GetRadius (csVector3 &radius, csVector3 &center)
 See igeom/objmodel.h for specification. More...


Protected Methods

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


Protected Attributes

csRef< iMeshObjectDrawCallbackVisCallback
 the drawing callback. More...

iBaseLogParent
 logical parent (usually the wrapper object from the engine). More...

iEngineEngine
 pointer to the engine if available (@ temporary). More...


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 60 of file meshobjtmpl.h.


Constructor & Destructor Documentation

csMeshObject::csMeshObject iEngine   engine
 

Constructor.

virtual csMeshObject::~csMeshObject   [virtual]
 

Destructor.


Member Function Documentation

virtual bool csMeshObject::Draw iRenderView   rview,
iMovable   movable,
csZBufMode    zbufMode
[pure virtual]
 

See imesh/object.h for sepcification.

There is no default implementation for this method.

Implements iMeshObject.

virtual bool csMeshObject::DrawTest iRenderView   rview,
iMovable   movable
[virtual]
 

See imesh/object.h for sepcification.

The default implementation does nothing and always returns true.

Implements iMeshObject.

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

See imesh/object.h for sepcification.

The default implementation does not support a base color.

Implements iMeshObject.

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

See imesh/object.h for sepcification.

There is no default implementation for this method.

Implements iMeshObject.

virtual iBase* csMeshObject::GetLogicalParent   const [virtual]
 

See imesh/object.h for sepcification.

This function is handled completely in csMeshObject.

Implements iMeshObject.

virtual iMaterialWrapper* csMeshObject::GetMaterialWrapper   const [virtual]
 

See imesh/object.h for sepcification.

The default implementation does not support a material.

Implements iMeshObject.

virtual void csMeshObject::GetObjectBoundingBox csBox3   bbox,
int    type
[virtual]
 

See igeom/objmodel.h for specification.

The default implementation returns an infinite bounding box.

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

See imesh/object.h for specification.

Implements iMeshObject.

Definition at line 186 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 iMeshObjectDrawCallback* csMeshObject::GetVisibleCallback   const [virtual]
 

See imesh/object.h for sepcification.

This function is handled completely in csMeshObject.

Implements iMeshObject.

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

See imesh/object.h for sepcification.

The default implementation does nothing.

Implements iMeshObject.

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

See imesh/object.h for sepcification.

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 sepcification.

The default implementation will always return a miss.

Implements iMeshObject.

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

See imesh/object.h for sepcification.

The default implementation does nothing.

Implements iMeshObject.

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

See imesh/object.h for sepcification.

The default implementation does not support a base color.

Implements iMeshObject.

virtual void csMeshObject::SetLogicalParent iBase   logparent [virtual]
 

See imesh/object.h for sepcification.

This function is handled completely in csMeshObject.

Implements iMeshObject.

virtual bool csMeshObject::SetMaterialWrapper iMaterialWrapper   material [virtual]
 

See imesh/object.h for sepcification.

The default implementation does not support a material.

Implements iMeshObject.

virtual void csMeshObject::SetVisibleCallback iMeshObjectDrawCallback   cb [virtual]
 

See imesh/object.h for sepcification.

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 sepcification.

The default implementation returns false.

Implements iMeshObject.

virtual void csMeshObject::UpdateLighting iLight **    lights,
int    num_lights,
iMovable   movable
[virtual]
 

See imesh/object.h for sepcification.

The default implementation does nothing.

Implements iMeshObject.

void csMeshObject::WantToDie   [protected]
 

Tell the engine that this object wants to be deleted.


Member Data Documentation

iEngine* csMeshObject::Engine [protected]
 

pointer to the engine if available (@ temporary).

@

Definition at line 70 of file meshobjtmpl.h.

iBase* csMeshObject::LogParent [protected]
 

logical parent (usually the wrapper object from the engine).

Definition at line 67 of file meshobjtmpl.h.

csRef<iMeshObjectDrawCallback> csMeshObject::VisCallback [protected]
 

the drawing callback.

Definition at line 64 of file meshobjtmpl.h.


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