本文整理了Java中us.ihmc.yoVariables.variable.YoInteger.getIntegerValue()
方法的一些代码示例,展示了YoInteger.getIntegerValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoInteger.getIntegerValue()
方法的具体详情如下:
包路径:us.ihmc.yoVariables.variable.YoInteger
类名称:YoInteger
方法名:getIntegerValue
[英]Retrieves the value of this YoInteger.
[中]检索此整数的值。
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
@Override
public String toString()
{
if (numberOfWaypoints.getIntegerValue() == 0)
return namePrefix + ": Has no waypoints.";
else
return namePrefix + ": number of waypoints = " + numberOfWaypoints.getIntegerValue() + ", current waypoint index = "
+ currentWaypointIndex.getIntegerValue() + "\nFirst waypoint: " + waypoints.get(0) + ", last waypoint: "
+ waypoints.get(numberOfWaypoints.getIntegerValue() - 1);
}
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
@Override
public boolean isDone()
{
if (isEmpty())
return true;
boolean isLastWaypoint = currentWaypointIndex.getIntegerValue() >= numberOfWaypoints.getIntegerValue() - 2;
if (!isLastWaypoint)
return false;
boolean subTrajectoryIsDone = subTrajectory.isDone();
return subTrajectoryIsDone;
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void update()
{
if (position == null)
{
throw new NullPointerException(
"GlitchFilteredYoInteger must be constructed with a non null position variable to call update(), otherwise use update(int)");
}
update(position.getIntegerValue());
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public int getCurrentSegmentIndex(double timeInState)
{
setCurrentSegmentIndexFromStateTime(timeInState);
return currentSegmentIndex.getIntegerValue();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
/**
* Add a value and return a handle to the object.
*
* @return value at the last position. This object can still hold data.
*/
public T add()
{
maxCapacityCheck(position.getIntegerValue() + 1);
position.increment();
T val = values[position.getIntegerValue()];
return val;
}
代码示例来源:origin: us.ihmc/ihmc-yovariables
/**
* Returns String representation of this YoInteger.
*
* @return String representing this YoInteger and its current value as an integer
*/
@Override public String toString()
{
return String.format("%s: %d", getName(), getIntegerValue());
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void compute(double time)
{
if (!frameTrajectories.get(positionTrajectoryGeneratorIndex.getIntegerValue()).timeIntervalContains(time)
&& (positionTrajectoryGeneratorIndex.getIntegerValue() < frameTrajectories.size() - 1))
{
positionTrajectoryGeneratorIndex.increment();
}
FrameTrajectory3D currentGenerator = frameTrajectories.get(positionTrajectoryGeneratorIndex.getIntegerValue());
currentGenerator.compute(time);
timeIntoStep.set(time);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void update(boolean value)
{
if (value != this.getBooleanValue())
{
counter.set(counter.getIntegerValue() + 1);
}
else
counter.set(0);
if (counter.getIntegerValue() >= (windowSize.getIntegerValue() ))
set(value);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void appendWaypoints(double[] timeAtWaypoints, double[] positions, double[] velocities)
{
if (timeAtWaypoints.length != positions.length || positions.length != velocities.length)
throw new RuntimeException("Arguments are inconsistent.");
checkNumberOfWaypoints(numberOfWaypoints.getIntegerValue() + timeAtWaypoints.length);
for (int i = 0; i < timeAtWaypoints.length; i++)
appendWaypointUnsafe(timeAtWaypoints[i], positions[i], velocities[i]);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
private void appendWaypointUnsafe(SO3TrajectoryPointInterface<?> so3Waypoint)
{
waypoints.get(numberOfWaypoints.getIntegerValue()).set(so3Waypoint);
numberOfWaypoints.increment();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public boolean isDone()
{
if (isEmpty())
return true;
boolean isLastWaypoint = currentWaypointIndex.getIntegerValue() >= numberOfWaypoints.getIntegerValue() - 2;
if (!isLastWaypoint)
return false;
return currentTrajectoryTime.getValue() >= waypoints.get(currentWaypointIndex.getValue() + 1).getTime();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void appendWaypoint(double timeAtWaypoint, Point3DReadOnly position, Vector3DReadOnly linearVelocity)
{
checkNumberOfWaypoints(numberOfWaypoints.getIntegerValue() + 1);
appendWaypointUnsafe(timeAtWaypoint, position, linearVelocity);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void appendWaypoint(double timeAtWaypoint, QuaternionReadOnly orientation, Vector3DReadOnly angularVelocity)
{
checkNumberOfWaypoints(numberOfWaypoints.getIntegerValue() + 1);
appendWaypointUnsafe(timeAtWaypoint, orientation, angularVelocity);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void appendWaypoint(double timeAtWaypoint, FrameQuaternionReadOnly orientation, FrameVector3DReadOnly angularVelocity)
{
checkNumberOfWaypoints(numberOfWaypoints.getIntegerValue() + 1);
appendWaypointUnsafe(timeAtWaypoint, orientation, angularVelocity);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void appendWaypoint(FrameSE3TrajectoryPoint frameSE3TrajectoryPoint)
{
frameSE3TrajectoryPoint.checkReferenceFrameMatch(getCurrentTrajectoryFrame());
checkNumberOfWaypoints(numberOfWaypoints.getIntegerValue() + 1);
appendWaypointUnsafe(frameSE3TrajectoryPoint);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void doAverage()
{
if (dataLength.getIntegerValue() < 1)
return;
set(dataCumulated.getDoubleValue() / dataLength.getValueAsDouble());
reset();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void appendWaypoint(FrameSE3TrajectoryPoint frameSE3TrajectoryPoint)
{
frameSE3TrajectoryPoint.checkReferenceFrameMatch(getCurrentTrajectoryFrame());
checkNumberOfWaypoints(numberOfWaypoints.getIntegerValue() + 1);
appendWaypointUnsafe(frameSE3TrajectoryPoint);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void appendWaypoint(double timeAtWaypoint, SpatialVectorReadOnly waypoint)
{
checkNumberOfWaypoints(numberOfWaypoints.getIntegerValue() + 1);
appendWaypointUnsafe(timeAtWaypoint, waypoint.getAngularPart(), waypoint.getLinearPart());
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void appendWaypoints(OneDoFTrajectoryPointInterface<?>[] waypoints1D)
{
checkNumberOfWaypoints(numberOfWaypoints.getIntegerValue() + waypoints1D.length);
for (int i = 0; i < waypoints1D.length; i++)
appendWaypointUnsafe(waypoints1D[i].getTime(), waypoints1D[i].getPosition(), waypoints1D[i].getVelocity());
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void appendWaypoints(FrameSO3TrajectoryPointList trajectoryPointList)
{
checkNumberOfWaypoints(numberOfWaypoints.getIntegerValue() + trajectoryPointList.getNumberOfTrajectoryPoints());
trajectoryPointList.checkReferenceFrameMatch(getCurrentTrajectoryFrame());
for (int i = 0; i < trajectoryPointList.getNumberOfTrajectoryPoints(); i++)
{
FrameSO3TrajectoryPoint trajectoryPoint = trajectoryPointList.getTrajectoryPoint(i);
trajectoryPoint.checkReferenceFrameMatch(getCurrentTrajectoryFrame());
appendWaypointUnsafe(trajectoryPoint);
}
}
内容来源于网络,如有侵权,请联系作者删除!