Classes

PhysicsJolt/Collision

Brief descriptions

Detailed information

physics::jolt::JoltCollisionShape

engine/core/modules/physicsJolt/include/nau/physics/jolt/jolt_physics_collider.h

class JoltCollisionShape

Jolt collision shape class wrapper.

Subclassed by nau::physics::jolt::JoltCollisionShapeImpl< IBoxCollision >, nau::physics::jolt::JoltCollisionShapeImpl< ICapsuleCollision >, nau::physics::jolt::JoltCollisionShapeImpl< IConvexHullCollision >, nau::physics::jolt::JoltCollisionShapeImpl< ICylinderCollision >, nau::physics::jolt::JoltCollisionShapeImpl< IMeshCollision >, nau::physics::jolt::JoltCollisionShapeImpl< ISphereCollision >, nau::physics::jolt::JoltCollisionShapeImpl< ShapeType >

Public Functions

JPH::RefConst<JPH::Shape> getCollisionShape() const

Retrieves the Jolt collision shape object.

Returns:

Jolt collision shape object.

Protected Functions

JoltCollisionShape()

Default constructor.

JoltCollisionShape(JPH::RefConst<JPH::Shape> shape)

Initialization constructor.

Parameters:

shape[in] Jolt collision shape instance.

void setCollisionShape(JPH::RefConst<JPH::Shape> shape)

Binds Jolt collision shape to the object.

Parameters:

shape[in] Shape to bind.

Protected Attributes

math::Transform m_transform

Private Members

JPH::RefConst<JPH::Shape> m_collisionShape

Wrapped Jolt collision shape object.


physics::jolt::JoltCollisionShapeImpl

engine/core/modules/physicsJolt/include/nau/physics/jolt/jolt_physics_collider.h

template<std::derived_from<ICollisionShape> ShapeType>
class JoltCollisionShapeImpl : public nau::physics::jolt::JoltCollisionShape, public ShapeType

Public Functions

inline void setShapeTransform(math::Transform localTransform) final
inline math::Transform getShapeTransform() const final

Protected Functions

JoltCollisionShape()

Default constructor.

JoltCollisionShape(JPH::RefConst<JPH::Shape> shape)

Initialization constructor.

Parameters:

shape[in] Jolt collision shape instance.


physics::jolt::JoltSphereCollision

engine/core/modules/physicsJolt/include/nau/physics/jolt/jolt_physics_collider.h

class JoltSphereCollision : public nau::physics::jolt::JoltCollisionShapeImpl<ISphereCollision>

Implements nau::physics::ISphereCollision interface utilizing Jolt physics engine.

Public Functions

JoltSphereCollision(TFloat radius, JPH::PhysicsMaterial *material = nullptr)

Initialization constructor.

Parameters:
  • radius[in] Sphere radius.

  • material[in] A pointer to the collision shape material.

TFloat getRadius() const override

Retrieves radius of the sphere.

Returns:

Sphere radius.

void setRadius(TFloat) override

Changes radius of the sphere.

Parameters:

radius[in] Value to assign.

Private Types

using Base = JoltCollisionShapeImpl<ISphereCollision>

physics::jolt::JoltBoxCollision

engine/core/modules/physicsJolt/include/nau/physics/jolt/jolt_physics_collider.h

class JoltBoxCollision : public nau::physics::jolt::JoltCollisionShapeImpl<IBoxCollision>

Implements nau::physics::IBoxCollision interface utilizing Jolt physics engine.

Public Functions

JoltBoxCollision(math::vec3 extent, JPH::PhysicsMaterial *material = nullptr)

Initialization constructor.

Parameters:
  • radius[in] Box half-size.

  • material[in] A pointer to the collision shape material.

Private Types

using Base = JoltCollisionShapeImpl<IBoxCollision>

physics::jolt::JoltCapsuleCollision

engine/core/modules/physicsJolt/include/nau/physics/jolt/jolt_physics_collider.h

class JoltCapsuleCollision : public nau::physics::jolt::JoltCollisionShapeImpl<ICapsuleCollision>

Implements nau::physics::ICapsuleCollision interface utilizing Jolt physics engine.

Public Functions

JoltCapsuleCollision(const ConstructionData &constructionData, JPH::PhysicsMaterial *material = nullptr)

Initialization constructor.

Parameters:
  • constructionData[in] Capsule geometry.

  • material[in] A pointer to the collision shape material.

Private Types

using Base = JoltCollisionShapeImpl<ICapsuleCollision>

physics::jolt::JoltCylinderCollision

engine/core/modules/physicsJolt/include/nau/physics/jolt/jolt_physics_collider.h

class JoltCylinderCollision : public nau::physics::jolt::JoltCollisionShapeImpl<ICylinderCollision>

Implements nau::physics::ICylinderCollision interface utilizing Jolt physics engine.

Public Functions

JoltCylinderCollision(const ConstructionData &constructionData, JPH::PhysicsMaterial *material = nullptr)

Initialization constructor.

Parameters:
  • constructionData[in] Cylinder geometry.

  • material[in] A pointer to the collision shape material.

Private Types

using Base = JoltCollisionShapeImpl<ICylinderCollision>

physics::jolt::JoltConvexHullCollision

engine/core/modules/physicsJolt/include/nau/physics/jolt/jolt_physics_collider.h

class JoltConvexHullCollision : public nau::physics::jolt::JoltCollisionShapeImpl<IConvexHullCollision>

Implements nau::physics::IConvexHullCollision interface utilizing Jolt physics engine.

Public Functions

JoltConvexHullCollision(const ConstructionData &constructionData, JPH::PhysicsMaterial *material = nullptr)

Initialization constructor.

Parameters:
  • constructionData[in] Convex hull geometry.

  • material[in] A pointer to the collision shape material.

JoltConvexHullCollision(nau::Ptr<JoltConvexHullAssetView> convexHullAssetView)

Private Types

using Base = JoltCollisionShapeImpl<IConvexHullCollision>

Private Members

nau::Ptr<JoltConvexHullAssetView> m_convexHullAsset

physics::jolt::JoltMeshCollision

engine/core/modules/physicsJolt/include/nau/physics/jolt/jolt_physics_collider.h

class JoltMeshCollision : public nau::physics::jolt::JoltCollisionShapeImpl<IMeshCollision>

Implements nau::physics::IMeshCollision interface utilizing Jolt physics engine.

Public Functions

JoltMeshCollision(const ConstructionData &constructionData)

Initialization constructor.

Parameters:
  • constructionData[in] Mesh geometry.

  • material[in] A pointer to the collision shape material.

JoltMeshCollision(nau::Ptr<JoltTriMeshAssetView> meshAssetView)

Private Types

using Base = JoltCollisionShapeImpl<IMeshCollision>

Private Members

nau::Ptr<JoltTriMeshAssetView> m_meshAsset

physics::jolt::JoltSphereShape

engine/core/modules/physicsJolt/include/nau/physics/jolt/jolt_physics_shapes.h

class JoltSphereShape : public JPH::SphereShape

Public Functions

JoltSphereShape(float radius, const JPH::PhysicsMaterial *material = nullptr)
void Draw(JPH::DebugRenderer *renderer, JPH::RMat44Arg centerOfMassTransform, JPH::Vec3Arg scale, JPH::ColorArg color, bool inUseMaterialColors, bool drawWireframe) const override