Toast Engine
Loading...
Searching...
No Matches
shape.hpp File Reference

Shape identifiers, geometry, and runtime records. More...

#include "aabb.hpp"
#include "body.hpp"
#include "material_defaults.hpp"
#include <compare>
#include <cstdint>
#include <glm/glm.hpp>
#include <limits>
Include dependency graph for shape.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  physics::PhysicsMaterial
struct  physics::ShapeID
struct  physics::ContactFeatureID
struct  physics::VoxelFeaturePayload
struct  physics::SphereShape
struct  physics::BoxShape
struct  physics::CapsuleShape
struct  physics::VoxelDataID
struct  physics::VoxelShape
struct  physics::Shape
struct  physics::ShapeSlot

Enumerations

enum class  FeatureType : uint8_t {
  sphere_surface = 1 , capsule_cap_a , capsule_side , capsule_cap_b ,
  box_face , box_edge , box_vertex , box_clip ,
  voxel_face , voxel_edge
}
enum class  ShapeType : uint8_t { sphere , box , capsule , voxel }

Functions

constexpr auto physics::makeContactFeature (FeatureType type, uint64_t payload=0) -> ContactFeatureID
constexpr auto physics::capsuleFeature (float parameter) -> ContactFeatureID
constexpr auto physics::boxFaceFeature (int axis, bool positive) -> ContactFeatureID
constexpr auto physics::boxEdgeFeature (int direction_axis, uint8_t positive_mask) -> ContactFeatureID
constexpr auto physics::boxVertexFeature (uint8_t positive_mask) -> ContactFeatureID
constexpr auto physics::boxClipFeature (int reference_axis, bool reference_positive, int side_axis, bool side_positive) -> ContactFeatureID
constexpr auto physics::voxelFeature (FeatureType type, uint32_t brick_slot, uint16_t local_index, uint8_t normal_index) -> ContactFeatureID
constexpr auto physics::unpackVoxelFeature (ContactFeatureID id) -> VoxelFeaturePayload

Variables

constexpr uint64_t physics::contact_feature_payload_mask = 0x00ff'ffff'ffff'ffffULL
constexpr ContactFeatureID physics::sphere_surface_feature = makeContactFeature(FeatureType::sphere_surface)

Detailed Description

Shape identifiers, geometry, and runtime records.

Author
Xein
Date
10 Sep 2026