本文整理汇总了C++中simtk::Array_::resize方法的典型用法代码示例。如果您正苦于以下问题:C++ Array_::resize方法的具体用法?C++ Array_::resize怎么用?C++ Array_::resize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类simtk::Array_
的用法示例。
在下文中一共展示了Array_::resize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getWeights
/** get the weighting (importance) of meeting this Reference */
void CoordinateReference::getWeights(const SimTK::State &s, SimTK::Array_<double> &weights) const
{
weights.resize(getNumRefs());
weights[0] = _defaultWeight;
}
示例2: computeCurrentSquaredMarkerErrors
/** Compute and return the distance errors between all model marker and observations. */
void InverseKinematicsSolver::computeCurrentSquaredMarkerErrors(SimTK::Array_<double> &markerErrors)
{
markerErrors.resize(_markerAssemblyCondition->getNumMarkers());
for(unsigned int i=0; i<markerErrors.size(); i++)
markerErrors[i] = _markerAssemblyCondition->findCurrentMarkerErrorSquared(SimTK::Markers::MarkerIx(i));
}
示例3: getValues
/** get the values of the CoordinateReference */
void CoordinateReference::getValues(const SimTK::State &s, SimTK::Array_<double> &values) const
{
SimTK::Vector t(1, s.getTime());
values.resize(getNumRefs());
values[0] = _coordinateValueFunction->calcValue(t);
}
示例4: computeCurrentMarkerLocations
/** Compute and return the spatial locations of all markers in ground. */
void InverseKinematicsSolver::computeCurrentMarkerLocations(SimTK::Array_<SimTK::Vec3> &markerLocations)
{
markerLocations.resize(_markerAssemblyCondition->getNumMarkers());
for(unsigned int i=0; i<markerLocations.size(); i++)
markerLocations[i] = _markerAssemblyCondition->findCurrentMarkerLocation(SimTK::Markers::MarkerIx(i));
}