![]() |
VR-Forces Developer's Guide
|
OSG Drawable that renders position-only debug spheres for all active ballistic projectiles when DebugTrajectoryVis is enabled.
Registered as a child of the plain model-set root before the ShowTracers visualizer root is created. On each cull pass, accept() calls debugDrawPositions() and writes green spheres keyed by bullet index into DtDebugShapes. When a camera also has ShowTracers enabled, the DtChannelSpecificGroup for that visualizer root is traversed afterwards (it is a later sibling) and DtBallisticGeometry::debugDrawCullResults() overwrites the same name keys with cull-state-colored spheres. No per-view exclusion logic is required because child ordering guarantees that the overwrite always happens last.

Public Member Functions | |
| DtBallisticDebugGeometry (DtDe &de, DtBallisticComputeComponent &computeComponent) | |
| virtual | ~DtBallisticDebugGeometry () |
| void | shutdown () |
| virtual void | accept (osg::NodeVisitor &nv) override |
| virtual void | drawImplementation (osg::RenderInfo &renderInfo) const override |
| virtual void | releaseGLObjects (osg::State *state) const override |
| virtual void | accept (osg::PrimitiveFunctor &functor) const override |
Private Member Functions | |
| DtBallisticDebugGeometry ()=delete | |
| DtBallisticDebugGeometry (const DtBallisticDebugGeometry &)=delete | |
| DtBallisticDebugGeometry & | operator= (const DtBallisticDebugGeometry &)=delete |
Private Attributes | |
| DtDe & | myDe |
| DtBallisticComputeComponent * | myComputeComponent |
| const DtBallisticRunTimeSettings & | myBallisticRunTimeSettings |
| makVrv::DtBallisticDebugGeometry::DtBallisticDebugGeometry | ( | DtDe & | de, |
| DtBallisticComputeComponent & | computeComponent | ||
| ) |
Constructor.
| de | Simulation environment. |
| computeComponent | Shared compute component providing the GPU state buffer. |
|
virtual |
Virtual destructor.
|
privatedelete |
Default construction is not supported.
|
privatedelete |
Copy construction is not supported.
| void makVrv::DtBallisticDebugGeometry::shutdown | ( | ) |
Severs this node from the compute component before that component is released on a display-config reload.
The OSG scene graph may keep this drawable alive after the owning manager deletes the compute component. Nulling the pointer here makes accept() a safe no-op for the remainder of this node's lifetime, preventing a virtual call through freed memory during the next cull traversal. This mirrors DtBallisticSpatialGridNode::shutdown().
|
overridevirtual |
Performs the per-camera position-only sphere draw during the cull pass.
|
overridevirtual |
Required OSG Drawable draw entry point; all drawing is done in accept().
|
overridevirtual |
Releases all OpenGL objects associated with this geometry.
|
overridevirtual |
Overrides osg::Drawable::accept() for primitive functor support.
|
privatedelete |
Copy assignment is not supported.
|
private |
|
private |
|
private |