Logo Search packages:      
Sourcecode: blender version File versions  Download package

GEOMETRIC_OPERATIONS


Classes

class  DISTANCE_PLANE_3D_FUNC
 This function calcs the distance from a 3D plane. More...
class  GIM_TRIANGLE
 Class for colliding triangles. More...
struct  GIM_TRIANGLE_CONTACT_DATA
 Structure for collision. More...

Defines

#define BT_CLAMP(number, minval, maxval)   (number<minval?minval:(number>maxval?maxval:number))
#define DISTANCE_PLANE_POINT(plane, point)   (VEC_DOT(plane,point) - plane[3])
#define EDGE_PLANE(e1, e2, n, plane)
 Calc a plane from an edge an a normal. plane is a vec4f.
#define MAX_TRI_CLIPPING   16
#define PARALELENORMALS   0.000001f
#define PARALELENORMALS   0.000001f
#define PLANE_MINOR_AXES(plane, i0, i1)   VEC_MINOR_AXES(plane, i0, i1)
 Finds the 2 smallest cartesian coordinates of a plane normal.
#define PLANEDIREPSILON   0.0000001f
#define PLANEDIREPSILON   0.0000001f
#define PROJECT_POINT_PLANE(point, plane, projected)
#define TRIANGLE_NORMAL(v1, v2, v3, n)
#define TRIANGLE_NORMAL_FAST(v1, v2, v3, n)
#define TRIANGLE_PLANE(v1, v2, v3, plane)
 plane is a vec4f
#define TRIANGLE_PLANE_FAST(v1, v2, v3, plane)
 plane is a vec4f

Enumerations

enum  eLINE_PLANE_INTERSECTION_TYPE {
  G_FRONT_PLANE_S1 = 0, G_FRONT_PLANE_S2, G_BACK_PLANE_S1, G_BACK_PLANE_S2,
  G_COLLIDE_PLANE_S1, G_COLLIDE_PLANE_S2
}
enum  ePLANE_INTERSECTION_TYPE { G_BACK_PLANE = 0, G_COLLIDE_PLANE, G_FRONT_PLANE }

Functions

template<typename T>
SIMD_FORCE_INLINE bool BOX_AXIS_INTERSECT (T pos, T dir, T bmin, T bmax, T &tfirst, T &tlast)
 Line box intersection in one dimension.
SIMD_FORCE_INLINE void bt_calc_quantization_parameters (btVector3 &outMinBound, btVector3 &outMaxBound, btVector3 &bvhQuantization, const btVector3 &srcMinBound, const btVector3 &srcMaxBound, btScalar quantizationMargin)
SIMD_FORCE_INLINE void bt_closest_point_on_segment (btVector3 &cp, const btVector3 &v, const btVector3 &e1, const btVector3 &e2)
SIMD_FORCE_INLINE btScalar bt_distance_point_plane (const btVector4 &plane, const btVector3 &point)
SIMD_FORCE_INLINE void bt_edge_plane (const btVector3 &e1, const btVector3 &e2, const btVector3 &normal, btVector4 &plane)
 Calc a plane from a triangle edge an a normal. plane is a vec4f.
SIMD_FORCE_INLINE int bt_line_plane_collision (const btVector4 &plane, const btVector3 &vDir, const btVector3 &vPoint, btVector3 &pout, btScalar &tparam, btScalar tmin, btScalar tmax)
 line plane collision
SIMD_FORCE_INLINE int bt_plane_clip_polygon (const btVector4 &plane, const btVector3 *polygon_points, int polygon_point_count, btVector3 *clipped)
 Clips a polygon by a plane.
SIMD_FORCE_INLINE void bt_plane_clip_polygon_collect (const btVector3 &point0, const btVector3 &point1, btScalar dist0, btScalar dist1, btVector3 *clipped, int &clipped_count)
 This function calcs the distance from a 3D plane.
SIMD_FORCE_INLINE int bt_plane_clip_triangle (const btVector4 &plane, const btVector3 &point0, const btVector3 &point1, const btVector3 &point2, btVector3 *clipped)
 Clips a polygon by a plane.
SIMD_FORCE_INLINE void bt_quantize_clamp (unsigned short *out, const btVector3 &point, const btVector3 &min_bound, const btVector3 &max_bound, const btVector3 &bvhQuantization)
SIMD_FORCE_INLINE void bt_segment_collision (const btVector3 &vA1, const btVector3 &vA2, const btVector3 &vB1, const btVector3 &vB2, btVector3 &vPointA, btVector3 &vPointB)
 Find closest points on segments.
