Rasterfarm-SDK
Loading...
Searching...
No Matches
Primitive3D Namespace Reference

API for calculating axis-aligned bounding-boxes, distance, intersections, and closet-points for 3D primitves. More...

Classes

class  Capsule
 
class  Sphere
 

Typedefs

typedef List< CapsuleCapsuleList
 
typedef HeapArray< CapsuleCapsuleArray
 
typedef Vertex3f Vertex
 
typedef Vertex3fArray VertexArray
 
typedef List< VertexVertexList
 

Functions

bool operator== (const Capsule &a, const Capsule &b)
 
template<uint LENGTH>
Capsule operator* (const Matrix< float, LENGTH, LENGTH > &mat, const Capsule &cap)
 
bool above (const Vertex3f &point, const Vertex4f &plane)
 
Vertex3f closestPoint (const Vertex3f &point, const Vertex4f &plane)
 
Vertex3f closestPoint (const Vertex3f &point, const Vertex4f &plane, float distance)
 
Vertex3f closestPoint (const Segment &segment, const Vertex4f &plane)
 
Vertex3f closestPoint (const Segment &segment, const Sphere &sphere)
 
Vertex3f closestPoint (const Vertex3f &point, const Disk &disk)
 
Vertex3f closestPoint (const Vertex3f &point, const Sphere &sphere)
 
Vertex3f closestPoint (const Vertex3f &point, const Sphere &sphere, float distance)
 
Vertex3f closestPoint (const Vertex3f &point, const Ray &ray)
 
Vertex3f closestPoint (const Vertex3f &point, const Vector3f &line, const Vertex3f &linePoint)
 
Vertex3f closestPoint (const Vertex3f &point, const Triangle &triangle)
 
Vertex3f closestPoint (const Vertex3f &point, const Segment &segment)
 
Vertex3f closestPoint (const Vertex3f &point, const Capsule &capsule)
 
Vertex3f closestPoint (const Vertex3f &point, const AABoundingBox &box)
 
Vertex3f closestPoint (const Segment &segment, const AABoundingBox &box)
 
Vertex3f closestPoint (const Vertex3f &point, const Polygon &polygon)
 
Vertex3f closestPoint (const Segment &segment, const Polygon &polygon)
 
Vertex3f closestPoint (const Segment &segment, const Disk &disk)
 
Vertex3f closestPoint (const Ray &ray, const Segment &segment)
 
Pair< Vertex3f, Vertex3fclosestPoint (const Segment &s1, const Segment &s2)
 
Vertex3f closestPoint (const Segment &s, const Capsule &c)
 
float distance (const Vertex3f &pointA, const Vertex3f &pointB, bool returnSquared=false)
 
float distance (const Vertex3f &point, const Vertex3f &linePoint, const Vertex3f &line, bool returnSquared=false)
 
float distance (const Vertex3f &point, const Ray &ray, bool returnSquared=false)
 
float distance (const Vertex3f &point, const Segment &segment, bool returnSquared=false)
 
float distance (const Sphere &sphere, const Segment &segment, bool returnSquared=false)
 
float distance (const Vertex3f &point, const Capsule &capsule, bool returnSquared=false)
 
float distance (const Sphere &sphere, const Capsule &capsule, bool returnSquared=false)
 
float distance (const Segment &segmentA, const Segment &segmentB, bool returnSquared=false)
 
float distance (const Segment &segment, const Vertex4f &plane)
 
float distance (const Capsule &capsule, const Vertex4f &plane)
 
float distance (const Capsule &capsuleA, const Capsule &capsuleB, bool returnSquared=false)
 
float distance (const Capsule &capsule, const Segment &segment, bool returnSquared=false)
 
float distance (const Segment &segment, const AABoundingBox &box)
 
float distance (const Capsule &capsule, const AABoundingBox &box)
 
float distance (const Vertex3f &point, const Sphere &sphere)
 
float distance (const Vertex3f &point, const Vector4f &plane)
 
float distance (const Vertex3f &point, const Disk &disk, bool returnSquared=false)
 
float distance (const Sphere &sphereA, const Sphere &sphereB, bool returnSquared=false)
 
float distance (const Sphere &sphere, const Vector4f &plane)
 
float distance (const Sphere &sphere, const Disk &disk)
 
float distance (const Vertex3f &point, const Triangle &triangle, bool returnSquared=false)
 
float distance (const Sphere &sphere, const Triangle &triangle, bool returnSquared=false)
 
float distance (const Vertex3f &point, const AABoundingBox &box, bool returnSquared=false)
 
float distance (const Sphere &sphere, const AABoundingBox &box, bool returnSquared=false)
 
float distance (const Vertex3f &point, const Polygon &polygon, bool returnSquared=false)
 
float distance (const Sphere &sphere, const Polygon &polygon)
 
float distance (const Segment &segment, const Disk &disk, bool returnSquared=false)
 
float distance (const Segment &segment, const Polygon &polygon, bool returnSquared=false)
 
float distance (const Capsule &capsule, const Disk &disk)
 
float distance (const Capsule &capsule, const Polygon &polygon)
 
template<uint LENGTH>
Sphere operator* (const Matrix< float, LENGTH, LENGTH > &mat, const Sphere &s)
 

Detailed Description

API for calculating axis-aligned bounding-boxes, distance, intersections, and closet-points for 3D primitves.

Typedef Documentation

◆ CapsuleArray

typedef HeapArray< Capsule > Primitive3D::CapsuleArray

◆ CapsuleList

◆ Vertex

◆ VertexArray

◆ VertexList

Function Documentation

◆ above()

bool Primitive3D::above ( const Vertex3f & point,
const Vertex4f & plane )
Returns
True if the point is above the plane w/respect to the plane normal.

◆ closestPoint() [1/20]

Vertex3f Primitive3D::closestPoint ( const Ray & ray,
const Segment & segment )

◆ closestPoint() [2/20]

Vertex3f Primitive3D::closestPoint ( const Segment & s,
const Capsule & c )

◆ closestPoint() [3/20]

Pair< Vertex3f, Vertex3f > Primitive3D::closestPoint ( const Segment & s1,
const Segment & s2 )
Returns
The closest points for the respective segments.

◆ closestPoint() [4/20]

Vertex3f Primitive3D::closestPoint ( const Segment & segment,
const AABoundingBox & box )

◆ closestPoint() [5/20]

Vertex3f Primitive3D::closestPoint ( const Segment & segment,
const Disk & disk )

◆ closestPoint() [6/20]

Vertex3f Primitive3D::closestPoint ( const Segment & segment,
const Polygon & polygon )

◆ closestPoint() [7/20]

Vertex3f Primitive3D::closestPoint ( const Segment & segment,
const Sphere & sphere )

◆ closestPoint() [8/20]

Vertex3f Primitive3D::closestPoint ( const Segment & segment,
const Vertex4f & plane )

◆ closestPoint() [9/20]

Vertex3f Primitive3D::closestPoint ( const Vertex3f & point,
const AABoundingBox & box )

◆ closestPoint() [10/20]

Vertex3f Primitive3D::closestPoint ( const Vertex3f & point,
const Capsule & capsule )

◆ closestPoint() [11/20]

Vertex3f Primitive3D::closestPoint ( const Vertex3f & point,
const Disk & disk )

◆ closestPoint() [12/20]

Vertex3f Primitive3D::closestPoint ( const Vertex3f & point,
const Polygon & polygon )

◆ closestPoint() [13/20]

Vertex3f Primitive3D::closestPoint ( const Vertex3f & point,
const Ray & ray )

◆ closestPoint() [14/20]

Vertex3f Primitive3D::closestPoint ( const Vertex3f & point,
const Segment & segment )

◆ closestPoint() [15/20]

Vertex3f Primitive3D::closestPoint ( const Vertex3f & point,
const Sphere & sphere )

◆ closestPoint() [16/20]

Vertex3f Primitive3D::closestPoint ( const Vertex3f & point,
const Sphere & sphere,
float distance )

◆ closestPoint() [17/20]

Vertex3f Primitive3D::closestPoint ( const Vertex3f & point,
const Triangle & triangle )

◆ closestPoint() [18/20]

Vertex3f Primitive3D::closestPoint ( const Vertex3f & point,
const Vector3f & line,
const Vertex3f & linePoint )

◆ closestPoint() [19/20]

Vertex3f Primitive3D::closestPoint ( const Vertex3f & point,
const Vertex4f & plane )

◆ closestPoint() [20/20]

Vertex3f Primitive3D::closestPoint ( const Vertex3f & point,
const Vertex4f & plane,
float distance )

◆ distance() [1/30]

float Primitive3D::distance ( const Capsule & capsule,
const AABoundingBox & box )

◆ distance() [2/30]

float Primitive3D::distance ( const Capsule & capsule,
const Disk & disk )

◆ distance() [3/30]

float Primitive3D::distance ( const Capsule & capsule,
const Polygon & polygon )

◆ distance() [4/30]

float Primitive3D::distance ( const Capsule & capsule,
const Segment & segment,
bool returnSquared = false )

◆ distance() [5/30]

float Primitive3D::distance ( const Capsule & capsule,
const Vertex4f & plane )

◆ distance() [6/30]

float Primitive3D::distance ( const Capsule & capsuleA,
const Capsule & capsuleB,
bool returnSquared = false )

◆ distance() [7/30]

float Primitive3D::distance ( const Segment & segment,
const AABoundingBox & box )

◆ distance() [8/30]

float Primitive3D::distance ( const Segment & segment,
const Disk & disk,
bool returnSquared = false )

◆ distance() [9/30]

float Primitive3D::distance ( const Segment & segment,
const Polygon & polygon,
bool returnSquared = false )

◆ distance() [10/30]

float Primitive3D::distance ( const Segment & segment,
const Vertex4f & plane )

◆ distance() [11/30]

float Primitive3D::distance ( const Segment & segmentA,
const Segment & segmentB,
bool returnSquared = false )

◆ distance() [12/30]

float Primitive3D::distance ( const Sphere & sphere,
const AABoundingBox & box,
bool returnSquared = false )

◆ distance() [13/30]

float Primitive3D::distance ( const Sphere & sphere,
const Capsule & capsule,
bool returnSquared = false )

◆ distance() [14/30]

float Primitive3D::distance ( const Sphere & sphere,
const Disk & disk )

◆ distance() [15/30]

float Primitive3D::distance ( const Sphere & sphere,
const Polygon & polygon )

◆ distance() [16/30]

float Primitive3D::distance ( const Sphere & sphere,
const Segment & segment,
bool returnSquared = false )

◆ distance() [17/30]

float Primitive3D::distance ( const Sphere & sphere,
const Triangle & triangle,
bool returnSquared = false )

◆ distance() [18/30]

float Primitive3D::distance ( const Sphere & sphere,
const Vector4f & plane )

◆ distance() [19/30]

float Primitive3D::distance ( const Sphere & sphereA,
const Sphere & sphereB,
bool returnSquared = false )

◆ distance() [20/30]

float Primitive3D::distance ( const Vertex3f & point,
const AABoundingBox & box,
bool returnSquared = false )

◆ distance() [21/30]

float Primitive3D::distance ( const Vertex3f & point,
const Capsule & capsule,
bool returnSquared = false )

◆ distance() [22/30]

float Primitive3D::distance ( const Vertex3f & point,
const Disk & disk,
bool returnSquared = false )

◆ distance() [23/30]

float Primitive3D::distance ( const Vertex3f & point,
const Polygon & polygon,
bool returnSquared = false )

◆ distance() [24/30]

float Primitive3D::distance ( const Vertex3f & point,
const Ray & ray,
bool returnSquared = false )

◆ distance() [25/30]

float Primitive3D::distance ( const Vertex3f & point,
const Segment & segment,
bool returnSquared = false )

◆ distance() [26/30]

float Primitive3D::distance ( const Vertex3f & point,
const Sphere & sphere )

◆ distance() [27/30]

float Primitive3D::distance ( const Vertex3f & point,
const Triangle & triangle,
bool returnSquared = false )

◆ distance() [28/30]

float Primitive3D::distance ( const Vertex3f & point,
const Vector4f & plane )
Returns
Signed-distance with positive-values returned for points in-front of the plane. The plane's normal determines the sign of the distance. Points on the plane will return a distance of excactly 0.

◆ distance() [29/30]

float Primitive3D::distance ( const Vertex3f & point,
const Vertex3f & linePoint,
const Vertex3f & line,
bool returnSquared = false )

◆ distance() [30/30]

float Primitive3D::distance ( const Vertex3f & pointA,
const Vertex3f & pointB,
bool returnSquared = false )

◆ operator*() [1/2]

template<uint LENGTH>
Capsule Primitive3D::operator* ( const Matrix< float, LENGTH, LENGTH > & mat,
const Capsule & cap )

◆ operator*() [2/2]

template<uint LENGTH>
Sphere Primitive3D::operator* ( const Matrix< float, LENGTH, LENGTH > & mat,
const Sphere & s )

NOTE: scale of matrix does not affect the sphere radius

◆ operator==()

bool Primitive3D::operator== ( const Capsule & a,
const Capsule & b )