#include <Geometry.h>
A class describing a Geometry.
◆ Geometry() [1/2]
| MOMENTUM_NAMESPACE::Geometry::Geometry |
( |
agxCollide::Geometry * |
geometry | ) |
|
Create a wrapper around an agxCollide::Geometry.
◆ Geometry() [2/2]
| MOMENTUM_NAMESPACE::Geometry::Geometry |
( |
| ) |
|
◆ addCollisionGroup()
| bool MOMENTUM_NAMESPACE::Geometry::addCollisionGroup |
( |
const std::string & |
name | ) |
|
Add a named collision group to this Geometry that can be used for contact filtering during a simulation.
Note that if a geometry is already involved in a contact, adding a named group that is disabled in the simulation, will not remove that contact.
- Parameters
-
| name | - the name of the collision group to be added |
- Returns
- false if geometry already has
name as collision group
◆ getBound()
| std::pair< Vec3, Vec3 > MOMENTUM_NAMESPACE::Geometry::getBound |
( |
| ) |
const |
Get the axis aligned bound of the Geometry.
- Returns
- pair containing the ( min, max ) of the axis aligned bound of the Geometry.
◆ getCollisionGroups()
| std::vector< std::string > MOMENTUM_NAMESPACE::Geometry::getCollisionGroups |
( |
| ) |
const |
Get a list of all collision groups that this geometry has.
- Returns
- list of all collision group names
◆ getContacts()
Get all contacts including this geometry during the current timestep.
- Returns
- all contacts connected to this geometry
◆ getEnableCollisions()
| bool MOMENTUM_NAMESPACE::Geometry::getEnableCollisions |
( |
| ) |
const |
Return whether this geometry can be involved in collisions.
- Returns
- true if this geometry can generate contacts
◆ getMaterial()
| std::shared_ptr< Material > MOMENTUM_NAMESPACE::Geometry::getMaterial |
( |
| ) |
const |
Get the material of this geometry.
- Returns
- the material of the geometry
◆ getName()
| std::string MOMENTUM_NAMESPACE::Geometry::getName |
( |
| ) |
const |
Get the name of the geometry.
- Returns
- the name of the geometry
◆ getSensor()
| bool MOMENTUM_NAMESPACE::Geometry::getSensor |
( |
| ) |
const |
- Returns
- true if this geometry will create contact constraints in the solver
◆ hasCollisionGroup()
| bool MOMENTUM_NAMESPACE::Geometry::hasCollisionGroup |
( |
const std::string & |
name | ) |
const |
Checks if this geometry has a named collision group.
- Parameters
-
| name | - the name of the collision group |
- Returns
- true if this geometry has the named collision group
◆ operator==()
| bool MOMENTUM_NAMESPACE::Geometry::operator== |
( |
const Geometry & |
other | ) |
const |
◆ pointIsInsideGeometry()
| bool MOMENTUM_NAMESPACE::Geometry::pointIsInsideGeometry |
( |
Vec3 |
point, |
|
|
double |
radius |
|
) |
| const |
Check if the selected point is inside the geometry.
- Returns
- True/False if the selected point is inside the geometry.
◆ removeCollisionGroup()
| bool MOMENTUM_NAMESPACE::Geometry::removeCollisionGroup |
( |
const std::string & |
name | ) |
|
Remove a named collision group from this Geometry.
- Parameters
-
| name | - the name of the collision group to be removed |
- Returns
- true if collision group
name was successfully removed
◆ setEnableCollisions()
| void MOMENTUM_NAMESPACE::Geometry::setEnableCollisions |
( |
bool |
flag | ) |
|
Enable/Disable collision detection of this geometry.
Only available in simulation mode
- Parameters
-
| flag | - If true this geometry will be enabled for all collision, otherwise disabled |
◆ setSensor()
| void MOMENTUM_NAMESPACE::Geometry::setSensor |
( |
bool |
flag | ) |
|
Specifies whether this geometry will generate contacts that the solver will see or not.
Only available in simulation mode
- Parameters
-
| flag | - If true this geometry will generate contacts but not contact constraints in the solver. |