Bullet Collision Detection & Physics Library: btReducedDeformableBodyHelpers.h Source File

Bullet Collision Detection & Physics Library

btReducedDeformableBodyHelpers.h
Go to the documentation of this file.
1#ifndef BT_REDUCED_SOFT_BODY_HELPERS_H
2#define BT_REDUCED_SOFT_BODY_HELPERS_H
3
4#include "btReducedDeformableBody.h"
5#include <string>
6
7 struct btReducedDeformableBodyHelpers
8{
9 // create a reduced deformable object
10 static btReducedDeformableBody* createReducedDeformableObject(btSoftBodyWorldInfo& worldInfo, const std::string& file_path, const std::string& vtk_file, const int num_modes, bool rigid_only);
11 // read in geometry info from Vtk file
12 static btReducedDeformableBody* createFromVtkFile(btSoftBodyWorldInfo& worldInfo, const char* vtk_file);
13 // read in all reduced files
14 static void readReducedDeformableInfoFromFiles(btReducedDeformableBody* rsb, const char* file_path);
15 // read in a binary vector
16 static void readBinaryVec(btReducedDeformableBody::tDenseArray& vec, const unsigned int n_size, const char* file);
17 // read in a binary matrix
18 static void readBinaryMat(btReducedDeformableBody::tDenseMatrix& mat, const unsigned int n_modes, const unsigned int n_full, const char* file);
19
20 // calculate the local inertia tensor for a box shape reduced deformable object
21 static void calculateLocalInertia(btVector3& inertia, const btScalar mass, const btVector3& half_extents, const btVector3& margin);
22};
23
24
25#endif // BT_REDUCED_SOFT_BODY_HELPERS_H
btReducedDeformableBody.h
btScalar
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:314
btAlignedObjectArray< btScalar >
btReducedDeformableBody
Definition: btReducedDeformableBody.h:12
btVector3
btVector3 can be used to represent 3D points and vectors.
Definition: btVector3.h:82
btReducedDeformableBodyHelpers
Definition: btReducedDeformableBodyHelpers.h:8
btReducedDeformableBodyHelpers::readBinaryMat
static void readBinaryMat(btReducedDeformableBody::tDenseMatrix &mat, const unsigned int n_modes, const unsigned int n_full, const char *file)
Definition: btReducedDeformableBodyHelpers.cpp:178
btReducedDeformableBodyHelpers::readBinaryVec
static void readBinaryVec(btReducedDeformableBody::tDenseArray &vec, const unsigned int n_size, const char *file)
Definition: btReducedDeformableBodyHelpers.cpp:156
btReducedDeformableBodyHelpers::createFromVtkFile
static btReducedDeformableBody * createFromVtkFile(btSoftBodyWorldInfo &worldInfo, const char *vtk_file)
Definition: btReducedDeformableBodyHelpers.cpp:19
btReducedDeformableBodyHelpers::createReducedDeformableObject
static btReducedDeformableBody * createReducedDeformableObject(btSoftBodyWorldInfo &worldInfo, const std::string &file_path, const std::string &vtk_file, const int num_modes, bool rigid_only)
Definition: btReducedDeformableBodyHelpers.cpp:7
btReducedDeformableBodyHelpers::calculateLocalInertia
static void calculateLocalInertia(btVector3 &inertia, const btScalar mass, const btVector3 &half_extents, const btVector3 &margin)
Definition: btReducedDeformableBodyHelpers.cpp:206
btReducedDeformableBodyHelpers::readReducedDeformableInfoFromFiles
static void readReducedDeformableInfoFromFiles(btReducedDeformableBody *rsb, const char *file_path)
Definition: btReducedDeformableBodyHelpers.cpp:127
btSoftBodyWorldInfo
Definition: btSoftBody.h:48