SIMD_FORCE_INLINE btVector3 bt_unquantize (const unsigned short *vecIn, const btVector3 &offset, const btVector3 &bvhQuantization)
SIMD_FORCE_INLINE void bt_vec_blend (btVector3 &vr, const btVector3 &va, const btVector3 &vb, btScalar blend_factor)
template<typename CLASS_POINT>
SIMD_FORCE_INLINE void CLOSEST_POINT_ON_SEGMENT (CLASS_POINT &cp, const CLASS_POINT &v, const CLASS_POINT &e1, const CLASS_POINT &e2)
template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE bool INTERSECT_PLANES (const CLASS_PLANE &p1, const CLASS_PLANE &p2, CLASS_POINT &p, CLASS_POINT &d)
 Returns the Ray on which 2 planes intersect if they do. Written by Rodrigo Hernandez on ODE convex collision.
template<typename T, typename CLASS_POINT>
SIMD_FORCE_INLINE bool LINE_INTERSECTION_PARAMS (const CLASS_POINT &dir1, CLASS_POINT &point1, const CLASS_POINT &dir2, CLASS_POINT &point2, T &t1, T &t2)
 Finds the line params where these lines intersect.
template<typename T, typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE GUINT LINE_PLANE_COLLISION (const CLASS_PLANE &plane, const CLASS_POINT &vDir, const CLASS_POINT &vPoint, CLASS_POINT &pout, T &tparam, T tmin, T tmax)
 line collision
template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE GUINT PLANE_CLIP_POLYGON3D (const CLASS_PLANE &plane, const CLASS_POINT *polygon_points, GUINT polygon_point_count, CLASS_POINT *clipped)
template<typename CLASS_POINT>
SIMD_FORCE_INLINE void PLANE_CLIP_POLYGON_COLLECT (const CLASS_POINT &point0, const CLASS_POINT &point1, GREAL dist0, GREAL dist1, CLASS_POINT *clipped, GUINT &clipped_count)
template<typename CLASS_POINT, typename CLASS_PLANE, typename DISTANCE_PLANE_FUNC>
SIMD_FORCE_INLINE GUINT PLANE_CLIP_POLYGON_GENERIC (const CLASS_PLANE &plane, const CLASS_POINT *polygon_points, GUINT polygon_point_count, CLASS_POINT *clipped, DISTANCE_PLANE_FUNC distance_func)
 Clips a polygon by a plane.
template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE void PLANE_CLIP_SEGMENT (const CLASS_POINT &s1, const CLASS_POINT &s2, const CLASS_PLANE &plane, CLASS_POINT &clipped)
template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE
eLINE_PLANE_INTERSECTION_TYPE 
PLANE_CLIP_SEGMENT2 (const CLASS_POINT &s1, const CLASS_POINT &s2, const CLASS_PLANE &plane, CLASS_POINT &clipped)
 Confirms if the plane intersect the edge or nor.
template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE
eLINE_PLANE_INTERSECTION_TYPE 
PLANE_CLIP_SEGMENT_CLOSEST (const CLASS_POINT &s1, const CLASS_POINT &s2, const CLASS_PLANE &plane, CLASS_POINT &clipped1, CLASS_POINT &clipped2)
 Confirms if the plane intersect the edge or not.
template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE GUINT PLANE_CLIP_TRIANGLE3D (const CLASS_PLANE &plane, const CLASS_POINT &point0, const CLASS_POINT &point1, const CLASS_POINT &point2, CLASS_POINT *clipped)
template<typename CLASS_POINT, typename CLASS_PLANE, typename DISTANCE_PLANE_FUNC>
SIMD_FORCE_INLINE GUINT PLANE_CLIP_TRIANGLE_GENERIC (const CLASS_PLANE &plane, const CLASS_POINT &point0, const CLASS_POINT &point1, const CLASS_POINT &point2, CLASS_POINT *clipped, DISTANCE_PLANE_FUNC distance_func)
 Clips a polygon by a plane.
template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE bool POINT_IN_HULL (const CLASS_POINT &point, const CLASS_PLANE *planes, GUINT plane_count)
 Verifies if a point is in the plane hull.
template<typename T, typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE bool RAY_PLANE_COLLISION (const CLASS_PLANE &plane, const CLASS_POINT &vDir, const CLASS_POINT &vPoint, CLASS_POINT &pout, T &tparam)
 Ray plane collision in one way.
template<typename CLASS_POINT>
SIMD_FORCE_INLINE void SEGMENT_COLLISION (const CLASS_POINT &vA1, const CLASS_POINT &vA2, const CLASS_POINT &vB1, const CLASS_POINT &vB2, CLASS_POINT &vPointA, CLASS_POINT &vPointB)
 Find closest points on segments.
template<typename T>
SIMD_FORCE_INLINE void SORT_3_INDICES (const T *values, GUINT *order_indices)
 Sorts 3 componets.


Generated by  Doxygen 1.6.0   Back to index