Refactor SDF coefficient computation into mjCOctree.
The logic for computing Signed Distance Function (SDF) coefficients using TriangleMeshDistance is moved from `mjCPlugin::Make` in `user_mesh.cc` to a new method `mjCOctree::ComputeSdfCoeffs` in `user_objects.cc`. This encapsulates the SDF computation within the octree class. PiperOrigin-RevId: 874572414 Change-Id: Ia2365c9c4527a252ff1d1bb43fe2c2593761e471
This commit is contained in:
committed by
Copybara-Service
parent
82e92cbcaa
commit
5fc580a8ba
@@ -301,6 +301,10 @@ class mjCOctree : public mjCOctree_ {
|
||||
face_.clear();
|
||||
}
|
||||
void AddCoeff(int n, int v, double coeff) { node_[n].coeff[v] = coeff; }
|
||||
double Coeff(int n, int v) const { return node_[n].coeff[v]; }
|
||||
|
||||
// compute SDF coefficients at octree vertices using triangle mesh distance
|
||||
void ComputeSdfCoeffs(const double* vert, int nvert, const int* face, int nface);
|
||||
|
||||
private:
|
||||
void Make(std::vector<Triangle>& elements);
|
||||
|
||||
Reference in New Issue
Block a user