GFXDrawUtil Class Reference

#include <gfxDrawUtil.h>

List of all members.


Detailed Description

Helper class containing utility functions for useful drawing routines (line, box, rect, billboard, text).


Public Member Functions

 GFXDrawUtil (GFXDevice *)
 ~GFXDrawUtil ()
void drawRect (const Point2F &upperLeft, const Point2F &lowerRight, const ColorI &color)
void drawRect (const RectF &rect, const ColorI &color)
void drawRect (const Point2I &upperLeft, const Point2I &lowerRight, const ColorI &color)
void drawRect (const RectI &rect, const ColorI &color)
void drawRectFill (const Point2F &upperL, const Point2F &lowerR, const ColorI &color)
void drawRectFill (const RectF &rect, const ColorI &color)
void drawRectFill (const Point2I &upperLeft, const Point2I &lowerRight, const ColorI &color)
void drawRectFill (const RectI &rect, const ColorI &color)
void drawLine (const Point3F &startPt, const Point3F &endPt, const ColorI &color)
void drawLine (const Point2F &startPt, const Point2F &endPt, const ColorI &color)
void drawLine (const Point2I &startPt, const Point2I &endPt, const ColorI &color)
void drawLine (F32 x1, F32 y1, F32 x2, F32 y2, const ColorI &color)
void drawLine (F32 x1, F32 y1, F32 z1, F32 x2, F32 y2, F32 z2, const ColorI &color)
U32 drawText (GFont *font, const Point2I &ptDraw, const UTF8 *in_string, const ColorI *colorTable=NULL, const U32 maxColorIndex=9, F32 rot=0.f)
U32 drawTextN (GFont *font, const Point2I &ptDraw, const UTF8 *in_string, U32 n, const ColorI *colorTable=NULL, const U32 maxColorIndex=9, F32 rot=0.f)
U32 drawText (GFont *font, const Point2I &ptDraw, const UTF16 *in_string, const ColorI *colorTable=NULL, const U32 maxColorIndex=9, F32 rot=0.f)
U32 drawTextN (GFont *font, const Point2I &ptDraw, const UTF16 *in_string, U32 n, const ColorI *colorTable=NULL, const U32 maxColorIndex=9, F32 rot=0.f)
U32 drawText (GFont *font, const Point2F &ptDraw, const UTF8 *in_string, const ColorI *colorTable=NULL, const U32 maxColorIndex=9, F32 rot=0.f)
U32 drawTextN (GFont *font, const Point2F &ptDraw, const UTF8 *in_string, U32 n, const ColorI *colorTable=NULL, const U32 maxColorIndex=9, F32 rot=0.f)
U32 drawText (GFont *font, const Point2F &ptDraw, const UTF16 *in_string, const ColorI *colorTable=NULL, const U32 maxColorIndex=9, F32 rot=0.f)
U32 drawTextN (GFont *font, const Point2F &ptDraw, const UTF16 *in_string, U32 n, const ColorI *colorTable=NULL, const U32 maxColorIndex=9, F32 rot=0.f)
void drawWireBox (const Box3F &box, const ColorI &color)
void drawSolidBox (const Box3F &box, const ColorI &color)
void drawWireCube (const Point3F &size, const Point3F &pos, const ColorI &color)
void drawSolidCube (const Point3F &size, const Point3F &pos, const ColorI &color)
void drawWireSphere (F32 radius, const Point3F &pos, const ColorI &color, bool drawTop=true, bool drawBottom=true)
void drawSolidSphere (F32 radius, const Point3F &pos, const ColorI &color, bool drawTop=true, bool drawBottom=true)
void drawWireCylinder (const Point3F &size, const Point3F &pos, const ColorI &color)
void drawSolidCylinder (const Point3F &size, const Point3F &pos, const ColorI &color)
void drawWireCapsule (const Point3F &size, const Point3F &pos, const ColorI &color)
void drawSolidCapsule (const Point3F &size, const Point3F &pos, const ColorI &color)
void drawWireCone (const Point3F &size, const Point3F &pos, const ColorI &color)
void drawSolidCone (const Point3F &size, const Point3F &pos, const ColorI &color)
void draw2DSquare (const Point2F &screenPoint, F32 width, F32 spinAngle)
void drawFrustum (const Frustum &f, const ColorI &color)
void drawSolidPlane (const Point3F &pos, const Point2F &size, const ColorI &color)
 Draws a solid XY plane centered on the point with the specified dimensions.
