Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Loading...
Searching...
No Matches
RigidBodyComponent Struct Reference

Holds mass, velocity, acceleration, forces, restitution, bounciness, and gravity settings. More...

#include <RigidBody.hpp>

Public Attributes

RigidBodyType type = RigidBodyType::Dynamic
float mass = 1.0f
glm::vec3 velocity = glm::vec3(0.0f)
glm::vec3 acceleration = glm::vec3(0.0f)
glm::vec3 force = glm::vec3(0.0f)
float gravityScale = 1.0f
float restitution = 0.5f
float friction = 0.3f
glm::vec3 angularVelocity = glm::vec3(0.0f)
glm::vec3 torque = glm::vec3(0.0f)
float angularDrag = 0.5f
float linearDrag = 0.0f
float sleepTimer = 0.0f
bool sleeping = false
bool hadContactThisFrame = false
bool unstableContactThisFrame = false
bool freezePositionX = false
bool freezePositionY = false
bool freezePositionZ = false
bool freezeRotationX = false
bool freezeRotationY = false
bool freezeRotationZ = false

Detailed Description

Holds mass, velocity, acceleration, forces, restitution, bounciness, and gravity settings.

Member Data Documentation

◆ acceleration

glm::vec3 RigidBodyComponent::acceleration = glm::vec3(0.0f)

◆ angularDrag

float RigidBodyComponent::angularDrag = 0.5f

◆ angularVelocity

glm::vec3 RigidBodyComponent::angularVelocity = glm::vec3(0.0f)

◆ force

glm::vec3 RigidBodyComponent::force = glm::vec3(0.0f)

◆ freezePositionX

bool RigidBodyComponent::freezePositionX = false

◆ freezePositionY

bool RigidBodyComponent::freezePositionY = false

◆ freezePositionZ

bool RigidBodyComponent::freezePositionZ = false

◆ freezeRotationX

bool RigidBodyComponent::freezeRotationX = false

◆ freezeRotationY

bool RigidBodyComponent::freezeRotationY = false

◆ freezeRotationZ

bool RigidBodyComponent::freezeRotationZ = false

◆ friction

float RigidBodyComponent::friction = 0.3f

◆ gravityScale

float RigidBodyComponent::gravityScale = 1.0f

◆ hadContactThisFrame

bool RigidBodyComponent::hadContactThisFrame = false

◆ linearDrag

float RigidBodyComponent::linearDrag = 0.0f

◆ mass

float RigidBodyComponent::mass = 1.0f

◆ restitution

float RigidBodyComponent::restitution = 0.5f

◆ sleeping

bool RigidBodyComponent::sleeping = false

◆ sleepTimer

float RigidBodyComponent::sleepTimer = 0.0f

◆ torque

glm::vec3 RigidBodyComponent::torque = glm::vec3(0.0f)

◆ type

RigidBodyType RigidBodyComponent::type = RigidBodyType::Dynamic

◆ unstableContactThisFrame

bool RigidBodyComponent::unstableContactThisFrame = false

◆ velocity

glm::vec3 RigidBodyComponent::velocity = glm::vec3(0.0f)

The documentation for this struct was generated from the following file: