Geometry provides access to a shape, such as a Box. More...
#include <Geometry.hh>
Public Member Functions | |
Geometry () | |
Default constructor. More... | |
const Box * | BoxShape () const |
Get the box geometry, or nullptr if the contained geometry is not a box. More... | |
const Capsule * | CapsuleShape () const |
Get the capsule geometry, or nullptr if the contained geometry is not a capsule. More... | |
const Cylinder * | CylinderShape () const |
Get the cylinder geometry, or nullptr if the contained geometry is not a cylinder. More... | |
sdf::ElementPtr | Element () const |
Get a pointer to the SDF element that was used during load. More... | |
const Ellipsoid * | EllipsoidShape () const |
Get the ellipsoid geometry, or nullptr if the contained geometry is not an ellipsoid. More... | |
const Heightmap * | HeightmapShape () const |
Get the heightmap geometry, or nullptr if the contained geometry is not a heightmap. More... | |
Errors | Load (ElementPtr _sdf) |
Load the geometry based on a element pointer. More... | |
const Mesh * | MeshShape () const |
Get the mesh geometry, or nullptr if the contained geometry is not a mesh. More... | |
const Plane * | PlaneShape () const |
Get the plane geometry, or nullptr if the contained geometry is not a plane. More... | |
const std::vector< Polyline > & | PolylineShape () const |
Get the polyline geometry. More... | |
void | SetBoxShape (const Box &_box) |
Set the box shape. More... | |
void | SetCapsuleShape (const Capsule &_capsule) |
Set the capsule shape. More... | |
void | SetCylinderShape (const Cylinder &_cylinder) |
Set the cylinder shape. More... | |
void | SetEllipsoidShape (const Ellipsoid &_ellipsoid) |
Set the ellipsoid shape. More... | |
void | SetHeightmapShape (const Heightmap &_heightmap) |
Set the heightmap shape. More... | |
void | SetMeshShape (const Mesh &_mesh) |
Set the mesh shape. More... | |
void | SetPlaneShape (const Plane &_plane) |
Set the plane shape. More... | |
void | SetPolylineShape (const std::vector< Polyline > &_polyline) |
Set the polyline shape. More... | |
void | SetSphereShape (const Sphere &_sphere) |
Set the sphere shape. More... | |
void | SetType (const GeometryType _type) |
Set the type of geometry. More... | |
const Sphere * | SphereShape () const |
Get the sphere geometry, or nullptr if the contained geometry is not a sphere. More... | |
sdf::ElementPtr | ToElement () const |
Create and return an SDF element filled with data from this geometry. More... | |
GeometryType | Type () const |
Get the type of geometry. More... | |
Geometry provides access to a shape, such as a Box.
Use the Type function to determine the type of shape contained within a Geometry. Access to shape data, such as a box's size, is achieved through the shape accessors, such as const Box *BoxShape() const.
sdf::v12::Geometry::Geometry | ( | ) |
Default constructor.
const Box* sdf::v12::Geometry::BoxShape | ( | ) | const |
Get the box geometry, or nullptr if the contained geometry is not a box.
const Capsule* sdf::v12::Geometry::CapsuleShape | ( | ) | const |
Get the capsule geometry, or nullptr if the contained geometry is not a capsule.
const Cylinder* sdf::v12::Geometry::CylinderShape | ( | ) | const |
Get the cylinder geometry, or nullptr if the contained geometry is not a cylinder.
sdf::ElementPtr sdf::v12::Geometry::Element | ( | ) | const |
const Ellipsoid* sdf::v12::Geometry::EllipsoidShape | ( | ) | const |
Get the ellipsoid geometry, or nullptr if the contained geometry is not an ellipsoid.
const Heightmap* sdf::v12::Geometry::HeightmapShape | ( | ) | const |
Get the heightmap geometry, or nullptr if the contained geometry is not a heightmap.
Errors sdf::v12::Geometry::Load | ( | ElementPtr | _sdf | ) |
const Mesh* sdf::v12::Geometry::MeshShape | ( | ) | const |
Get the mesh geometry, or nullptr if the contained geometry is not a mesh.
const Plane* sdf::v12::Geometry::PlaneShape | ( | ) | const |
Get the plane geometry, or nullptr if the contained geometry is not a plane.
const std::vector<Polyline>& sdf::v12::Geometry::PolylineShape | ( | ) | const |
Get the polyline geometry.
Vector is empty if the contained geometry is not a polyline.
void sdf::v12::Geometry::SetBoxShape | ( | const Box & | _box | ) |
Set the box shape.
[in] | _box | The box shape. |
void sdf::v12::Geometry::SetCapsuleShape | ( | const Capsule & | _capsule | ) |
Set the capsule shape.
[in] | _capsule | The capsule shape. |
void sdf::v12::Geometry::SetCylinderShape | ( | const Cylinder & | _cylinder | ) |
Set the cylinder shape.
[in] | _cylinder | The cylinder shape. |
void sdf::v12::Geometry::SetEllipsoidShape | ( | const Ellipsoid & | _ellipsoid | ) |
Set the ellipsoid shape.
[in] | _ellipsoid | The ellipsoid shape. |
void sdf::v12::Geometry::SetHeightmapShape | ( | const Heightmap & | _heightmap | ) |
Set the heightmap shape.
[in] | _heightmap | The heightmap shape. |
void sdf::v12::Geometry::SetMeshShape | ( | const Mesh & | _mesh | ) |
Set the mesh shape.
[in] | _mesh | The mesh shape. |
void sdf::v12::Geometry::SetPlaneShape | ( | const Plane & | _plane | ) |
Set the plane shape.
[in] | _plane | The plane shape. |
void sdf::v12::Geometry::SetPolylineShape | ( | const std::vector< Polyline > & | _polyline | ) |
Set the polyline shape.
[in] | _polyline | The polyline shape. |
void sdf::v12::Geometry::SetSphereShape | ( | const Sphere & | _sphere | ) |
Set the sphere shape.
[in] | _sphere | The sphere shape. |
void sdf::v12::Geometry::SetType | ( | const GeometryType | _type | ) |
Set the type of geometry.
[in] | _type | The geometry type. |
const Sphere* sdf::v12::Geometry::SphereShape | ( | ) | const |
Get the sphere geometry, or nullptr if the contained geometry is not a sphere.
sdf::ElementPtr sdf::v12::Geometry::ToElement | ( | ) | const |
GeometryType sdf::v12::Geometry::Type | ( | ) | const |
Get the type of geometry.