Saga
Saga Game Engine
Loading...
Searching...
No Matches
Saga::Physics Namespace Reference

Classes

struct  RaycastHit
 

Functions

bool overlapCylinder (std::shared_ptr< GameWorld > world, float height, float radius, glm::vec3 pos)
 Determine if a cylinder overlaps with another cylinder in the world.
 
void registerPhysicsMetaSystem (std::shared_ptr< GameWorld > world)
 Register all Groups that the Physics meta system use.
 
std::optional< RaycastHitraycastAllTriangles (std::shared_ptr< GameWorld > world, glm::vec3 pos, glm::vec3 dir)
 Cast a ray, hitting any mesh collider.
 

Function Documentation

◆ overlapCylinder()

bool Saga::Physics::overlapCylinder ( std::shared_ptr< GameWorld world,
float  height,
float  radius,
glm::vec3  pos 
)

Determine if a cylinder overlaps with another cylinder in the world.

Parameters
world
heightheight of the cylinder.
radiusradius of the cylinder.
posposition of the cylinder.
Returns
true if the cylinder overlaps with another cylinder collider.
false otherwise.
Here is the call graph for this function:

◆ raycastAllTriangles()

std::optional< RaycastHit > Saga::Physics::raycastAllTriangles ( std::shared_ptr< GameWorld world,
glm::vec3  pos,
glm::vec3  dir 
)

Cast a ray, hitting any mesh collider.

Parameters
world
posthe starting position of the raycast in world space
dirthe direction of the raycast in world space

◆ registerPhysicsMetaSystem()

void Saga::Physics::registerPhysicsMetaSystem ( std::shared_ptr< GameWorld world)

Register all Groups that the Physics meta system use.

Parameters
world