PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
|
Multibody Tetrahedral Mesh System. More...
#include <MultibodyTetrahedralMeshSystem.h>
Public Types | |
using | IndexType = TIndex |
Index type used in the multibody system. | |
using | ScalarType = TScalar |
Scalar type used in the multibody system. | |
Public Member Functions | |
MultibodyTetrahedralMeshSystem (Eigen::Ref< Eigen::Matrix< TScalar, 3, Eigen::Dynamic > > X, Eigen::Ref< Eigen::Matrix< IndexType, 4, Eigen::Dynamic > > T) | |
Construct a new Multibody Tetrahedral Mesh System object. | |
void | Construct (Eigen::Ref< Eigen::Matrix< TScalar, 3, Eigen::Dynamic > > X, Eigen::Ref< Eigen::Matrix< IndexType, 4, Eigen::Dynamic > > T, TScalar muS=0.4, TScalar muD=0.2) |
Construct a new Multibody Tetrahedral Mesh System object. | |
Eigen::Index | NumBodies () const |
Get the number of bodies in the multibody system. | |
auto | ContactVerticesOf (IndexType o) const |
Get vertices of body o | |
auto | ContactEdgesOf (IndexType o) const |
Get edges of body o | |
auto | ContactTrianglesOf (IndexType o) const |
Get triangles of body o | |
template<class TDerivedT> | |
auto | TetrahedraOf (IndexType o, Eigen::DenseBase< TDerivedT > const &T) const |
Get tetrahedra of body o | |
template<class TDerivedX> | |
auto | ContactVertexPositionsOf (IndexType o, Eigen::DenseBase< TDerivedX > const &X) const |
Get vertex positions of body o | |
auto | BodyOfContactVertex (IndexType v) const |
Get the body associated with vertex v | |
auto | BodyOfContactEdge (IndexType e) const |
Get the body associated with edge e | |
auto | BodyOfContactTriangle (IndexType f) const |
Get the body associated with triangle f | |
template<class TDerivedT> | |
auto | BodyOfTetrahedron (IndexType t, Eigen::DenseBase< TDerivedT > const &T) const |
Get the body associated with tetrahedron t | |
Eigen::Index | NumContactVertices () const |
Get the number of contact vertices. | |
Eigen::Index | NumContactEdges () const |
Get the number of contact edges. | |
Eigen::Index | NumContactTriangles () const |
Get the number of contact triangles. | |
Eigen::Index | NumTetrahedra () const |
Get the number of tetrahedra. | |
auto | ContactVerticesRangeFor (IndexType o) const |
Get the range of contact vertices for body o | |
auto | ContactEdgesRangeFor (IndexType o) const |
Get the range of contact edges for body o | |
auto | ContactTrianglesRangeFor (IndexType o) const |
Get the range of contact triangles for body o | |
void | SetMaterial (IndexType o, TScalar muS, TScalar muD) |
Set the friction coefficients for body o | |
void | SetMaterial (TScalar muS, TScalar muD) |
Set the friction coefficients for all bodies. | |
auto | TetrahedraRangeFor (IndexType o) const |
Get the range of tetrahedra for body o | |
void | Serialize (io::Archive &archive) const |
Serialize the multibody tetrahedral mesh system to an HDF5 archive. | |
void | Deserialize (io::Archive &archive) |
Deserialize the multibody tetrahedral mesh system from an HDF5 archive. | |
Public Attributes | |
Eigen::Vector< TIndex, Eigen::Dynamic > | V |
|# contact vertices| x 1 indices into mesh vertices | |
Eigen::Matrix< TIndex, 2, Eigen::Dynamic > | E |
2 x |# contact edges| edges into mesh vertices | |
Eigen::Matrix< TIndex, 3, Eigen::Dynamic > | F |
3 x |# contact triangles| triangles into mesh vertices | |
Eigen::Vector< TIndex, Eigen::Dynamic > | VP |
|# bodies + 1| x 1 prefix sum of vertex pointers into V | |
Eigen::Vector< TIndex, Eigen::Dynamic > | EP |
|# bodies + 1| x 1 prefix sum of edge pointers into E | |
Eigen::Vector< TIndex, Eigen::Dynamic > | FP |
|# bodies + 1| x 1 prefix sum of triangle pointers into F | |
Eigen::Vector< TIndex, Eigen::Dynamic > | TP |
pointers into input tetrahedral mesh T | |
Eigen::Vector< TIndex, Eigen::Dynamic > | CC |
|# mesh vertices| x 1 connected component map | |
Eigen::Matrix< TScalar, 2, Eigen::Dynamic > | muF |
coefficients at contact faces | |
Multibody Tetrahedral Mesh System.
Holds a common representation of a multibody system composed of tetrahedral meshes.
|
inline |
Construct a new Multibody Tetrahedral Mesh System object.
X | 3 x |# mesh vertices| matrix of vertex positions |
T | 4 x |# tetrahedra| tetrahedral mesh elements/connectivity |
|
inline |
|
inline |
Get the body associated with triangle f
f | Index of the triangle |
f
|
inline |
|
inline |
Get the body associated with tetrahedron t
t | Index of the tetrahedron |
T | 4 x |# tetrahedra| tetrahedral mesh elements/connectivity |
t
|
inline |
Construct a new Multibody Tetrahedral Mesh System object.
X | 3 x |# mesh vertices| matrix of vertex positions |
T | 4 x |# tetrahedra| tetrahedral mesh elements/connectivity |
muS | Uniform static friction coefficient |
muD | Uniform dynamic friction coefficient |
|
inline |
Get edges of body o
o | Index of the body |
2 x |# contact edges of body o|
edges into mesh vertices
|
inline |
Get the range of contact edges for body o
o | Index of the body |
o
|
inline |
Get triangles of body o
o | Index of the body |
3 x |# contact triangles of body o|
triangles into mesh vertices
|
inline |
Get the range of contact triangles for body o
o | Index of the body |
o
|
inline |
Get vertex positions of body o
TDerivedX | Eigen type of the input vertex positions |
o | Index of the body |
X | 3 x |# mesh vertices| matrix of vertex positions |
3 x |# contact vertices of body o|
matrix of vertex positions
|
inline |
Get vertices of body o
o | Index of the body |
|# contact vertices of body o| x 1
indices into mesh vertices
|
inline |
Get the range of contact vertices for body o
o | Index of the body |
o
void pbat::sim::contact::MultibodyTetrahedralMeshSystem< TIndex, TScalar >::Deserialize | ( | io::Archive & | archive | ) |
Deserialize the multibody tetrahedral mesh system from an HDF5 archive.
archive | The HDF5 archive to deserialize from |
|
inline |
Get the number of bodies in the multibody system.
|
inline |
Get the number of contact edges.
|
inline |
Get the number of contact triangles.
|
inline |
Get the number of contact vertices.
|
inline |
Get the number of tetrahedra.
void pbat::sim::contact::MultibodyTetrahedralMeshSystem< TIndex, TScalar >::Serialize | ( | io::Archive & | archive | ) | const |
Serialize the multibody tetrahedral mesh system to an HDF5 archive.
archive | The HDF5 archive to serialize to |
|
inline |
Set the friction coefficients for body o
o | Index of the body |
muS | Static friction coefficient |
muD | Dynamic friction coefficient |
|
inline |
Set the friction coefficients for all bodies.
muS | Static friction coefficient |
muD | Dynamic friction coefficient |
|
inline |
Get tetrahedra of body o
TDerivedT | Eigen type of the input tetrahedral mesh |
o | Index of the body |
T | 4 x |# tetrahedra| tetrahedral mesh elements/connectivity |
4 x |# contact tetrahedra of body o|
tetrahedra into input tetrahedral mesh T
|
inline |
Get the range of tetrahedra for body o
o | Index of the body |
o
Eigen::Matrix<TScalar, 2, Eigen::Dynamic> pbat::sim::contact::MultibodyTetrahedralMeshSystem< TIndex, TScalar >::muF |
coefficients at contact faces
2 x |# contact faces|
matrix of static (row 0) and dynamic (row 1) friction
Eigen::Vector<TIndex, Eigen::Dynamic> pbat::sim::contact::MultibodyTetrahedralMeshSystem< TIndex, TScalar >::TP |
pointers into input tetrahedral mesh T
|# bodies + 1| x 1
prefix sum of tetrahedron