Occluder Class. More...
#include <deOccluder.h>
Public Member Functions | |
Constructors and Destructors | |
| deOccluder (deOccluderManager *manager) | |
| Creates a new occluder. | |
| virtual | ~deOccluder () |
| Cleans up the occluder. | |
Management | |
| const decDVector & | GetPosition () const |
| Retrieves the position. | |
| void | SetPosition (const decDVector &position) |
| Sets the position. | |
| const decQuaternion & | GetOrientation () const |
| Retrieves the orientation. | |
| void | SetOrientation (const decQuaternion &orientation) |
| Sets the orientation. | |
| const decVector & | GetScaling () const |
| Retrieves the scaling. | |
| void | SetScaling (const decVector &scaling) |
| Sets the scaling. | |
| deModel * | GetModel () const |
| Retrieves the model or NULL if none is attached. | |
| void | SetModel (deModel *model) |
| Sets the mode or NULL if none is attached. | |
Vertices | |
| int | GetVertexCount () const |
| Retrieves the number of vertices. | |
| const decVector & | GetVertexAt (int index) const |
| Retrieves the vertex at the given position. | |
| void | AddVertex (const decVector &vertex) |
| Adds a vertex. | |
| void | RemoveAllVertices () |
| Removes all vertices. | |
System Peers | |
| deBaseGraphicOccluder * | GetGraphicPeer () const |
| Retrieves the graphic system peer object. | |
| void | SetGraphicPeer (deBaseGraphicOccluder *peer) |
| Sets the graphic system peer object. | |
Occluder Class.
Defines an occluder acting as a hint for visibility. Occluders affect all objects in the world. The shape of the occluder can be defined either by an attached model object or using a list of vertices defining the shape of an occluder plane. Occluders defined by a list of vertices require these vertices to be co-planar. The resulting polygon has to be convex. At least 3 vertices are required for an occluder to be valid. Occluders with less than 3 vertices are ignored unless there is a model attached. An attached model takes precedence over the plane. In the attached model all faces are used as collider planes. Graphic modules typically will assemble co-planar triangles into polygons so there is no need to worry about triangulization of occluder meshes. At least one texture is required in the model but the name is of no importance. Important is only the double-sided flag. Faces belonging to a texture which is double-sided are also double-sided occluders. All other faces are single-sided occluders. A single-sided occluder can be useful for situations where certain parts of the world can only be seen from one side but not the other. Using single-sided occluders allows Graphic Modules to optimized better such cases.
| deOccluder::deOccluder | ( | deOccluderManager * | manager ) |
Creates a new occluder.
| virtual deOccluder::~deOccluder | ( | ) | [virtual] |
Cleans up the occluder.
| void deOccluder::AddVertex | ( | const decVector & | vertex ) |
Adds a vertex.
| deBaseGraphicOccluder* deOccluder::GetGraphicPeer | ( | ) | const [inline] |
Retrieves the graphic system peer object.
| deModel* deOccluder::GetModel | ( | ) | const [inline] |
Retrieves the model or NULL if none is attached.
| const decQuaternion& deOccluder::GetOrientation | ( | ) | const [inline] |
Retrieves the orientation.
| const decDVector& deOccluder::GetPosition | ( | ) | const [inline] |
Retrieves the position.
| const decVector& deOccluder::GetScaling | ( | ) | const [inline] |
Retrieves the scaling.
| const decVector& deOccluder::GetVertexAt | ( | int | index ) | const |
Retrieves the vertex at the given position.
| int deOccluder::GetVertexCount | ( | ) | const [inline] |
Retrieves the number of vertices.
| void deOccluder::RemoveAllVertices | ( | ) |
Removes all vertices.
| void deOccluder::SetGraphicPeer | ( | deBaseGraphicOccluder * | peer ) |
Sets the graphic system peer object.
| void deOccluder::SetModel | ( | deModel * | model ) |
Sets the mode or NULL if none is attached.
| void deOccluder::SetOrientation | ( | const decQuaternion & | orientation ) |
Sets the orientation.
| void deOccluder::SetPosition | ( | const decDVector & | position ) |
Sets the position.
| void deOccluder::SetScaling | ( | const decVector & | scaling ) |
Sets the scaling.
1.7.2