HDK
|
#include <GU_IntersectionAnalysis.h>
Classes | |
struct | SegmentIntersectionInfo |
struct | TriangleIntersectionInfo |
Public Types | |
enum | SegmentIntersectionType { SEGMENT_INTERIOR = 0, SEGMENT_VERTEX, SEGMENT_SEGMENT } |
Where on a segment does the intersection lie. More... | |
enum | TriangleIntersectionType { TRIANGLE_INTERIOR = 0, TRIANGLE_EDGE, TRIANGLE_VERTEX, TRIANGLE_SEGMENT } |
Where on the triangle does the intersection lie. More... | |
using | Real = fpreal64 |
Shorthands for common vector types. More... | |
using | Vec3 = UT_Vector3T< Real > |
using | Vec3f = UT_Vector3T< fpreal32 > |
using | Vec2 = UT_Vector2T< Real > |
using | Vec4 = UT_Vector4T< Real > |
Static Public Member Functions | |
static UT_Optional< std::pair < SegmentIntersectionInfo, TriangleIntersectionInfo > > | triangleSegmentIntersect (const Vec3 &p0, const Vec3 &p1, const Vec3 &p2, const Vec3 &n, const Vec3 &a, const Vec3 &b) |
template<bool USEFILTER> | |
static UT_Optional< std::pair < SegmentIntersectionInfo, TriangleIntersectionInfo > > | triangleSegmentIntersect (const Vec3 &p0, const Vec3 &p1, const Vec3 &p2, const Vec3 &n, const Vec3 &a, const Vec3 &b, const UT_GeometryPredicates< Real, USEFILTER > &pred) |
static UT_Optional< std::pair < SegmentIntersectionInfo, SegmentIntersectionInfo > > | segmentSegmentIntersect (const Vec3 &p0, const Vec3 &p1, const Vec3 &q0, const Vec3 &q1) |
template<bool USEFILTER> | |
static UT_Optional< std::pair < SegmentIntersectionInfo, SegmentIntersectionInfo > > | segmentSegmentIntersect (const Vec3 &p0, const Vec3 &p1, const Vec3 &q0, const Vec3 &q1, const UT_GeometryPredicates< Real, USEFILTER > &pred) |
static UT_Optional< std::pair < SegmentIntersectionInfo, SegmentIntersectionInfo > > | segmentSegmentIntersect (const Vec3 &p0, const Vec3 &p1, const Vec3 &q0, const Vec3 &q1, Real tol) |
template<bool USEFILTER> | |
static UT_Optional< std::pair < SegmentIntersectionInfo, SegmentIntersectionInfo > > | segmentSegmentIntersect (const Vec3 &p0, const Vec3 &p1, const Vec3 &q0, const Vec3 &q1, Real tol, const UT_GeometryPredicates< Real, USEFILTER > &pred) |
static UT_Vector3DArray | findIntersectionPoints (const GEO_Detail *gdp0, const GA_PrimitiveGroup *prim_grp0, const GEO_Detail *gdp1=NULL, const GA_PrimitiveGroup *prim_grp1=NULL, Real prox_tol=0, UT_Array< UT_Int32Array > *input_num_arr=NULL, UT_Array< UT_Int64Array > *prim_num_arr=NULL, UT_Array< UT_Fpreal32Array > *prim_uvw_arr=NULL, UT_Array< UT_Int64Array > *pt_num_arr=NULL) |
static UT_UniquePtr< GU_Detail > | validateGeometry (const GU_Detail *geo, std::string &warning) |
Definition at line 21 of file GU_IntersectionAnalysis.h.
Shorthands for common vector types.
Definition at line 25 of file GU_IntersectionAnalysis.h.
using GU_IntersectionAnalysis::Vec2 = UT_Vector2T<Real> |
Definition at line 28 of file GU_IntersectionAnalysis.h.
using GU_IntersectionAnalysis::Vec3 = UT_Vector3T<Real> |
Definition at line 26 of file GU_IntersectionAnalysis.h.
Definition at line 27 of file GU_IntersectionAnalysis.h.
using GU_IntersectionAnalysis::Vec4 = UT_Vector4T<Real> |
Definition at line 29 of file GU_IntersectionAnalysis.h.
Where on a segment does the intersection lie.
Supporting data structures specifying the information about triangle and segment intersections
Enumerator | |
---|---|
SEGMENT_INTERIOR | |
SEGMENT_VERTEX | |
SEGMENT_SEGMENT |
Definition at line 35 of file GU_IntersectionAnalysis.h.
Where on the triangle does the intersection lie.
Enumerator | |
---|---|
TRIANGLE_INTERIOR | |
TRIANGLE_EDGE | |
TRIANGLE_VERTEX | |
TRIANGLE_SEGMENT |
Definition at line 61 of file GU_IntersectionAnalysis.h.
|
static |
Given valid details gdp0 and gdp1, returns points of intersection between the two details or self-intersection if gdp1 is null. This routine requires a valid gdp containing triangles and curves only, as ensured by validateGeometry
|
static |
PRE: Two segments p0-p1 and q0-q1. Assume that all points are distinct. POST: Find t coordinates for the two segments respectively if the intersection is close to endpoints p0,p1,q0,q1 then these will be accordinly snapped to 0 or 1 so you can test them against 1 and 0 later with operator==
|
static |
|
static |
Approximate version of the function above. tol is the distance tolerance between line segments. If tol == 0, this function simply calls the function above
|
static |
|
static |
This routine computes the intersection between a segment and a triangle. PRE: p0,p1,p2 are triangle vertex positions n is the triangle normal ( e.g. cross(p1-p0, p2-p0).normalize() ) a,b are segment vertex positions Assume that all points are distinct. POST: Returns the intersection info as defined above. This method guarantees that the local primitive 1-u-v,u,v, coordinates are in the triangle interior (i.e. no coordinate is exactly 0 or 1) if intersection type is TRIANGLE_INTERIOR. Naturally, one of 1-u-v,u,v is zero if the type is TRIANGLE_EDGE, and two are 0 if type is TRIANGLE_VERTEX.
|
static |
|
static |