Namespace atlas::physics
Namespace List > atlas > physics
Handles error handling with in jolt. More...
Classes
Type | Name |
---|---|
class | broad_phase_layer_interface This class is made to control the broadphase layer. Filters can be added to it to create a better and more organized broadphase. Ass well as giving some control to the user on how the broadphase should be organized. This requires dynamic masking however, which is not currently running. |
struct | collider_body |
struct | collider_event This is a replacement for an event system to handle collider. It will be replaced by an event system once we have functional one up and running. |
struct | contact_event |
class | contact_listener This is the glue between contact events and jolts contact listener. It takes the calls from jolt through virtual functions and allows users to create children for jolt collision. |
class | jolt_api |
class | jolt_collision This is the collision api. It allows users to create children of this collision handler and write their own functions over the virtual ones. Then they can assign it to the engine. |
class | jolt_collision_manager This allows users to make thier own version of jolt collition and run them their own way. It allows users to interact with the calls by creating a child class of jolt_collision and run whatever action they want. |
struct | jolt_config Used to keep global data for player access and use. Tells how physics bodies should act within a given scene by default. |
class | jolt_context This class is made to be 1 of three api wrappers for jolt. Jolt context is specifically for engine only use of the api. It wraps the inititialization, the physics step and the clean up. Allow use not to have to write batching algorithms for each time we want to change the settings of jolt physics. |
struct | jolt_settings This includes global configs for each scene and how the physics engine will behave in a paticular scene. |
struct | matrix4 <typename T> |
struct | matrix4< JPH::Mat44 > <> |
class | object_layer_pair_filter This goes into more detailed ways of filtering, where the object collisions may be defined be what the other object is. In this case a static setup allows static object to trigger collision only when it is touched by a dynamic target. |
class | object_vs_broadphase_layer This is used to tell Jolt what can or cannot collide. As of right now the list is static therfore the layers do not need a dynamic set up. This will change when the object layers become user definable. |
class | physics_api |
struct | physics_body |
class | physics_context The context is the way to interact with only the engine. It is the api for all the background funcitons and information that the user shouldn not see. It is a virtual based type erasure class so thatmany engines can implement the same functions. Specifically realted to backend engine creation like batching, starting runtime, etc... |
class | physics_engine The manager class for all physics engines. Manages the physics contexts and the collision engines. |
struct | quaternion <typename T> |
struct | vector3 <typename T> |
struct | vector3< JPH::DVec3 > <> |
struct | vector3< JPH::Double3 > <> |
struct | vector3< JPH::Float3 > <> |
struct | vector3< JPH::Vec3 > <> |
struct | vector4 <typename T> |
struct | vector4< JPH::Float4 > <> |
struct | vector4< JPH::Vec4 > <> |
Public Types
Type | Name |
---|---|
enum std::uint8_t | BroadPhaseLayers |
enum std::uint8_t | ObjectLayer This contains a few important comparisons having to do with setting up the oct-trees correctly as well as the filtering and collision interaction. |
enum uint8_t | body_layer |
enum uint8_t | body_type |
enum uint8_t | collider_shape |
enum uint8_t | physics_backend This is the manager of all three api for physics. It contians the scope for all physics engine related functions. It passes the jolt_vlaues to engine and gives them to the user api. |
enum uint8_t | thread_system |
Public Functions
Type | Name |
---|---|
void | add_angular_velocity (const glm::vec3 & angular_velocity, const physics_body & body) |
void | add_force (const glm::vec3 & force, const physics_body & body) These functions are the generic functions implmented in jolt but should be able to switch to any engine. |
void | add_velocity (const glm::vec3 & velocity, const physics_body & body) FIXME: This is a difficult funciton that requires locks and waiting multiple frames before running. So it is later. |
bool | assert_failed_impl (const char * p_in_expression, const char * p_in_message, const char * p_in_file, unsigned int p_in_line) Allows for custom desciptions and messages when Asserts fail. |
ref< physics_engine > | initialize_engine (const ref< scene_object > & p_physics_object, flecs::world & p_registery) Creates the engine and all three api - collision, user, and engine api. |
void | set_angular_velocity (const glm::vec3 & angular_velocity, const physics_body & body) |
void | set_velocity (const glm::vec3 & velocity, const physics_body & body) |
void | trace_impl (const char * p_in_fmt, ...) Enforced by JPH to handle assert and give users and ourselves a way to track where those asserts are coming from in Jolt. |
Detailed Description
Types are still be filled out. When this is completed to_jph() can be removed.
This is the how the user is able to call functions relating to jolt. It is the api calls for the user. Most of them running in runtime. With a couple effecting config which is a system wide change. This api is deticated to user interaction, however a few functions will be used by both the engine and the user.
Note:
FIXME: Should have a custom definition for how we want to handle and print JPH_ASSERTS().
Public Types Documentation
enum BroadPhaseLayers
enum atlas::physics::BroadPhaseLayers {
NonMoving = 0,
Moving = 1,
NumLayers
};
enum ObjectLayer
This contains a few important comparisons having to do with setting up the oct-trees correctly as well as the filtering and collision interaction.
enum atlas::physics::ObjectLayer {
NonMoving = 0,
Moving = 1,
NumLayers
};
Warning:
Most of these contain implicit conversions which might lead to unexpected behavior. This should probably be fixed or atleast checked eventually.
enum body_layer
enum atlas::physics::body_layer {
NonMoving = 0,
Moving = 1,
LayerNum
};
enum body_type
enum atlas::physics::body_type {
Static = 0,
Kenmatic = 1,
Dynamic = 2,
BodyNum
};
enum collider_shape
enum atlas::physics::collider_shape {
Box,
Sphere,
Capsule
};
enum physics_backend
This is the manager of all three api for physics. It contians the scope for all physics engine related functions. It passes the jolt_vlaues to engine and gives them to the user api.
enum atlas::physics::physics_backend {
JoltBackend
};
enum thread_system
enum atlas::physics::thread_system {
Default = 0,
JobSystem = 1
};
Public Functions Documentation
function add_angular_velocity
void atlas::physics::add_angular_velocity (
const glm::vec3 & angular_velocity,
const physics_body & body
)
function add_force
These functions are the generic functions implmented in jolt but should be able to switch to any engine.
void atlas::physics::add_force (
const glm::vec3 & force,
const physics_body & body
)
function add_velocity
FIXME: This is a difficult funciton that requires locks and waiting multiple frames before running. So it is later.
void atlas::physics::add_velocity (
const glm::vec3 & velocity,
const physics_body & body
)
function assert_failed_impl
Allows for custom desciptions and messages when Asserts fail.
bool atlas::physics::assert_failed_impl (
const char * p_in_expression,
const char * p_in_message,
const char * p_in_file,
unsigned int p_in_line
)
Parameters:
p_in_expression
The failing arguementp_in_message
The message providedp_in_file
The file the assert is inp_in_line
The line the assert is on
Returns:
true
Returns:
false
function initialize_engine
Creates the engine and all three api - collision, user, and engine api.
ref < physics_engine > atlas::physics::initialize_engine (
const ref < scene_object > & p_physics_object,
flecs::world & p_registery
)
Parameters:
p_physics_object
p_registery
Returns:
ref<physics_engine>
function set_angular_velocity
void atlas::physics::set_angular_velocity (
const glm::vec3 & angular_velocity,
const physics_body & body
)
function set_velocity
void atlas::physics::set_velocity (
const glm::vec3 & velocity,
const physics_body & body
)
function trace_impl
Enforced by JPH to handle assert and give users and ourselves a way to track where those asserts are coming from in Jolt.
void atlas::physics::trace_impl (
const char * p_in_fmt,
...
)
The documentation for this class was generated from the following file TheAtlasEngine/atlas/physics/jolt-cpp/jolt_collision.hpp