当前位置: 首页>>代码示例>>C++>>正文


C++ Array_::resize方法代码示例

本文整理汇总了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;
}
开发者ID:ANKELA,项目名称:opensim-core,代码行数:6,代码来源:CoordinateReference.cpp

示例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));
}
开发者ID:chrisdembia,项目名称:opensim-core,代码行数:7,代码来源:InverseKinematicsSolver.cpp

示例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);
}
开发者ID:ANKELA,项目名称:opensim-core,代码行数:7,代码来源:CoordinateReference.cpp

示例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));
}
开发者ID:chrisdembia,项目名称:opensim-core,代码行数:7,代码来源:InverseKinematicsSolver.cpp


注:本文中的simtk::Array_::resize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。