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

#include <colliders.h>

Inheritance diagram for nngn::GravityCollider:
Collaboration diagram for nngn::GravityCollider:

Public Member Functions

 GravityCollider ()=default
 
 GravityCollider (vec3 p, float p_m, float max_distance)
 
void load (const nngn::lua::table &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< GravityCollider > s)
 

Public Attributes

float max_distance2 = {}
 
- Public Attributes inherited from nngn::Collider
Entityentity = nullptr
 
vec3 pos = {}
 
vec3 vel = {}
 
float m = {}
 
Flags< Flagflags = {}
 

Static Public Attributes

static constexpr float G = 6.674e-11f
 

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

◆ GravityCollider() [1/2]

nngn::GravityCollider::GravityCollider ( )
default

◆ GravityCollider() [2/2]

nngn::GravityCollider::GravityCollider ( vec3 p,
float p_m,
float max_distance )
inline

Member Function Documentation

◆ load()

void nngn::GravityCollider::load ( const nngn::lua::table & t)
Here is the call graph for this function:

◆ update()

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

Member Data Documentation

◆ G

float nngn::GravityCollider::G = 6.674e-11f
staticconstexpr

◆ max_distance2

float nngn::GravityCollider::max_distance2 = {}

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