Package org.robwork.sdurw_trajectory
Class TrajectoryIteratorVector2D
- java.lang.Object
-
- org.robwork.sdurw_trajectory.TrajectoryIteratorVector2D
-
public class TrajectoryIteratorVector2D extends java.lang.ObjectBi-directional iterator for running efficiently through a trajectory
-
-
Constructor Summary
Constructors Constructor Description TrajectoryIteratorVector2D(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAssign(double dt)This function can be used to increase the iterator position.
The position can be increased no longer than the length of the
complete trajectory.
Vector2Dddx()Extracts a point of the double derivative of the trajectory at the
current position in the trajectory
voiddec()Method for decreasing the position of the iterator a fixed amount
The decrement is equal to the dt specified in the constructor.voiddec(double dt)Method for decreasing the position of the iterator a fixed amount
voiddelete()Vector2Ddx()Extracts a point of the derivative of the trajectory
at the current position in the trajectory
static longgetCPtr(TrajectoryIteratorVector2D obj)doublegetTime()Returns the current position (time) of the iteratorvoidinc()Method for increasing the position of the iterator a fixed amount
The increment is equal to the dt specified in the constructor.voidinc(double dt)Method for increasing the position of the iterator by dt
booleanisBegin()Test if the beginning of the trajectory is reached.
booleanisEnd()Test if the end of the trajectory is reached.
TrajectoryIteratorVector2Dnext()Operator overloading ++ for increasing the position of the iterator.
Usage: ++iterator
The increment is equal to the dt specified in the constructor.voidnext(int arg0)Operator overloading ++ for increasing the position of the iterator.
Usage: iterator++
The increment is equal to the dt specified in the constructor.Vector2Dpoint()Extracts a point at the current position in the trajectory.
TrajectoryIteratorVector2Dprev()Operator overloading -- for decreasing the position of the iterator.
Usage: --iterator;
The decrement is equal to the dt specified in the constructor.voidprev(int arg0)Operator overloading -- for decreasing the position of the iterator.
Usage: iterator--;
The decrement is equal to the dt specified in the constructor.voidsubtractAssign(double dt)This function can be used to decrease the iterator position.
The position can be decreased no longer than to time equals 0.
Vector2Dx()Extracts a point at the current position in the trajectory.
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(TrajectoryIteratorVector2D obj)
-
delete
public void delete()
-
getTime
public double getTime()
Returns the current position (time) of the iterator- Returns:
- The current time.
-
inc
public void inc()
Method for increasing the position of the iterator a fixed amount
The increment is equal to the dt specified in the constructor.
-
inc
public void inc(double dt)
Method for increasing the position of the iterator by dt
- Parameters:
dt- [in] Amount to increase. A positive value is expected.
-
dec
public void dec()
Method for decreasing the position of the iterator a fixed amount
The decrement is equal to the dt specified in the constructor.
-
dec
public void dec(double dt)
Method for decreasing the position of the iterator a fixed amount
- Parameters:
dt- [in] Amount to decrease. A positive value is expected
-
subtractAssign
public void subtractAssign(double dt)
This function can be used to decrease the iterator position.
The position can be decreased no longer than to time equals 0.
- Parameters:
dt- [in] a double that describes how much to decrease the
iterator position
-
addAssign
public void addAssign(double dt)
This function can be used to increase the iterator position.
The position can be increased no longer than the length of the
complete trajectory.
- Parameters:
dt- [in] a double that describes how much to increase the
iterator position
-
next
public TrajectoryIteratorVector2D next()
Operator overloading ++ for increasing the position of the iterator.
Usage: ++iterator
The increment is equal to the dt specified in the constructor.- Returns:
- Reference to the TrajectoryIterator
-
next
public void next(int arg0)
Operator overloading ++ for increasing the position of the iterator.
Usage: iterator++
The increment is equal to the dt specified in the constructor.
-
prev
public TrajectoryIteratorVector2D prev()
Operator overloading -- for decreasing the position of the iterator.
Usage: --iterator;
The decrement is equal to the dt specified in the constructor.- Returns:
- Reference to the TrajectoryIterator
-
prev
public void prev(int arg0)
Operator overloading -- for decreasing the position of the iterator.
Usage: iterator--;
The decrement is equal to the dt specified in the constructor.
-
isEnd
public boolean isEnd()
Test if the end of the trajectory is reached.
- Returns:
- true if the iterator has reached the end of the trajectory false
otherwise.
-
isBegin
public boolean isBegin()
Test if the beginning of the trajectory is reached.
- Returns:
- true if the iterator has reached the beginning of the trajectory
false otherwise.
-
point
public Vector2D point()
Extracts a point at the current position in the trajectory.
- Returns:
- the point at the current position in the trajectory.
-
x
public Vector2D x()
Extracts a point at the current position in the trajectory.
- Returns:
- the point at the current position in the trajectory.
-
dx
public Vector2D dx()
Extracts a point of the derivative of the trajectory
at the current position in the trajectory
- Returns:
- the derived point at the current position in the trajectory.
-
ddx
public Vector2D ddx()
Extracts a point of the double derivative of the trajectory at the
current position in the trajectory
- Returns:
- the double derived point at the current position in the trajectory.
-
-