本文整理汇总了C++中GeometryUnrecPtr::setProperty方法的典型用法代码示例。如果您正苦于以下问题:C++ GeometryUnrecPtr::setProperty方法的具体用法?C++ GeometryUnrecPtr::setProperty怎么用?C++ GeometryUnrecPtr::setProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GeometryUnrecPtr
的用法示例。
在下文中一共展示了GeometryUnrecPtr::setProperty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
gh.readPackedIntegralPropertyHeader(rh, maxValue,
propSize, byteSize);
if(root->getOptions().unpack16BitIndices())
{
if(maxValue > TypeTraits<UInt16>::getMax())
{
GeoUInt32PropertyUnrecPtr ui32Indices =
GeoUInt32Property::create();
gh.readPackedIntegralProperty(rh, ui32Indices, maxValue,
propSize, byteSize );
_indices16Bit = false;
_indices = ui32Indices;
}
else
{
GeoUInt16PropertyUnrecPtr ui16Indices =
GeoUInt16Property::create();
gh.readPackedIntegralProperty(rh, ui16Indices, maxValue,
propSize, byteSize );
_indices16Bit = true;
_indices = ui16Indices;
}
}
else
{
GeoUInt32PropertyUnrecPtr ui32Indices =
GeoUInt32Property::create();
gh.readPackedIntegralProperty(rh, ui32Indices, maxValue,
propSize, byteSize );
_indices16Bit = false;
_indices = ui32Indices;
}
}
else if(fieldName == "qpositions")
{
// Quantized positions are stored inside the geometry object, not
// in the geo-property. They are always of type Pnt3f.
GeoPnt3fPropertyUnrecPtr propPos = GeoPnt3fProperty::create();
UInt8 resolution;
Real32 minValue;
Real32 maxValue;
UInt32 propSize;
gh.readQuantizedVectorPropertyHeader(rh, resolution, minValue,
maxValue, propSize );
gh.readQuantizedVectorProperty(rh, propPos, fieldSize, resolution,
minValue, maxValue, propSize );
geo->setProperty(propPos, Geometry::PositionsIndex);
}
else if(fieldName == "qnormals")
{
// Quantized normals are stored inside the geometry object, not
// in the geo-property. They are always of type Vec3f.
GeoVec3fPropertyUnrecPtr propNorm = GeoVec3fProperty::create();
UInt8 resolution;
Real32 minValue;
Real32 maxValue;
UInt32 propSize;
gh.readQuantizedVectorPropertyHeader(
rh, resolution, minValue, maxValue, propSize);
gh.readQuantizedVectorProperty(
rh, propNorm, fieldSize, resolution,
minValue, maxValue, propSize );
geo->setProperty(propNorm, Geometry::NormalsIndex);
}
else if(fieldName == "qtexCoords")
{
// Quantized texCoords are stored inside the geometry object, not
// in the geo-property. They are always of type Vec2f.
GeoVec2fPropertyUnrecPtr propTexCoords = GeoVec2fProperty::create();
UInt8 resolution;
Real32 minValue;
Real32 maxValue;
UInt32 propSize;
gh.readQuantizedVectorPropertyHeader(
rh, resolution, minValue, maxValue, propSize);
gh.readQuantizedVectorProperty(
rh, propTexCoords, fieldSize, resolution,
minValue, maxValue, propSize );
geo->setProperty(propTexCoords, Geometry::NormalsIndex);
}
else
{
// 1.x Geometry has _sfVbo, it can be skipped
readFieldContent(fieldName, fieldTypeName, fieldSize,
"'vbo'", ptrFieldIt );
}
}
}