Rasterfarm-SDK
Loading...
Searching...
No Matches
intersect.h File Reference
#include "primitive2d.h"
#include "2d/aaboundingbox.h"
#include "2d/triangle.h"
#include "2d/polygon.h"
#include "2d/ray.h"
#include "2d/segment.h"
#include "2d/circle.h"
#include "2d/capsule.h"

Functions

PRIMITIVE2D_NAMESPACE_BEGIN bool insideProjection (const Vector2f &pa, const Vector2f &pb, const Vertex2f &p, const Vertex2f &v, float precision=0.0f)
 
bool overlapping (const Segment &a, const Segment &b, float precision=0.0f)
 
bool collinear (const Vertex2f &v, const Segment &s, float precision=0.0f)
 
bool collinear (const Vertex2f &v, const Ray &r, float precision=0.0f)
 
bool collinear (const Vertex2f &v, const Triangle &t, float precision=0.0f)
 
bool tangent (const AABoundingBox &a, const AABoundingBox &b)
 
bool tangent (const Vertex2f &v, const Vertex2fArray &c, float precision=0.0f)
 
bool tangent (const Segment &a, const Segment &b, float precision=0.0f)
 
bool tangent (const Vertex2fArray &a, const Vertex2fArray &b, float precision=0.0f)
 
bool intersectConvex (const Segment &s, const Vertex2fArray &p, float precision=0.0f)
 
bool intersectConvex (const Vertex2f &v, const Vertex2fArray &p, float precision=0.0f)
 
bool intersect (const Vertex2f &v, const Segment &s, float precision=0.0f)
 
bool intersect (const Vertex2f &v, const Ray &r, float precision=0.0f)
 
bool intersect (const Segment &a, const Segment &b, float precision=0.0f)
 
bool intersect (const Ray &r, const Segment &s, float precision=0.0f)
 
bool intersect (const Vertex2f &p, const Triangle &t)
 
bool intersect (const Vertex2f &v, const Vertex2fArray &p, float precision=0.0f)
 
bool intersect (const Segment &s, const Vertex2fArray &c, float precision=0.0f)
 
bool intersect (const Vertex2fArray &a, const Vertex2fArray &b, float precision=0.0f)
 
bool insideConvex (const Segment &s, const Vertex2fArray &p, float precision=0.0f)
 
bool inside (const Segment &s, const Vertex2fArray &p, float precision=0.0f)
 
bool inside (const Segment &s, const AABoundingBox &b)
 
bool inside (const AABoundingBox &outerBox, const AABoundingBox &innerBox, float precision=0.0f)
 
bool inside (const AABoundingBox &outerBox, const Vertex2fArray &innerContour, float precision=0.0f)
 
bool inside (const Vertex2fArray &outerContour, const Vertex2fArray &innerContour, float precision=0.0f)
 
bool inside (const Vertex2f &p, const AABoundingBox &b, float precision=0.0f)
 
bool intersect (const AABoundingBox &a, const AABoundingBox &b, float precision=0.0f)
 
bool intersect (const Triangle &a, const AABoundingBox &b, float precision=0.0f)
 
bool intersect (const Segment &s, const AABoundingBox &b, float precision=0.0f)
 
Vertex2f intersection (const Ray &rA, const Ray &rB)
 
Vertex2f intersection (const Ray &r, const Segment &s)
 
Vertex2f intersection (const Segment &sA, const Segment &sB)
 
AABoundingBox intersection (const AABoundingBox &a, const AABoundingBox &b)
 
Vertex2f intersection (const Ray &r, const Vertex4f &p)
 
Vertex2f intersection (const Segment &s, const Vertex4f &p)
 
bool orientation (const Ray &r, const Segment &s)
 

Function Documentation

◆ collinear() [1/3]

bool collinear ( const Vertex2f & v,
const Ray & r,
float precision = 0.0f )

◆ collinear() [2/3]

bool collinear ( const Vertex2f & v,
const Segment & s,
float precision = 0.0f )

◆ collinear() [3/3]

bool collinear ( const Vertex2f & v,
const Triangle & t,
float precision = 0.0f )

◆ inside() [1/6]

bool inside ( const AABoundingBox & outerBox,
const AABoundingBox & innerBox,
float precision = 0.0f )

◆ inside() [2/6]

bool inside ( const AABoundingBox & outerBox,
const Vertex2fArray & innerContour,
float precision = 0.0f )

◆ inside() [3/6]

bool inside ( const Segment & s,
const AABoundingBox & b )

◆ inside() [4/6]

bool inside ( const Segment & s,
const Vertex2fArray & p,
float precision = 0.0f )

