![]() |
VR-Forces 4.8 Class Documentation
|
a class to quickly render a bunch of basic primitives as debugging aids basic overview, create an adapter that inherits from DtDebugDrawCallbackInterface then call DtOsgGizmoRenderer::addDebugDrawerCallback() to register it with the system. More...

Public Member Functions | |
| DtOsgGizmoRenderer (DtDe &de) | |
| CTOR. More... | |
| ~DtOsgGizmoRenderer () | |
| DTOR. More... | |
| void | releaseGLObjects (osg::State *state) |
| releases the opengl data More... | |
| virtual void | drawImplementation (osg::RenderInfo &renderInfo) const |
| osg draw function More... | |
| virtual void | addDebugDrawerCallback (DtDebugDrawCallbackInterface *drawer) |
| adds a callback to have the gizmo call the module to draw things when it's ready. More... | |
| void | addWsLine (const osg::Vec3d &p1, const osg::Vec3d &p2, const osg::Vec4f &color1, const osg::Vec4f &color2) |
| adds a line segment More... | |
| virtual void | renderWsBoxIntoVbo (const osg::Vec3d &p1, const osg::Vec3d &p2, const osg::Vec4f &color) |
| draws axis at pos More... | |
| virtual void | renderBoxFromPointsIntoVbo (const osg::Matrixf &model_matrix, const osg::Vec3f &pMin, const osg::Vec3f &pMax, const osg::Vec4f &color) |
| draw a transformed box More... | |
| virtual void | renderSphereIntoVbo (const osg::Vec3f &localCenter, const osg::Vec3f &radii, const osg::Matrixf &xform, const osg::Vec4f &force_color) |
| adds a sphere/ellipsoid More... | |
| virtual void | renderCircleIntoVbo (const osg::Vec3f &localCenter, const float radii, const osg::Matrixf &xform, const osg::Vec4f &force_color) |
| adds a 2D circle More... | |
| virtual void | renderHemisphereIntoVbo (const osg::Vec3f &localCenter, const osg::Vec3f &radii, const osg::Matrixf &xform, const osg::Vec4f &force_color) |
| adds a hemisphere More... | |
| virtual void | renderEllipseIntoVbo (const osg::Vec3f &localCenter, const osg::Vec2f &radii, const osg::Matrixf &xform, const osg::Vec4f &force_color) |
| adds a 2D ellipse More... | |
| virtual void | renderBoxIntoVbo (const osg::Vec3f &localCenter, const osg::Vec3f &localMin, const osg::Vec3f &localMax, const osg::Matrixf &xform, const osg::Vec4f &force_color) |
| adds a box around the center More... | |
| void | drawStreamedData (osg::RenderInfo &renderInfo, int primitive_type, const std::vector< osg::Vec3f > &verts, const std::vector< osg::Vec4f > *colors, const std::vector< osg::Vec3f > *normals, const std::vector< unsigned short > *index_buffer, const osg::Vec4f &default_color=osg::Vec4f(1, 1, 1, 1)) |
| draws vert/color data, vert are required, colors, normals and index buffer is optional. More... | |
Protected Member Functions | |
| void | setCameraPos (const osg::Vec3 &pos) |
| used to modify the input verts for worldspace functions More... | |
| virtual void | drawImplementationNonConst (osg::RenderInfo &renderInfo) |
| everything is mutable More... | |
Protected Attributes | |
| DtDe & | myDe |
| DtStreamedVboData | m_dynamic_vbo |
| DtStreamedVboData | m_axis_vbo |
| std::vector< osg::Vec3f > | m_line_strip_verts |
| std::vector< osg::Vec4f > | m_line_strip_colors |
| std::vector< unsigned short > | m_line_strip_indexes |
| GLuint | m_vertex_array_object |
| osg::Vec3d | m_camera_pos |
| std::vector< osg::Vec3f > | m_scratch_verts |
| std::vector< osg::Vec4f > | m_scratch_colors |
| std::vector < DtDebugDrawCallbackInterface * > | myExtraDebugDrawObjects |
a class to quickly render a bunch of basic primitives as debugging aids basic overview, create an adapter that inherits from DtDebugDrawCallbackInterface then call DtOsgGizmoRenderer::addDebugDrawerCallback() to register it with the system.
Your code will then get called while the system is drawing, user should then add various primitives that will get rendered in one big batch after all the callbacks. See DtOsgLightDebugAdapter::drawDebugLines() for an example.
| makVrv::DtOsgGizmoRenderer::DtOsgGizmoRenderer | ( | DtDe & | de | ) |
CTOR.
| makVrv::DtOsgGizmoRenderer::~DtOsgGizmoRenderer | ( | ) |
DTOR.
| void makVrv::DtOsgGizmoRenderer::releaseGLObjects | ( | osg::State * | state | ) |
releases the opengl data
|
virtual |
osg draw function
|
virtual |
adds a callback to have the gizmo call the module to draw things when it's ready.
| void makVrv::DtOsgGizmoRenderer::addWsLine | ( | const osg::Vec3d & | p1, |
| const osg::Vec3d & | p2, | ||
| const osg::Vec4f & | color1, | ||
| const osg::Vec4f & | color2 | ||
| ) |
adds a line segment
|
virtual |
draws axis at pos
draws a box
|
virtual |
draw a transformed box
|
virtual |
adds a sphere/ellipsoid
|
virtual |
adds a 2D circle
|
virtual |
adds a hemisphere
|
virtual |
adds a 2D ellipse
|
virtual |
adds a box around the center
| void makVrv::DtOsgGizmoRenderer::drawStreamedData | ( | osg::RenderInfo & | renderInfo, |
| int | primitive_type, | ||
| const std::vector< osg::Vec3f > & | verts, | ||
| const std::vector< osg::Vec4f > * | colors, | ||
| const std::vector< osg::Vec3f > * | normals, | ||
| const std::vector< unsigned short > * | index_buffer, | ||
| const osg::Vec4f & | default_color = osg::Vec4f(1, 1, 1, 1) |
||
| ) |
draws vert/color data, vert are required, colors, normals and index buffer is optional.
|
protected |
used to modify the input verts for worldspace functions
|
protectedvirtual |
everything is mutable
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |