syBR::map2syBR::EntitySolid Class Reference

Base class for all solid entities i.e. entities with polygons. More...

#include <EntitySolid.hpp>

Inheritance diagram for syBR::map2syBR::EntitySolid:

syBR::map2syBR::EntityBase syBR::map2syBR::EntityWorld

List of all members.

Public Member Functions

 EntitySolid ()
 Constructor.
virtual ~EntitySolid ()
 Destructor.
void addBrush (Brush *pBrush)
 Add a brush.
virtual void releaseMAP ()
 Delete MAP-based content from memory.

Protected Member Functions

 EntitySolid (const EntityType type)
 Constructor with the entity type specified.
void brushesToPolygons ()
 Convert brushes to polygons.
void doCSGUnion ()
 Perform CSG union.
void polygonsToTriangles ()
 Convert polygons to triangles.
void sortPolygons ()
 Sort polygons by texture.
const unsigned long getTotalPolygonCount () const
 Get the total polygon count.
const unsigned long getTotalTriangleCount () const
 Get the total triangle count.
void saveMesh (const std::string &file) const
 Save Ogre mesh to the specified file.

Protected Attributes

std::list< Brush * > m_lpBrushes
 Brushes list (MAP-based content).
std::vector< Polygon * > m_vpPolygons
 Polygons list (MAP/RLS-based content).
Trianglem_pTriangles
 Triangle array.
unsigned long m_triangleCount
 Triangle array size.


Detailed Description

Base class for all solid entities i.e. entities with polygons.

Constructor & Destructor Documentation

syBR::map2syBR::EntitySolid::EntitySolid (  ) 

Constructor.

syBR::map2syBR::EntitySolid::~EntitySolid (  )  [virtual]

Destructor.

syBR::map2syBR::EntitySolid::EntitySolid ( const EntityType  type  )  [protected]

Constructor with the entity type specified.

Parameters:
type Type of the entity


Member Function Documentation

void syBR::map2syBR::EntitySolid::addBrush ( Brush pBrush  ) 

Add a brush.

Parameters:
pBrush Brush to added to the entity

void syBR::map2syBR::EntitySolid::releaseMAP (  )  [virtual]

Delete MAP-based content from memory.

Reimplemented from syBR::map2syBR::EntityBase.

Reimplemented in syBR::map2syBR::EntityWorld.

void syBR::map2syBR::EntitySolid::brushesToPolygons (  )  [protected]

Convert brushes to polygons.

void syBR::map2syBR::EntitySolid::doCSGUnion (  )  [protected]

Perform CSG union.

void syBR::map2syBR::EntitySolid::polygonsToTriangles (  )  [protected]

Convert polygons to triangles.

void syBR::map2syBR::EntitySolid::sortPolygons (  )  [protected]

Sort polygons by texture.

const unsigned long syBR::map2syBR::EntitySolid::getTotalPolygonCount (  )  const [protected]

Get the total polygon count.

Returns:

const unsigned long syBR::map2syBR::EntitySolid::getTotalTriangleCount (  )  const [protected]

Get the total triangle count.

Returns:

void syBR::map2syBR::EntitySolid::saveMesh ( const std::string &  file  )  const [protected]

Save Ogre mesh to the specified file.

Invert x-axis vectors coordinates and change winding order of triangles in order to match Ogre3D coordinates system and then save all the triangles to an Ogre3D .mesh file.

Parameters:
file Full path of the destination mesh file


Member Data Documentation

std::list<Brush *> syBR::map2syBR::EntitySolid::m_lpBrushes [protected]

Brushes list (MAP-based content).

std::vector<Polygon *> syBR::map2syBR::EntitySolid::m_vpPolygons [protected]

Polygons list (MAP/RLS-based content).

Triangle* syBR::map2syBR::EntitySolid::m_pTriangles [protected]

Triangle array.

unsigned long syBR::map2syBR::EntitySolid::m_triangleCount [protected]

Triangle array size.


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

Copyright © 2008 by Sebastien Frippiat
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
Last modified Tue Dec 30 17:57:34 2008