◆ inside() [5/6]

bool inside ( const Vertex2f & p,
const AABoundingBox & b,
float precision = 0.0f )

◆ inside() [6/6]

bool inside ( const Vertex2fArray & outerContour,
const Vertex2fArray & innerContour,
float precision = 0.0f )

◆ insideConvex()

bool insideConvex ( const Segment & s,
const Vertex2fArray & p,
float precision = 0.0f )

◆ insideProjection()

PRIMITIVE2D_NAMESPACE_BEGIN bool insideProjection ( const Vector2f & pa,
const Vector2f & pb,
const Vertex2f & p,
const Vertex2f & v,
float precision = 0.0f )

Determine if point is inside the projection of 2 vectors. This method is less expensive than the one without a point of origin for vectors.

Parameters
1stVector with origin a point p.
2ndVector with origin b point p.
Pointof origin for vectors.
Pointto test if inside vectors.
Returns
true if inside vectors.

◆ intersect() [1/11]

bool intersect ( const AABoundingBox & a,
const AABoundingBox & b,
float precision = 0.0f )

◆ intersect() [2/11]

bool intersect ( const Ray & r,
const Segment & s,
float precision = 0.0f )
Returns
True if the ray intersects the segment and not a segment vertex.

◆ intersect() [3/11]

bool intersect ( const Segment & a,
const Segment & b,
float precision = 0.0f )

Checks if 2 Segments intersect. Segments that are parallel and/or overlapping are not considered intersections.

Returns
True if segments intersect.

◆ intersect() [4/11]

bool intersect ( const Segment & s,
const AABoundingBox & b,
float precision = 0.0f )

◆ intersect() [5/11]

bool intersect ( const Segment & s,
const Vertex2fArray & c,
float precision = 0.0f )

Tests if a Segment intersects a contour. NOTE: will return false if the Segment is inside the contour.

◆ intersect() [6/11]

bool intersect ( const Triangle & a,
const AABoundingBox & b,
float precision = 0.0f )

◆ intersect() [7/11]

bool intersect ( const Vertex2f & p,
const Triangle & t )

◆ intersect() [8/11]

bool intersect ( const Vertex2f & v,
const Ray & r,
float precision = 0.0f )

◆ intersect() [9/11]

bool intersect ( const Vertex2f & v,
const Segment & s,
float precision = 0.0f )

◆ intersect() [10/11]

bool intersect ( const Vertex2f & v,
const Vertex2fArray & p,
float precision = 0.0f )

◆ intersect() [11/11]

bool intersect ( const Vertex2fArray & a,
const Vertex2fArray & b,
float precision = 0.0f )

◆ intersectConvex() [1/2]

bool intersectConvex ( const Segment & s,
const Vertex2fArray & p,
float precision = 0.0f )

◆ intersectConvex() [2/2]

bool intersectConvex ( const Vertex2f & v,
const Vertex2fArray & p,
float precision = 0.0f )
Returns
True if point is within the contour but, false if it is tangent to the contour.

◆ intersection() [1/6]

AABoundingBox intersection ( const AABoundingBox & a,
const AABoundingBox & b )

◆ intersection() [2/6]

Vertex2f intersection ( const Ray & r,
const Segment & s )

◆ intersection() [3/6]

Vertex2f intersection ( const Ray & r,
const Vertex4f & p )

◆ intersection() [4/6]

Vertex2f intersection ( const Ray & rA,
const Ray & rB )

◆ intersection() [5/6]

Vertex2f intersection ( const Segment & s,
const Vertex4f & p )

◆ intersection() [6/6]

Vertex2f intersection ( const Segment & sA,
const Segment & sB )

◆ orientation()

bool orientation ( const Ray & r,
const Segment & s )
Returns
true if Ray is pointing toward the segment.

◆ overlapping()

bool overlapping ( const Segment & a,
const Segment & b,
float precision = 0.0f )

◆ tangent() [1/4]

bool tangent ( const AABoundingBox & a,
const AABoundingBox & b )
Returns
True if the bounding-boxes are tangent.

◆ tangent() [2/4]

bool tangent ( const Segment & a,
const Segment & b,
float precision = 0.0f )
Returns
True if a segment's endpoint lies on the other segment.

◆ tangent() [3/4]

bool tangent ( const Vertex2f & v,
const Vertex2fArray & c,
float precision = 0.0f )
Returns
True if a Contour's segment is tangent with the given vertex.

◆ tangent() [4/4]

bool tangent ( const Vertex2fArray & a,
const Vertex2fArray & b,
float precision = 0.0f )
Returns
True if a Contour's segment is tangent with another Contour's segment.