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::Capsule

Syntax

Capsule::Capsule(); [1 line of code]

The default constructor does not initialize any members of this class.

This means that the values of the members l and r are both undefined after creating a new capsule using this default constructor. Remember to assign to them before use.

See Also

l, r.

Syntax

Capsule::Capsule(const LineSegment &endPoints, float radius); [4 lines of code]

Constructs a new capsule by explicitly specifying the member variables.

Parameters

const LineSegment &endPointsSpecifies the line segment of the capsule. floatradiusSpecifies the size of this capsule.

See Also

l, r.

Syntax

Capsule::Capsule(const float4 &bottomPoint, const float4 &topPoint, float radius); [4 lines of code]

Constructs a new capsule by explicitly specifying the member variables.

This constructor is equivalent to calling Capsule(LineSegment(bottomPoint, topPoint), radius), but provided here for conveniency.

See Also

l, r.