Summary

A capsule object, defined by 2 points and a radius. A capsule is a cylinder with round ends (inset half spheres on each end).

Constructors

Capsule

Fields

CenterA Position of point A.
CenterB Position of point B.
Radius Radius of a capsule.

Properties

Bounds Gets the Bounding Box of the capsule.
RandomPointInside Returns a random point within this capsule.
RandomPointOnEdge Returns a random point on the edge of this capsule.
Volume Gets the volume of the capsule in cubic units.

Methods

Contains Determines if the capsule contains the specified point.
GetEdgeDistance Calculates the distance from a given point to the edge of the capsule.

Static Methods

FromHeightAndRadius Creates a capsule where Point A is radius units above the ground and Point B is height minus radius units above the ground.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.