GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
Shape.hpp File Reference

Go to the source code of this file.

Classes

class  grem::physics::CollisionLayer
 Identifier for a collision layer that a collider may belong to. More...
class  grem::physics::CollisionLayers
 Set of collision layers that a collider may belong to. More...
struct  grem::physics::CollisionFilter
 Collision filtering options for a collider. More...
struct  grem::physics::CollisionFilterTestResult
 Result of a CollisionFilterTest. More...
struct  grem::physics::CollisionFilterTest
 Test that checks if a pair of colliders should collide. More...
struct  grem::physics::Ray< N >
 Description of a ray. More...
struct  grem::physics::RayMiss
 Result of a raycast miss. More...
struct  grem::physics::RayHit< N >
 Result of a raycast hit. More...
struct  grem::physics::RayHitInterior< N >
 Result of a raycast interior hit. More...
struct  grem::physics::RaycastResult< N >
 Result of a raycast. More...
struct  grem::physics::Plane< N >
 Description of an infinite plane in world space. More...
struct  grem::physics::LineSegment< N >
 Description of a line segment in world space. More...
struct  grem::physics::Box< N >
 Description of an axis-aligned box in world space. More...
struct  grem::physics::Sphere< N >
 Description of a sphere in world space. More...
struct  grem::physics::Triangle< N >
 Description of a triangle in world space. More...
struct  grem::physics::PointShape< N >
 Point shape. More...
struct  grem::physics::LineSegmentShape< N >
 Line segment shape parallel to the local Y axis. More...
struct  grem::physics::InfiniteLineShape< N >
 Infinite line shape parallel to the local Y axis. More...
struct  grem::physics::InfiniteHalfSpaceShape< N >
 Infinite half-space shape perpendicular to the local Y axis. More...
struct  grem::physics::InfinitePlaneShape3D
 Infinite plane shape perpendicular to the local Y axis in 3-dimensional space. More...
struct  grem::physics::BoxShape< N >
 Box shape. More...
struct  grem::physics::CubeShape< N >
 Cube shape. More...
struct  grem::physics::EllipsoidShape< N >
 Ellipsoid shape. More...
struct  grem::physics::SphereShape< N >
 Sphere shape. More...
struct  grem::physics::CapsuleShape< N >
 Capsule shape aligned with the local Y axis. More...
struct  grem::physics::TaperedCapsuleShape< N >
 Tapered capsule shape aligned with the local Y axis. More...
struct  grem::physics::CylinderShape3D
 Cylinder shape aligned with the local Y axis in 3-dimensional world space. More...
struct  grem::physics::TaperedCylinderShape3D
 Conical frustum shape aligned with the local Y axis in 3-dimensional space. More...
class  grem::physics::ConvexPolytopeShape< N >
 Convex polytope shape. More...
class  grem::physics::TriangleMeshShape< N >
 Triangle mesh shape. More...
struct  grem::physics::LocallyTransformedShape< N >
 Wrapper of another shape with a local transformation applied to it. More...
class  grem::physics::CompoundColliderShape< N >
 Shape that combines multiple colliders. More...
struct  grem::physics::Shape< 2 >
 Shape in 2-dimensional space. More...
struct  grem::physics::Shape< 3 >
 Shape in 3-dimensional space. More...
struct  grem::physics::Collider< N >
 Generic collider. More...
struct  grem::physics::SubCollider< N >
 Sub-collider of a compound collider shape. More...
class  grem::physics::ShapeView< N >
 View of a generic shape. More...
class  grem::physics::ConvexShapeView< N >
 View of a generic convex shape. More...
class  grem::physics::ConvexPolytopeShapeView< N >
 View of a generic convex polytope shape. More...
struct  grem::physics::ColliderView< N >
 View of a generic collider. More...

Namespaces

namespace  grem
namespace  grem::physics

Concepts

concept  grem::physics::shape
 Concept that checks if a type is a valid shape type.
concept  grem::physics::shape_2d
 Concept that checks if a type is a valid 2-dimensional shape type.
concept  grem::physics::shape_3d
 Concept that checks if a type is a valid 3-dimensional shape type.
concept  grem::physics::convex_shape
 Concept that checks if a type is a valid convex shape type.
concept  grem::physics::convex_shape_2d
 Concept that checks if a type is a valid 2-dimensional convex shape type.
concept  grem::physics::convex_shape_3d
 Concept that checks if a type is a valid 3-dimensional convex shape type.
concept  grem::physics::convex_polytope_shape
 Concept that checks if a type is a valid convex polytope shape type.
concept  grem::physics::convex_polytope_shape_2d
 Concept that checks if a type is a valid 2-dimensional convex polytope shape type.
