KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Member Functions | List of all members
kjb::GL_Polygon_Renderer Class Reference

#include <gr_polygon_renderer.h>

Static Public Member Functions

static void wire_render (const Polygon &)
 Renders this polygon as a wireframe using OpenGL. More...
 
static void wire_occlude_render (const Polygon &)
 Renders this polygon into the depth buffer using OpenGL, excluding the contour. More...
 
static void solid_occlude_render (const Polygon &)
 Renders this polygon in the Z buffer. More...
 
static unsigned int wire_render_with_sequential_ids (const Polygon &, unsigned int start_id=1)
 Render each edge of this polygon with a different color. The first edge will be rendered using the input id as a color, the following edges will be rendered with an id sequentially increasing. Returns the id (color) used to render the last edge of the polygon. More...
 
static unsigned int wire_render_with_sequential_ids_16bits (const Polygon &p, unsigned int start_id=1)
 
static void solid_render (const Polygon &)
 Renders this polygon as a solid using OpenGL. More...
 
static void solid_render_with_bases (const Polygon &p, unsigned int base1=0, unsigned int base2=0)
 Renders this polygon as a solid using OpenGL. More...
 
static void project (Polygon &p)
 Projects this polygon onto the image plane using the current OpenGL transformation. More...
 
static void project (Polygon &p, const Matrix &M, double width, double height)
 

Member Function Documentation

void GL_Polygon_Renderer::project ( Polygon p)
static

Projects this polygon onto the image plane using the current OpenGL transformation.

Parameters
pThe polygon to project The polygon points are transformed and projected onto the view plane by the current modelview and projection matrix on the GL stack.

The origin of the view plane coordinate system is in the lower left corner and its extents are defined by the current GL viewport size.

void GL_Polygon_Renderer::project ( Polygon p,
const Matrix M,
double  width,
double  height 
)
static
Parameters
pThe polygon to project The polygon points are transformed and projected onto the view plane by the current modelview and projection matrix on the GL stack.

The origin of the view plane coordinate system is in the lower left corner and its extents are defined by the current GL viewport size.

void GL_Polygon_Renderer::solid_occlude_render ( const Polygon p)
static

Renders this polygon in the Z buffer.

Does not render into the color buffer, only in the depth buffer.

Parameters
pThe polygon to render
void GL_Polygon_Renderer::solid_render ( const Polygon p)
static

Renders this polygon as a solid using OpenGL.

Parameters
pThe polygon to render Does not set color or material effects.
void GL_Polygon_Renderer::solid_render_with_bases ( const Polygon p,
unsigned int  base1 = 0,
unsigned int  base2 = 0 
)
static

Renders this polygon as a solid using OpenGL.

void GL_Polygon_Renderer::wire_occlude_render ( const Polygon p)
static

Renders this polygon into the depth buffer using OpenGL, excluding the contour.

Parameters
pThe polygon to render Does not render into the color buffer, only the depth buffer.

After calling this method, call wire_render() to render the polygon with hidden lines occluded.

void GL_Polygon_Renderer::wire_render ( const Polygon p)
static

Renders this polygon as a wireframe using OpenGL.

Does not set color or material effects.

Parameters
pThe polygon to render
unsigned int GL_Polygon_Renderer::wire_render_with_sequential_ids ( const Polygon p,
unsigned int  start_id = 1 
)
static

Render each edge of this polygon with a different color. The first edge will be rendered using the input id as a color, the following edges will be rendered with an id sequentially increasing. Returns the id (color) used to render the last edge of the polygon.

Render each edge of this polygon with a different color. The first edge will be rendered using the input id as a color, the following edges will be rendered with an id sequentially increasing

Parameters
pThe polygon to render
start_idThe color for the first edge of the polygon
Returns
The last id used
unsigned int GL_Polygon_Renderer::wire_render_with_sequential_ids_16bits ( const Polygon p,
unsigned int  start_id = 1 
)
static

Render each edge of this polygon with a different color. The first edge will be rendered using the input id as a color, the following edges will be rendered with an id sequentially increasing

Parameters
pThe polygon to render
start_idThe color for the first edge of the polygon
Returns
The last id used

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