|
Momentum
A library for solving nonlinear optimization problems related to human body kinematics
|
Represents collision geometry states using a Structure of Arrays (SoA) format. More...
#include <collision_geometry_state.h>
Public Member Functions | |
| void | resize (size_t numElements) |
Resizes all per-primitive state arrays to hold numElements entries. | |
| void | updatePrimitive (const SkeletonStateT< T > &skeletonState, const CollisionGeometry &collisionGeometry, size_t primitiveIndex) |
| Updates one primitive state from the given skeleton state and collision geometry. | |
| void | update (const SkeletonStateT< T > &skeletonState, const CollisionGeometry &collisionGeometry) |
| Updates the state based on a given skeleton state and collision geometry. | |
Public Attributes | |
| std::vector< Vector3< T > > | origin |
| Primitive origin/center in global coordinates. | |
| std::vector< Vector3< T > > | direction |
| Capsule's direction vector (representing the X-axis) in global coordinates. | |
| std::vector< Vector2< T > > | radius |
| Scaled radii of the capsule's endpoints. | |
| std::vector< T > | delta |
| Signed difference between the capsule's radii (radius[1] - radius[0]). | |
| std::vector< CollisionPrimitiveType > | type |
| Primitive types matching the source collision geometry. | |
| std::vector< Quaternion< T > > | orientation |
| Primitive orientation in global coordinates. | |
| std::vector< Vector3< T > > | ellipsoidRadii |
| Scaled ellipsoid radii in global coordinates. | |
| std::vector< Vector3< T > > | boxHalfExtents |
| Scaled box half extents in global coordinates. | |
Represents collision geometry states using a Structure of Arrays (SoA) format.
Definition at line 22 of file collision_geometry_state.h.
| void momentum::CollisionGeometryStateT< T >::resize | ( | size_t | numElements | ) |
Resizes all per-primitive state arrays to hold numElements entries.
Definition at line 16 of file collision_geometry_state.cpp.
References boxHalfExtents, delta, direction, ellipsoidRadii, orientation, origin, radius, and type.
Referenced by update().
| void momentum::CollisionGeometryStateT< T >::update | ( | const SkeletonStateT< T > & | skeletonState, |
| const CollisionGeometry & | collisionGeometry ) |
Updates the state based on a given skeleton state and collision geometry.
Definition at line 72 of file collision_geometry_state.cpp.
References resize(), and updatePrimitive().
Referenced by momentum::logBvh().
| void momentum::CollisionGeometryStateT< T >::updatePrimitive | ( | const SkeletonStateT< T > & | skeletonState, |
| const CollisionGeometry & | collisionGeometry, | ||
| size_t | primitiveIndex ) |
Updates one primitive state from the given skeleton state and collision geometry.
Definition at line 28 of file collision_geometry_state.cpp.
References momentum::Box, boxHalfExtents, momentum::TransformT< T >::cast(), delta, direction, momentum::Ellipsoid, ellipsoidRadii, momentum::TransformT< T >::getAxisX(), momentum::SkeletonStateT< T >::jointState, momentum::kInvalidIndex, orientation, origin, radius, momentum::TransformT< T >::rotation, momentum::TransformT< T >::scale, momentum::TaperedCapsule, momentum::TransformT< T >::translation, and type.
Referenced by update().
| std::vector<Vector3<T> > momentum::CollisionGeometryStateT< T >::boxHalfExtents |
Scaled box half extents in global coordinates.
Definition at line 61 of file collision_geometry_state.h.
Referenced by momentum::overlaps(), resize(), momentum::updateAabb(), and updatePrimitive().
| std::vector<T> momentum::CollisionGeometryStateT< T >::delta |
Signed difference between the capsule's radii (radius[1] - radius[0]).
Definition at line 49 of file collision_geometry_state.h.
Referenced by momentum::overlaps(), resize(), and updatePrimitive().
| std::vector<Vector3<T> > momentum::CollisionGeometryStateT< T >::direction |
Capsule's direction vector (representing the X-axis) in global coordinates.
Definition at line 43 of file collision_geometry_state.h.
Referenced by momentum::overlaps(), resize(), momentum::updateAabb(), and updatePrimitive().
| std::vector<Vector3<T> > momentum::CollisionGeometryStateT< T >::ellipsoidRadii |
Scaled ellipsoid radii in global coordinates.
Definition at line 58 of file collision_geometry_state.h.
Referenced by momentum::overlaps(), resize(), momentum::updateAabb(), and updatePrimitive().
| std::vector<Quaternion<T> > momentum::CollisionGeometryStateT< T >::orientation |
Primitive orientation in global coordinates.
Definition at line 55 of file collision_geometry_state.h.
Referenced by momentum::overlaps(), resize(), momentum::updateAabb(), and updatePrimitive().
| std::vector<Vector3<T> > momentum::CollisionGeometryStateT< T >::origin |
Primitive origin/center in global coordinates.
Definition at line 40 of file collision_geometry_state.h.
Referenced by momentum::overlaps(), resize(), momentum::updateAabb(), and updatePrimitive().
| std::vector<Vector2<T> > momentum::CollisionGeometryStateT< T >::radius |
Scaled radii of the capsule's endpoints.
Definition at line 46 of file collision_geometry_state.h.
Referenced by momentum::overlaps(), resize(), momentum::updateAabb(), and updatePrimitive().
| std::vector<CollisionPrimitiveType> momentum::CollisionGeometryStateT< T >::type |
Primitive types matching the source collision geometry.
Definition at line 52 of file collision_geometry_state.h.
Referenced by resize(), momentum::updateAabb(), and updatePrimitive().