Blender
V3.3
|
Axis aligned box. More...
#include <gim_box_collision.h>
Public Member Functions | |
GIM_AABB () | |
GIM_AABB (const btVector3 &V1, const btVector3 &V2, const btVector3 &V3) | |
GIM_AABB (const btVector3 &V1, const btVector3 &V2, const btVector3 &V3, GREAL margin) | |
GIM_AABB (const GIM_AABB &other) | |
GIM_AABB (const GIM_AABB &other, btScalar margin) | |
SIMD_FORCE_INLINE void | invalidate () |
SIMD_FORCE_INLINE void | increment_margin (btScalar margin) |
SIMD_FORCE_INLINE void | copy_with_margin (const GIM_AABB &other, btScalar margin) |
template<typename CLASS_POINT > | |
SIMD_FORCE_INLINE void | calc_from_triangle (const CLASS_POINT &V1, const CLASS_POINT &V2, const CLASS_POINT &V3) |
template<typename CLASS_POINT > | |
SIMD_FORCE_INLINE void | calc_from_triangle_margin (const CLASS_POINT &V1, const CLASS_POINT &V2, const CLASS_POINT &V3, btScalar margin) |
SIMD_FORCE_INLINE void | appy_transform (const btTransform &trans) |
Apply a transform to an AABB. More... | |
SIMD_FORCE_INLINE void | merge (const GIM_AABB &box) |
Merges a Box. More... | |
template<typename CLASS_POINT > | |
SIMD_FORCE_INLINE void | merge_point (const CLASS_POINT &point) |
Merges a point. More... | |
SIMD_FORCE_INLINE void | get_center_extend (btVector3 ¢er, btVector3 &extend) const |
Gets the extend and center. More... | |
SIMD_FORCE_INLINE void | find_intersection (const GIM_AABB &other, GIM_AABB &intersection) const |
Finds the intersecting box between this box and the other. More... | |
SIMD_FORCE_INLINE bool | has_collision (const GIM_AABB &other) const |
SIMD_FORCE_INLINE bool | collide_ray (const btVector3 &vorigin, const btVector3 &vdir) |
Finds the Ray intersection parameter. More... | |
SIMD_FORCE_INLINE void | projection_interval (const btVector3 &direction, btScalar &vmin, btScalar &vmax) const |
SIMD_FORCE_INLINE ePLANE_INTERSECTION_TYPE | plane_classify (const btVector4 &plane) const |
SIMD_FORCE_INLINE bool | overlapping_trans_conservative (const GIM_AABB &box, btTransform &trans1_to_0) |
SIMD_FORCE_INLINE bool | overlapping_trans_cache (const GIM_AABB &box, const GIM_BOX_BOX_TRANSFORM_CACHE &transcache, bool fulltest) |
transcache is the transformation cache from box to this AABB More... | |
SIMD_FORCE_INLINE bool | collide_plane (const btVector4 &plane) |
Simple test for planes. More... | |
SIMD_FORCE_INLINE bool | collide_triangle_exact (const btVector3 &p1, const btVector3 &p2, const btVector3 &p3, const btVector4 &triangle_plane) |
test for a triangle, with edges More... | |
Public Attributes | |
btVector3 | m_min |
btVector3 | m_max |
Axis aligned box.
Definition at line 195 of file gim_box_collision.h.
|
inline |
Definition at line 201 of file gim_box_collision.h.
|
inline |
Definition at line 239 of file gim_box_collision.h.
Definition at line 243 of file gim_box_collision.h.
|
inline |
Apply a transform to an AABB.
Definition at line 322 of file gim_box_collision.h.
References btVector3, center, m_max, and m_min.
Referenced by GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::boxQueryTrans(), and overlapping_trans_conservative().
|
inline |
|
inline |
|
inline |
Simple test for planes.
Definition at line 510 of file gim_box_collision.h.
References G_COLLIDE_PLANE, and plane_classify().
Referenced by collide_triangle_exact().
|
inline |
Finds the Ray intersection parameter.
aabb | Aligned box |
vorigin | A vec3f with the origin of the ray |
vdir | A vec3f with the direction of the ray |
Definition at line 400 of file gim_box_collision.h.
References btFabs(), btVector3, center, get_center_extend(), and GIM_GREATER.
Referenced by GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::rayQuery().
|
inline |
test for a triangle, with edges
Definition at line 518 of file gim_box_collision.h.
References btVector3, center, collide_plane(), KDL::diff(), get_center_extend(), TEST_CROSS_EDGE_BOX_X_AXIS_MCR, TEST_CROSS_EDGE_BOX_Y_AXIS_MCR, TEST_CROSS_EDGE_BOX_Z_AXIS_MCR, v1, and v2.
Referenced by GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::node_collision().
|
inline |
Definition at line 273 of file gim_box_collision.h.
|
inline |
|
inline |
Gets the extend and center.
Definition at line 363 of file gim_box_collision.h.
References center, m_max, and m_min.
Referenced by collide_ray(), collide_triangle_exact(), and overlapping_trans_cache().
|
inline |
Definition at line 381 of file gim_box_collision.h.
Referenced by GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::boxQuery(), GIM_TRIANGLE::collide_triangle(), and overlapping_trans_conservative().
|
inline |
Definition at line 263 of file gim_box_collision.h.
Referenced by GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::node_collision().
|
inline |
Definition at line 253 of file gim_box_collision.h.
References G_REAL_INFINITY, m_max, and m_min.
|
inline |
Merges a Box.
Definition at line 338 of file gim_box_collision.h.
References GIM_MAX, GIM_MIN, m_max, and m_min.
Referenced by GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::refit().
|
inline |
|
inline |
transcache is the transformation cache from box to this AABB
Definition at line 458 of file gim_box_collision.h.
References btVector3, get_center_extend(), GIM_GREATER, GIM_BOX_BOX_TRANSFORM_CACHE::m_AR, GIM_BOX_BOX_TRANSFORM_CACHE::m_R1to0, GIM_BOX_BOX_TRANSFORM_CACHE::m_T1to0, MAT_DOT_COL, r, T, and t.
Referenced by GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::node_collision().
|
inline |
Definition at line 450 of file gim_box_collision.h.
References appy_transform(), and has_collision().
|
inline |
Definition at line 433 of file gim_box_collision.h.
References BOX_PLANE_EPSILON, G_BACK_PLANE, G_COLLIDE_PLANE, G_FRONT_PLANE, and projection_interval().
Referenced by collide_plane().
|
inline |
Definition at line 422 of file gim_box_collision.h.
References btVector3, center, m_max, and m_min.
Referenced by plane_classify().
btVector3 GIM_AABB::m_max |
Definition at line 199 of file gim_box_collision.h.
Referenced by appy_transform(), calc_from_triangle(), calc_from_triangle_margin(), copy_with_margin(), find_intersection(), get_center_extend(), GIM_AABB(), has_collision(), increment_margin(), invalidate(), merge(), merge_point(), and projection_interval().
btVector3 GIM_AABB::m_min |
Definition at line 198 of file gim_box_collision.h.
Referenced by appy_transform(), calc_from_triangle(), calc_from_triangle_margin(), copy_with_margin(), find_intersection(), get_center_extend(), GIM_AABB(), has_collision(), increment_margin(), invalidate(), merge(), merge_point(), and projection_interval().