concept  grem::physics::convex_polytope_shape_3d
 Concept that checks if a type is a valid 3-dimensional convex polytope shape type.

Typedefs

using grem::physics::Ray2D = Ray<2>
 Description of a ray in 2-dimensional space.
using grem::physics::Ray3D = Ray<3>
 Description of a ray in 3-dimensional space.
using grem::physics::RayHit2D = RayHit<2>
 Result of a raycast hit in 2-dimensional space.
using grem::physics::RayHit3D = RayHit<3>
 Result of a raycast hit in 3-dimensional space.
using grem::physics::RayHitInterior2D = RayHitInterior<2>
 Result of a raycast interior hit in 2-dimensional space.
using grem::physics::RayHitInterior3D = RayHitInterior<3>
 Result of a raycast interior hit in 3-dimensional space.
using grem::physics::RaycastResult2D = RaycastResult<2>
 Result of a raycast in 2-dimensional space.
using grem::physics::RaycastResult3D = RaycastResult<3>
 Result of a raycast in 3-dimensional space.
using grem::physics::Plane2D = Plane<2>
 Description of an infinite plane in 2-dimensional space.
using grem::physics::Plane3D = Plane<3>
 Description of an infinite plane in 3-dimensional space.
using grem::physics::LineSegment2D = LineSegment<2>
 Description of a line segment in 2-dimensional space.
using grem::physics::LineSegment3D = LineSegment<3>
 Description of a line segment in 3-dimensional space.
using grem::physics::Box2D = Box<2>
 Description of an axis-aligned box in 2-dimensional space.
using grem::physics::Box3D = Box<3>
 Description of an axis-aligned box in 3-dimensional space.
using grem::physics::Sphere2D = Sphere<2>
 Description of a sphere in 2-dimensional space.
using grem::physics::Sphere3D = Sphere<3>
 Description of a sphere in 3-dimensional space.
using grem::physics::Circle = Sphere2D
 Description of a circle in 2-dimensional space.
using grem::physics::Triangle2D = Triangle<2>
 Description of a triangle in 2-dimensional space.
using grem::physics::Triangle3D = Triangle<3>
 Description of a triangle in 3-dimensional space.
using grem::physics::PointShape2D = PointShape<2>
 Point shape in 2-dimensional space.
using grem::physics::PointShape3D = PointShape<3>
 Point shape in 3-dimensional space.
using grem::physics::LineSegmentShape2D = LineSegmentShape<2>
 Line segment shape parallel to the local Y axis in 2-dimensional space.
using grem::physics::LineSegmentShape3D = LineSegmentShape<3>
 Line segment shape parallel to the local Y axis in 3-dimensional space.
using grem::physics::InfiniteLineShape2D = InfiniteLineShape<2>
 Infinite line shape parallel to the local Y axis in 2-dimensional space.
using grem::physics::InfiniteLineShape3D = InfiniteLineShape<3>
 Infinite line shape parallel to the local Y axis in 3-dimensional space.
using grem::physics::InfiniteHalfSpaceShape2D = InfiniteHalfSpaceShape<2>
 Infinite half-space shape perpendicular to the local Y axis in 2-dimensional space.
using grem::physics::InfiniteHalfSpaceShape3D = InfiniteHalfSpaceShape<3>
 Infinite half-space shape perpendicular to the local Y axis in 3-dimensional space.
using grem::physics::BoxShape2D = BoxShape<2>
 Box shape in 2-dimensional space.
using grem::physics::BoxShape3D = BoxShape<3>
 Box shape in 3-dimensional space.
using grem::physics::RectangleShape2D = BoxShape2D
 Rectangle shape in 2-dimensional space.
using grem::physics::CubeShape2D = CubeShape<2>
 Cube shape in 2-dimensional space.
using grem::physics::CubeShape3D = CubeShape<3>
 Cube shape in 3-dimensional space.
using grem::physics::SquareShape2D = CubeShape2D
 Square shape in 2-dimensional space.
using grem::physics::EllipsoidShape2D = EllipsoidShape<2>
 Ellipsoid shape in 2-dimensional space.
using grem::physics::EllipsoidShape3D = EllipsoidShape<3>
 Ellipsoid shape in 3-dimensional space.
using grem::physics::EllipseShape2D = EllipsoidShape2D
 Ellipse shape in 2-dimensional space.
using grem::physics::SphereShape2D = SphereShape<2>
 Sphere shape in 2-dimensional space.
using grem::physics::SphereShape3D = SphereShape<3>
 Sphere shape in 3-dimensional space.
using grem::physics::CircleShape2D = SphereShape2D
 Circle shape in 2-dimensional space.
