Half Space: this is equivalent to the Plane in ODE. A Half space has a priviledged direction: the direction of the normal. The separation plane is defined as n * x = d; Points in the negative side of the separation plane (i.e. {x | n * x < d}) are inside the half space and points in the positive side of the separation plane (i.e. {x | n * x > d}) are outside the half space. Note: prefer using a Halfspace instead of a Plane if possible, it has better behavior w.r.t. collision detection algorithms.
More...
#include <coal/shape/geometric_shapes.h>
|
Scalar | m_swept_sphere_radius {0} |
| Radius of the sphere swept around the shape. Default value is 0. Note: this property differs from inflated method of certain derived classes (e.g. Box, Sphere, Ellipsoid, Capsule, Cone, Cylinder) in the sense that inflated returns a new shape which can be inflated but also deflated. Also, an inflated shape is not rounded. It simply has a different size. Sweeping a shape with a sphere is a different operation (a Minkowski sum), which rounds the sharp corners of a shape. The swept sphere radius is a property of the shape itself and can be manually updated between collision checks.
|
|
Half Space: this is equivalent to the Plane in ODE. A Half space has a priviledged direction: the direction of the normal. The separation plane is defined as n * x = d; Points in the negative side of the separation plane (i.e. {x | n * x < d}) are inside the half space and points in the positive side of the separation plane (i.e. {x | n * x > d}) are outside the half space. Note: prefer using a Halfspace instead of a Plane if possible, it has better behavior w.r.t. collision detection algorithms.
◆ Halfspace() [1/4]
coal::Halfspace::Halfspace |
( |
const Vec3s & |
n_, |
|
|
Scalar |
d_ |
|
) |
| |
|
inline |
Construct a half space with normal direction and offset.
◆ Halfspace() [2/4]
Construct a plane with normal direction and offset.
◆ Halfspace() [3/4]
coal::Halfspace::Halfspace |
( |
| ) |
|
|
inline |
◆ Halfspace() [4/4]
coal::Halfspace::Halfspace |
( |
const Halfspace & |
other | ) |
|
|
inline |
◆ clone()
virtual Halfspace * coal::Halfspace::clone |
( |
| ) |
const |
|
inlinevirtual |
◆ computeLocalAABB()
void coal::Halfspace::computeLocalAABB |
( |
| ) |
|
|
virtual |
◆ distance()
Scalar coal::Halfspace::distance |
( |
const Vec3s & |
p | ) |
const |
|
inline |
◆ getNodeType()
NODE_TYPE coal::Halfspace::getNodeType |
( |
| ) |
const |
|
inlinevirtual |
◆ inflated()
Inflate the halfspace by an amount given by value
. This value can be positive or negative but must always >= minInflationValue()
.
- Parameters
-
[in] | value | of the shape inflation. |
- Returns
- a new inflated halfspace and the related transform to account for the change of shape frame
◆ minInflationValue()
Scalar coal::Halfspace::minInflationValue |
( |
| ) |
const |
|
inline |
◆ operator=()
◆ signedDistance()
Scalar coal::Halfspace::signedDistance |
( |
const Vec3s & |
p | ) |
const |
|
inline |
◆ unitNormalTest()
void coal::Halfspace::unitNormalTest |
( |
| ) |
|
|
protected |
Turn non-unit normal into unit.
The documentation for this class was generated from the following file: