Darc Library  2012.11
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
darc::geometry Namespace Reference

Classes

class  GE_Triangle3D
struct  GE_HitInfo

Enumerations

enum  EVALUE {
  DC_DISJOINT = 100, DC_COLLINEAR = 101, DC_ERROR_NUMERIC = 102, GE_INTERSECT_SEGMENT = 103,
  DC_INTERSECT_RAY = 104, DC_INTERSECT_LINE = 105
}

Functions

DCR CR_API CR_Intersect2D_VxV (const core::CR_Vector2D &_v0, const core::CR_Vector2D &_v1)
 Intersection between two vectors.
DCR CR_API CR_Intersect2D_SxV (const GE_Segment2D &_s0, const CR_Vector2D &_v1)
 Intersection between a vector and a segment.
DCR CR_API CR_Intersect2D_SxS (const GE_Segment2D &_s0, const CR_Vector2D &_v1)
DCR CR_API CR_Intersect2D_RxV (const GE_Segment2D &_s0, const CR_Vector2D &_v1)
DCR CR_API CR_Intersect2D_RxS (const GE_Segment2D &_s0, const CR_Vector2D &_v1)
DCR CR_API CR_Intersect2D_RxR (const GE_Segment2D &_s0, const CR_Vector2D &_v1)
DCR CR_API CR_Intersect2D_LxL (const GE_Segment2D &_s0, const Triangle2D &_v1)
DCR GE_API ge_Intersect_SegmentSegment2D (const GE_Segment2D &_s0, const GE_Segment2D &_s1, core::CR_Vector2D &_vOut)
DCR GE_API ge_Intersect_SegmentSegment2D (const GE_Segment2D &_s0, const GE_Segment2D &_s1, core::CR_Vector2D &_vOut, float *_fOut)
DCR GE_API ge_Intersect_TriangleTriangle2D (Triangle2D &_tTarget, Triangle2D &_tSource, core::CR_Vector2D *_vIntersectOut, int &_nPointOut)
DCR GE_API ge_Intersect_SegmentPlane (const GE_Segment3D &_s, const GE_Plane3D &_p, Vector3D &_vOut, float *_fOut)
DCR GE_API ge_Intersect_SegmentTriangle (const GE_Segment3D &_s, const Triangle3D &_t, Vector3D &_vOut, Real *_fOut, Real *_ftOut)
DCR GE_API ge_Intersect_LineTriangle (const GE_Line3D &_l, const GE_Plane3D &_p, Vector3D &_vOut)
DCR GE_API ge_Intersect_PlanePlane (const GE_Plane3D &_p0, const GE_Plane3D &_p1, GE_Line3D &_lOut)
int ge_Intersect_TT2D_Flags (const Triangle2D &_t, const CR_Vector2D &_v)
DCR ge_Intersect_TT2D_Edge (const Triangle2D &_t, const GE_Segment2D &_s, int _flCombined, int _eID, int &_nHits, GE_HitInfo *_info)
DCR GE_API ge_Project_PointSegment2D (const CR_Vector2D &_v, const GE_Segment2D &_s, float &_fDistOut, CR_Vector2D *_vBaseOut)

Enumeration Type Documentation

Enumerator:
DC_DISJOINT 
DC_COLLINEAR 
DC_ERROR_NUMERIC 
GE_INTERSECT_SEGMENT 
DC_INTERSECT_RAY 
DC_INTERSECT_LINE 

Function Documentation

Intersection between a vector and a segment.

In the case of collinearity, the function calculates the parametric coordinate of the intersection point. A value of 0.0 represents the first point of the segment, 1.0 the second one.

DCR CR_API darc::geometry::CR_Intersect2D_VxV ( const core::CR_Vector2D &  _v0,
const core::CR_Vector2D &  _v1 
)

Intersection between two vectors.

Intersection between line and triangle.

DCR GE_API darc::geometry::ge_Intersect_PlanePlane ( const GE_Plane3D _p0,
const GE_Plane3D _p1,
GE_Line3D _lOut 
)

Intersection between two triangles. Intersection between two triangles. Intersection between two planes.

Intersection between two planes.

DCR GE_API darc::geometry::ge_Intersect_SegmentPlane ( const GE_Segment3D _s,
const GE_Plane3D _p,
Vector3D _vOut,
float *  _fOut 
)

Intersection between a segment and plane including scaling factor. The result can be GE_DISJOINT, GE_COLLINEAR or DC_OK

DCR GE_API darc::geometry::ge_Intersect_SegmentSegment2D ( const GE_Segment2D _s0,
const GE_Segment2D _s1,
core::CR_Vector2D &  _vOut 
)
DCR GE_API darc::geometry::ge_Intersect_SegmentSegment2D ( const GE_Segment2D _s0,
const GE_Segment2D _s1,
core::CR_Vector2D &  _vOut,
float *  _fOut 
)

Intersection between two segments including scaling factors.

DCR GE_API darc::geometry::ge_Intersect_SegmentTriangle ( const GE_Segment3D _s,
const Triangle3D _t,
Vector3D _vOut,
Real *  _fOut,
Real *  _ftOut 
)

Intersection between a segment and triangle including scaling factors. The result can be GE_DISJOINT, GE_COLLINEAR or DC_OK.

Parameters:
_fOutScaling factor for the segment. Make room for one float.
_ftOutScaling factors for the triangle. Make room for two floats.
DCR GE_API darc::geometry::ge_Intersect_TriangleTriangle2D ( Triangle2D _tTarget,
Triangle2D _tSource,
core::CR_Vector2D *  _vIntersectOut,
int &  _nPointOut 
)

This function computes the overlapping area of 2 triangles. The vertices of both source and target triangle may be reordered during the process.

Parameters:
_vOutlineExternal array where the points (up to six) of the intersection area will be stored.
_nHitNumber of points defining the intersection area.
DCR darc::geometry::ge_Intersect_TT2D_Edge ( const Triangle2D _t,
const GE_Segment2D _s,
int  _flCombined,
int  _eID,
int &  _nHits,
GE_HitInfo *  _info 
)

This function computes all intersections between an edge and all edges of a target triangle, and resorts by distance if necessary. A maximum number of 2 intersections is possible

Parameters:
__flCombinedThe OR combined flags of the source edge.
_eIDThe ID of the source edge.
int darc::geometry::ge_Intersect_TT2D_Flags ( const Triangle2D _t,
const CR_Vector2D _v 
)

This function computes the positional flags of a vertex in relation to a triangle

DCR GE_API darc::geometry::ge_Project_PointSegment2D ( const CR_Vector2D _v,
const GE_Segment2D _s,
float &  _fDistOut,
CR_Vector2D _vBaseOut 
)