using grem::physics::CapsuleShape2D = CapsuleShape<2>
 Capsule shape aligned with the local Y axis in 2-dimensional space.
using grem::physics::CapsuleShape3D = CapsuleShape<3>
 Capsule shape aligned with the local Y axis in 3-dimensional space.
using grem::physics::StadiumShape2D = CapsuleShape2D
 Stadium shape in 2-dimensional space.
using grem::physics::TaperedCapsuleShape2D = TaperedCapsuleShape<2>
 Tapered capsule shape aligned with the local Y axis in 2-dimensional space.
using grem::physics::TaperedCapsuleShape3D = TaperedCapsuleShape<3>
 Tapered capsule shape aligned with the local Y axis in 3-dimensional space.
using grem::physics::ConvexPolytopeShape2D = ConvexPolytopeShape<2>
 Convex polytope shape in 2-dimensional space.
using grem::physics::ConvexPolytopeShape3D = ConvexPolytopeShape<3>
 Convex polytope shape in 3-dimensional space.
using grem::physics::TriangleMeshShape2D = TriangleMeshShape<2>
 Triangle mesh shape in 2-dimensional space.
using grem::physics::TriangleMeshShape3D = TriangleMeshShape<3>
 Triangle mesh shape in 3-dimensional space.
using grem::physics::LocallyTransformedShape2D = LocallyTransformedShape<2>
 Wrapper of another shape with a local transformation applied to it in 2-dimensional space.
using grem::physics::LocallyTransformedShape3D = LocallyTransformedShape<3>
 Wrapper of another shape with a local transformation applied to it in 3-dimensional space.
using grem::physics::SubCollider2D = SubCollider<2>
 Sub-collider of a compound collider shape in 2-dimensional space.
using grem::physics::SubCollider3D = SubCollider<3>
 Sub-collider of a compound collider shape in 3-dimensional space.
using grem::physics::CompoundColliderShape2D = CompoundColliderShape<2>
 Shape that combines multiple colliders in 2-dimensional space.
using grem::physics::CompoundColliderShape3D = CompoundColliderShape<3>
 Shape that combines multiple colliders in 3-dimensional space.
using grem::physics::Shape2D = Shape<2>
 Generic shape in 2-dimensional space.
using grem::physics::Shape3D = Shape<3>
 Generic shape in 3-dimensional space.
using grem::physics::Collider2D = Collider<2>
 Generic collider in 2-dimensional space.
using grem::physics::Collider3D = Collider<3>
 Generic collider in 3-dimensional space.
using grem::physics::ShapeView2D = ShapeView<2>
 View of a generic shape in 2-dimensional space.
using grem::physics::ShapeView3D = ShapeView<3>
 View of a generic shape in 3-dimensional space.
using grem::physics::ConvexShapeView2D = ConvexShapeView<2>
 View of a generic convex shape in 2-dimensional space.
using grem::physics::ConvexShapeView3D = ConvexShapeView<3>
 View of a generic convex shape in 3-dimensional space.
using grem::physics::ConvexPolytopeShapeView2D = ConvexPolytopeShapeView<2>
 View of a generic convex polytope shape in 2-dimensional space.
using grem::physics::ConvexPolytopeShapeView3D = ConvexPolytopeShapeView<3>
 View of a generic convex polytope shape in 3-dimensional space.
using grem::physics::ColliderView2D = ColliderView<2>
 View of a generic collider in 2-dimensional space.
using grem::physics::ColliderView3D = ColliderView<3>
 View of a generic collider in 3-dimensional space.

Functions

constexpr CollisionLayers grem::physics::operator~ (CollisionLayer a) noexcept
 Get the complement of a collision layer.
constexpr CollisionLayers grem::physics::operator| (CollisionLayer a, CollisionLayer b) noexcept
 Get the union of two collision layers.
