|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mechio.api.animation.Channel
public class Channel
Holds a list of MotionPaths, and can build a composite CompiledPath.
| Constructor Summary | |
|---|---|
Channel(int id,
String name)
Create an empty Channel for given ServoParameters. |
|
| Method Summary | |
|---|---|
void |
addPath(int i,
MotionPath p)
Adds a MotionPath to the list at the given index. |
void |
addPath(MotionPath p)
Adds a MotionPath to the list. |
void |
addPaths(List<MotionPath> paths)
Adds a List of MotionPaths to the Channel. |
Channel |
clone()
Returns a deep copy of the Channel. |
CompiledPath |
compilePath(long start,
long end,
long stepLength)
Creates a composite CompiledPath from all MotionPaths for given times. |
boolean |
equals(Object obj)
|
CompiledPath |
getCompiledPath(long stepLength)
Creates a composite CompiledPath from all MotionPaths. |
Integer |
getId()
Returns the id of this Channel's Joint. |
List<Point2D> |
getInterpolatedPoints(long start,
long end)
Combines the interpolations from each motion path, omitting overlaps. |
MotionPath |
getMotionPath(int i)
Returns the MotionPath for the given index. |
List<MotionPath> |
getMotionPaths()
Returns the list of MotionPaths belonging to this Channel. |
String |
getName()
Returns the name of this Channel's Joint. |
Long |
getStartTime()
Returns the start time |
Long |
getStopTime()
Returns the stop time |
int |
hashCode()
|
MotionPath |
removeMotionPath(int i)
Removes the MotionPath at the given index. |
int |
removeMotionPath(MotionPath mp)
Removes the given MotionPath. |
void |
setId(int id)
Sets the Channel's Id. |
void |
setName(String name)
Sets the Channel's Name. |
void |
setStartTime(Long time)
Sets the start time |
void |
setStopTime(Long time)
Sets the stop time |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Channel(int id,
String name)
id - id for Channelname - name for Channel| Method Detail |
|---|
public void setId(int id)
id - the new Channel idpublic Integer getId()
public void setName(String name)
name - the new Channel namepublic String getName()
public void setStartTime(Long time)
time - start timepublic Long getStartTime()
public void setStopTime(Long time)
time - stop timepublic Long getStopTime()
public void addPaths(List<MotionPath> paths)
paths - MotionPaths to add
NullPointerException - if paths are nullpublic void addPath(MotionPath p)
p - MotionPath to add
NullPointerException - if p is null
public void addPath(int i,
MotionPath p)
i - the index to add atp - MotionPath to add
NullPointerException - if p is nullpublic List<MotionPath> getMotionPaths()
public MotionPath getMotionPath(int i)
i - index for the MotionPath to retrieve
public MotionPath removeMotionPath(int i)
i - index for MotionPath to remove
public int removeMotionPath(MotionPath mp)
mp - the MotionPath to remove
public CompiledPath getCompiledPath(long stepLength)
stepLength - milliseconds between path positions
public CompiledPath compilePath(long start,
long end,
long stepLength)
start - path start timeend - path end timestepLength - milliseconds between positions
public List<Point2D> getInterpolatedPoints(long start,
long end)
start - path start timeend - path end time
public Channel clone()
clone in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||