Free Electron
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
fe::ext::DrawMode Class Reference

Configuration for rendering such as line width and backface culling. More...

#include <DrawMode.h>

Inheritance diagram for fe::ext::DrawMode:
Inheritance graph
[legend]

Public Types

enum  DrawStyle {
  e_defaultStyle,
  e_pointCloud,
  e_wireframe,
  e_outline,
  e_solid,
  e_edgedSolid,
  e_foreshadow,
  e_ghost,
  e_drawStyleCount
}
 Rendering schemes that an an implementation may recognize. More...
 
enum  Coloring {
  e_color,
  e_normal,
  e_tangent,
  e_uv,
  e_partition,
  e_coloringCount
}
 

Public Member Functions

void copy (sp< DrawMode > a_spDrawMode)
 
void setTextureImage (sp< ImageI > spImageI)
 Set raster for texture mapping. More...
 
sp< ImageItextureImage (void) const
 Get raster for texture mapping. More...
 
void setTextureImageID (I32 a_imageId)
 Set raster for texture mapping. More...
 
I32 textureImageID (void) const
 Get raster for texture mapping. More...
 
void setDrawStyle (DrawStyle style)
 Set rendering scheme (see DrawStyle) More...
 
DrawStyle drawStyle (void) const
 Get rendering scheme (see DrawStyle) More...
 
void setColoring (Coloring coloring)
 Set color source (see Coloring) More...
 
Coloring coloring (void) const
 Get color source (see Coloring) More...
 
void setGroup (String a_group)
 Set named group. More...
 
String group (void) const
 Get named group. More...
 
void setLayer (I32 set)
 Set rendering ordering (highest last) More...
 
I32 layer (void) const
 Get rendering ordering (highest last) More...
 
void setPointSize (Real pixels)
 Set diameter of all following drawn points. More...
 
Real pointSize (void) const
 Get diameter of all following drawn points. More...
 
void setLineWidth (Real pixels)
 Set width of all following drawn lines. More...
 
Real lineWidth (void) const
 Get width of all following drawn lines. More...
 
void setRefinement (I32 level)
 Set subvision level of all following drawn polys. More...
 
I32 refinement (void) const
 Get subvision level of all following drawn polys. More...
 
void setAntialias (BWORD antialias)
 Set rasterization anti-aliasing. More...
 
BWORD antialias (void) const
 Get whether anti-aliasing is used. More...
 
void setFrontfaceCulling (BWORD frontfaceCulling)
 Set whether frontfaces are removed. More...
 
BWORD frontfaceCulling (void) const
 Get whether frontfaces are removed. More...
 
void setBackfaceCulling (BWORD backfaceCulling)
 Set whether backfaces are removed. More...
 
BWORD backfaceCulling (void) const
 Get whether backfaces are removed. More...
 
void setTwoSidedLighting (BWORD twoSidedLighting)
 Set whether backfaces have an independent material. More...
 
BWORD twoSidedLighting (void) const
 Get whether backfaces have an independent material. More...
 
void setZBuffering (BWORD zBuffering)
 Set whether z-buffering is used. More...
 
BWORD zBuffering (void) const
 Get whether z-buffering is used. More...
 
void setLit (BWORD lit)
 Set lit. More...
 
BWORD lit (void) const
 Get whether lit. More...
 
void setShadows (BWORD shadows)
 Set shadows. More...
 
BWORD shadows (void) const
 Get whether shadows. More...
 
void setUvSpace (BWORD uvSpace)
 Set whether in UV space. More...
 
BWORD uvSpace (void) const
 Get whether in UV space. More...
 
- Public Member Functions inherited from fe::Counted
virtual void acquire (void)
 Increment the reference count. More...
 
virtual void acquire (int &rCount)
 Increment the reference count (and get the count) More...
 
virtual void release (void)
 Decrement the reference count. More...
 
virtual void abandon (void)
 Decrement the reference count. More...
 
int count (void) const
 Return the count of references. More...
 
void setName (const String &)
 
void trackReference (void *pReference, String what)
 
void untrackReference (void *pReference)
 
void registerRegion (void *pT, U32 bytes)
 

Static Public Member Functions

static DrawStyle stringToStyle (const String &a_styleName)
 
static Coloring stringToColoring (const String &a_coloringName)
 
- Static Public Member Functions inherited from fe::Counted
static String reportTracker (void)
 
static U32 trackerCount (void)
 

Private Attributes

sp< ImageIm_spTextureImage
 
I32 m_textureImageID
 
DrawStyle m_drawStyle
 
Coloring m_coloring
 
String m_group
 
I32 m_layer
 
Real m_pointSize
 
Real m_lineWidth
 
I32 m_refinement
 
BWORD m_antialias
 
BWORD m_frontfaceCulling
 
BWORD m_backfaceCulling
 
BWORD m_twoSidedLighting
 
BWORD m_zBuffering
 
BWORD m_lit
 
BWORD m_shadows
 
BWORD m_uvSpace
 

Additional Inherited Members

- Protected Member Functions inherited from fe::Counted
int releaseInternal (void)
 Decrement the reference count. More...
 
void suppressReport (void)
 

Detailed Description

Configuration for rendering such as line width and backface culling.

An instance of a DrawMode is shared between all draw operations that occur while it is the current DrawMode to a DrawI. Changing a DrawMode at any time can affect all elements that are associated with that DrawMode.

It is intended for these modes to be configured and left alone prior to being used. They are not an indirect interface extension to DrawI.

The DrawMode is an optimization for cached rendering. Without them, either every draw operation would have to cache an entire drawing state or there would be an extraordinary amount of cross checking to match up coincidentally identical states.

Member Enumeration Documentation

◆ DrawStyle

Rendering schemes that an an implementation may recognize.

Not all methods may be available in a particular situation.

Member Function Documentation

◆ antialias()

BWORD fe::ext::DrawMode::antialias ( void  ) const
inline

Get whether anti-aliasing is used.

◆ backfaceCulling()

BWORD fe::ext::DrawMode::backfaceCulling ( void  ) const
inline

Get whether backfaces are removed.

◆ coloring()

Coloring fe::ext::DrawMode::coloring ( void  ) const
inline

Get color source (see Coloring)

◆ drawStyle()

DrawStyle fe::ext::DrawMode::drawStyle ( void  ) const
inline

Get rendering scheme (see DrawStyle)

◆ frontfaceCulling()

BWORD fe::ext::DrawMode::frontfaceCulling ( void  ) const
inline

Get whether frontfaces are removed.

◆ group()

String fe::ext::DrawMode::group ( void  ) const
inline

Get named group.

◆ layer()

I32 fe::ext::DrawMode::layer ( void  ) const
inline

Get rendering ordering (highest last)

◆ lineWidth()

Real fe::ext::DrawMode::lineWidth ( void  ) const
inline

Get width of all following drawn lines.

◆ lit()

BWORD fe::ext::DrawMode::lit ( void  ) const
inline

Get whether lit.

◆ pointSize()

Real fe::ext::DrawMode::pointSize ( void  ) const
inline

Get diameter of all following drawn points.

◆ refinement()

I32 fe::ext::DrawMode::refinement ( void  ) const
inline

Get subvision level of all following drawn polys.

◆ setAntialias()

void fe::ext::DrawMode::setAntialias ( BWORD  antialias)
inline

Set rasterization anti-aliasing.

◆ setBackfaceCulling()

void fe::ext::DrawMode::setBackfaceCulling ( BWORD  backfaceCulling)
inline

Set whether backfaces are removed.

◆ setColoring()

void fe::ext::DrawMode::setColoring ( Coloring  coloring)
inline

Set color source (see Coloring)

◆ setDrawStyle()

void fe::ext::DrawMode::setDrawStyle ( DrawStyle  style)
inline

Set rendering scheme (see DrawStyle)

◆ setFrontfaceCulling()

void fe::ext::DrawMode::setFrontfaceCulling ( BWORD  frontfaceCulling)
inline

Set whether frontfaces are removed.

◆ setGroup()

void fe::ext::DrawMode::setGroup ( String  a_group)
inline

Set named group.

◆ setLayer()

void fe::ext::DrawMode::setLayer ( I32  set)
inline

Set rendering ordering (highest last)

◆ setLineWidth()

void fe::ext::DrawMode::setLineWidth ( Real  pixels)
inline

Set width of all following drawn lines.

◆ setLit()

void fe::ext::DrawMode::setLit ( BWORD  lit)
inline

Set lit.

◆ setPointSize()

void fe::ext::DrawMode::setPointSize ( Real  pixels)
inline

Set diameter of all following drawn points.

◆ setRefinement()

void fe::ext::DrawMode::setRefinement ( I32  level)
inline

Set subvision level of all following drawn polys.

◆ setShadows()

void fe::ext::DrawMode::setShadows ( BWORD  shadows)
inline

Set shadows.

◆ setTextureImage()

void fe::ext::DrawMode::setTextureImage ( sp< ImageI spImageI)
inline

Set raster for texture mapping.

◆ setTextureImageID()

void fe::ext::DrawMode::setTextureImageID ( I32  a_imageId)
inline

Set raster for texture mapping.

An id less than zero indicates to just use the currently selected image id for the ImageI.

◆ setTwoSidedLighting()

void fe::ext::DrawMode::setTwoSidedLighting ( BWORD  twoSidedLighting)
inline

Set whether backfaces have an independent material.

◆ setUvSpace()

void fe::ext::DrawMode::setUvSpace ( BWORD  uvSpace)
inline

Set whether in UV space.

◆ setZBuffering()

void fe::ext::DrawMode::setZBuffering ( BWORD  zBuffering)
inline

Set whether z-buffering is used.

◆ shadows()

BWORD fe::ext::DrawMode::shadows ( void  ) const
inline

Get whether shadows.

◆ textureImage()

sp<ImageI> fe::ext::DrawMode::textureImage ( void  ) const
inline

Get raster for texture mapping.

◆ textureImageID()

I32 fe::ext::DrawMode::textureImageID ( void  ) const
inline

Get raster for texture mapping.

◆ twoSidedLighting()

BWORD fe::ext::DrawMode::twoSidedLighting ( void  ) const
inline

Get whether backfaces have an independent material.

◆ uvSpace()

BWORD fe::ext::DrawMode::uvSpace ( void  ) const
inline

Get whether in UV space.

◆ zBuffering()

BWORD fe::ext::DrawMode::zBuffering ( void  ) const
inline

Get whether z-buffering is used.


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