#include <Brush.hpp>
Public Member Functions | |
| Brush () | |
| Constructor. | |
| ~Brush () | |
| Destructor. | |
| void | addFace (BrushFace *pBrushFace) |
| Add a face to the faces list. | |
| const unsigned long | getFaceCount () const |
| Get the face count. | |
| void | toPolygons () |
| Create the polygons from the faces list. | |
| const unsigned long | getPolygonCount () const |
| Get the polygon count. | |
| void | mergePolygons (std::vector< Polygon * > &vpPolygons) |
| Merge the polygon list with another polygon list. | |
| Brush * | clone () const |
| Clone / duplicate the brush. | |
| void | clipToBrush (Brush *pBrush, bool clipOnPlane) |
| Clip a brush to another one. | |
Static Public Member Functions | |
| static void | setTextureManager (TextureManager *pManager) |
| Set texture manager used to load textures and retrieve the size of textures. | |
Private Member Functions | |
| const bool | isVectorInBrush (const Vector3 &vec) const |
| Check if a vector is inside the brush. | |
| bool | addVectorToPolygon (const Vector3 &vec, unsigned long index, BrushFace *pFace) |
| Add a vector to a polygon. | |
Private Attributes | |
| std::list< BrushFace * > | m_lstFaces |
| List of faces of the brush. | |
| std::vector< Polygon * > | m_vpPolygons |
| List of polygons of the brush, created from the faces list. | |
| bool | m_mustDeletePolygons |
| Indicate if this object must delete its polygons or not. | |
Static Private Attributes | |
| static TextureManager * | sm_pTextureManager = NULL |
| Texture manager. | |
| syBR::map2syBR::Brush::Brush | ( | ) |
Constructor.
| syBR::map2syBR::Brush::~Brush | ( | ) |
Destructor.
| void syBR::map2syBR::Brush::addFace | ( | BrushFace * | pBrushFace | ) |
Add a face to the faces list.
| pBrushFace | Face to add to the list, memory allocated for the face will be freed by the brush when it is no longer needed |
| const unsigned long syBR::map2syBR::Brush::getFaceCount | ( | ) | const |
Get the face count.
| void syBR::map2syBR::Brush::toPolygons | ( | ) |
Create the polygons from the faces list.
Here are the two steps of this creation:
| const unsigned long syBR::map2syBR::Brush::getPolygonCount | ( | ) | const |
| void syBR::map2syBR::Brush::mergePolygons | ( | std::vector< Polygon * > & | vpPolygons | ) |
Merge the polygon list with another polygon list.
| vpPolygons | Polygon list with which this polygon list must be merged |
| Brush * syBR::map2syBR::Brush::clone | ( | ) | const |
Clone / duplicate the brush.
| void syBR::map2syBR::Brush::clipToBrush | ( | Brush * | pBrush, | |
| bool | clipOnPlane | |||
| ) |
Clip a brush to another one.
| pBrush | Brush against which this brush must be clipped | |
| clipOnPlane | One of these:
|
| void syBR::map2syBR::Brush::setTextureManager | ( | TextureManager * | pManager | ) | [static] |
Set texture manager used to load textures and retrieve the size of textures.
| pManager | Pointer to the texture manager to use |
| const bool syBR::map2syBR::Brush::isVectorInBrush | ( | const Vector3 & | vec | ) | const [private] |
Check if a vector is inside the brush.
| vec | Vector to check |
| bool syBR::map2syBR::Brush::addVectorToPolygon | ( | const Vector3 & | vec, | |
| unsigned long | index, | |||
| BrushFace * | pFace | |||
| ) | [private] |
Add a vector to a polygon.
| vec | Vector to add | |
| index | Index of the polygon to which the vector must be added | |
| pFace | Face to which this vector belongs (used for texture coordinates determination) |
TextureManager * syBR::map2syBR::Brush::sm_pTextureManager = NULL [static, private] |
Texture manager.
The texture manager is used to load textures and then retrieve the dimensions of textures in order to calculate texture coordinates of vertices.
std::list<BrushFace *> syBR::map2syBR::Brush::m_lstFaces [private] |
List of faces of the brush.
std::vector<Polygon *> syBR::map2syBR::Brush::m_vpPolygons [private] |
List of polygons of the brush, created from the faces list.
bool syBR::map2syBR::Brush::m_mustDeletePolygons [private] |
Indicate if this object must delete its polygons or not.
It is equal to true by default but is reverter to false when mergePolygons is called.
Copyright © 2008 by Sebastien Frippiat

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