TrinityCore
|
#include <Capsule.h>
Public Member Functions | |
Capsule () | |
Capsule (class BinaryInput &b) | |
Capsule (const Vector3 &_p1, const Vector3 &_p2, float _r) | |
void | serialize (class BinaryOutput &b) const |
void | deserialize (class BinaryInput &b) |
Line | axis () const |
float | radius () const |
Vector3 | point (int i) const |
float | height () const |
Vector3 | center () const |
void | getReferenceFrame (class CoordinateFrame &cframe) const |
bool | contains (const Vector3 &p) const |
float | volume () const |
float | area () const |
void | getBounds (AABox &out) const |
void | getRandomSurfacePoint (Vector3 &P, Vector3 &N) const |
Vector3 | randomInteriorPoint () const |
Private Attributes | |
Vector3 | p1 |
Vector3 | p2 |
float | _radius |
A shape formed by extruding a sphere along a line segment.
G3D::Capsule::Capsule | ( | class BinaryInput & | b | ) |
float G3D::Capsule::area | ( | ) | const |
Line G3D::Capsule::axis | ( | ) | const |
The line down the center of the capsule
|
inline |
Returns true if the point is inside the capsule or on its surface.
void G3D::Capsule::deserialize | ( | class BinaryInput & | b | ) |
void G3D::Capsule::getBounds | ( | AABox & | out | ) | const |
Get axis aligned bounding box
Random world space point with outward facing normal.
void G3D::Capsule::getReferenceFrame | ( | class CoordinateFrame & | cframe | ) | const |
Get a reference frame in which the center of mass is the origin and Y is the axis of the capsule.
|
inline |
Distance between the sphere centers. The total extent of the cylinder is 2r + h.
|
inline |
Argument may be 0 or 1
|
inline |
Vector3 G3D::Capsule::randomInteriorPoint | ( | ) | const |
Point selected uniformly at random over the volume.
void G3D::Capsule::serialize | ( | class BinaryOutput & | b | ) | const |
float G3D::Capsule::volume | ( | ) | const |
|
private |
|
private |
|
private |