本文整理汇总了C++中LLPrimitive::isChanged方法的典型用法代码示例。如果您正苦于以下问题:C++ LLPrimitive::isChanged方法的具体用法?C++ LLPrimitive::isChanged怎么用?C++ LLPrimitive::isChanged使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLPrimitive
的用法示例。
在下文中一共展示了LLPrimitive::isChanged方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void llprimitive_object_t::test<6>()
{
set_test_name("Test setVolume creation of new NOT-unique volume.");
LLPrimitive primitive;
LLVolumeParams params;
// Make sure volume starts off null
ensure(primitive.getVolume() == NULL);
// Make sure we have no texture entries before setting the volume
ensure_equals(primitive.getNumTEs(), 0);
// Test that GEOMETRY has not been flagged as changed.
ensure(!primitive.isChanged(LLXform::GEOMETRY));
// Make sure setVolume returns true
ensure(primitive.setVolume(params, 0, false) == TRUE);
LLVolume* new_volume = primitive.getVolume();
// make sure new volume was actually created
ensure(new_volume != NULL);
// Make sure that now that we've set the volume we have texture entries
ensure_not_equals(primitive.getNumTEs(), 0);
// Make sure that the number of texture entries equals the number of faces in the volume (should be 6)
ensure_equals(new_volume->getNumFaces(), 6);
ensure_equals(primitive.getNumTEs(), new_volume->getNumFaces());
// Test that GEOMETRY has been flagged as changed.
ensure(primitive.isChanged(LLXform::GEOMETRY));
// Run it twice to make sure it doesn't create a different one if params are the same
ensure(primitive.setVolume(params, 0, false) == FALSE);
ensure(new_volume == primitive.getVolume());
// Change the param definition and try setting it again.
params.setRevolutions(4);
ensure(primitive.setVolume(params, 0, false) == TRUE);
// Ensure that we now have a different volume
ensure(new_volume != primitive.getVolume());
}