This class provides auxiliary means for rendering a 3D view. More...
#include "Renderer3D.hpp"
Classes | |
| class | UseOrthoMatricesT |
| A helper class that temporarily sets up the matrices in the Cafu MatSys for orthogonal rendering into the given 3D view window. More... | |
Public Member Functions | |
| Renderer3DT (ViewWindow3DT &ViewWin3D) | |
| The constructor. More... | |
| ~Renderer3DT () | |
| The destructor. More... | |
| void | InitFrame () |
| Initializes the rendering of a new frame by computing and caching all relevant data. More... | |
| const ViewWindow3DT & | GetViewWin3D () const |
| const Plane3fT * | GetViewFrustumPlanes () const |
| const ArrayT< MapElementT * > & | GetVisElemsBackToFront () const |
| float | GetConstShade (const Vector3T< float > &Normal) const |
| MatSys::RenderMaterialT * | GetRMatWireframe () const |
| MatSys::RenderMaterialT * | GetRMatWireframe_OffsetZ () const |
| MatSys::RenderMaterialT * | GetRMatFlatShaded () const |
| MatSys::RenderMaterialT * | GetRMatFlatShaded_OffsetZ () const |
| MatSys::RenderMaterialT * | GetRMatOverlay () const |
| MatSys::RenderMaterialT * | GetRMatOverlay_OffsetZ () const |
| MatSys::RenderMaterialT * | GetRMatTerrainEditorTool () const |
| MatSys::RenderMaterialT * | GetRMatTerrainEyeDropper () const |
| void | RenderBox (const BoundingBox3fT &BB, const wxColour &Color, bool Solid) const |
| Renders a box from the given bounding-box in the given color, with solid faces or in wireframe. More... | |
| void | RenderBox (const Vector3fT Vertices[], const wxColour &Color, bool Solid) const |
| Renders a box from the given eight vertices in the given color, with solid faces or in wireframe. More... | |
| void | RenderLine (const Vector3fT &A, const Vector3fT &B, const wxColour &Color) const |
| Renders a line from A to B in the given color. More... | |
| void | RenderSplitPlanes (const OrthoBspTreeT::NodeT *Node, int Depth) const |
| Renders the split planes of the BSP tree at and below the given node, up to the given depth. More... | |
| void | BasisVectors (const Vector3fT &Pos, const cf::math::Matrix3x3fT &Mat, float Length=100.0f) const |
| Renders the basis vectors (the "axes") of the given matrix at the given position with the given length. More... | |
| void | RenderCrossHair (const wxPoint &Center) const |
| Renders a cross-hair at the given point. Assumes that orthogonal rendering mode is active. More... | |
This class provides auxiliary means for rendering a 3D view.
A 3D view is essentially rendered by calling the MapElementT::Render3D() method of all relevant (visible) MapElementTs within the document, see the ViewWindow3DT::OnPaint() method for details. The map elements can render themselves either directly by means of the Cafu MatSys, or by calls to the auxiliary functions in this class.
| Renderer3DT::Renderer3DT | ( | ViewWindow3DT & | ViewWin3D | ) |
The constructor.
| Renderer3DT::~Renderer3DT | ( | ) |
The destructor.
| void Renderer3DT::BasisVectors | ( | const Vector3fT & | Pos, |
| const cf::math::Matrix3x3fT & | Mat, | ||
| float | Length = 100.0f |
||
| ) | const |
Renders the basis vectors (the "axes") of the given matrix at the given position with the given length.
| void Renderer3DT::InitFrame | ( | ) |
Initializes the rendering of a new frame by computing and caching all relevant data.
| void Renderer3DT::RenderBox | ( | const BoundingBox3fT & | BB, |
| const wxColour & | Color, | ||
| bool | Solid | ||
| ) | const |
Renders a box from the given bounding-box in the given color, with solid faces or in wireframe.
| void Renderer3DT::RenderBox | ( | const Vector3fT | Vertices[], |
| const wxColour & | Color, | ||
| bool | Solid | ||
| ) | const |
Renders a box from the given eight vertices in the given color, with solid faces or in wireframe.
The vertices are expected in the same order as given by the BoundingBox3T<T>::GetCornerVertices() method, and the box can be arbitrarily trans- or even deformed.
| void Renderer3DT::RenderCrossHair | ( | const wxPoint & | Center | ) | const |
Renders a cross-hair at the given point. Assumes that orthogonal rendering mode is active.
| void Renderer3DT::RenderLine | ( | const Vector3fT & | A, |
| const Vector3fT & | B, | ||
| const wxColour & | Color | ||
| ) | const |
Renders a line from A to B in the given color.
| void Renderer3DT::RenderSplitPlanes | ( | const OrthoBspTreeT::NodeT * | Node, |
| int | Depth | ||
| ) | const |
Renders the split planes of the BSP tree at and below the given node, up to the given depth.