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

#include <gr_polymesh_renderer.h>

Static Public Member Functions

static void wire_render (const Polymesh &)
 Renders this polymesh as a wireframe using OpenGL. More...
 
static void wire_occlude_render (const Polymesh &)
 Renders this polymesh into the depth buffer using OpenGL. More...
 
static void solid_occlude_render (const Polymesh &p)
 
static void solid_render (const Polymesh &)
 Renders this polymesh as a solid using OpenGL. More...
 
static void project (Polymesh &)
 Projects this polymesh onto the image plane using the current OpenGL transformation. More...
 
static unsigned int wire_render_with_sequential_ids (const Polymesh &, unsigned int start_id=1)
 Render each edge of this polymesh 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 Polymesh &, unsigned int start_id=1)
 Render each edge of this polymesh 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 solid_render_with_sequential_ids (const Polymesh &, unsigned int start_id=1)
 Render each polygon of this polymesh with a different color. The first polygon 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 polygon. More...
 
static void solid_render_with_bases (const Polymesh &p, unsigned int base1=0, unsigned int base2=0)
 
static void solid_render_orientations_with_bases (const Polymesh &p, unsigned int base1)
 
static void silhouette_render (const kjb::Base_gl_interface &camera, const Polymesh &p, double iwidth=1.0)
 Renders the silhouette (contour) of this polygonal mesh. This method works only for convex meshes, and gives reasonable results for concave ones. More...
 
static void draw_orientation_map (const kjb::Parapiped &p)
 Draws the orientation map given a parapiped. This function must be moved somewhere else. More...
 
static void draw_left_right_orientation_map (const kjb::Parapiped &p)
 Draws the left-right orientation map given a parapiped. This function assumes that the parapiped is lying on a plane parallel to the x-z plane This function must be moved somewhere else. More...
 
static void draw_CMU_orientation_map (const kjb::Parapiped &p)
 
static void draw_geometric_context_map (const kjb::Parapiped &p)
 

Member Function Documentation

void GL_Polymesh_Renderer::draw_CMU_orientation_map ( const kjb::Parapiped p)
static
void GL_Polymesh_Renderer::draw_geometric_context_map ( const kjb::Parapiped p)
static
void GL_Polymesh_Renderer::draw_left_right_orientation_map ( const kjb::Parapiped p)
static

Draws the left-right orientation map given a parapiped. This function assumes that the parapiped is lying on a plane parallel to the x-z plane This function must be moved somewhere else.

Draws the orientation map given a parapiped. This function should be moved somewhere else. This function assumes that the parapiped is lying on a plane parallel to the x-z plane

void GL_Polymesh_Renderer::draw_orientation_map ( const kjb::Parapiped p)
static

Draws the orientation map given a parapiped. This function must be moved somewhere else.

Draws an orientation map given a parapiped. This function should be moved somewhere else

void GL_Polymesh_Renderer::project ( Polymesh p)
static

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

The polymesh faces 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_Polymesh_Renderer::silhouette_render ( const kjb::Base_gl_interface camera,
const Polymesh mesh,
double  iwidth = 1.0 
)
static

Renders the silhouette (contour) of this polygonal mesh. This method works only for convex meshes, and gives reasonable results for concave ones.

This method renders the silhouette (contour) of this polygonal mesh. This method works only for convex meshes, and gives reasonable results for concave ones. A simple algorithm is used: first, all polygons are rendered in the z buffer, then we render the contour of all polygon that are not visible.

Parameters
meshThe mesh to be rendered
iwidthThe line width used to render the silhouette.
void GL_Polymesh_Renderer::solid_occlude_render ( const Polymesh p)
static

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

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

void GL_Polymesh_Renderer::solid_render ( const Polymesh p)
static

Renders this polymesh as a solid using OpenGL.

Does not set color or material effects.

void GL_Polymesh_Renderer::solid_render_orientations_with_bases ( const Polymesh p,
unsigned int  base1 
)
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. This works if and only if the polymesh has 8 faces or less!!!!

Parameters
pThe polymesh to render
start_idThe color for the first edge of the polymesh
Returns
The last id used
void GL_Polymesh_Renderer::solid_render_with_bases ( const Polymesh p,
unsigned int  base1 = 0,
unsigned int  base2 = 0 
)
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. This works if and only if the polymesh has 8 faces or less!!!!

Parameters
pThe polymesh to render
start_idThe color for the first edge of the polymesh
Returns
The last id used
unsigned int GL_Polymesh_Renderer::solid_render_with_sequential_ids ( const Polymesh p,
unsigned int  start_id = 1 
)
static

Render each polygon of this polymesh with a different color. The first polygon 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 polygon.

void GL_Polymesh_Renderer::wire_occlude_render ( const Polymesh p)
static

Renders this polymesh into the depth buffer using OpenGL.

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

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

void GL_Polymesh_Renderer::wire_render ( const Polymesh p)
static

Renders this polymesh as a wireframe using OpenGL.

Does not set color or material effects.

unsigned int GL_Polymesh_Renderer::wire_render_with_sequential_ids ( const Polymesh p,
unsigned int  start_id = 1 
)
static

Render each edge of this polymesh 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 polymesh to render
start_idThe color for the first edge of the polymesh
Returns
The last id used
unsigned int GL_Polymesh_Renderer::wire_render_with_sequential_ids_16bits ( const Polymesh p,
unsigned int  start_id = 1 
)
static

Render each edge of this polymesh 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. This works if and only if the polymesh has 8 faces or less!!!!

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

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