Add MjcPhysicsSceneAPI support.
Still missing compiler settings but will follow up in a future CL. Tried to add full coverage for testing setting of attributes to non-default values. PiperOrigin-RevId: 761636862 Change-Id: Id4b9486645b2600931556cdcb8dc71f28ec309cd
This commit is contained in:
committed by
Copybara-Service
parent
bf1f8081c1
commit
62a9d5b98d
@@ -74,7 +74,7 @@ pxr::SdfLayerRefPtr LoadLayer(
|
||||
const pxr::SdfFileFormat::FileFormatArguments& args = {});
|
||||
|
||||
template <typename T>
|
||||
void ExpectAttributeEqual(pxr::UsdStageRefPtr stage, const char* path,
|
||||
void ExpectAttributeEqual(pxr::UsdStageRefPtr stage, pxr::SdfPath path,
|
||||
const T& value) {
|
||||
auto attr = stage->GetAttributeAtPath(pxr::SdfPath(path));
|
||||
EXPECT_TRUE(attr.IsValid()) << "Attribute " << path << " is not valid";
|
||||
@@ -84,13 +84,19 @@ void ExpectAttributeEqual(pxr::UsdStageRefPtr stage, const char* path,
|
||||
<< attr_value << ". Expected: " << value;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void ExpectAttributeEqual(pxr::UsdStageRefPtr stage, const char* path,
|
||||
const T& value) {
|
||||
ExpectAttributeEqual(stage, pxr::SdfPath(path), value);
|
||||
}
|
||||
|
||||
// Specialization for SdfAssetPath, so that we can compare only the asset path
|
||||
// and not care about whatever the resolved path is.
|
||||
// Otherwise the default operator== would fail because it tests for equality of
|
||||
// the asset path AND the resolved path.
|
||||
template <>
|
||||
void ExpectAttributeEqual<pxr::SdfAssetPath>(pxr::UsdStageRefPtr stage,
|
||||
const char* path,
|
||||
pxr::SdfPath,
|
||||
const pxr::SdfAssetPath& value);
|
||||
|
||||
void ExpectAttributeHasConnection(pxr::UsdStageRefPtr stage, const char* path,
|
||||
|
||||
Reference in New Issue
Block a user