This class provides auxiliary means for rendering a 3D scene view of the model editor. More...
#include "Renderer3D.hpp"
Public Member Functions | |
Renderer3DT () | |
The constructor. More... | |
~Renderer3DT () | |
The destructor. More... | |
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 |
MatSys::RenderMaterialT * | GetRMatWhite () const |
MatSys::RenderMaterialT * | GetRMatTexturedWireframe () const |
float | GetConstShade (const Vector3T< float > &Normal) const |
Returns a "shade" according to the direction of the given normal vector. More... | |
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 | 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 scene view of the model editor.
It is similar to but much simpler than the 3D renderer of the map editor. In the future, we might split the Renderer3DT of the map editor into a GenericRenderer3DT base class and Renderer3DT derived classes for the map and model editor, for re-using the code of the shared functionality...
Renderer3DT::Renderer3DT | ( | ) |
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.
float Renderer3DT::GetConstShade | ( | const Vector3T< float > & | Normal | ) | const |
Returns a "shade" according to the direction of the given normal vector.
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.