#include <stack>
#include <algorithm>
#include "glm/glm.hpp"
#include "glm/gtx/string_cast.hpp"
#include "glm/gtx/norm.hpp"
#include "math_3d.hpp"
#include "collision.hpp"
Go to the source code of this file.
|
| vector< int > | getTriangleSet (TriOctree &octree, CollisionBody &sphereBody, vector< int > &tri_ids) |
| | Get triangle set in the octree for the positions. More...
|
| |
| void | createChildren (TriOctree &octree) |
| | Helper function for spawning child TriOctree. More...
|
| |
| void | initOctree (TriOctree &octree, int ind, vec3 pos, float hwidth, vector< Tri > tris) |
| | Initialization function. More...
|
| |
| vector< vec4 > | getAllNodes () |
| | Get a vector of nodes, represented with a 3D position and half-width of the TriOctree. {vec4(x,y,z,hw), ... }. More...
|
| |
| int | initBox (CollisionBody *body, float w, float h, float b) |
| | Initializer function for a box CollisionBody; w x h x b. More...
|
| |
| int | initSphere (CollisionBody *body, float r) |
| | Initializer function for a sphere CollisionBody. More...
|
| |
| int | initCylinder (CollisionBody *body, float r1, float r2, float h) |
| | Initializer function for a cylinder CollisionBody. More...
|
| |
| int | initTriangle (CollisionBody *body, vector< vec3 > verts) |
| | Initializer function for a triangle CollisionBody. More...
|
| |
| vector< CollisionBody > | initTriangleMesh (vector< vec3 > verts) |
| | Initializer function for triangle mesh CollisionBody's. More...
|
| |
| TriOctree * | getOctree () |
| |
|
| const float | pi = 3.141592654f |
| |
◆ GLM_ENABLE_EXPERIMENTAL
| #define GLM_ENABLE_EXPERIMENTAL |
◆ BodyType
| Enumerator |
|---|
| NONE | |
| TRIANGLE | |
| BOX | |
| SPHERE | |
| CYLINDER | |
| COMPOSITE | |
◆ createChildren()
Helper function for spawning child TriOctree.
◆ getAllNodes()
| vector<vec4> getAllNodes |
( |
| ) |
|
Get a vector of nodes, represented with a 3D position and half-width of the TriOctree. {vec4(x,y,z,hw), ... }.
◆ getOctree()
◆ getTriangleSet()
Get triangle set in the octree for the positions.
◆ initBox()
◆ initCylinder()
| int initCylinder |
( |
CollisionBody * |
body, |
|
|
float |
r1, |
|
|
float |
r2, |
|
|
float |
h |
|
) |
| |
◆ initOctree()
| void initOctree |
( |
TriOctree & |
octree, |
|
|
int |
ind, |
|
|
vec3 |
pos, |
|
|
float |
hwidth, |
|
|
vector< Tri > |
tris |
|
) |
| |
Initialization function.
- Todo:
- make it a member.
◆ initSphere()
◆ initTriangle()
◆ initTriangleMesh()
◆ pi
| const float pi = 3.141592654f |