VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Attributes

a class to quickly render a bunch of basic primitives as debugging aids

Public Member Functions

 DtFxGizmoRenderer (DtDe &de)
 
 ~DtFxGizmoRenderer ()
 
void releaseGLObjects (osg::State *state)
 
void setCameraPos (const bdiFarPosition &pos)
 
const bdiFarPosition & getCameraPos ()
 
void drawAxis (osg::RenderInfo &renderInfo, const osg::Vec3 &pos)
 
void drawStreamedData (osg::RenderInfo &renderInfo, const bdiMat4f &model_matrix, int primitive_type, const bdiVec3fArray &verts, const bdiVec4fArray *colors, const bdiVec3fArray *normals, const std::vector< unsigned short > *index_buffer, const bdiVec4f &default_color=bdiVec4f(1, 1, 1, 1))
 
void drawBox (osg::RenderInfo &renderInfo, bool highlight, const bdiFarPosition &p1, const bdiFarPosition &p2, const bdiVec4f &color)
 
void drawBoxFromPoints (osg::RenderInfo &renderInfo, const bdiMat4f &model_matrix, bool highlight, const bdiVec3f &pMin, const bdiVec3f &pMax, const bdiVec4f &color)
 
bdiVec3fArray & scratchVerts (bool depth_test_mode)
 
bdiVec4fArray & scratchColors (bool depth_test_mode)
 
bdiVec3fArray & scratchPointsVerts (bool depth_test_mode)
 
bdiVec4fArray & scratchPointsColors (bool depth_test_mode)
 

Static Public Member Functions

static void renderSphereIntoVbo (const bdiVec3f &localCenter, const bdiVec3f &radii, const bdiMat4f &geocentricMatrix, const bdiVec4f &force_color, bdiVec3fArray &verts, bdiVec4fArray &colors)
 
static void renderCircleIntoVbo (const bdiVec3f &localCenter, const float radii, const bdiMat4f &geocentricMatrix, const bdiVec4f &force_color, bdiVec3fArray &verts, bdiVec4fArray &colors)
 
static void renderHemisphereIntoVbo (const bdiVec3f &center, const bdiVec3f &radii, const bdiMat4f &geocentricMatrix, const bdiVec4f &force_color, bdiVec3fArray &verts, bdiVec4fArray &colors)
 
static void renderEllipseIntoVbo (const bdiVec3f &localCenter, const bdiVec2f &radii, const bdiMat4f &geocentricMatrix, const bdiVec4f &force_color, bdiVec3fArray &verts, bdiVec4fArray &colors)
 
static void renderBoxIntoVbo (const bdiVec3f &localCenter, const bdiVec3f &localMin, const bdiVec3f &localMax, const bdiMat4f &geocentricMatrix, const bdiVec4f &force_color, bdiVec3fArray &verts, bdiVec4fArray &colors)
 

Protected Attributes

DtDemyDe
 
DtFxStreamedVboData m_dynamic_vbo
 
DtFxStreamedVboData m_axis_vbo
 
bdiVec3fArray m_line_strip_verts [2]
 
bdiVec4fArray m_line_strip_colors [2]
 
std::vector< unsigned short > m_line_strip_indexes [2]
 
GLuint m_vertex_array_object
 
bdiFarPosition m_camera_pos
 
bdiVec3fArray m_scratch_verts [2]
 
bdiVec4fArray m_scratch_colors [2]
 
bdiVec3fArray m_scratch_points_verts [2]
 
bdiVec4fArray m_scratch_points_colors [2]
 
int m_depth_test_mode
 
osg::ref_ptr< osg::StateSet > m_debug_state_set
 
osg::ref_ptr< osg::Shader > m_vertex_shader
 
osg::ref_ptr< osg::Shader > m_fragment_shader
 
osg::ref_ptr< osg::Program > m_default_program
 

Constructor & Destructor Documentation

makVrv::DtFxGizmoRenderer::DtFxGizmoRenderer ( DtDe de)

CTOR.

makVrv::DtFxGizmoRenderer::~DtFxGizmoRenderer ( )

DTOR.

Member Function Documentation

void makVrv::DtFxGizmoRenderer::releaseGLObjects ( osg::State *  state)

releases the opengl data

void makVrv::DtFxGizmoRenderer::setCameraPos ( const bdiFarPosition &  pos)

used to modify the input verts.

const bdiFarPosition& makVrv::DtFxGizmoRenderer::getCameraPos ( )

returns current render camera pos used to modify the input verts.

void makVrv::DtFxGizmoRenderer::drawAxis ( osg::RenderInfo &  renderInfo,
const osg::Vec3 &  pos 
)

draws axis at pos

void makVrv::DtFxGizmoRenderer::drawStreamedData ( osg::RenderInfo &  renderInfo,
const bdiMat4f &  model_matrix,
int  primitive_type,
const bdiVec3fArray &  verts,
const bdiVec4fArray *  colors,
const bdiVec3fArray *  normals,
const std::vector< unsigned short > *  index_buffer,
const bdiVec4f &  default_color = bdiVec4f(1, 1, 1, 1) 
)

