15 #include <osg/MatrixTransform>
16 #include <osg/Drawable>
28 class DtOsgGizmoRenderer;
38 virtual void drawDebugLines(osg::RenderInfo& renderInfo,
const osg::Vec3d& eyePoint,
DtOsgGizmoRenderer* renderer) = 0;
60 virtual osg::Object* clone(
const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY)
const;
66 virtual bool computeWorldToLocalMatrix(osg::Matrix& matrix, osg::NodeVisitor* nv)
const;
69 virtual bool computeLocalToWorldMatrix(osg::Matrix& matrix, osg::NodeVisitor* nv)
const;
87 void releaseGLObjects(osg::State* state)
const;
92 void setName(
const char* name);
94 void update(
const std::vector<osg::Vec3f>& verts,
95 const std::vector<osg::Vec4f>* colors,
const std::vector<osg::Vec3f>* normals,
const std::vector<osg::Vec2f>* uvs,
96 const osg::UShortArray* index_buffer);
98 void updateBuffer(
GLuint&
id,
const char* suffix,
int size,
void* data);
101 void draw(
const osg::Matrixf& model_matrix,
const osg::Vec4& default_color = osg::Vec4(1, 1, 1, 1));
134 void releaseGLObjects(osg::State* state);
137 virtual void drawImplementation(osg::RenderInfo& renderInfo)
const;
143 void addWsLine(
const osg::Vec3d& p1,
const osg::Vec3d& p2,
const osg::Vec4f& color1,
const osg::Vec4f& color2);
149 virtual void renderWsBoxIntoVbo(
const osg::Vec3d& p1,
const osg::Vec3d& p2,
150 const osg::Vec4f& color);
153 virtual void renderBoxFromPointsIntoVbo(
const osg::Matrixf& model_matrix,
154 const osg::Vec3f& pMin,
const osg::Vec3f& pMax,
const osg::Vec4f& color);
157 virtual void renderSphereIntoVbo(
const osg::Vec3f& localCenter,
const osg::Vec3f& radii,
const osg::Matrixf& xform,
158 const osg::Vec4f& force_color);
161 virtual void renderCircleIntoVbo(
const osg::Vec3f& localCenter,
const float radii,
const osg::Matrixf& xform,
162 const osg::Vec4f& force_color);
165 virtual void renderHemisphereIntoVbo(
const osg::Vec3f& localCenter,
const osg::Vec3f& radii,
const osg::Matrixf& xform,
166 const osg::Vec4f& force_color);
169 virtual void renderEllipseIntoVbo(
const osg::Vec3f& localCenter,
const osg::Vec2f& radii,
const osg::Matrixf& xform,
170 const osg::Vec4f& force_color);
173 virtual void renderBoxIntoVbo(
const osg::Vec3f& localCenter,
const osg::Vec3f& localMin,
const osg::Vec3f& localMax,
const osg::Matrixf& xform,
174 const osg::Vec4f& force_color);
177 void drawStreamedData(osg::RenderInfo& renderInfo,
int primitive_type,
178 const std::vector<osg::Vec3f>& verts,
const std::vector<osg::Vec4f>* colors,
const std::vector<osg::Vec3f>* normals,
179 const std::vector<unsigned short>* index_buffer,
180 const osg::Vec4f& default_color = osg::Vec4f(1, 1, 1, 1));
184 void setCameraPos(
const osg::Vec3& pos);
187 virtual void drawImplementationNonConst(osg::RenderInfo& renderInfo);
224 static const std::string& theClassName();
a helper struct to send basic primitives to video card
Definition: DtOsgGizmoRenderer.h:79
std::vector< osg::Vec3f > m_scratch_verts
Definition: DtOsgGizmoRenderer.h:202
DtDebugDrawCallbackInterface(DtDe &de)
CTOR.
Definition: DtOsgGizmoRenderer.h:35
Virtual base class.
Definition: DtVirtualBaseClass.h:22
unsigned int m_normals_object
Definition: DtOsgGizmoRenderer.h:108
std::vector< osg::Vec4f > m_scratch_colors
Definition: DtOsgGizmoRenderer.h:203
unsigned int m_model_matrix_buffer
Definition: DtOsgGizmoRenderer.h:110
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
unsigned int m_verts_object
Definition: DtOsgGizmoRenderer.h:106
int m_index_count
Definition: DtOsgGizmoRenderer.h:113
DtStreamedVboData m_dynamic_vbo
Definition: DtOsgGizmoRenderer.h:191
voidpf void uLong size
Definition: ioapi.h:39
std::vector< unsigned short > m_line_strip_indexes
Definition: DtOsgGizmoRenderer.h:197
DtStreamedVboData m_axis_vbo
Definition: DtOsgGizmoRenderer.h:192
unsigned int GLuint
Definition: DtGlTextureBufferObject.h:17
A simple interface for allowing the various systems to draw lines at the right time.
Definition: DtOsgGizmoRenderer.h:31
int m_intialized
Definition: DtOsgGizmoRenderer.h:114
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.
Definition: DtOsgGizmoRenderer.h:125
int m_primitive_size
Definition: DtOsgGizmoRenderer.h:112
DtDe & myDe
Definition: DtOsgGizmoRenderer.h:190
int m_primitive_type
Definition: DtOsgGizmoRenderer.h:115
DtDe & myDe
Definition: DtOsgGizmoRenderer.h:44
Contains makVrv::DtVirtualBaseClass class.
virtual void systemShutDown()
Gizmo Renderer manager is getting shut down.
Definition: DtOsgGizmoRenderer.h:41
std::vector< osg::Vec3f > m_line_strip_verts
Definition: DtOsgGizmoRenderer.h:195
DtGizmoRendererManager.
Definition: DtOsgGizmoRenderer.h:210
osg::Vec3d m_camera_pos
Definition: DtOsgGizmoRenderer.h:201
std::string m_name
Definition: DtOsgGizmoRenderer.h:104
unsigned int m_color_array_buffer
Definition: DtOsgGizmoRenderer.h:111
std::vector< osg::Vec4f > m_line_strip_colors
Definition: DtOsgGizmoRenderer.h:196
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
unsigned int m_colors_object
Definition: DtOsgGizmoRenderer.h:107
unsigned int m_index_buffer
Definition: DtOsgGizmoRenderer.h:109
DtDe & myDe
Definition: DtOsgGizmoRenderer.h:230
std::vector< DtDebugDrawCallbackInterface * > myExtraDebugDrawObjects
Definition: DtOsgGizmoRenderer.h:204
GLuint m_vertex_array_object
Definition: DtOsgGizmoRenderer.h:199
DtOsgGizmoRenderer * myRenderer
Definition: DtOsgGizmoRenderer.h:231