HughPH.Box2D
Organised dotnet bindings for Box2D 3.1.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Properties | List of all members
Box2D.Capsule Struct Reference

A solid capsule can be viewed as two semicircles connected by a rectangle. More...

Public Member Functions

 Capsule (Vec2 center1, Vec2 center2, float radius)
 Construct a capsule shape with two centers and a radius.
 
MassData ComputeMass (float density)
 Compute mass properties of this capsule.
 
AABB ComputeAABB (in Transform transform)
 Compute the bounding box of this transformed capsule.
 
bool TestPoint (in Vec2 point)
 Test a point for overlap with this capsule in local space.
 
CastOutput RayCast (in RayCastInput input)
 Ray cast versus this capsule shape in local space. Initial overlap is treated as a miss.
 
CastOutput ShapeCast (in ShapeCastInput input)
 Shape cast versus this capsule. Initial overlap is treated as a miss.
 

Public Attributes

Vec2 Center1
 Local center of the first semicircle.
 
Vec2 Center2
 Local center of the second semicircle.
 
float Radius
 The radius of the semicircles.
 

Properties

float Length [get]
 Returns the total length of the capsule, which is the distance between the two centers plus twice the radius.
 

Detailed Description

A solid capsule can be viewed as two semicircles connected by a rectangle.


The documentation for this struct was generated from the following file: