Copy texture coordinates from OBJ into flex. Fixes #2464.
PiperOrigin-RevId: 732109960 Change-Id: I506b3540ab5d489ce8f10d0c473919611ccb654a
This commit is contained in:
committed by
Copybara-Service
parent
06e217df7e
commit
7651cb1b33
@@ -776,6 +776,7 @@ class mjCFlex_ : public mjCBase {
|
||||
std::vector<double> node_; // node positions
|
||||
std::vector<int> elem_; // element vertex ids
|
||||
std::vector<float> texcoord_; // vertex texture coordinates
|
||||
std::vector<int> facetexcoord_; // face texture coordinates (OBJ only)
|
||||
std::string material_; // name of material used for rendering
|
||||
|
||||
std::string spec_material_;
|
||||
@@ -785,6 +786,7 @@ class mjCFlex_ : public mjCBase {
|
||||
std::vector<double> spec_node_;
|
||||
std::vector<int> spec_elem_;
|
||||
std::vector<float> spec_texcoord_;
|
||||
std::vector<int> spec_facetexcoord_;
|
||||
};
|
||||
|
||||
class mjCFlex: public mjCFlex_, private mjsFlex {
|
||||
@@ -815,6 +817,7 @@ class mjCFlex: public mjCFlex_, private mjsFlex {
|
||||
const std::vector<double>& get_elemaabb() const { return elemaabb_; }
|
||||
const std::vector<int>& get_elem() const { return elem_; }
|
||||
const std::vector<float>& get_texcoord() const { return texcoord_; }
|
||||
const std::vector<int>& get_facetexcoord() const { return facetexcoord_; }
|
||||
const std::vector<std::string>& get_nodebody() const { return nodebody_; }
|
||||
|
||||
bool HasTexcoord() const; // texcoord not null
|
||||
@@ -927,6 +930,8 @@ class mjCMesh: public mjCMesh_, private mjsMesh {
|
||||
float Vert(int i) const { return vert_[i]; }
|
||||
const std::vector<float>& UserVert() const { return spec_vert_; }
|
||||
const std::vector<float>& UserNormal() const { return spec_normal_; }
|
||||
const std::vector<float>& Texcoord() const { return texcoord_; }
|
||||
const std::vector<int>& FaceTexcoord() const { return facetexcoord_; }
|
||||
const std::vector<float>& UserTexcoord() const { return spec_texcoord_; }
|
||||
const std::vector<int>& Face() const { return face_; }
|
||||
const std::vector<int>& UserFace() const { return spec_face_; }
|
||||
|
||||
Reference in New Issue
Block a user