diff options
Diffstat (limited to 'src/BulletSoftBody/BulletReducedDeformableBody/btReducedDeformableBodyHelpers.h')
-rw-r--r-- | src/BulletSoftBody/BulletReducedDeformableBody/btReducedDeformableBodyHelpers.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/BulletSoftBody/BulletReducedDeformableBody/btReducedDeformableBodyHelpers.h b/src/BulletSoftBody/BulletReducedDeformableBody/btReducedDeformableBodyHelpers.h new file mode 100644 index 000000000..2b259a931 --- /dev/null +++ b/src/BulletSoftBody/BulletReducedDeformableBody/btReducedDeformableBodyHelpers.h @@ -0,0 +1,25 @@ +#ifndef BT_REDUCED_SOFT_BODY_HELPERS_H +#define BT_REDUCED_SOFT_BODY_HELPERS_H + +#include "btReducedDeformableBody.h" +#include <string> + +struct btReducedDeformableBodyHelpers +{ + // create a reduced deformable object + static btReducedDeformableBody* createReducedDeformableObject(btSoftBodyWorldInfo& worldInfo, const std::string& file_path, const std::string& vtk_file, const int num_modes, bool rigid_only); + // read in geometry info from Vtk file + static btReducedDeformableBody* createFromVtkFile(btSoftBodyWorldInfo& worldInfo, const char* vtk_file); + // read in all reduced files + static void readReducedDeformableInfoFromFiles(btReducedDeformableBody* rsb, const char* file_path); + // read in a binary vector + static void readBinaryVec(btReducedDeformableBody::tDenseArray& vec, const unsigned int n_size, const char* file); + // read in a binary matrix + static void readBinaryMat(btReducedDeformableBody::tDenseMatrix& mat, const unsigned int n_modes, const unsigned int n_full, const char* file); + + // calculate the local inertia tensor for a box shape reduced deformable object + static void calculateLocalInertia(btVector3& inertia, const btScalar mass, const btVector3& half_extents, const btVector3& margin); +}; + + +#endif // BT_REDUCED_SOFT_BODY_HELPERS_H
\ No newline at end of file |