Cafu Engine
Renderer2DT Class Reference

This class implements the rendering into a 2D view. More...

#include "Renderer2D.hpp"

Public Member Functions

 Renderer2DT (const ViewWindow2DT &ViewWin2D, wxDC &dc)
 The Constructor. More...
 
const ViewWindow2DTGetViewWin2D () const
 Returns the ViewWindow2DT that this renderer renders into. More...
 
void SetFillColor (const wxColour &Color)
 
void SetLineColor (const wxColour &Color)
 
void SetLineType (wxPenStyle Style, int Width, const wxColour &Color)
 
void DrawPoint (const wxPoint &Point, int Radius)
 
void DrawPoint (const Vector3fT &Point, int Radius)
 
void DrawLine (const wxPoint &A, const wxPoint &B)
 
void DrawLine (const Vector3fT &A, const Vector3fT &B)
 
void DrawLine (int x1, int y1, int x2, int y2)
 
void DrawLineLoop (const ArrayT< Vector3fT > &Points, int Radius)
 
void DrawEllipse (const wxPoint &Center, int RadiusX, int RadiusY, bool Fill)
 
void Rectangle (const wxRect &Rect, bool Fill)
 
void DrawBitmap (int x, int y, const wxBitmap &Bitmap)
 
void SetTextColor (const wxColour &FgColor, const wxColour &BkColor)
 
void DrawText (const wxString &Text, const wxPoint &Pos)
 
void BasisVectors (const Vector3fT &Pos, const cf::math::Matrix3x3fT &Mat, float Length=24.0f)
 Renders the basis vectors (the "axes") of the given matrix at the given position with the given length. More...
 
void XHandle (const wxPoint &Pos, int Radius=3)
 Renders an X-shaped handle at the given position with the given radius. More...
 
void DrawBoxDims (const BoundingBox3fT &BB, int Pos)
 Renders the dimensions of the given bounding-box next to the box. More...
 

Static Public Attributes

static const int LINE_THIN =1
 
static const int LINE_THICK =2
 

Detailed Description

This class implements the rendering into a 2D view.

Most methods are just simple wrappers around wxDC functionality, but it still makes rendering more convenient.

Constructor & Destructor Documentation

Renderer2DT::Renderer2DT ( const ViewWindow2DT ViewWin2D,
wxDC &  dc 
)

The Constructor.

Member Function Documentation

void Renderer2DT::BasisVectors ( const Vector3fT Pos,
const cf::math::Matrix3x3fT Mat,
float  Length = 24.0f 
)

Renders the basis vectors (the "axes") of the given matrix at the given position with the given length.

void Renderer2DT::DrawBoxDims ( const BoundingBox3fT BB,
int  Pos 
)

Renders the dimensions of the given bounding-box next to the box.

Parameters
BBThe bounding-box whose dimensions are printed.
PosA combination of the flags wxTOP, wxBOTTOM, wxLEFT and wxRIGHT that determines where the dimensions are printed.
const ViewWindow2DT& Renderer2DT::GetViewWin2D ( ) const
inline

Returns the ViewWindow2DT that this renderer renders into.

void Renderer2DT::XHandle ( const wxPoint &  Pos,
int  Radius = 3 
)

Renders an X-shaped handle at the given position with the given radius.

This is typically used for marking the center of map elements.


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