void drawPlaneGrid (const Point3F &pos, const Point2F &size, const Point2F &step, const ColorI &color)
 Draws a grid on XY plane centered on the point with the specified size and step size.
void setBitmapModulation (const ColorI &modColor)
void setTextAnchorColor (const ColorI &ancColor)
void clearBitmapModulation ()
void getBitmapModulation (ColorI *color)
void drawBitmap (GFXTextureObject *texture, const Point2F &in_rAt, const GFXBitmapFlip in_flip=GFXBitmapFlip_None, const GFXTextureFilterType filter=GFXTextureFilterPoint, bool in_wrap=true)
void drawBitmapSR (GFXTextureObject *texture, const Point2F &in_rAt, const RectF &srcRect, const GFXBitmapFlip in_flip=GFXBitmapFlip_None, const GFXTextureFilterType filter=GFXTextureFilterPoint, bool in_wrap=true)
void drawBitmapStretch (GFXTextureObject *texture, const RectF &dstRect, const GFXBitmapFlip in_flip=GFXBitmapFlip_None, const GFXTextureFilterType filter=GFXTextureFilterPoint, bool in_wrap=true)
void drawBitmapStretchSR (GFXTextureObject *texture, const RectF &dstRect, const RectF &srcRect, const GFXBitmapFlip in_flip=GFXBitmapFlip_None, const GFXTextureFilterType filter=GFXTextureFilterPoint, bool in_wrap=true)
void drawBitmap (GFXTextureObject *texture, const Point2I &in_rAt, const GFXBitmapFlip in_flip=GFXBitmapFlip_None, const GFXTextureFilterType filter=GFXTextureFilterPoint, bool in_wrap=true)
void drawBitmapSR (GFXTextureObject *texture, const Point2I &in_rAt, const RectI &srcRect, const GFXBitmapFlip in_flip=GFXBitmapFlip_None, const GFXTextureFilterType filter=GFXTextureFilterPoint, bool in_wrap=true)
void drawBitmapStretch (GFXTextureObject *texture, const RectI &dstRect, const GFXBitmapFlip in_flip=GFXBitmapFlip_None, const GFXTextureFilterType filter=GFXTextureFilterPoint, bool in_wrap=true)
void drawBitmapStretchSR (GFXTextureObject *texture, const RectI &dstRect, const RectI &srcRect, const GFXBitmapFlip in_flip=GFXBitmapFlip_None, const GFXTextureFilterType filter=GFXTextureFilterPoint, bool in_wrap=true)

Private Member Functions

void setupStateBlocks ()

Private Attributes

GFXDevicemDevice
 The device we're rendering to.
GFXVertexColor mBitmapModulation
 Bitmap modulation color; bitmaps are multiplied by this color when drawn.
GFXVertexColor mTextAnchorColor
 Base text color; what color text is drawn at when no other color is specified.
GFXStateBlockRef mBitmapStretchSB
GFXStateBlockRef mBitmapStretchLinearSB
GFXStateBlockRef mBitmapStretchWrapSB
GFXStateBlockRef mBitmapStretchWrapLinearSB
GFXStateBlockRef mRectFillSB
GFXStateBlockRef mSolidSB
GFXStateBlockRef mTrasparentSB
FontRenderBatchermFontRenderBatcher


Constructor & Destructor Documentation

GFXDrawUtil::GFXDrawUtil ( GFXDevice  ) 

GFXDrawUtil::~GFXDrawUtil (  ) 


Member Function Documentation

void GFXDrawUtil::drawRect ( const Point2F upperLeft,
const Point2F lowerRight,
const ColorI color 
)

void GFXDrawUtil::drawRect ( const RectF rect,
const ColorI color 
)

void GFXDrawUtil::drawRect ( const Point2I upperLeft,
const Point2I lowerRight,
const ColorI color 
)

