Geometry provides access to a shape, such as a Box. More...
#include <Geometry.hh>
Public Member Functions | |
Geometry () | |
Default constructor. More... | |
Geometry (const Geometry &_geometry) | |
Copy constructor. More... | |
Geometry (Geometry &&_geometry) noexcept | |
Move constructor. More... | |
virtual | ~Geometry () |
Destructor. More... | |
const Box * | BoxShape () const |
Get the box geometry, or nullptr if the contained geometry is not a box. 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 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... | |
Geometry & | operator= (const Geometry &_geometry) |
Assignment operator. More... | |
Geometry & | operator= (Geometry &&_geometry) |
Move assignment operator. More... | |
const Plane * | PlaneShape () const |
Get the plane geometry, or nullptr if the contained geometry is not a plane. More... | |
void | SetBoxShape (const Box &_box) |
Set the box shape. More... | |
void | SetCylinderShape (const Cylinder &_cylinder) |
Set the cylinder 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 | 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... | |
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::v10::Geometry::Geometry | ( | ) |
Default constructor.
sdf::v10::Geometry::Geometry | ( | const Geometry & | _geometry | ) |
Copy constructor.
[in] | _geometry | Geometry to copy. |
|
noexcept |
Move constructor.
[in] | _geometry | Geometry to move. |
|
virtual |
Destructor.
const Box* sdf::v10::Geometry::BoxShape | ( | ) | const |
Get the box geometry, or nullptr if the contained geometry is not a box.
const Cylinder* sdf::v10::Geometry::CylinderShape | ( | ) | const |
Get the cylinder geometry, or nullptr if the contained geometry is not a cylinder.
sdf::ElementPtr sdf::v10::Geometry::Element | ( | ) | const |
const Heightmap* sdf::v10::Geometry::HeightmapShape | ( | ) | const |
Get the heightmap geometry, or nullptr if the contained geometry is not a heightmap.
Errors sdf::v10::Geometry::Load | ( | ElementPtr | _sdf | ) |
const Mesh* sdf::v10::Geometry::MeshShape | ( | ) | const |
Get the mesh geometry, or nullptr if the contained geometry is not a mesh.
Assignment operator.
[in] | _geometry | The geometry to set values from. |
Move assignment operator.
[in] | _geometry | The geometry to move from. |
const Plane* sdf::v10::Geometry::PlaneShape | ( | ) | const |
Get the plane geometry, or nullptr if the contained geometry is not a plane.
void sdf::v10::Geometry::SetBoxShape | ( | const Box & | _box | ) |
Set the box shape.
[in] | _box | The box shape. |
void sdf::v10::Geometry::SetCylinderShape | ( | const Cylinder & | _cylinder | ) |
Set the cylinder shape.
[in] | _cylinder | The cylinder shape. |
void sdf::v10::Geometry::SetHeightmapShape | ( | const Heightmap & | _heightmap | ) |
Set the heightmap shape.
[in] | _heightmap | The heightmap shape. |
void sdf::v10::Geometry::SetMeshShape | ( | const Mesh & | _mesh | ) |
Set the mesh shape.
[in] | _mesh | The mesh shape. |
void sdf::v10::Geometry::SetPlaneShape | ( | const Plane & | _plane | ) |
Set the plane shape.
[in] | _plane | The plane shape. |
void sdf::v10::Geometry::SetSphereShape | ( | const Sphere & | _sphere | ) |
Set the sphere shape.
[in] | _sphere | The sphere shape. |
void sdf::v10::Geometry::SetType | ( | const GeometryType | _type | ) |
Set the type of geometry.
[in] | _type | The geometry type. |
const Sphere* sdf::v10::Geometry::SphereShape | ( | ) | const |
Get the sphere geometry, or nullptr if the contained geometry is not a sphere.
GeometryType sdf::v10::Geometry::Type | ( | ) | const |
Get the type of geometry.