nngn
Loading...
Searching...
No Matches
nngn::Collider Struct Reference

#include <colliders.h>

Inheritance diagram for nngn::Collider:
Collaboration diagram for nngn::Collider:

Public Types

enum  Type : u8 {
  NONE , AABB , BB , SPHERE ,
  PLANE , GRAVITY , N_TYPES
}
 
enum  Flag : u8 { COLLIDING = 1 << 0 , TRIGGER = 1 << 1 , SOLID = 1 << 2 }
 

Public Member Functions

 Collider ()=default
 
 Collider (vec3 p)
 
 Collider (vec3 p, float p_m)
 
void load (nngn::lua::table_view t)
 

Public Attributes

Entityentity = nullptr
 
vec3 pos = {}
 
vec3 vel = {}
 
float m = {}
 
Flags< Flagflags = {}
 

Member Enumeration Documentation

◆ Flag

Enumerator
COLLIDING 
TRIGGER 
SOLID 

◆ Type

Enumerator
NONE 
AABB 
BB 
SPHERE 
PLANE 
GRAVITY 
N_TYPES 

Constructor & Destructor Documentation

◆ Collider() [1/3]

nngn::Collider::Collider ( )
default

◆ Collider() [2/3]

nngn::Collider::Collider ( vec3 p)
inlineexplicit

◆ Collider() [3/3]

nngn::Collider::Collider ( vec3 p,
float p_m )
inline

Member Function Documentation

◆ load()

void nngn::Collider::load ( nngn::lua::table_view t)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ entity

Entity* nngn::Collider::entity = nullptr

◆ flags

Flags<Flag> nngn::Collider::flags = {}

◆ m

float nngn::Collider::m = {}

◆ pos

vec3 nngn::Collider::pos = {}

◆ vel

vec3 nngn::Collider::vel = {}

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