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

#include <colliders.h>

Inheritance diagram for nngn::AABBCollider:
Collaboration diagram for nngn::AABBCollider:

Public Member Functions

 AABBCollider ()=default
 
 AABBCollider (vec2 p_bl, vec2 p_tr)
 
void load (nngn::lua::table_view t)
 
- Public Member Functions inherited from nngn::Collider
 Collider ()=default
 
 Collider (vec3 p)
 
 Collider (vec3 p, float p_m)
 
void load (nngn::lua::table_view t)
 

Static Public Member Functions

static void update (std::span< AABBCollider > s)
 

Public Attributes

vec2 rel_center = {}
 
vec2 rel_bl = {}
 
vec2 rel_tr = {}
 
vec2 center = {}
 
vec2 bl = {}
 
vec2 tr = {}
 
float radius = {}
 
- Public Attributes inherited from nngn::Collider
Entityentity = nullptr
 
vec3 pos = {}
 
vec3 vel = {}
 
float m = {}
 
Flags< Flagflags = {}
 

Additional Inherited Members

- Public Types inherited from nngn::Collider
enum  Type : u8 {
  NONE , AABB , BB , SPHERE ,
  PLANE , GRAVITY , N_TYPES
}
 
enum  Flag : u8 { COLLIDING = 1 << 0 , TRIGGER = 1 << 1 , SOLID = 1 << 2 }
 

Constructor & Destructor Documentation

◆ AABBCollider() [1/2]

nngn::AABBCollider::AABBCollider ( )
default

◆ AABBCollider() [2/2]

nngn::AABBCollider::AABBCollider ( vec2 p_bl,
vec2 p_tr )

Member Function Documentation

◆ load()

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

◆ update()

void nngn::AABBCollider::update ( std::span< AABBCollider > s)
static
Here is the caller graph for this function:

Member Data Documentation

◆ bl

vec2 nngn::AABBCollider::bl = {}

◆ center

vec2 nngn::AABBCollider::center = {}

◆ radius

float nngn::AABBCollider::radius = {}

◆ rel_bl

vec2 nngn::AABBCollider::rel_bl = {}

◆ rel_center

vec2 nngn::AABBCollider::rel_center = {}

◆ rel_tr

vec2 nngn::AABBCollider::rel_tr = {}

◆ tr

vec2 nngn::AABBCollider::tr = {}

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