item corresponds to a robot model More...
Classes | |
class | MenuChangeType |
class | NormalRender |
Public Member Functions | |
void | addLink (GrxLinkItem link) |
add a link | |
void | addRobot (File f, GrxLinkItem parentLink) |
load and add a new robot as a child | |
void | calcForwardKinematics () |
compute forward kinematics | |
void | cancelModified () |
int | checkModifiedModel (boolean reload) |
GrxModelItem | clone () |
Override clone method. | |
boolean | create () |
create a new model | |
void | delete () |
BodyInfo | getBodyInfo () |
get BodyInfo | |
List< Camera_impl > | getCameraSequence () |
get sequence of cameras | |
void | getCoM (Vector3d pos) |
compute center of mass | |
int | getDOF () |
double[] | getInitialJointMode () |
double[] | getInitialJointValues () |
double[] | getInitialJointVelocity () |
double[] | getInitialTransformArray (GrxLinkItem link) |
double[] | getInitialVelocity (GrxLinkItem link) |
String[] | getJointNames () |
double[] | getJointValues () |
GrxLinkItem | getLink (String name) |
get link from name | |
List< GrxModelItem > | getSameUrlModels () |
String[] | getSensorNames (String type) |
List< GrxSensorItem > | getSensors (String type) |
double[] | getTransformArray (GrxLinkItem link) |
get transform of link in array form | |
TransformGroup | getTransformGroupRoot () |
ValueEditType | GetValueEditType (String key) |
Return editing type of the key item. | |
GrxModelItem (String name, GrxPluginManager item) | |
constructor | |
boolean | isModified () |
boolean | isRobot () |
boolean | load (File f) |
load a model from file | |
void | makeAABBforSameUrlModels () |
void | notifyModified () |
notify this model is modified | |
boolean | propertyChanged (String property, String value) |
check validity of new value of property and update if valid | |
boolean | registerCharacter (BodyInfo bInfo) |
boolean | reload () |
void | removeExtraJoint (GrxExtraJointItem extraJoint) |
void | removeLink (GrxLinkItem link) |
remove a link | |
void | rename (String newName) |
rename this Model | |
void | resizeBoundingBox () |
resize bounding box which covers the whole body | |
void | restoreProperties () |
restore properties | |
GrxLinkItem | rootLink () |
get root link | |
boolean | saveAndLoad () |
void | setCharacterPos (LinkPosition[] lpos, double[] q) |
set transformation of the root joint and all joint values | |
void | setFocused (boolean b) |
set/unset focus on this item | |
void | setJointColor (int jid, java.awt.Color color) |
set color of joint | |
void | setJointValues (final double[] values) |
set joint values | |
void | setJointValuesWithinLimit () |
modify joint value if it exceeds limit values | |
void | setSelected (boolean b) |
set selected flag | |
void | setTransformRoot (Vector3d pos, Matrix3d rot) |
set transformation of the root joint | |
void | setTransformRoot (Transform3D tform) |
set transformation of the root joint | |
void | setTransparencyMode (boolean b) |
void | setVisibleAABB (boolean b) |
void | setVisibleCoM (boolean b) |
set visibility of CoM | |
void | setVisibleCoMonFloor (boolean b) |
set visibility of CoM projected on the floor | |
void | setWireFrame (boolean b) |
switch display mode between fill and line | |
void | setWireFrame (boolean b, Node node) |
switch display mode between fill and line | |
void | updateCoM () |
update CoM and projected CoM positions | |
void | updateInitialJointValue (GrxLinkItem link) |
update joint value property from current joint value | |
void | updateInitialJointValues () |
void | updateInitialTransformRoot () |
update initial transformation property from current Transform3D | |
Public Attributes | |
AppearanceInfo[] | appearances = null |
BranchGroup | bgRoot_ = new BranchGroup() |
Vector< GrxExtraJointItem > | extraJoints_ = new Vector<GrxExtraJointItem>() |
Vector< GrxLinkItem > | links_ = new Vector<GrxLinkItem>() |
MaterialInfo[] | materials = null |
Map< String, GrxLinkItem > | nameToLink_ = new HashMap<String, GrxLinkItem>() |
ShapeInfo[] | shapes = null |
TextureInfo[] | textures = null |
Static Public Attributes | |
static final String | DEFAULT_DIR = "/../model" |
static final String | FILE_EXTENSION = "*" |
static final int | MODIFIED_NG = 1 |
static final int | MODIFIED_NOT = 2 |
static final int | MODIFIED_OK = 0 |
static final String | TITLE = "Model" |
Package Attributes | |
MenuChangeType | menuChangeType_ = new MenuChangeType() |
Private Member Functions | |
void | _globalToRoot (Vector3d pos) |
convert global position into robot local | |
void | _initMenu () |
initialize right-click menu | |
void | _loadVrmlScene (LinkInfo[] links) throws BadLinkStructureException |
create shapes of links | |
boolean | _saveAs () |
save this model as a VRML file | |
void | _setModelType (String value) |
set model type(robot or environment) from String | |
void | _setModelType (boolean isRobot) |
set model type(robot or environment) | |
void | _setTransform (int linkId, Vector3d pos, Matrix3d rot) |
set transformation of linkId th joint | |
void | _setupMarks () |
create spheres to display CoM and projected CoM | |
void | addExtraJoint (String name) |
void | createLink (int index) |
make connections between links and gather cameras | |
BodyInfo | getBodyInfoFromModelLoader () |
boolean | load0 (File f) |
void | makeAABB (BodyInfo binfo) |
boolean | registerCharacter () |
void | sameUrlModelLoad () |
void | setTransparencyMode (boolean b, Node node) |
Private Attributes | |
BodyInfo | bInfo_ |
boolean | bModified_ = false |
List< Camera_impl > | cameraList_ = new ArrayList<Camera_impl>() |
boolean | isRobot_ = true |
int[] | jointToLink_ |
Switch | switchBb_ |
Switch | switchCom_ |
Switch | switchComZ0_ |
TransformGroup | tgCom_ |
TransformGroup | tgComZ0_ |
Static Private Attributes | |
static final double | DEFAULT_RADIUS = 0.05 |
static final String | envIcon = "environment.png" |
static final String | robotIcon = "robot.png" |
item corresponds to a robot model
Definition at line 52 of file GrxModelItem.java.
com.generalrobotix.ui.item.GrxModelItem.GrxModelItem | ( | String | name, |
GrxPluginManager | item | ||
) | [inline] |
constructor
name | name of this item |
item | plugin manager |
Definition at line 219 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem._globalToRoot | ( | Vector3d | pos | ) | [inline, private] |
convert global position into robot local
pos | global position It is overwritten by robot local position |
Definition at line 1086 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem._initMenu | ( | ) | [inline, private] |
initialize right-click menu
Definition at line 265 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem._loadVrmlScene | ( | LinkInfo[] | links | ) | throws BadLinkStructureException [inline, private] |
create shapes of links
links | array of LinkInfo retrieved from ModelLoader |
BadLinkStructureException |
Definition at line 771 of file GrxModelItem.java.
boolean com.generalrobotix.ui.item.GrxModelItem._saveAs | ( | ) | [inline, private] |
save this model as a VRML file
Definition at line 350 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem._setModelType | ( | String | value | ) | [inline, private] |
set model type(robot or environment) from String
value | "true" or "false" |
Definition at line 504 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem._setModelType | ( | boolean | isRobot | ) | [inline, private] |
set model type(robot or environment)
isRobot | true if this model is robot, false otherwise |
Definition at line 515 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem._setTransform | ( | int | linkId, |
Vector3d | pos, | ||
Matrix3d | rot | ||
) | [inline, private] |
set transformation of linkId th joint
linkId | id of the link |
pos | position |
rot | rotation matrix |
Definition at line 990 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem._setupMarks | ( | ) | [inline, private] |
create spheres to display CoM and projected CoM
Definition at line 536 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.addExtraJoint | ( | String | name | ) | [inline, private] |
Definition at line 1673 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.addLink | ( | GrxLinkItem | link | ) | [inline] |
add a link
This method is called by constructor of GrxLinkItem
link | link to be added |
Definition at line 246 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.addRobot | ( | File | f, |
GrxLinkItem | parentLink | ||
) | [inline] |
load and add a new robot as a child
f | file name of the new robot |
Definition at line 810 of file GrxModelItem.java.
compute forward kinematics
Definition at line 1055 of file GrxModelItem.java.
Definition at line 157 of file GrxModelItem.java.
int com.generalrobotix.ui.item.GrxModelItem.checkModifiedModel | ( | boolean | reload | ) | [inline] |
Definition at line 109 of file GrxModelItem.java.
Override clone method.
Reimplemented from com.generalrobotix.ui.GrxBaseItem.
Definition at line 1505 of file GrxModelItem.java.
boolean com.generalrobotix.ui.item.GrxModelItem.create | ( | ) | [inline] |
create a new model
Reimplemented from com.generalrobotix.ui.GrxBaseItem.
Definition at line 368 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.createLink | ( | int | index | ) | [inline, private] |
make connections between links and gather cameras
index | index of link in links_ |
Definition at line 737 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.delete | ( | ) | [inline] |
delete this item
Reimplemented from com.generalrobotix.ui.GrxBaseItem.
Definition at line 1283 of file GrxModelItem.java.
BodyInfo com.generalrobotix.ui.item.GrxModelItem.getBodyInfo | ( | ) | [inline] |
BodyInfo com.generalrobotix.ui.item.GrxModelItem.getBodyInfoFromModelLoader | ( | ) | [inline, private] |
Definition at line 1550 of file GrxModelItem.java.
List<Camera_impl> com.generalrobotix.ui.item.GrxModelItem.getCameraSequence | ( | ) | [inline] |
get sequence of cameras
Definition at line 1466 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.getCoM | ( | Vector3d | pos | ) | [inline] |
compute center of mass
pos | computed center of mass |
Definition at line 1100 of file GrxModelItem.java.
int com.generalrobotix.ui.item.GrxModelItem.getDOF | ( | ) | [inline] |
Definition at line 1196 of file GrxModelItem.java.
double [] com.generalrobotix.ui.item.GrxModelItem.getInitialJointMode | ( | ) | [inline] |
Definition at line 1244 of file GrxModelItem.java.
double [] com.generalrobotix.ui.item.GrxModelItem.getInitialJointValues | ( | ) | [inline] |
Definition at line 1216 of file GrxModelItem.java.
double [] com.generalrobotix.ui.item.GrxModelItem.getInitialJointVelocity | ( | ) | [inline] |
Definition at line 1226 of file GrxModelItem.java.
double [] com.generalrobotix.ui.item.GrxModelItem.getInitialTransformArray | ( | GrxLinkItem | link | ) | [inline] |
Definition at line 1162 of file GrxModelItem.java.
double [] com.generalrobotix.ui.item.GrxModelItem.getInitialVelocity | ( | GrxLinkItem | link | ) | [inline] |
Definition at line 1182 of file GrxModelItem.java.
String [] com.generalrobotix.ui.item.GrxModelItem.getJointNames | ( | ) | [inline] |
Definition at line 1202 of file GrxModelItem.java.
double [] com.generalrobotix.ui.item.GrxModelItem.getJointValues | ( | ) | [inline] |
Definition at line 1209 of file GrxModelItem.java.
GrxLinkItem com.generalrobotix.ui.item.GrxModelItem.getLink | ( | String | name | ) | [inline] |
get link from name
name | name of the link |
Definition at line 1546 of file GrxModelItem.java.
List<GrxModelItem> com.generalrobotix.ui.item.GrxModelItem.getSameUrlModels | ( | ) | [inline] |
Definition at line 1591 of file GrxModelItem.java.
String [] com.generalrobotix.ui.item.GrxModelItem.getSensorNames | ( | String | type | ) | [inline] |
Definition at line 1126 of file GrxModelItem.java.
List<GrxSensorItem> com.generalrobotix.ui.item.GrxModelItem.getSensors | ( | String | type | ) | [inline] |
Definition at line 1116 of file GrxModelItem.java.
double [] com.generalrobotix.ui.item.GrxModelItem.getTransformArray | ( | GrxLinkItem | link | ) | [inline] |
get transform of link in array form
link | link |
Definition at line 1146 of file GrxModelItem.java.
TransformGroup com.generalrobotix.ui.item.GrxModelItem.getTransformGroupRoot | ( | ) | [inline] |
Definition at line 1137 of file GrxModelItem.java.
ValueEditType com.generalrobotix.ui.item.GrxModelItem.GetValueEditType | ( | String | key | ) | [inline] |
Return editing type of the key item.
Reimplemented from com.generalrobotix.ui.GrxBasePlugin.
Definition at line 1658 of file GrxModelItem.java.
Definition at line 102 of file GrxModelItem.java.
boolean com.generalrobotix.ui.item.GrxModelItem.isRobot | ( | ) | [inline] |
Definition at line 1254 of file GrxModelItem.java.
boolean com.generalrobotix.ui.item.GrxModelItem.load | ( | File | f | ) | [inline] |
load a model from file
f | file that describes a model |
Reimplemented from com.generalrobotix.ui.GrxBaseItem.
Definition at line 561 of file GrxModelItem.java.
boolean com.generalrobotix.ui.item.GrxModelItem.load0 | ( | File | f | ) | [inline, private] |
Definition at line 586 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.makeAABB | ( | BodyInfo | binfo | ) | [inline, private] |
Definition at line 1571 of file GrxModelItem.java.
Definition at line 1602 of file GrxModelItem.java.
notify this model is modified
Definition at line 96 of file GrxModelItem.java.
boolean com.generalrobotix.ui.item.GrxModelItem.propertyChanged | ( | String | property, |
String | value | ||
) | [inline] |
check validity of new value of property and update if valid
property | name of property |
value | value of property |
Reimplemented from com.generalrobotix.ui.GrxBasePlugin.
Definition at line 442 of file GrxModelItem.java.
boolean com.generalrobotix.ui.item.GrxModelItem.registerCharacter | ( | BodyInfo | bInfo | ) | [inline] |
Definition at line 624 of file GrxModelItem.java.
boolean com.generalrobotix.ui.item.GrxModelItem.registerCharacter | ( | ) | [inline, private] |
Definition at line 629 of file GrxModelItem.java.
boolean com.generalrobotix.ui.item.GrxModelItem.reload | ( | ) | [inline] |
Definition at line 169 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.removeExtraJoint | ( | GrxExtraJointItem | extraJoint | ) | [inline] |
Definition at line 1668 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.removeLink | ( | GrxLinkItem | link | ) | [inline] |
void com.generalrobotix.ui.item.GrxModelItem.rename | ( | String | newName | ) | [inline] |
rename this Model
newName | new name |
Reimplemented from com.generalrobotix.ui.GrxBasePlugin.
Definition at line 1622 of file GrxModelItem.java.
resize bounding box which covers the whole body
Definition at line 1319 of file GrxModelItem.java.
restore properties
Reimplemented from com.generalrobotix.ui.GrxBasePlugin.
Definition at line 386 of file GrxModelItem.java.
get root link
Definition at line 375 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.sameUrlModelLoad | ( | ) | [inline, private] |
Definition at line 176 of file GrxModelItem.java.
Definition at line 162 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.setCharacterPos | ( | LinkPosition[] | lpos, |
double[] | q | ||
) | [inline] |
set transformation of the root joint and all joint values
lpos | transformation of the root joint |
q | sequence of joint values |
Definition at line 940 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.setFocused | ( | boolean | b | ) | [inline] |
set/unset focus on this item
When this item is focused, its bounding box is displayed.
true | to focus, false to unfocus |
Reimplemented from com.generalrobotix.ui.GrxBasePlugin.
Definition at line 1275 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.setJointColor | ( | int | jid, |
java.awt.Color | color | ||
) | [inline] |
set color of joint
jid | joint id |
color | color |
Definition at line 1475 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.setJointValues | ( | final double[] | values | ) | [inline] |
modify joint value if it exceeds limit values
Definition at line 1012 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.setSelected | ( | boolean | b | ) | [inline] |
set selected flag
b | flag |
Reimplemented from com.generalrobotix.ui.GrxBasePlugin.
Definition at line 1258 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.setTransformRoot | ( | Vector3d | pos, |
Matrix3d | rot | ||
) | [inline] |
set transformation of the root joint
pos | position |
rot | rotation matrix |
Definition at line 968 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.setTransformRoot | ( | Transform3D | tform | ) | [inline] |
set transformation of the root joint
pos | position |
rot | rotation matrix |
Definition at line 977 of file GrxModelItem.java.
b |
Definition at line 1421 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.setTransparencyMode | ( | boolean | b, |
Node | node | ||
) | [inline, private] |
b | |
node |
Definition at line 1430 of file GrxModelItem.java.
Definition at line 1411 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.setVisibleCoM | ( | boolean | b | ) | [inline] |
set visibility of CoM
b | true to make it visible, false otherwise |
Definition at line 1346 of file GrxModelItem.java.
set visibility of CoM projected on the floor
b | true to make it visible, false otherwise |
Definition at line 1359 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.setWireFrame | ( | boolean | b | ) | [inline] |
switch display mode between fill and line
b | true to switch to line mode, false otherwise |
Definition at line 1372 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.setWireFrame | ( | boolean | b, |
Node | node | ||
) | [inline] |
switch display mode between fill and line
b | true to switch to line mode, false otherwise |
node | top of subtree to be processed |
Definition at line 1381 of file GrxModelItem.java.
void com.generalrobotix.ui.item.GrxModelItem.updateCoM | ( | ) | [inline] |
update CoM and projected CoM positions
Definition at line 1063 of file GrxModelItem.java.
update joint value property from current joint value
link | link |
Definition at line 1037 of file GrxModelItem.java.
update initial joint value properties from current joint values
Definition at line 1045 of file GrxModelItem.java.
update initial transformation property from current Transform3D
Definition at line 1019 of file GrxModelItem.java.
AppearanceInfo [] com.generalrobotix.ui.item.GrxModelItem.appearances = null |
Definition at line 78 of file GrxModelItem.java.
BranchGroup com.generalrobotix.ui.item.GrxModelItem.bgRoot_ = new BranchGroup() |
Definition at line 67 of file GrxModelItem.java.
BodyInfo com.generalrobotix.ui.item.GrxModelItem.bInfo_ [private] |
Definition at line 64 of file GrxModelItem.java.
boolean com.generalrobotix.ui.item.GrxModelItem.bModified_ = false [private] |
Definition at line 65 of file GrxModelItem.java.
List<Camera_impl> com.generalrobotix.ui.item.GrxModelItem.cameraList_ = new ArrayList<Camera_impl>() [private] |
Definition at line 75 of file GrxModelItem.java.
final String com.generalrobotix.ui.item.GrxModelItem.DEFAULT_DIR = "/../model" [static] |
Definition at line 54 of file GrxModelItem.java.
final double com.generalrobotix.ui.item.GrxModelItem.DEFAULT_RADIUS = 0.05 [static, private] |
Definition at line 56 of file GrxModelItem.java.
final String com.generalrobotix.ui.item.GrxModelItem.envIcon = "environment.png" [static, private] |
Definition at line 60 of file GrxModelItem.java.
Vector<GrxExtraJointItem> com.generalrobotix.ui.item.GrxModelItem.extraJoints_ = new Vector<GrxExtraJointItem>() |
Definition at line 69 of file GrxModelItem.java.
final String com.generalrobotix.ui.item.GrxModelItem.FILE_EXTENSION = "*" [static] |
Definition at line 55 of file GrxModelItem.java.
boolean com.generalrobotix.ui.item.GrxModelItem.isRobot_ = true [private] |
Definition at line 62 of file GrxModelItem.java.
int [] com.generalrobotix.ui.item.GrxModelItem.jointToLink_ [private] |
Definition at line 71 of file GrxModelItem.java.
Vector<GrxLinkItem> com.generalrobotix.ui.item.GrxModelItem.links_ = new Vector<GrxLinkItem>() |
Definition at line 68 of file GrxModelItem.java.
MaterialInfo [] com.generalrobotix.ui.item.GrxModelItem.materials = null |
Definition at line 79 of file GrxModelItem.java.
MenuChangeType com.generalrobotix.ui.item.GrxModelItem.menuChangeType_ = new MenuChangeType() [package] |
Definition at line 212 of file GrxModelItem.java.
final int com.generalrobotix.ui.item.GrxModelItem.MODIFIED_NG = 1 [static] |
Definition at line 107 of file GrxModelItem.java.
final int com.generalrobotix.ui.item.GrxModelItem.MODIFIED_NOT = 2 [static] |
Definition at line 108 of file GrxModelItem.java.
final int com.generalrobotix.ui.item.GrxModelItem.MODIFIED_OK = 0 [static] |
Definition at line 106 of file GrxModelItem.java.
Map<String, GrxLinkItem> com.generalrobotix.ui.item.GrxModelItem.nameToLink_ = new HashMap<String, GrxLinkItem>() |
Definition at line 72 of file GrxModelItem.java.
final String com.generalrobotix.ui.item.GrxModelItem.robotIcon = "robot.png" [static, private] |
Definition at line 59 of file GrxModelItem.java.
ShapeInfo [] com.generalrobotix.ui.item.GrxModelItem.shapes = null |
Definition at line 77 of file GrxModelItem.java.
Switch com.generalrobotix.ui.item.GrxModelItem.switchBb_ [private] |
Definition at line 91 of file GrxModelItem.java.
Switch com.generalrobotix.ui.item.GrxModelItem.switchCom_ [private] |
Definition at line 83 of file GrxModelItem.java.
Switch com.generalrobotix.ui.item.GrxModelItem.switchComZ0_ [private] |
Definition at line 87 of file GrxModelItem.java.
TextureInfo [] com.generalrobotix.ui.item.GrxModelItem.textures = null |
Definition at line 80 of file GrxModelItem.java.
TransformGroup com.generalrobotix.ui.item.GrxModelItem.tgCom_ [private] |
Definition at line 84 of file GrxModelItem.java.
TransformGroup com.generalrobotix.ui.item.GrxModelItem.tgComZ0_ [private] |
Definition at line 88 of file GrxModelItem.java.
final String com.generalrobotix.ui.item.GrxModelItem.TITLE = "Model" [static] |
Definition at line 53 of file GrxModelItem.java.