Back to class index
Capsule[Class Summary]
l
r
ctor (+2 overloads)
SetFrom(s)
SetDegenerate()
IsDegenerate()[const]
LineLength()[const]
Height()[const]
Diameter()[const]
Bottom()[const]
Center()[const]
Centroid()[const]
AnyPointFast()[const]
ExtremePoint(direction)[const] (+1 overload)
ProjectToAxis(...)[const]
Top()[const]
UpDirection()[const]
Volume()[const]
SurfaceArea()[const]
CrossSection(l)[const]
HeightLineSegment()[const]
IsFinite()[const]
PointInside(l,a,d)[const]
UniformPointPerhapsInside(l,x,y)[const]
SphereA()[const]
SphereB()[const]
MinimalEnclosingAABB()[const]
MinimalEnclosingOBB()[const]
RandomPointInside(rng)[const]
RandomPointOnSurface(rng)[const]
Translate(offset)
Scale(...)
Transform(transform) (+3 overloads)
ClosestPoint(targetPoint)[const]
Distance(point)[const] (+6 overloads)
Contains(point)[const] (+7 overloads)
Intersects(ray)[const] (+11 overloads)
ToString()[const]
SerializeToString()[const]
SerializeToCodeString()[const]
Equals(rhs,epsilon)[const]
BitEquals(other)[const]
FromString(str,outEndStr)[static] (+1 overload)

Capsule::ProjectToAxis

Syntax

void Capsule::ProjectToAxis(const float4 &direction, float &outMin, float &outMax) const; [13 lines of code]

Projects this Capsule onto the given 1D axis direction vector.

This function collapses this Capsule onto an 1D axis for the purposes of e.g. separate axis test computations. The function returns a 1D range [outMin, outMax] denoting the interval of the projection.

Parameters

const float4 &directionThe 1D axis to project to. This vector may be unnormalized, in which case the output of this function gets scaled by the length of this vector. float &outMin [out]Returns the minimum extent of this object along the projection axis.float &outMax [out]Returns the maximum extent of this object along the projection axis.