void GFXDrawUtil::drawRect ( const RectI rect,
const ColorI color 
)

void GFXDrawUtil::drawRectFill ( const Point2F upperL,
const Point2F lowerR,
const ColorI color 
)

void GFXDrawUtil::drawRectFill ( const RectF rect,
const ColorI color 
)

void GFXDrawUtil::drawRectFill ( const Point2I upperLeft,
const Point2I lowerRight,
const ColorI color 
)

void GFXDrawUtil::drawRectFill ( const RectI rect,
const ColorI color 
)

void GFXDrawUtil::drawLine ( const Point3F startPt,
const Point3F endPt,
const ColorI color 
)

void GFXDrawUtil::drawLine ( const Point2F startPt,
const Point2F endPt,
const ColorI color 
)

void GFXDrawUtil::drawLine ( const Point2I startPt,
const Point2I endPt,
const ColorI color 
)

void GFXDrawUtil::drawLine ( F32  x1,
F32  y1,
F32  x2,
F32  y2,
const ColorI color 
)

void GFXDrawUtil::drawLine ( F32  x1,
F32  y1,
F32  z1,
F32  x2,
F32  y2,
F32  z2,
const ColorI color 
)

U32 GFXDrawUtil::drawText ( GFont font,
const Point2I ptDraw,
const UTF8 in_string,
const ColorI colorTable = NULL,
const U32  maxColorIndex = 9,
F32  rot = 0.f 
)

U32 GFXDrawUtil::drawTextN ( GFont font,
const Point2I ptDraw,
const UTF8 in_string,
U32  n,
const ColorI colorTable = NULL,
const U32  maxColorIndex = 9,
F32  rot = 0.f 
)

U32 GFXDrawUtil::drawText ( GFont font,
const Point2I ptDraw,
const UTF16 in_string,
const ColorI colorTable = NULL,
const U32  maxColorIndex = 9,
F32  rot = 0.f 
)

U32 GFXDrawUtil::drawTextN ( GFont font,
const Point2I ptDraw,
const UTF16 in_string,
U32  n,
const ColorI colorTable = NULL,
const U32  maxColorIndex = 9,
F32  rot = 0.f 
)

U32 GFXDrawUtil::drawText ( GFont font,
const Point2F ptDraw,
const UTF8 in_string,
const ColorI colorTable = NULL,
const U32  maxColorIndex = 9,
F32  rot = 0.f 
)

U32 GFXDrawUtil::drawTextN ( GFont font,
const Point2F ptDraw,
const UTF8 in_string,
U32  n,
const ColorI colorTable = NULL,
const U32  maxColorIndex = 9,
F32  rot = 0.f 
)

U32 GFXDrawUtil::drawText ( GFont font,
const Point2F ptDraw,
const UTF16 in_string,
const ColorI colorTable = NULL,
const U32  maxColorIndex = 9,
F32  rot = 0.f 
)

U32 GFXDrawUtil::drawTextN ( GFont font,
const Point2F ptDraw,
const UTF16 in_string,
U32  n,
const ColorI colorTable = NULL,
const U32  maxColorIndex = 9,
F32  rot = 0.f 
)

void GFXDrawUtil::drawWireBox ( const Box3F box,
const ColorI color 
)

void GFXDrawUtil::drawSolidBox ( const Box3F box,
const ColorI color 
)

void GFXDrawUtil::drawWireCube ( const Point3F size,
const Point3F pos,
const ColorI color 
)

void GFXDrawUtil::drawSolidCube ( const Point3F size,
const Point3F pos,
const ColorI color 
)

void GFXDrawUtil::drawWireSphere ( F32  radius,
const Point3F pos,
const ColorI color,
bool  drawTop = true,
bool  drawBottom = true 
)

void GFXDrawUtil::drawSolidSphere ( F32  radius,
const Point3F pos,
const ColorI color,
bool  drawTop = true,
bool  drawBottom = true 
)

void GFXDrawUtil::drawWireCylinder ( const Point3F size,
const Point3F pos,
const ColorI color 
)

void GFXDrawUtil::drawSolidCylinder ( const Point3F size,
const Point3F pos,
const ColorI color 
)

