|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.robokind.api.animation.Animation
public class Animation
An Animation holds a map of servo IDs and Channel. This also stores the JointParameters corresponding to each Channel.
Constructor Summary | |
---|---|
Animation()
Creates an empty Animation. |
|
Animation(org.robokind.api.common.config.VersionProperty version)
Creates an Animation with the given VersionProperty. |
Method Summary | |
---|---|
void |
addChannel(Channel channel)
Adds a given Channel for the given servo parameters. |
void |
addChannels(List<Channel> channels)
Adds a list of Channels. |
Animation |
clone()
Returns a deep copy of the Animation. |
CompiledMap |
compileMap(long start,
long end,
long stepLength)
Creates a composite CompiledPath from all MotionPaths for given times. |
boolean |
containsLogicalId(int id)
Returns true if there exists a channel for the given id. |
Channel |
getChannel(int id)
Returns the Channel for id, ordered by when the Channels were added. |
Channel |
getChannelByLogicalId(int id)
Returns the Channel for the given id. |
List<Channel> |
getChannels()
Returns a set of entries of servo ids and Channels |
CompiledMap |
getCompiledMap(long stepLength)
Creates a CompiledMap from contained Channels' CompiledPaths. |
Set<Map.Entry<Integer,Channel>> |
getEntrySet()
Returns a set of entries of servo ids and Channels |
Long |
getStartTime()
Returns the start time |
Long |
getStopTime()
Returns the stop time |
org.robokind.api.common.config.VersionProperty |
getVersion()
Returns The Animation's Version. |
void |
insertChannel(int i,
Channel channel)
Adds a given Channel for the given servo parameters, and orders it by the given index. |
Channel |
removeChannelByListOrder(int i)
Removes the ith Channel, ordered by when the channels were added. |
Channel |
removeChannelByLogicalId(int logicalId)
Removes the Channel with the given logical id. |
void |
setStartTime(Long time)
Sets the start time |
void |
setStopTime(Long time)
Sets the stop time |
void |
setVersion(String name,
String versionNumber)
Set the Animation's Version with the given name and version number. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Animation()
public Animation(org.robokind.api.common.config.VersionProperty version)
version
- the Animation's VersionMethod Detail |
---|
public org.robokind.api.common.config.VersionProperty getVersion()
public void setVersion(String name, String versionNumber)
name
- the Animations new nameversionNumber
- the Animations new version numberpublic void addChannel(Channel channel) throws IllegalArgumentException
channel
- Channel to add
IllegalArgumentException
- if servo id has already been added
NullPointerException
- if channel is nullpublic void addChannels(List<Channel> channels) throws NullPointerException
channels
- Channels to add
NullPointerException
- if channels is nullpublic void setStartTime(Long time)
time
- start timepublic Long getStartTime()
public void setStopTime(Long time)
time
- stop timepublic Long getStopTime()
public void insertChannel(int i, Channel channel) throws IllegalArgumentException
channel
- Channel to addi
- the index to insert the channel
IllegalArgumentException
- if servo id has already been added
NullPointerException
- if channel is nullpublic boolean containsLogicalId(int id)
id
- servo id
public Channel getChannel(int id)
id
- for Channel
public Channel getChannelByLogicalId(int id)
id
- Servo id for Channel
public Set<Map.Entry<Integer,Channel>> getEntrySet()
public List<Channel> getChannels()
public Channel removeChannelByListOrder(int i)
i
- the index of the channel to remove
public Channel removeChannelByLogicalId(int logicalId)
logicalId
- the logicalId of the Channel to remove
public CompiledMap getCompiledMap(long stepLength)
stepLength
- milliseconds between positions
public CompiledMap compileMap(long start, long end, long stepLength)
start
- path start timeend
- path end timestepLength
- milliseconds between positions
public Animation clone()
clone
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |