[AE Engine logo] Public API Reference
Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

aeObject Class Reference

A base class for all objects. More...

#include <object.h>

Inheritance diagram for aeObject:

aeBase aeLine aeModel aePolygon aeQuad aeTriangle aeMD2Object List of all members.

Public Member Functions

virtual char * getName ()
 Get object's name.

virtual aeMaterialgetMaterial ()
 Get the object's material.

virtual void draw (aeEngineflags *)=0
 Draw this object.

virtual aeVector3 getOrigin ()
 Get the origin for this object.

virtual void setOrigin (const aeVector3 &norigin)
 Set the origin for this object.

virtual void setColor (float r, float g, float b)
 Set the RGB color of this object.

virtual void setColor (float r, float g, float b, float a)
 Set the RGBA color of this object.

virtual void setColor (const aeColor3 &color)
 Set the RGB color of this object.

virtual void setColor (const aeColor4 &color)
 Set the RGBA color of this object.

virtual void setTexCoord (const aeTexCoord2 &texcoord)
 Set the texture coordinate for the next vertex(es).

virtual void setTexCoord (float s, float t)
 Set the texture coordinate for the next vertex(es).

virtual void setMaterial (aeMaterial *mat)
 Set material for this object.

virtual void addVertex (const aeVector3 &vertex)
 Add a vertex to this object.

virtual void setTransparent (bool)
 Used to specify whether this object is transparent or not.

virtual unsigned int getVertexCount ()
 Get the number of vertices in this object.

virtual aeVector3 getVertex (int)
 Get a vertex of this object.

virtual float getBoundingSphereRadius ()
 Return the radius of the bounding sphere of this object.

virtual bool isTransparent ()
 Used to check if this object is currently transparent.

virtual void setMode (aeObjRenderingMode mode)
 Set the object rendering mode.


Protected Attributes

aeVector3_vectorvertexList
aeColor4_vectorvertexColorList
aeTexCoord2_vectorvertexTexcoordList
aeVector3 origin
aeColor4 currentVertexColor
aeTexCoord2 currentVertexTexcoord
bool hasMaterial
aeMaterialmaterial
char * objName
bool isObjTransparent
float objRadius
aeObjRenderingMode objRenderMode

Detailed Description

A base class for all objects.

Definition at line 127 of file object.h.


Member Function Documentation

virtual void aeObject::addVertex const aeVector3   vertex [virtual]
 

Add a vertex to this object.

This adds a single vertex to this object.

Parameters:
vertex The vertex vector.

virtual void aeObject::draw aeEngineflags   [pure virtual]
 

Draw this object.

This is called by aeEngine::Render(). You shouldn't need to call this yourself.

Implemented in aeLine, aeModel, aePolygon, aeQuad, aeTriangle, and aeMD2Object.

virtual float aeObject::getBoundingSphereRadius   [virtual]
 

Return the radius of the bounding sphere of this object.

Returns:
Bounding sphere radius of this object.

virtual aeMaterial* aeObject::getMaterial   [virtual]
 

Get the object's material.

Returns:
The object's material.

virtual char* aeObject::getName   [virtual]
 

Get object's name.

Returns:
The object's name.

virtual aeVector3 aeObject::getOrigin   [virtual]
 

Get the origin for this object.

Returns:
The object's origin.

virtual aeVector3 aeObject::getVertex int    [virtual]
 

Get a vertex of this object.

Parameters:
int The vertex index number.
Returns:
The vertex.

virtual unsigned int aeObject::getVertexCount   [virtual]
 

Get the number of vertices in this object.

Returns:
The vertex count of this object.

virtual bool aeObject::isTransparent   [virtual]
 

Used to check if this object is currently transparent.

Returns:
True if the object is transparent, false if not.

virtual void aeObject::setColor const aeColor4   color [virtual]
 

Set the RGBA color of this object.

This accepts an aeColor4 to specify the color. Subsequent AddVertex() calls will add a vertex of this color.

Parameters:
color an aeColor4 instance representing the wanted color.

virtual void aeObject::setColor const aeColor3   color [virtual]
 

Set the RGB color of this object.

This accepts an aeColor3 to specify the color. Subsequent AddVertex() calls will add a vertex of this color.

Parameters:
color an aeColor3 instance representing the wanted color.

virtual void aeObject::setColor float    r,
float    g,
float    b,
float    a
[virtual]
 

Set the RGBA color of this object.

The values are from 0.0 to 1.0. Subsequent AddVertex() calls will add a vertex of this color.

Parameters:
r Red.
g Green.
b Blue.
a Alpha.

virtual void aeObject::setColor float    r,
float    g,
float    b
[virtual]
 

Set the RGB color of this object.

The values are from 0.0 to 1.0. Subsequent AddVertex() calls will add a vertex of this color.

Parameters:
r Red.
g Green.
b Blue.

virtual void aeObject::setMaterial aeMaterial   mat [virtual]
 

Set material for this object.

Parameters:
The material.

virtual void aeObject::setMode aeObjRenderingMode    mode [virtual]
 

Set the object rendering mode.

For each derived object type (aeTriangle, aeQuad, aePolygon, aeLine) there is a set of rendering modes which indicate how the object's vertices are to be interpreted when drawing them. Possible modes are:

  • TRIANGLES_NORMAL
  • TRIANGLES_STRIP
  • TRIANGLES_FAN
  • QUADS_NORMAL
  • QUADS_STRIP
  • LINES_NORMAL
  • LINES_STRIP
  • LINES_LOOP
  • POLYGON_NORMAL

Parameters:
mode The object rendering mode to use.
See also:
aeObjRenderingMode

virtual void aeObject::setOrigin const aeVector3   norigin [virtual]
 

Set the origin for this object.

Parameters:
o_origin The origin vector.

virtual void aeObject::setTexCoord float    s,
float    t
[virtual]
 

Set the texture coordinate for the next vertex(es).

Use this before AddVertex() to add a texture coordinate for that vertex. If you set a texcoord only for the first vertex, that coordinate will be used for all subsequent vertices until you specify a new texture coordinate.

Parameters:
s The s coordinate.
t The t coordinate.

virtual void aeObject::setTexCoord const aeTexCoord2   texcoord [virtual]
 

Set the texture coordinate for the next vertex(es).

Use this before AddVertex() to add a texture coordinate for that vertex. If you set a texcoord only for the first vertex, that coordinate will be used for all subsequent vertices until you specify a new texture coordinate.

Parameters:
texcoord a 2D texcoord representing the texture coordinate.

virtual void aeObject::setTransparent bool    [virtual]
 

Used to specify whether this object is transparent or not.

Parameters:
bool true = transparent, false = solid (default).


The documentation for this class was generated from the following file:
AE Engine Public API Reference
Generated on Wed Apr 9 09:43:41 2003 by Doxygen.