Merge pull request #3387 from bd-pmorais:pmorais/renderer-live-mat-texid
PiperOrigin-RevId: 949427127 Change-Id: I607af41aefdefd6d22602889e6982d64df8b380b
This commit is contained in:
@@ -10371,6 +10371,16 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
||||
type=ValueType(name='int'),
|
||||
doc='material id; -1: no textured material',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='texid',
|
||||
type=ValueType(name='int'),
|
||||
doc='texture id; -1: none',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='texuniform',
|
||||
type=ValueType(name='int'),
|
||||
doc='uniform cube mapping',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='texcoord',
|
||||
type=ValueType(name='int'),
|
||||
@@ -10433,6 +10443,14 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
||||
type=ValueType(name='float'),
|
||||
doc='reflectance coef',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='texrepeat',
|
||||
type=ArrayType(
|
||||
inner_type=ValueType(name='float'),
|
||||
extents=(2,),
|
||||
),
|
||||
doc='texture repetition for 2d mapping',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='label',
|
||||
type=ArrayType(
|
||||
|
||||
@@ -1186,6 +1186,8 @@ This is useful for example when the MJB is not available as a file on disk.)"));
|
||||
X(objid);
|
||||
X(category);
|
||||
X(matid);
|
||||
X(texid);
|
||||
X(texuniform);
|
||||
X(texcoord);
|
||||
X(segid);
|
||||
X(emission);
|
||||
@@ -1202,6 +1204,7 @@ This is useful for example when the MJB is not available as a file on disk.)"));
|
||||
X(pos);
|
||||
X(mat);
|
||||
X(rgba);
|
||||
X(texrepeat);
|
||||
#undef X
|
||||
|
||||
DefinePyStr(mjvGeom, "label", &raw::MjvGeom::label);
|
||||
|
||||
@@ -832,6 +832,7 @@ class MjWrapper<raw::MjvGeom> : public WrapperBase<raw::MjvGeom> {
|
||||
X(pos);
|
||||
X(mat);
|
||||
X(rgba);
|
||||
X(texrepeat);
|
||||
#undef X
|
||||
};
|
||||
|
||||
|
||||
@@ -1193,7 +1193,8 @@ MjvGeomWrapper::MjWrapper()
|
||||
static_assert(sizeof(ptr_->mat) == sizeof(ptr_->mat[0]) * 9);
|
||||
return InitPyArray(std::array{3, 3}, ptr_->mat, owner_);
|
||||
}()),
|
||||
X(rgba) {
|
||||
X(rgba),
|
||||
X(texrepeat) {
|
||||
mjv_initGeom(ptr_, mjGEOM_NONE, nullptr, nullptr, nullptr, nullptr);
|
||||
}
|
||||
|
||||
@@ -1205,7 +1206,8 @@ MjvGeomWrapper::MjWrapper(raw::MjvGeom* ptr, py::handle owner)
|
||||
static_assert(sizeof(ptr_->mat) == sizeof(ptr_->mat[0]) * 9);
|
||||
return InitPyArray(std::array{3, 3}, ptr_->mat, owner_);
|
||||
}()),
|
||||
X(rgba) {}
|
||||
X(rgba),
|
||||
X(texrepeat) {}
|
||||
#undef X
|
||||
|
||||
MjvGeomWrapper::MjWrapper(const MjvGeomWrapper& other) : MjvGeomWrapper() {
|
||||
|
||||
Reference in New Issue
Block a user