1#ifndef PGR_SEM_COPAKOND_RIGIDSPHERE_H
2#define PGR_SEM_COPAKOND_RIGIDSPHERE_H
9 glm::vec3 _velocity = glm::vec3(0.0f, 0.0f, 0.0f);
10 glm::vec3 _gravity = glm::vec3(0.0f, -9.81f, 0.0f);
11 float _airFriction = 0.1f;
14 void rollRotation(
float timeDeltaNow);
15 bool _isOnFloor =
false;
19 const glm::vec3 &
scale = glm::vec3(1.0f),
bool debug =
false);
22 void physics_process(
float deltaTime,
const std::vector<CollisionShape*>& allColliders);
CollisionSphere(const glm::vec3 &position=glm::vec3(0.0f), const glm::vec3 &rotation=glm::vec3(0.0f), const glm::vec3 &scale=glm::vec3(1.0f), bool visible=false)
Definition collisionSphere.cpp:13
glm::vec3 & rotation()
Definition geometry.h:61
glm::vec3 & scale()
Definition geometry.h:62
glm::vec3 & position()
Definition geometry.h:60
bool isOnFloor() const
Definition rigidSphere.h:28
glm::vec3 & gravity()
Definition rigidSphere.h:24
void physics_process(float deltaTime, const std::vector< CollisionShape * > &allColliders)
Updates position, applies gravity, friction, rolling, and resolves collisions.
Definition rigidSphere.cpp:33
float getAirFriction() const
Definition rigidSphere.h:26
void setAirFriction(float airFriction)
RigidSphere(const glm::vec3 &position=glm::vec3(0.0f), const glm::vec3 &rotation=glm::vec3(0.0f), const glm::vec3 &scale=glm::vec3(1.0f), bool debug=false)
Definition rigidSphere.cpp:4
glm::vec3 & velocity()
Definition rigidSphere.h:23
PGR Semestral work with sample scenes and bowling. doxygen was generated with a help of LLM.
Definition bezier.cpp:3