com.yobotics.simulationconstructionset.util.environments
Class ContactableSelectableBoxRobot

java.lang.Object
  extended by com.yobotics.simulationconstructionset.Robot
      extended by com.yobotics.simulationconstructionset.util.environments.ContactableRobot
          extended by com.yobotics.simulationconstructionset.util.environments.ContactableSelectableBoxRobot
All Implemented Interfaces:
SelectableObject, Contactable, YoVariableHolder, java.io.Serializable, SelectedListener

public class ContactableSelectableBoxRobot
extends ContactableRobot
implements SelectableObject, SelectedListener

See Also:
Serialized Form

Constructor Summary
ContactableSelectableBoxRobot()
           
ContactableSelectableBoxRobot(java.lang.String name)
           
ContactableSelectableBoxRobot(java.lang.String name, double length, double width, double height, double mass)
           
 
Method Summary
 void addDynamicGraphicForceVectorsToGroundContactPoints(double forceVectorScale, AppearanceDefinition appearance, DynamicGraphicObjectsListRegistry dynamicGraphicObjectsListRegistry)
           
 void addDynamicGraphicForceVectorsToGroundContactPoints(int groupIdentifier, double forceVectorScale, AppearanceDefinition appearance, DynamicGraphicObjectsListRegistry dynamicGraphicObjectsListRegistry)
           
 void addSelectedListeners(SelectableObjectListener listener)
           
 void closestIntersectionAndNormalAt(javax.vecmath.Point3d intersectionToPack, javax.vecmath.Vector3d normalToPack, javax.vecmath.Point3d pointInWorldToCheck)
           
static ContactableSelectableBoxRobot createContactableCardboardBoxRobot(java.lang.String name, double length, double width, double height, double mass)
           
static ContactableSelectableBoxRobot createContactableWoodBoxRobot(java.lang.String name, double length, double width, double height, double mass)
           
 void getCurrentBox3d(FrameBox3d frameBoxToPack)
           
 FloatingJoint getFloatingJoint()
           
 double getHalfHeight()
           
 Direction getSelectedDirection()
           
 boolean isClose(javax.vecmath.Point3d pointInWorldToCheck)
           
 boolean isPointOnOrInside(javax.vecmath.Point3d pointInWorldToCheck)
           
 void select()
           
 void selected(Graphics3DNode graphics3dNode, ModifierKeyInterface modifierKeyHolder, javax.vecmath.Point3d location, javax.vecmath.Point3d cameraLocation, javax.vecmath.Quat4d cameraRotation)
          This function is called when a point on the screen is selected while holding the modifier key defined with getModifierKey()
 void setMass(double mass)
           
 void setMomentOfInertia(double Ixx, double Iyy, double Izz)
           
 void unSelect(boolean reset)
           
 void update()
          Returns a list of the YoVariables associated with this robot.
 
Methods inherited from class com.yobotics.simulationconstructionset.util.environments.ContactableRobot
createAvailableContactPoints, getAndLockAvailableContactPoint, getBodyTransformToWorld, getLockedContactPoint, getPosition, getVelocity, setAngularVelocityInBody, setPosition, setPosition, setPosition, setPositionAndVelocity, setPositionAndVelocity, setVelocity, setVelocity, unlockContactPoint, updateContactPoints
 
Methods inherited from class com.yobotics.simulationconstructionset.Robot
addDynamicGraphicObjectsListRegistry, addFunctionToIntegrate, addRootJoint, addStaticLink, addStaticLinkGraphics, addStaticLinkGraphics, addYoVariableRegistry, computeAngularMomentum, computeAngularMomentum, computeCenterOfMass, computeCenterOfMass, computeCenterOfPressure, computeCOMMomentum, computeCOMMomentum, computeGravitationalPotentialEnergy, computeGravitationalPotentialEnergy, computeLinearMomentum, computeLinearMomentum, computeRotationalKineticEnergy, computeRotationalKineticEnergy, computeTranslationalKineticEnergy, computeTranslationalKineticEnergy, createAllVarLists, decideGroundContactPointsInContact, doAfterControlBeforeDynamics, doDynamicsAndIntegrate, doDynamicsButDoNotIntegrate, getAllExternalForcePoints, getAllGroundContactPoints, getAllKinematicPoints, getAllOneDegreeOfFreedomJoints, getAllVariables, getAllVariablesArray, getCameraMountList, getControllers, getGravity, getGravityX, getGravityY, getGravityZ, getGroundContactModel, getGroundContactPoints, getIMUMounts, getName, getRobotsYoVariableRegistry, getRootJoints, getSensors, getSensors, getSimulationRewoundListeners, getStaticLinkGraphics, getTime, getVariable, getVariable, getVariables, getVariables, getVariables, getYoTime, hasUniqueVariable, hasUniqueVariable, setBodyExternalForcePoint, setController, setController, setController, setControllersAndCallInitialization, setDynamic, setDynamicIntegrationMethod, setGravity, setGravity, setGravity, setGroundContactModel, setTime, toString, updateAllGroundContactPointVelocities, updateForPlayback, updateVelocities
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContactableSelectableBoxRobot

public ContactableSelectableBoxRobot(java.lang.String name,
                                     double length,
                                     double width,
                                     double height,
                                     double mass)

ContactableSelectableBoxRobot

public ContactableSelectableBoxRobot()

ContactableSelectableBoxRobot

public ContactableSelectableBoxRobot(java.lang.String name)
Method Detail

createContactableCardboardBoxRobot

public static ContactableSelectableBoxRobot createContactableCardboardBoxRobot(java.lang.String name,
                                                                               double length,
                                                                               double width,
                                                                               double height,
                                                                               double mass)

createContactableWoodBoxRobot

public static ContactableSelectableBoxRobot createContactableWoodBoxRobot(java.lang.String name,
                                                                          double length,
                                                                          double width,
                                                                          double height,
                                                                          double mass)

addDynamicGraphicForceVectorsToGroundContactPoints

public void addDynamicGraphicForceVectorsToGroundContactPoints(double forceVectorScale,
                                                               AppearanceDefinition appearance,
                                                               DynamicGraphicObjectsListRegistry dynamicGraphicObjectsListRegistry)

addDynamicGraphicForceVectorsToGroundContactPoints

public void addDynamicGraphicForceVectorsToGroundContactPoints(int groupIdentifier,
                                                               double forceVectorScale,
                                                               AppearanceDefinition appearance,
                                                               DynamicGraphicObjectsListRegistry dynamicGraphicObjectsListRegistry)

getFloatingJoint

public FloatingJoint getFloatingJoint()
Specified by:
getFloatingJoint in class ContactableRobot

isPointOnOrInside

public boolean isPointOnOrInside(javax.vecmath.Point3d pointInWorldToCheck)
Specified by:
isPointOnOrInside in interface Contactable

getCurrentBox3d

public void getCurrentBox3d(FrameBox3d frameBoxToPack)

isClose

public boolean isClose(javax.vecmath.Point3d pointInWorldToCheck)
Specified by:
isClose in interface Contactable

closestIntersectionAndNormalAt

public void closestIntersectionAndNormalAt(javax.vecmath.Point3d intersectionToPack,
                                           javax.vecmath.Vector3d normalToPack,
                                           javax.vecmath.Point3d pointInWorldToCheck)
Specified by:
closestIntersectionAndNormalAt in interface Contactable

setMass

public void setMass(double mass)
Specified by:
setMass in class ContactableRobot

setMomentOfInertia

public void setMomentOfInertia(double Ixx,
                               double Iyy,
                               double Izz)
Specified by:
setMomentOfInertia in class ContactableRobot

select

public void select()
Specified by:
select in interface SelectableObject

unSelect

public void unSelect(boolean reset)
Specified by:
unSelect in interface SelectableObject

addSelectedListeners

public void addSelectedListeners(SelectableObjectListener listener)
Specified by:
addSelectedListeners in interface SelectableObject

getSelectedDirection

public Direction getSelectedDirection()

update

public void update()
Description copied from class: Robot
Returns a list of the YoVariables associated with this robot. This list does not include variables belonging to its GroundContactModel or controllers.

Overrides:
update in class Robot

getHalfHeight

public double getHalfHeight()

selected

public void selected(Graphics3DNode graphics3dNode,
                     ModifierKeyInterface modifierKeyHolder,
                     javax.vecmath.Point3d location,
                     javax.vecmath.Point3d cameraLocation,
                     javax.vecmath.Quat4d cameraRotation)
Description copied from interface: SelectedListener
This function is called when a point on the screen is selected while holding the modifier key defined with getModifierKey()

Specified by:
selected in interface SelectedListener
Parameters:
graphics3dNode - The node that was selected, null if none selected
location - location of the selected point
cameraLocation - camera position
cameraRotation - camera view direction