void GFXDrawUtil::drawWireCapsule ( const Point3F size,
const Point3F pos,
const ColorI color 
)

void GFXDrawUtil::drawSolidCapsule ( const Point3F size,
const Point3F pos,
const ColorI color 
)

void GFXDrawUtil::drawWireCone ( const Point3F size,
const Point3F pos,
const ColorI color 
)

void GFXDrawUtil::drawSolidCone ( const Point3F size,
const Point3F pos,
const ColorI color 
)

void GFXDrawUtil::draw2DSquare ( const Point2F screenPoint,
F32  width,
F32  spinAngle 
)

void GFXDrawUtil::drawFrustum ( const Frustum f,
const ColorI color 
)

void GFXDrawUtil::drawSolidPlane ( const Point3F pos,
const Point2F size,
const ColorI color 
)

Draws a solid XY plane centered on the point with the specified dimensions.

void GFXDrawUtil::drawPlaneGrid ( const Point3F pos,
const Point2F size,
const Point2F step,
const ColorI color 
)

Draws a grid on XY plane centered on the point with the specified size and step size.

void GFXDrawUtil::setBitmapModulation ( const ColorI modColor  ) 

void GFXDrawUtil::setTextAnchorColor ( const ColorI ancColor  ) 

void GFXDrawUtil::clearBitmapModulation (  ) 

void GFXDrawUtil::getBitmapModulation ( ColorI color  ) 

void GFXDrawUtil::drawBitmap ( GFXTextureObject texture,
const Point2F in_rAt,
const GFXBitmapFlip  in_flip = GFXBitmapFlip_None,
const GFXTextureFilterType  filter = GFXTextureFilterPoint,
bool  in_wrap = true 
)

void GFXDrawUtil::drawBitmapSR ( GFXTextureObject texture,
const Point2F in_rAt,
const RectF srcRect,
const GFXBitmapFlip  in_flip = GFXBitmapFlip_None,
const GFXTextureFilterType  filter = GFXTextureFilterPoint,
bool  in_wrap = true 
)

void GFXDrawUtil::drawBitmapStretch ( GFXTextureObject texture,
const RectF dstRect,
const GFXBitmapFlip  in_flip = GFXBitmapFlip_None,
const GFXTextureFilterType  filter = GFXTextureFilterPoint,
bool  in_wrap = true 
)

void GFXDrawUtil::drawBitmapStretchSR ( GFXTextureObject texture,
const RectF dstRect,
const RectF srcRect,
const GFXBitmapFlip  in_flip = GFXBitmapFlip_None,
const GFXTextureFilterType  filter = GFXTextureFilterPoint,
bool  in_wrap = true 
)

void GFXDrawUtil::drawBitmap ( GFXTextureObject texture,
const Point2I in_rAt,
const GFXBitmapFlip  in_flip = GFXBitmapFlip_None,
const GFXTextureFilterType  filter = GFXTextureFilterPoint,
bool  in_wrap = true 
)

void GFXDrawUtil::drawBitmapSR ( GFXTextureObject texture,
const Point2I in_rAt,
const RectI srcRect,
const GFXBitmapFlip  in_flip = GFXBitmapFlip_None,
const GFXTextureFilterType  filter = GFXTextureFilterPoint,
bool  in_wrap = true 
)

void GFXDrawUtil::drawBitmapStretch ( GFXTextureObject texture,
const RectI dstRect,
const GFXBitmapFlip  in_flip = GFXBitmapFlip_None,
const GFXTextureFilterType  filter = GFXTextureFilterPoint,
bool  in_wrap = true 
)

void GFXDrawUtil::drawBitmapStretchSR ( GFXTextureObject texture,
const RectI dstRect,
const RectI srcRect,
const GFXBitmapFlip  in_flip = GFXBitmapFlip_None,
const GFXTextureFilterType  filter = GFXTextureFilterPoint,
bool  in_wrap = true 
)

void GFXDrawUtil::setupStateBlocks (  )  [private]


Member Data Documentation

The device we're rendering to.

Bitmap modulation color; bitmaps are multiplied by this color when drawn.

Base text color; what color text is drawn at when no other color is specified.