CapsulePrimitive
public class CapsulePrimitive : Primitive
{
// Length of the cylindrical body between the hemispherical caps
public float length;
// Radius of the capsule
public float radius;
// This transform must only contain rotation and translation components, not scale
public Matrix4F transform;
}
This is the same as CylinderPrimitive but with rounded caps on either end that extend outside the ends of the cylinder, i.e. the real length of this primitive is length + radius * 2.
WARNING: the
transformmatrix should only contain rotation and translation operations, not scale. The size of the capsule should be controlled via theradiusandlengthproperties