Blender V2.61 - r43446
Public Member Functions | Public Attributes

GIM_AABB Class Reference

Axis aligned box. More...

#include <gim_box_collision.h>

List of all members.

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.
SIMD_FORCE_INLINE void merge (const GIM_AABB &box)
 Merges a Box.
template<typename CLASS_POINT >
SIMD_FORCE_INLINE void merge_point (const CLASS_POINT &point)
 Merges a point.
SIMD_FORCE_INLINE void get_center_extend (btVector3 &center, btVector3 &extend) const
 Gets the extend and center.
SIMD_FORCE_INLINE void find_intersection (const GIM_AABB &other, GIM_AABB &intersection) const
 Finds the intersecting box between this box and the other.
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.
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
SIMD_FORCE_INLINE bool collide_plane (const btVector4 &plane)
 Simple test for planes.
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

Public Attributes

btVector3 m_min
btVector3 m_max

Detailed Description

Axis aligned box.

Definition at line 199 of file gim_box_collision.h.


Constructor & Destructor Documentation

GIM_AABB::GIM_AABB ( ) [inline]

Definition at line 205 of file gim_box_collision.h.

GIM_AABB::GIM_AABB ( const btVector3 &  V1,
const btVector3 &  V2,
const btVector3 &  V3 
) [inline]

Definition at line 209 of file gim_box_collision.h.

References GIM_MAX3, GIM_MIN3, m_max, and m_min.

GIM_AABB::GIM_AABB ( const btVector3 &  V1,
const btVector3 &  V2,
const btVector3 &  V3,
GREAL  margin 
) [inline]

Definition at line 222 of file gim_box_collision.h.

References GIM_MAX3, GIM_MIN3, m_max, and m_min.

GIM_AABB::GIM_AABB ( const GIM_AABB other) [inline]

Definition at line 243 of file gim_box_collision.h.

GIM_AABB::GIM_AABB ( const GIM_AABB other,
btScalar  margin 
) [inline]

Definition at line 248 of file gim_box_collision.h.

References m_max, and m_min.


Member Function Documentation

SIMD_FORCE_INLINE void GIM_AABB::appy_transform ( const btTransform trans) [inline]
template<typename CLASS_POINT >
SIMD_FORCE_INLINE void GIM_AABB::calc_from_triangle ( const CLASS_POINT &  V1,
const CLASS_POINT &  V2,
const CLASS_POINT &  V3 
) [inline]

Definition at line 291 of file gim_box_collision.h.

References GIM_MAX3, GIM_MIN3, m_max, and m_min.

template<typename CLASS_POINT >
SIMD_FORCE_INLINE void GIM_AABB::calc_from_triangle_margin ( const CLASS_POINT &  V1,
const CLASS_POINT &  V2,
const CLASS_POINT &  V3,
btScalar  margin 
) [inline]

Definition at line 306 of file gim_box_collision.h.

References GIM_MAX3, GIM_MIN3, m_max, and m_min.

SIMD_FORCE_INLINE bool GIM_AABB::collide_plane ( const btVector4 plane) [inline]

Simple test for planes.

Definition at line 520 of file gim_box_collision.h.

References G_COLLIDE_PLANE, and plane_classify().

Referenced by collide_triangle_exact().

SIMD_FORCE_INLINE bool GIM_AABB::collide_ray ( const btVector3 &  vorigin,
const btVector3 &  vdir 
) [inline]

Finds the Ray intersection parameter.

Parameters:
aabbAligned box
voriginA vec3f with the origin of the ray
vdirA vec3f with the direction of the ray

Definition at line 407 of file gim_box_collision.h.

References btFabs(), get_center_extend(), and GIM_GREATER.

Referenced by GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE >::rayQuery().

SIMD_FORCE_INLINE bool GIM_AABB::collide_triangle_exact ( const btVector3 &  p1,
const btVector3 &  p2,
const btVector3 &  p3,
const btVector4 triangle_plane 
) [inline]
SIMD_FORCE_INLINE void GIM_AABB::copy_with_margin ( const GIM_AABB other,
btScalar  margin 
) [inline]

Definition at line 279 of file gim_box_collision.h.

References m_max, and m_min.

SIMD_FORCE_INLINE void GIM_AABB::find_intersection ( const GIM_AABB other,
GIM_AABB intersection 
) const [inline]

Finds the intersecting box between this box and the other.

Definition at line 376 of file gim_box_collision.h.

References GIM_MAX, GIM_MIN, m_max, and m_min.

SIMD_FORCE_INLINE void GIM_AABB::get_center_extend ( btVector3 &  center,
btVector3 &  extend 
) const [inline]

Gets the extend and center.

Definition at line 369 of file gim_box_collision.h.

References m_max, and m_min.

Referenced by collide_ray(), collide_triangle_exact(), and overlapping_trans_cache().

SIMD_FORCE_INLINE bool GIM_AABB::has_collision ( const GIM_AABB other) const [inline]
SIMD_FORCE_INLINE void GIM_AABB::increment_margin ( btScalar  margin) [inline]
SIMD_FORCE_INLINE void GIM_AABB::invalidate ( void  ) [inline]

Definition at line 259 of file gim_box_collision.h.

References G_REAL_INFINITY, m_max, and m_min.

SIMD_FORCE_INLINE void GIM_AABB::merge ( const GIM_AABB box) [inline]
template<typename CLASS_POINT >
SIMD_FORCE_INLINE void GIM_AABB::merge_point ( const CLASS_POINT &  point) [inline]

Merges a point.

Definition at line 357 of file gim_box_collision.h.

References GIM_MAX, GIM_MIN, m_max, and m_min.

SIMD_FORCE_INLINE bool GIM_AABB::overlapping_trans_cache ( const GIM_AABB box,
const GIM_BOX_BOX_TRANSFORM_CACHE transcache,
bool  fulltest 
) [inline]
SIMD_FORCE_INLINE bool GIM_AABB::overlapping_trans_conservative ( const GIM_AABB box,
btTransform trans1_to_0 
) [inline]

Definition at line 458 of file gim_box_collision.h.

References appy_transform(), and has_collision().

SIMD_FORCE_INLINE ePLANE_INTERSECTION_TYPE GIM_AABB::plane_classify ( const btVector4 plane) const [inline]
SIMD_FORCE_INLINE void GIM_AABB::projection_interval ( const btVector3 &  direction,
btScalar vmin,
btScalar vmax 
) const [inline]

Definition at line 430 of file gim_box_collision.h.

References m_max, and m_min.

Referenced by plane_classify().


Member Data Documentation

btVector3 GIM_AABB::m_max
btVector3 GIM_AABB::m_min

The documentation for this class was generated from the following file: