![]() |
VR-Forces 5.0.2 Developer's Guide
|
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 ¢er, 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 | |
| DtDe & | myDe |
| 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 |
| makVrv::DtFxGizmoRenderer::DtFxGizmoRenderer | ( | DtDe & | de | ) |
CTOR.
| makVrv::DtFxGizmoRenderer::~DtFxGizmoRenderer | ( | ) |
DTOR.
| 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 |
fills our verts and colors with a sphere/ellipsoid
|
static |
fills our verts and colors with a 2D circle
|
static |
fills our verts and colors with a hemisphere
|
static |
fills our verts and colors with a 2D elipse
|
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
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |