Add edge ids to flex elements in mjModel.

PiperOrigin-RevId: 675130981
Change-Id: If2ccfb268142d235273b7a50e15740f6399903b2
This commit is contained in:
Alessio Quaglino
2024-09-16 06:56:09 -07:00
committed by Copybara-Service
parent 9d73211757
commit 31abd7900a
18 changed files with 84 additions and 131 deletions
+3
View File
@@ -694,6 +694,7 @@ class mjCFlex_ : public mjCBase {
std::vector<double> vertxpos; // global vertex positions
mjCBoundingVolumeHierarchy tree; // bounding volume hierarchy
std::vector<double> elemaabb_; // element bounding volume
std::vector<int> edgeidx_; // element edge ids
// variable-size data
std::vector<std::string> vertbody_; // vertex body names
@@ -741,6 +742,8 @@ class mjCFlex: public mjCFlex_, private mjsFlex {
bool HasTexcoord() const; // texcoord not null
void DelTexcoord(); // delete texcoord
static constexpr int kNumEdges[3] = {1, 3, 6}; // number of edges per element indexed by dim
private:
void Compile(const mjVFS* vfs); // compiler
void CreateBVH(void); // create flex BVH