Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
EngineCore::RigidBodyCreateInfo Struct Reference

Rigid body create info is used to create a rigid body. It delivers all informations like the initial transform where the simulation should start or the mass of the object. More...

#include <PhysicsEngine.h>

Public Attributes

glm::mat4 transform {1.0f}
 initial location for the rigid body
float mass = 1.0f
 mass in Kilograms. Mass of 0 is a static object --> immovable
btCollisionShape * shape = nullptr
 pointer to the collision shape
float friction = 0.5f
 friction 0.0f - 1.0f. 0 is ice 0.3f - 0.5f wood or plastic. 0.7f - 1.0f High friction
float restitution = 0.0f
 energy absorption 0.0f means full absorption on impact, 0.5f half of the energy is maintained after impact, 1.0f, full energy is maintained

Detailed Description

Rigid body create info is used to create a rigid body. It delivers all informations like the initial transform where the simulation should start or the mass of the object.

Author
Konstantin Passig
Date
31.12.2025

Definition at line 13 of file PhysicsEngine.h.

Member Data Documentation

◆ friction

float EngineCore::RigidBodyCreateInfo::friction = 0.5f

friction 0.0f - 1.0f. 0 is ice 0.3f - 0.5f wood or plastic. 0.7f - 1.0f High friction

Definition at line 22 of file PhysicsEngine.h.

Referenced by EngineCore::PhysicsBodyComponent::createRigidBody(), and EngineCore::PhysicsEngine::createRigidBody().

◆ mass

float EngineCore::RigidBodyCreateInfo::mass = 1.0f

mass in Kilograms. Mass of 0 is a static object --> immovable

Definition at line 18 of file PhysicsEngine.h.

Referenced by EngineCore::PhysicsBodyComponent::createRigidBody(), and EngineCore::PhysicsEngine::createRigidBody().

◆ restitution

float EngineCore::RigidBodyCreateInfo::restitution = 0.0f

energy absorption 0.0f means full absorption on impact, 0.5f half of the energy is maintained after impact, 1.0f, full energy is maintained

Definition at line 24 of file PhysicsEngine.h.

Referenced by EngineCore::PhysicsBodyComponent::createRigidBody(), and EngineCore::PhysicsEngine::createRigidBody().

◆ shape

btCollisionShape* EngineCore::RigidBodyCreateInfo::shape = nullptr

pointer to the collision shape

Definition at line 20 of file PhysicsEngine.h.

Referenced by EngineCore::PhysicsBodyComponent::createRigidBody(), and EngineCore::PhysicsEngine::createRigidBody().

◆ transform

glm::mat4 EngineCore::RigidBodyCreateInfo::transform {1.0f}

initial location for the rigid body

Definition at line 16 of file PhysicsEngine.h.

Referenced by EngineCore::PhysicsBodyComponent::createRigidBody(), and EngineCore::PhysicsEngine::createRigidBody().


The documentation for this struct was generated from the following file:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Physics/PhysicsEngine.h