|
Avara3D 0.2.0
C++ API reference
|
Box collision shape centered at the local origin, with width along X, height along Y, and length along Z. More...
#include <a3d/physics/shape/primitive/BoxPhysicsShape.h>
Public Member Functions | |
| BoxPhysicsShape (float width, float height, float length) | |
| Creates a box collision shape with the supplied full dimensions. More... | |
| float | width () const |
| Returns the configured full width along X. More... | |
| float | height () const |
| Returns the configured full height along Y. More... | |
| float | length () const |
| Returns the configured full length along Z. More... | |
| Type | type () const override |
| Returns PhysicsShape::Type::Primitive. More... | |
| void | type (Type type) override |
| Rejects attempts to change the fixed primitive shape type. More... | |
Public Member Functions inherited from a3d::PhysicsShape | |
| PhysicsShape (Type type, const std::shared_ptr< Mesh > &mesh) | |
Creates a PhysicsShape of type derived from mesh. More... | |
| PhysicsShape (Type type, const std::shared_ptr< Node > &node) | |
Creates a PhysicsShape of type from mesh geometry in the node hierarchy. More... | |
| virtual Type | type () const |
| Returns the collision-geometry type. More... | |
| virtual void | type (Type type) |
| Validates the requested collision-geometry type. More... | |
| Source | source () const |
| Returns the weak Mesh or Node source, or std::monostate for a source-less primitive shape. More... | |
Additional Inherited Members | |
Public Types inherited from a3d::PhysicsShape | |
| enum class | Type : uint8_t { Primitive , BoundingBox , ConvexHull , ConcavePolyhedron } |
| Collision-geometry representation requested for a PhysicsShape. More... | |
| using | Source = std::variant< std::monostate, std::weak_ptr< Mesh >, std::weak_ptr< Node > > |
| Weak source object used to derive collision geometry, or no source for primitive shapes. More... | |
Static Public Member Functions inherited from a3d::PhysicsShape | |
| static std::shared_ptr< PhysicsShape > | BoundingBoxShape (const std::shared_ptr< Mesh > &mesh) |
Creates a bounding-box collision shape derived from mesh. More... | |
| static std::shared_ptr< PhysicsShape > | BoundingBoxShape (const std::shared_ptr< Node > &node) |
Creates a bounding-box collision shape from mesh geometry in the node hierarchy. More... | |
| static std::shared_ptr< PhysicsShape > | ConvexHullShape (const std::shared_ptr< Mesh > &mesh) |
Creates a convex-hull collision shape derived from mesh. More... | |
| static std::shared_ptr< PhysicsShape > | ConvexHullShape (const std::shared_ptr< Node > &node) |
Creates a convex-hull collision shape from mesh geometry in the node hierarchy. More... | |
| static std::shared_ptr< PhysicsShape > | ConcavePolyhedronShape (const std::shared_ptr< Mesh > &mesh) |
Creates a concave-polyhedron collision shape derived from mesh. More... | |
| static std::shared_ptr< PhysicsShape > | ConcavePolyhedronShape (const std::shared_ptr< Node > &node) |
Creates a concave-polyhedron collision shape from mesh geometry in the node hierarchy. More... | |
Box collision shape centered at the local origin, with width along X, height along Y, and length along Z.
Definition at line 17 of file BoxPhysicsShape.h.
| a3d::BoxPhysicsShape::BoxPhysicsShape | ( | float | width, |
| float | height, | ||
| float | length | ||
| ) |
Creates a box collision shape with the supplied full dimensions.
| float a3d::BoxPhysicsShape::height | ( | ) | const |
Returns the configured full height along Y.
| float a3d::BoxPhysicsShape::length | ( | ) | const |
Returns the configured full length along Z.
|
overridevirtual |
Returns PhysicsShape::Type::Primitive.
Reimplemented from a3d::PhysicsShape.
|
overridevirtual |
Rejects attempts to change the fixed primitive shape type.
| std::logic_error | always; BoxPhysicsShape has a fixed type. |
Reimplemented from a3d::PhysicsShape.
| float a3d::BoxPhysicsShape::width | ( | ) | const |
Returns the configured full width along X.