draws vert/color data, vert are required, colors, normals and index buffer is optional.

void makVrv::DtFxGizmoRenderer::drawBox ( osg::RenderInfo &  renderInfo,
bool  highlight,
const bdiFarPosition &  p1,
const bdiFarPosition &  p2,
const bdiVec4f &  color 
)

draws a box

void makVrv::DtFxGizmoRenderer::drawBoxFromPoints ( osg::RenderInfo &  renderInfo,
const bdiMat4f &  model_matrix,
bool  highlight,
const bdiVec3f &  pMin,
const bdiVec3f &  pMax,
const bdiVec4f &  color 
)

draw a transformed box

static void makVrv::DtFxGizmoRenderer::renderSphereIntoVbo ( const bdiVec3f &  localCenter,
const bdiVec3f &  radii,
const bdiMat4f &  geocentricMatrix,
const bdiVec4f &  force_color,
bdiVec3fArray &  verts,
bdiVec4fArray &  colors 
)
static

fills our verts and colors with a sphere/ellipsoid

static void makVrv::DtFxGizmoRenderer::renderCircleIntoVbo ( const bdiVec3f &  localCenter,
const float  radii,
const bdiMat4f &  geocentricMatrix,
const bdiVec4f &  force_color,
bdiVec3fArray &  verts,
bdiVec4fArray &  colors 
)
static

fills our verts and colors with a 2D circle

static void makVrv::DtFxGizmoRenderer::renderHemisphereIntoVbo ( const bdiVec3f &  center,
const bdiVec3f &  radii,
const bdiMat4f &  geocentricMatrix,
const bdiVec4f &  force_color,
bdiVec3fArray &  verts,
bdiVec4fArray &  colors 
)
static

fills our verts and colors with a hemisphere

static void makVrv::DtFxGizmoRenderer::renderEllipseIntoVbo ( const bdiVec3f &  localCenter,
const bdiVec2f &  radii,
const bdiMat4f &  geocentricMatrix,
const bdiVec4f &  force_color,
bdiVec3fArray &  verts,
bdiVec4fArray &  colors 
)
static

fills our verts and colors with a 2D elipse

static void makVrv::DtFxGizmoRenderer::renderBoxIntoVbo ( const bdiVec3f &  localCenter,
const bdiVec3f &  localMin,
const bdiVec3f &  localMax,
const bdiMat4f &  geocentricMatrix,
const bdiVec4f &  force_color,
bdiVec3fArray &  verts,
bdiVec4fArray &  colors 
)
static

fills our verts and colors with a box around the center

bdiVec3fArray& makVrv::DtFxGizmoRenderer::scratchVerts ( bool  depth_test_mode)

access to scratch data to avoid stack allocs

bdiVec4fArray& makVrv::DtFxGizmoRenderer::scratchColors ( bool  depth_test_mode)

access to scratch data to avoid stack allocs

bdiVec3fArray& makVrv::DtFxGizmoRenderer::scratchPointsVerts ( bool  depth_test_mode)

access to scratch data to avoid stack allocs

bdiVec4fArray& makVrv::DtFxGizmoRenderer::scratchPointsColors ( bool  depth_test_mode)

access to scratch data to avoid stack allocs

Member Data Documentation

DtDe& makVrv::DtFxGizmoRenderer::myDe
protected
DtFxStreamedVboData makVrv::DtFxGizmoRenderer::m_dynamic_vbo
protected
DtFxStreamedVboData makVrv::DtFxGizmoRenderer::m_axis_vbo
protected
bdiVec3fArray makVrv::DtFxGizmoRenderer::m_line_strip_verts[2]
protected
bdiVec4fArray makVrv::DtFxGizmoRenderer::m_line_strip_colors[2]
protected
std::vector<unsigned short> makVrv::DtFxGizmoRenderer::m_line_strip_indexes[2]
protected
GLuint makVrv::DtFxGizmoRenderer::m_vertex_array_object
protected
bdiFarPosition makVrv::DtFxGizmoRenderer::m_camera_pos
protected
bdiVec3fArray makVrv::DtFxGizmoRenderer::m_scratch_verts[2]
protected
bdiVec4fArray makVrv::DtFxGizmoRenderer::m_scratch_colors[2]
protected
bdiVec3fArray makVrv::DtFxGizmoRenderer::m_scratch_points_verts[2]
protected
bdiVec4fArray makVrv::DtFxGizmoRenderer::m_scratch_points_colors[2]
protected
int makVrv::DtFxGizmoRenderer::m_depth_test_mode
protected
osg::ref_ptr<osg::StateSet> makVrv::DtFxGizmoRenderer::m_debug_state_set
protected
osg::ref_ptr<osg::Shader> makVrv::DtFxGizmoRenderer::m_vertex_shader
protected
osg::ref_ptr<osg::Shader> makVrv::DtFxGizmoRenderer::m_fragment_shader
protected
osg::ref_ptr<osg::Program> makVrv::DtFxGizmoRenderer::m_default_program
protected

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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)