template<size_t N, typename T>
GREM_ALWAYS_INLINE constexpr Ray< N > grem::physics::operator* (const grem::Ray< N, T > &ray, typename Ray< N >::Unit)
template<size_t N, typename T>
GREM_ALWAYS_INLINE constexpr Ray< N > grem::physics::operator* (typename Ray< N >::Unit, const grem::Ray< N, T > &ray)
GREM_ALWAYS_INLINE constexpr RayMiss grem::physics::operator* (const grem::RayMiss &miss, typename RayMiss::Unit)
GREM_ALWAYS_INLINE constexpr RayMiss grem::physics::operator* (typename RayMiss::Unit, const grem::RayMiss &miss)
template<size_t N, typename T>
GREM_ALWAYS_INLINE constexpr RayHit< N > grem::physics::operator* (const grem::RayHit< N, T > &hit, typename RayHit< N >::Unit)
template<size_t N, typename T>
GREM_ALWAYS_INLINE constexpr RayHit< N > grem::physics::operator* (typename RayHit< N >::Unit, const grem::RayHit< N, T > &hit)
template<size_t N, typename T>
GREM_ALWAYS_INLINE constexpr RayHitInterior< N > grem::physics::operator* (const grem::RayHitInterior< N, T > &hit, typename RayHitInterior< N >::Unit)
template<size_t N, typename T>
GREM_ALWAYS_INLINE constexpr RayHitInterior< N > grem::physics::operator* (typename RayHitInterior< N >::Unit, const grem::RayHitInterior< N, T > &hit)
template<size_t N, typename T>
GREM_ALWAYS_INLINE constexpr RaycastResult< N > grem::physics::operator* (const grem::RaycastResult< N, T > &raycastResult, typename RaycastResult< N >::Unit)
template<size_t N, typename T>
GREM_ALWAYS_INLINE constexpr RaycastResult< N > grem::physics::operator* (typename RaycastResult< N >::Unit, const grem::RaycastResult< N, T > &raycastResult)
template<size_t N, typename T>
GREM_ALWAYS_INLINE constexpr LineSegment< N > grem::physics::operator* (const grem::LineSegment< N, T > &line, typename LineSegment< N >::Unit)
template<size_t N, typename T>
GREM_ALWAYS_INLINE constexpr LineSegment< N > grem::physics::operator* (typename LineSegment< N >::Unit, const grem::LineSegment< N, T > &line)
template<size_t N, typename T>
GREM_ALWAYS_INLINE constexpr Box< N > grem::physics::operator* (const grem::Box< N, T > &box, typename Box< N >::Unit)
template<size_t N, typename T>
GREM_ALWAYS_INLINE constexpr Box< N > grem::physics::operator* (typename Box< N >::Unit, const grem::Box< N, T > &box)
template<size_t N, typename T>
GREM_ALWAYS_INLINE constexpr Sphere< N > grem::physics::operator* (const grem::Sphere< N, T > &sphere, typename Sphere< N >::Unit)
template<size_t N, typename T>
GREM_ALWAYS_INLINE constexpr Sphere< N > grem::physics::operator* (typename Sphere< N >::Unit, const grem::Sphere< N, T > &sphere)
template<size_t N, typename T>
GREM_ALWAYS_INLINE constexpr Triangle< N > grem::physics::operator* (const grem::Triangle< N, T > &triangle, typename Triangle< N >::Unit)
template<size_t N, typename T>
GREM_ALWAYS_INLINE constexpr Triangle< N > grem::physics::operator* (typename Triangle< N >::Unit, const grem::Triangle< N, T > &triangle)
template<size_t N>
Box< N > grem::physics::getTransformedBoundingBox (const Transformation< N > &transformation, const Box< N > &box)
 Get the axis-aligned bounding box of an axis-aligned box with a transformation applied to it.
void grem::physics::forEachVertexIndexInFace (const convex_polytope_shape_2d auto &shape, ConvexPolytopeFaceIndex faceIndex, auto callback)
 Execute a function for each vertex of a face of a convex polytope shape.
void grem::physics::forEachVertexIndexInFace (const convex_polytope_shape_3d auto &shape, ConvexPolytopeFaceIndex faceIndex, auto callback)
 Execute a function for each vertex of a face of a convex polytope shape.
void grem::physics::forEachFaceIndexAroundVertex (const convex_polytope_shape_2d auto &shape, ConvexPolytopeVertexIndex vertexIndex, auto callback)
 Execute a function for each face that is adjacent to a vertex of a convex polytope shape.
void grem::physics::forEachFaceIndexAroundVertex (const convex_polytope_shape_3d auto &shape, ConvexPolytopeVertexIndex vertexIndex, auto callback)
 Execute a function for each face that is adjacent to a vertex of a convex polytope shape.
void grem::physics::forEachNeighboringVertexIndex (const convex_polytope_shape_2d auto &shape, ConvexPolytopeVertexIndex vertexIndex, auto callback)
 Execute a function for each vertex that is directly connected to a specific vertex of a convex polytope shape.
void grem::physics::forEachNeighboringVertexIndex (const convex_polytope_shape_3d auto &shape, ConvexPolytopeVertexIndex vertexIndex, auto callback)
 Execute a function for each vertex that is directly connected to a specific vertex of a convex polytope shape.
template<typename Visitor, size_t N>
constexpr decltype(auto) grem::physics::visit (Visitor &&visitor, ShapeView< N > shape)
 Call a visitor functor with a reference to the currently active underlying shape of a ShapeView.