Wrath of Zeus
Made by Torchlight Games for CSE 125 SP24
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
Physics Struct Reference

Physics struct that contains all movement / collision related data for a particular object. More...

#include <object.hpp>

Public Member Functions

 Physics (bool movable, Collider collider, glm::vec3 corner, glm::vec3 facing, glm::vec3 dimensions=glm::vec3(1.0f))
 constructor for Physics More...
 
std::string to_string (unsigned int tab_offset)
 
std::string to_string ()
 

Data Fields

SharedPhysics shared
 Shared physics properties (needed by both the server and the client) More...
 
bool movable
 true if the object that contains this Physics struct can move and false otherwise More...
 
bool feels_gravity
 true if the object that contains this Physics struct feels gravity and false otherwise More...
 
glm::vec3 velocity
 3-D vector that denotes this object's current velocity. More...
 
glm::vec3 velocityMultiplier
 3-D vector that denotes this object's velocity multiplier. More...
 
glm::vec3 currTickVelocity
 Tick velocity for knockbacks. More...
 
float nauseous
 Factor for potion of nausea. More...
 
Collider collider
 This object's collider type. More...
 

Detailed Description

Physics struct that contains all movement / collision related data for a particular object.

Constructor & Destructor Documentation

◆ Physics()

Physics::Physics ( bool  movable,
Collider  collider,
glm::vec3  corner,
glm::vec3  facing,
glm::vec3  dimensions = glm::vec3(1.0f) 
)
inline

constructor for Physics

Parameters
movableWhether or not the object is affected by velocity/gravity
colliderCollision type for this object
cornerbottom left corner position of the object
facingwhat direction the object is facing

NOTE: dimensions is an optional parameter, because most of the time dimensions will be set by the setModel function! NOTE: velocity defaults to 0 NOTE: velocityMultitplier defaults to 1 NOTE: Dizziness defaults to 1

Member Function Documentation

◆ to_string() [1/2]

std::string Physics::to_string ( )
inline

◆ to_string() [2/2]

std::string Physics::to_string ( unsigned int  tab_offset)

Field Documentation

◆ collider

Collider Physics::collider

This object's collider type.

◆ currTickVelocity

glm::vec3 Physics::currTickVelocity

Tick velocity for knockbacks.

◆ feels_gravity

bool Physics::feels_gravity

true if the object that contains this Physics struct feels gravity and false otherwise

◆ movable

bool Physics::movable

true if the object that contains this Physics struct can move and false otherwise

◆ nauseous

float Physics::nauseous

Factor for potion of nausea.

◆ shared

SharedPhysics Physics::shared

Shared physics properties (needed by both the server and the client)

◆ velocity

glm::vec3 Physics::velocity

3-D vector that denotes this object's current velocity.

◆ velocityMultiplier

glm::vec3 Physics::velocityMultiplier

3-D vector that denotes this object's velocity multiplier.


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