VOX
A little voxel engine
Loading...
Searching...
No Matches
Mob Class Reference

#include <Mob.hpp>

Collaboration diagram for Mob:
Collaboration graph

Public Member Functions

 Mob ()
 
 ~Mob ()
 
 Mob (Mob &other)=delete
 
 Mob (Mob &&other)=delete
 
Moboperator= (Mob &other)=delete
 
Moboperator= (Mob &&other)=delete
 
bool canJump () const
 
void startJump ()
 
void startFall ()
 
double fallDuration ()
 
 TracyLockableN (std::mutex, mutex, "Mob Mutex")
 

Public Attributes

Transform transform = Transform({0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, {1.0, 1.0, 1.0})
 
HitBox hitbox = HitBox({-0.4, 0, -0.4}, {0.8, 1.8, 0.8})
 
HitBox feet = HitBox({-0.4, -0.01, -0.4}, {0.8, 0.1, 0.8})
 
glm::dvec3 velocity = glm::dvec3(0.0)
 
bool on_ground = false
 
bool jumping = false
 
int jump_remaining = 1
 
glm::dvec3 target_position = glm::dvec3(0.0)
 
bool should_jump = false
 

Constructor & Destructor Documentation

◆ Mob() [1/3]

Mob::Mob ( )

◆ ~Mob()

Mob::~Mob ( )

◆ Mob() [2/3]

Mob::Mob ( Mob other)
delete

◆ Mob() [3/3]

Mob::Mob ( Mob &&  other)
delete

Member Function Documentation

◆ canJump()

bool Mob::canJump ( ) const

◆ fallDuration()

double Mob::fallDuration ( )

◆ operator=() [1/2]

Mob & Mob::operator= ( Mob &&  other)
delete

◆ operator=() [2/2]

Mob & Mob::operator= ( Mob other)
delete

◆ startFall()

void Mob::startFall ( )

◆ startJump()

void Mob::startJump ( )

◆ TracyLockableN()

Mob::TracyLockableN ( std::mutex  ,
mutex  ,
"Mob Mutex"   
)

Member Data Documentation

◆ feet

HitBox Mob::feet = HitBox({-0.4, -0.01, -0.4}, {0.8, 0.1, 0.8})

◆ hitbox

HitBox Mob::hitbox = HitBox({-0.4, 0, -0.4}, {0.8, 1.8, 0.8})

◆ jump_remaining

int Mob::jump_remaining = 1

◆ jumping

bool Mob::jumping = false

◆ on_ground

bool Mob::on_ground = false

◆ should_jump

bool Mob::should_jump = false

◆ target_position

glm::dvec3 Mob::target_position = glm::dvec3(0.0)

◆ transform

Transform Mob::transform = Transform({0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, {1.0, 1.0, 1.0})

◆ velocity

glm::dvec3 Mob::velocity = glm::dvec3(0.0)

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