|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.common.TaggableObject
com.kuka.roboticsAPI.geometricModel.SceneGraphObject
public abstract class SceneGraphObject
Base class for all objects that build up the scene graph.
The Robotics API always assumes the translation part of transformations to be given in [mm].
| Constructor Summary | |
|---|---|
protected |
SceneGraphObject()
Creates a new instance of SceneGraphObject without a root frame and with an empty name. |
protected |
SceneGraphObject(String name)
Creates a new instance of SceneGraphObject which creates a new ObjectFrame as root frame. |
| Method Summary | |
|---|---|
ObjectFrame |
addChildFrame(String name)
Adds a new frame with the given name and transformation = MatrixTransformation = IDENTITY from the root frame of this object. |
ObjectFrame |
addChildFrame(String name,
ITransformation offset)
Adds a new frame with the given name and transformation from the root frame of this object. |
ObjectFrame |
addChildFrame(String name,
ObjectFrame parent)
Adds a new frame with the given name and transformation = MatrixTransformation = IDENTITY to the given parent frame. |
ObjectFrame |
addChildFrame(String name,
ObjectFrame parent,
ITransformation offset)
Adds a new frame with the given name and transformation from the given parent frame. |
ObjectFrame |
addChildFrame(String name,
ObjectFrame parent,
ITransformationProvider provider)
Adds a new frame with the given name and transformation to the root frame of this object. |
ObjectFrame |
addChildFrame(String id,
String name,
ObjectFrame parent,
ITransformation offset)
Adds a new frame with the given name and transformation from the given parent frame. |
List<SceneGraphObject> |
allObjects()
Gets a list of all child objects of this object and the object itself. |
protected void |
changeFrameParent(ObjectFrame frame,
ObjectFrame newParent)
Changes the frames parent to newParent. |
void |
changeFramePosition(ObjectFrame frame,
ITransformation newOffset)
Changes the frame position in the object relative to its parent.. |
protected abstract void |
changeParent(ObjectFrame frame)
Changes the parent of this object. |
List<SceneGraphObject> |
findMembersOfGroup()
Gets a list of all objects that are in a group with the calling object, including the root object of the group. |
Robot |
findRobot()
Finds the robot to which the object is connected. |
List<ObjectFrame> |
getAllFrames()
Gets a list of all frames of the object. |
Map<String,Object> |
getAllUserParameters()
Gets unmodifiable map containing all user parameters. |
SceneGraphObject |
getChild(String name)
Gets the child object with the given name. |
protected Object |
getChildFrameLock()
|
List<SceneGraphObject> |
getChildren()
Gets a list of all child objects of the calling object. |
ObjectFrame |
getFrame(String path)
Gets the object frame with the given path from the object frame to the root of this object. |
String |
getName()
Gets the name of this object. |
SceneGraphObject |
getParent()
Gets the parent object of this object. |
ObjectFrame |
getRootFrame()
Gets the root frame of this object. |
SceneGraphObject |
getRootOfGroup()
Gets the root member of the group of the calling object. |
Object |
getUserParameter(String key)
Gets user parameter value for the given key. |
void |
groupToParent()
Sets the group flag for this spatial object. |
boolean |
isDescendantOf(SceneGraphObject other)
Checks if the object is a descendant of the specified object. |
boolean |
isGroupedToParent()
Checks if the spatial object is grouped to its parent. |
boolean |
isMemberOfGroup()
Checks if the spatial object belongs to a group of objects. |
boolean |
isRootOfGroup()
Checks if the spatial object is the root element of the group it belongs to. |
void |
removeFrame(ObjectFrame frame)
Removes the specified child frame and sets the owner of all its children to null. |
void |
renameFrame(ObjectFrame frame,
String newName)
Changes the name of the specified frame. |
protected void |
setName(String name)
Sets the given name as the name of this object and its root frame. |
protected void |
setRootFrame(ObjectFrame frame)
Sets the root frame of this object, if frame is not null and no root
frame for this object exists. |
void |
setUserParameter(String key,
Object value)
Sets given user parameter value for the given key. |
String |
toString()
|
void |
ungroupFromParent()
Removes the group flag from the spatial object. |
| Methods inherited from class com.kuka.common.TaggableObject |
|---|
getTag, setTag |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected SceneGraphObject(String name)
ObjectFrame as root frame.
The name of the created object and its root frame is the specified name.
name - the SceneGraphObject's and root frame's name.protected SceneGraphObject()
| Method Detail |
|---|
public String getName()
protected void setName(String name)
name - the new SceneGraphObject and root frame name.protected void setRootFrame(ObjectFrame frame)
null and no root
frame for this object exists.
frame - the new root frame
IllegalStateException - if the root frame already existspublic ObjectFrame getRootFrame()
public ObjectFrame getFrame(String path)
path - the full qualified path
null will be returned.public List<SceneGraphObject> findMembersOfGroup()
public SceneGraphObject getParent()
The parent object of this object is the object to which belongs the parent of this object's frame.
null if there are no parent
object.public SceneGraphObject getChild(String name)
name - the name of the child object
public List<SceneGraphObject> allObjects()
public List<SceneGraphObject> getChildren()
public ObjectFrame addChildFrame(String name,
ObjectFrame parent,
ITransformation offset)
name - the name of the new frame.parent - the parent frame of the new frame. The parent frame should
belong to this object.offset - the transformation between the given parent and the created
frame.
IllegalArgumentException - the parent frame does not belong to the same object or null.
IllegalArgumentException - if the name is not unique
public ObjectFrame addChildFrame(String id,
String name,
ObjectFrame parent,
ITransformation offset)
id - the id of the new frame.name - the name of the new frame.parent - the parent frame of the new frame. The parent frame should
belong to this object.offset - the transformation between the given parent and the created
frame.
IllegalArgumentException - the parent frame does not belong to the same object or null.
IllegalArgumentException - if the name is not unique
public ObjectFrame addChildFrame(String name,
ITransformation offset)
name - the name of the new frame.offset - the transformation between the new frame an the root frame.
IllegalArgumentException - the parent frame does not belong to the same object.
IllegalArgumentException - if the name is not unique
public ObjectFrame addChildFrame(String name,
ObjectFrame parent,
ITransformationProvider provider)
name - the name of the new frame. Must be unique for the current
frame node.parent - parent frame for the created frame, should belong to this
objectprovider - the transformation provider that should provide transformation
from the parent frame to the created frame.
IllegalArgumentException - the parent frame does not belong to the same object or null.
IllegalArgumentException - if the name is not uniquepublic ObjectFrame addChildFrame(String name)
name - the name of the new frame.
IllegalArgumentException - the parent frame does not belong to the same object.
IllegalArgumentException - if the name is not unique
public ObjectFrame addChildFrame(String name,
ObjectFrame parent)
name - the name of the new frame.parent - the parent frame of the new frame.
IllegalArgumentException - if name is null.
IllegalArgumentException - the parent frame does not belong to the same object.
IllegalArgumentException - if the name is not uniquepublic void removeFrame(ObjectFrame frame)
null.
frame - the frame that should be removed.public void groupToParent()
If a grouped object is attached to a new parent with the attachTo() or the
switchParent() method, the whole group will be attached to the new parent. This means that the root
member of the group will be attached to the new parent object, not the calling object.
public void ungroupFromParent()
public Robot findRobot()
null if no robot found.public boolean isGroupedToParent()
true if the object is grouped to its parent.public boolean isMemberOfGroup()
true if the object is part of a group.public SceneGraphObject getRootOfGroup()
null is returned.
public boolean isRootOfGroup()
true if the object is the root element.public List<ObjectFrame> getAllFrames()
protected abstract void changeParent(ObjectFrame frame)
frame - new parent frame for the object root.
public void changeFramePosition(ObjectFrame frame,
ITransformation newOffset)
frame - the frame whose position should be changed.newOffset - the new transformation from frame parent to the frame.
IllegalStateException - if the given frame does not belong to the object.
public void renameFrame(ObjectFrame frame,
String newName)
frame - frame to rename.newName - new name for the frame. The name should be unique for the
current frame node.
IllegalArgumentException - if the name is not unique
protected void changeFrameParent(ObjectFrame frame,
ObjectFrame newParent)
frame - the frame whose parent should be changed.newParent - the frames new parent.
IllegalStateException - if the frame or the new parent do not belong to the object.public String toString()
toString in class Objectprotected Object getChildFrameLock()
public boolean isDescendantOf(SceneGraphObject other)
other - The other object. null is not allowed.
true if the object is a child of the given object.public Object getUserParameter(String key)
key - The key. null is not allowed.
null if not found.
public void setUserParameter(String key,
Object value)
This data can be retrieved later from the object through the method getUserParameter(String).
key - The key. null is not allowed.value - The value. May be null.public Map<String,Object> getAllUserParameters()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||