16 #ifndef SURGSIM_GRAPHICS_OSGBOXREPRESENTATION_H
17 #define SURGSIM_GRAPHICS_OSGBOXREPRESENTATION_H
25 #include <osg/PositionAttitudeTransform>
30 #pragma warning(disable:4250)
54 virtual void setSizeX(
double sizeX)
override;
58 virtual double getSizeX()
const override;
62 virtual void setSizeY(
double sizeY)
override;
66 virtual double getSizeY()
const override;
70 virtual void setSizeZ(
double sizeZ)
override;
74 virtual double getSizeZ()
const override;
80 virtual void setSizeXYZ(
double sizeX,
double sizeY,
double sizeZ);
85 virtual void getSizeXYZ(
double* sizeX,
double* sizeY,
double* sizeZ)
const;
109 #if defined(_MSC_VER)
113 #endif // SURGSIM_GRAPHICS_OSGBOXREPRESENTATION_H
Definition: DriveElementFromInputBehavior.cpp:27
virtual SurgSim::Math::Vector3d getSize() const override
Returns the extents of the box.
Definition: OsgBoxRepresentation.cpp:92
SURGSIM_STATIC_REGISTRATION(OsgBoxRepresentation)
std::shared_ptr< OsgUnitBox > m_sharedUnitBox
Shared unit box, so that the geometry can be instanced rather than having multiple copies...
Definition: OsgBoxRepresentation.h:100
osg::Vec3d m_scale
The OSG box shape is a unit box and this transform scales it to the size set.
Definition: OsgBoxRepresentation.h:97
Base graphics box representation class, which defines the basic interface for a box that can be visua...
Definition: BoxRepresentation.h:31
virtual void setSize(const SurgSim::Math::Vector3d &size) override
Sets the size of the box.
Definition: OsgBoxRepresentation.cpp:87
SURGSIM_CLASSNAME(SurgSim::Graphics::OsgBoxRepresentation)
OsgBoxRepresentation(const std::string &name)
Constructor.
Definition: OsgBoxRepresentation.cpp:32
virtual double getSizeX() const override
Returns the size along X-axis of the box.
Definition: OsgBoxRepresentation.cpp:48
OSG implementation of a graphics box representation.
Definition: OsgBoxRepresentation.h:43
virtual void setSizeZ(double sizeZ) override
Sets the size along Z-axis of the box.
Definition: OsgBoxRepresentation.cpp:63
virtual void setSizeXYZ(double sizeX, double sizeY, double sizeZ)
Sets the size of the box.
Definition: OsgBoxRepresentation.cpp:73
virtual void setSizeX(double sizeX) override
Sets the size along X-axis of the box.
Definition: OsgBoxRepresentation.cpp:43
virtual void getSizeXYZ(double *sizeX, double *sizeY, double *sizeZ) const
Gets the size of the box.
Definition: OsgBoxRepresentation.cpp:80
virtual double getSizeY() const override
Returns the size along Y-axis of the box.
Definition: OsgBoxRepresentation.cpp:58
static std::shared_ptr< OsgUnitBox > getSharedUnitBox()
Returns the shared unit box.
Definition: OsgBoxRepresentation.cpp:97
virtual void setSizeY(double sizeY) override
Sets the size along Y-axis of the box.
Definition: OsgBoxRepresentation.cpp:53
Base OSG implementation of a graphics representation.
Definition: OsgRepresentation.h:42
Eigen::Matrix< double, 3, 1 > Vector3d
A 3D vector of doubles.
Definition: Vector.h:56
virtual double getSizeZ() const override
Returns the size along Z-axis of the box.
Definition: OsgBoxRepresentation.cpp:68