Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
momentum::CollisionGeometryStateT< T > Struct Template Reference

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.

Detailed Description

template<typename T>
struct momentum::CollisionGeometryStateT< T >

Represents collision geometry states using a Structure of Arrays (SoA) format.

Definition at line 22 of file collision_geometry_state.h.

Member Function Documentation

◆ resize()

template<typename T>
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().

◆ update()

template<typename T>
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().

◆ updatePrimitive()

template<typename T>
void momentum::CollisionGeometryStateT< T >::updatePrimitive ( const SkeletonStateT< T > & skeletonState,
const CollisionGeometry & collisionGeometry,
size_t primitiveIndex )

Member Data Documentation

◆ boxHalfExtents

template<typename T>
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().

◆ delta

template<typename T>
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().

◆ direction

template<typename T>
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().

◆ ellipsoidRadii

template<typename T>
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().

◆ orientation

template<typename T>
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().

◆ origin

template<typename T>
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().

◆ radius

template<typename T>
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().

◆ type

template<typename T>
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().


The documentation for this struct was generated from the following files: