The code to manipulate articulated parts was re-written for VR-Link 3.12.
All classes were written to maintain backwards compatibility, while at the same time providing a robust and intuitive interface to access articulated parts.
Articulated parts are implemented in three classes:
- DtArtPartCollection The container used to store Articulated Parts.
- DtArtPart The representation of an articulated parts. DtArtParts are a container of Articulated Parameters.
- DtArtPartParam The Articulated Parameter
Other examples which use articulated parts include:
A typical usage of articulated parts may look like this:
{
artPartIter != artPartCol->
end();
++artPartIter)
{
int currentPartType = artPartIter->first;
std::vector<DtArticulatedPart::ParameterMetric> parameterMetrics;
std::vector<DtArticulatedPart::ParameterMetric>::const_iterator paramMetricIter =
parameterMetrics.begin();
std::vector<DtArticulatedPart::ParameterMetric>::const_iterator paramMetricEnd =
parameterMetrics.end();
for(;paramMetricIter != paramMetricEnd; ++paramMetricIter)
{
int paramMetric = *paramMetricIter;
<<
" Value: " << parameter.
value <<
"\n";
}
}
}