本文整理汇总了C++中InterpolationArray类的典型用法代码示例。如果您正苦于以下问题:C++ InterpolationArray类的具体用法?C++ InterpolationArray怎么用?C++ InterpolationArray使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了InterpolationArray类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getTimeFullSteer
/** Returns the time the kart needs to fully steer in one direction from
* steering straight depending on the current steering value.
* \param steer Current steering value, must be >=0. */
float getTimeFullSteer(float steer) const
{
assert(steer>=0);
return m_time_full_steer.get(steer);
} // getTimeFullSteer
示例2: getMaxSteerAngle
/** Returns the maximum steering angle (depending on speed). */
float getMaxSteerAngle(float speed) const {
return m_turn_angle_at_speed.get(speed);
} // getMaxSteerAngle
示例3: getSpeedForTurnRadius
/** Returns the (maximum) speed for a given turn radius.
* \param radius The radius for which the speed needs to be computed. */
float getSpeedForTurnRadius(float radius) const {
float angle = sin(m_wheel_base / radius);
return m_turn_angle_at_speed.getReverse(angle);
} // getSpeedForTurnRadius
示例4: getItemCollectProbability
/** Returns the probability to collect an item depending on the distance
* to the first player kart. */
float getItemCollectProbability(float distance) const
{
return m_collect_item_probability.get(distance);
} // getItemcollectProbability
示例5: getSpeedCap
/** Returns the fraction of maximum speed the AI should drive at, depending
* on the distance from the player. */
float getSpeedCap(float distance) const
{
return m_speed_cap.get(distance);
} // getSpeedCap
示例6: getSkiddingProbability
/** Returns the skidding probability dependent on the specified distance
* to the first player kart. */
float getSkiddingProbability(float distance) const
{
return m_skid_probability.get(distance);
} // getSkiddingProbability