16 #ifndef SURGSIM_GRAPHICS_OSGOCTREEREPRESENTATION_H
17 #define SURGSIM_GRAPHICS_OSGOCTREEREPRESENTATION_H
22 #include <osg/ref_ptr>
31 #pragma warning(disable:4250)
62 virtual void doUpdate(
double dt)
override;
64 virtual void setOctreeShape(
const std::shared_ptr<SurgSim::Math::Shape>& shape)
override;
65 virtual std::shared_ptr<SurgSim::Math::OctreeShape>
getOctreeShape()
const override;
77 void buildOctree(osg::ref_ptr<osg::PositionAttitudeTransform> parentTransformNode,
78 std::shared_ptr<SurgSim::Math::OctreeShape::NodeType> octree);
97 #endif // SURGSIM_GRAPHICS_OSGOCTREEREPRESENTATION_H
static std::shared_ptr< OsgUnitBox > getSharedUnitBox()
Returns the shared unit box.
Definition: OsgOctreeRepresentation.cpp:120
Definition: DriveElementFromInputBehavior.cpp:27
SURGSIM_STATIC_REGISTRATION(OsgBoxRepresentation)
std::shared_ptr< SurgSim::Math::OctreeShape > m_octreeShape
The OctreeShape whose Octree will be visualized.
Definition: OsgOctreeRepresentation.h:84
void buildOctree(osg::ref_ptr< osg::PositionAttitudeTransform > parentTransformNode, std::shared_ptr< SurgSim::Math::OctreeShape::NodeType > octree)
Draw the Octree associated with this OSG representation.
Definition: OsgOctreeRepresentation.cpp:63
std::vector< size_t > OctreePath
Typedef of octree path The path is a vector of children indexes (each within 0 to 7) that lead to the...
Definition: OctreeNode.h:43
virtual void setOctreeShape(const std::shared_ptr< SurgSim::Math::Shape > &shape) override
Set the OctreeShape of this representation.
Definition: OsgOctreeRepresentation.cpp:89
~OsgOctreeRepresentation()
Destructor.
Definition: OsgOctreeRepresentation.cpp:44
SURGSIM_CLASSNAME(SurgSim::Graphics::OsgOctreeRepresentation)
Graphic representation of an Octree.
Definition: OctreeRepresentation.h:31
virtual void doUpdate(double dt) override
Executes the update operation.
Definition: OsgOctreeRepresentation.cpp:48
virtual std::shared_ptr< SurgSim::Math::OctreeShape > getOctreeShape() const override
Definition: OsgOctreeRepresentation.cpp:100
OSG octree representation, implements an OctreeRepresenation using OSG.
Definition: OsgOctreeRepresentation.h:48
Base OSG implementation of a graphics representation.
Definition: OsgRepresentation.h:42
virtual void setNodeVisible(const SurgSim::DataStructures::OctreePath &path, bool visibility) override
Mark the OctreeNode visible/invisible in the given a OctreePath (typedef-ed in OctreeNode.h).
Definition: OsgOctreeRepresentation.cpp:105
OsgOctreeRepresentation(const std::string &name)
Constructor.
Definition: OsgOctreeRepresentation.cpp:36
std::shared_ptr< OsgUnitBox > m_sharedUnitBox
Shared unit box, so that the geometry can be instanced rather than having multiple copies...
Definition: OsgOctreeRepresentation.h:81