deDebugDrawerShapeFace Class Reference

Debug Drawer Volume Face. More...

#include <deDebugDrawerShapeFace.h>

List of all members.

Public Member Functions

Constructors and Destructors
 deDebugDrawerShapeFace ()
 Creates a new debug drawer deDebugDrawerShapeFace face.
 ~deDebugDrawerShapeFace ()
 Cleans up the debug drawer deDebugDrawerShapeFace face.
Management
const decVectorGetNormal () const
 Retrieves the face normal.
void SetNormal (const decVector &normal)
 Sets the face normal.
int GetVertexCount () const
 Retrieves the number of vertices.
const decVectorGetVertexAt (int index) const
 Retrieves the vertex at the given index.
void AddVertex (const decVector &vertex)
 Adds a vertex to the end of the list.
void RemoveAllVertices ()
 Removes all vertices.
Helper Functions
void MakeCoplanarTo (const decVector &position)
 Turns the face into a properly coplanar face.

Detailed Description

Debug Drawer Volume Face.

Describes a face in a debug drawer shape. These faces can have any number of vertices where all vertices are considered to be coplanar. The face normal is specified explicity to avoid troubles in cases where vertices are very close together. This way an application or module wishing for some debug drawing does not have to worry about badly spaced vertices which makes debug code more simple. The face is considered to be a triangle fan type face. Hence the first vertex is the base vertex and the second vertex the first triangle base. Every next vertex defines a triangle with the first vertex, the last vertex and the newly specified vertex. The triangle fan is not closesed automatically. For filled shapes at least 3 vertices are required and for non filled shapes at least 2. If not enough vertices are specified the face not drawn.

Author:
Plüss Roland
Version:
1.0
Date:
2008

Constructor & Destructor Documentation

deDebugDrawerShapeFace::deDebugDrawerShapeFace (  )

Creates a new debug drawer deDebugDrawerShapeFace face.

deDebugDrawerShapeFace::~deDebugDrawerShapeFace (  )

Cleans up the debug drawer deDebugDrawerShapeFace face.


Member Function Documentation

void deDebugDrawerShapeFace::AddVertex ( const decVector vertex )

Adds a vertex to the end of the list.

const decVector& deDebugDrawerShapeFace::GetNormal (  ) const [inline]

Retrieves the face normal.

const decVector& deDebugDrawerShapeFace::GetVertexAt ( int  index ) const

Retrieves the vertex at the given index.

int deDebugDrawerShapeFace::GetVertexCount (  ) const [inline]

Retrieves the number of vertices.

void deDebugDrawerShapeFace::MakeCoplanarTo ( const decVector position )

Turns the face into a properly coplanar face.

All vertices are moved to be in the plane defined by the given vertex and the face normal.

void deDebugDrawerShapeFace::RemoveAllVertices (  )

Removes all vertices.

void deDebugDrawerShapeFace::SetNormal ( const decVector normal )

Sets the face normal.


The documentation for this class was generated from the following file: