A line-swept-cricle.
More...
#include <capsule.h>
|
| Capsule2 () |
| Empty.
|
|
| Capsule2 (const Vector2 &, const Vector2 &, const double &) |
| Creates a capsule. More...
|
|
| ~Capsule2 () |
| Empty.
|
|
bool | Inside (const Vector2 &) const |
| Check if a point is inside the capsule. More...
|
|
double | R (const Vector2 &) const |
| Computes the squared distance between a point and the capsule. More...
|
|
double | Signed (const Vector2 &) const |
| Computes the signed distance between a point and the capsule. More...
|
|
bool | Intersect (const Ray2 &) const |
| Check the intersection between a capsule and a ray. More...
|
|
int | Intersect (const Ray2 &, double &, double &) const |
| Compute the intersections between a capsule and a ray. More...
|
|
Box2 | GetBox () const |
| Computes the tight bounding box of the capsule. More...
|
|
double | Area () const |
| Compute the surface area.
|
|
Vector2 | Vertex (int) const |
| Return one of the end vertexes of the axis.
|
|
|
double | r = 1.0 |
| Radius.
|
|
Vector2 | b = Vector2(1.0, 0.0) |
| End vertices of the axis.
|
|
Vector2 | axis = Vector2::X |
| Normalized axis vector.
|
|
double | length = 1.0 |
| Length of the axis.
|
|
◆ Capsule2()
Capsule2::Capsule2 |
( |
const Vector2 & |
a, |
|
|
const Vector2 & |
b, |
|
|
const double & |
r |
|
) |
| |
|
explicit |
Creates a capsule.
- Parameters
-
◆ GetBox()
Box2 Capsule2::GetBox |
( |
| ) |
const |
◆ Inside()
bool Capsule2::Inside |
( |
const Vector2 & |
p | ) |
const |
Check if a point is inside the capsule.
- Parameters
-
◆ Intersect() [1/2]
bool Capsule2::Intersect |
( |
const Ray2 & |
ray | ) |
const |
Check the intersection between a capsule and a ray.
- Parameters
-
◆ Intersect() [2/2]
int Capsule2::Intersect |
( |
const Ray2 & |
ray, |
|
|
double & |
ta, |
|
|
double & |
tb |
|
) |
| const |
Compute the intersections between a capsule and a ray.
- Parameters
-
ray | The ray. |
ta,tb | Intersection depths. |
◆ R()
double Capsule2::R |
( |
const Vector2 & |
p | ) |
const |
Computes the squared distance between a point and the capsule.
- Parameters
-
◆ Signed()
double Capsule2::Signed |
( |
const Vector2 & |
p | ) |
const |
Computes the signed distance between a point and the capsule.
- Parameters
-
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & |
s, |
|
|
const Capsule2 & |
c |
|
) |
| |
|
friend |