public final class gui
extends java.lang.Object
Constructor and Description |
---|
gui() |
Modifier and Type | Method and Description |
---|---|
static void |
addModel(java.lang.String fileName)
addModel() creates a new OpenSim model from the passed in fileName and loads this model
into the OpenSim application.
|
static org.opensim.customGui.InstructionsTopComponent |
createInstructionsWindow(java.lang.String fileName)
createInstructionsWindow Creates and open a window for Instructions, the window is a singleton type (1 per application)
and is normally docked.
|
static org.opensim.customGui.ParametersTopComponent |
createParametersWindow()
createParametersWindow Creates and open a window for custom GUI, the window is a singleton type (1 per application)
and is normally docked.
|
static java.lang.String |
dumpModelState(org.opensim.modeling.Model aModel)
dumpModelState() dumps the vector of continuous state variables that backs aModel
as a String (SimTK::State.getY())
|
static org.opensim.modeling.OpenSimObject |
findObject(org.opensim.modeling.Model aModel,
java.lang.String type,
java.lang.String name)
findObject locates an Object in the model and returns a reference to it.
|
static java.lang.String |
getClassName(java.lang.Object obj)
getClassName() returns the full qualified name of the Class that obj is an instance of
|
static org.opensim.modeling.Coordinate |
getCoordinate(org.opensim.modeling.Model aModel,
java.lang.String name)
getCoordinate ()
|
static org.opensim.modeling.Model |
getCurrentModel()
getCurrentModel() gets a reference to the model that is current in the OpenSim application.
|
static org.opensim.modeling.Storage |
getCurrentMotion()
getCurrentMotion() gets a reference to the motion that is current in the OpenSim application.
|
static java.lang.String |
getInstallDir()
Get the full name of the directory used as a root for OpenSim installation.
|
static org.opensim.modeling.Model[] |
getOpenModels()
getOpenModels()
|
static java.lang.String |
getResourcesDir() |
static java.lang.String |
getScriptsDir()
Get the full name of the directory used as a root for the Scripts.
|
static org.opensim.modeling.State |
getStateRef(org.opensim.modeling.Model aModel)
getStateRef() returns a reference to the instance of SimTK::State that backs aModel
|
static void |
gfxWindowSendKey(char c)
Perform operation in current graphics window equivalent to pressing c while the window has focus
|
static java.lang.String |
installResources()
Invoke method to install resources to user directory
|
static void |
loadModel(org.opensim.modeling.Model aModel)
loadModel() loads the passed in model into the OpenSim application.
|
static void |
loadModel(java.lang.String fileName)
loadModel() creates a new OpenSim model from the passed in fileName and loads this model
into the OpenSim application.
|
static void |
loadMotion(java.lang.String fileName)
loadMotion constructs a motion out of the passed in fileName and loads it into the application,
associating it with the current model if possible.
|
static void |
methodsview(java.lang.Class classObj)
Show in a standalone modal dialog the methods available for the passed in class
Class name is fully qualified with package name etc.
|
static void |
methodsview(java.lang.Object obj)
methodsview() Shows in a standalone modal dialog the methods available for the passed in object
|
static void |
performAction(java.lang.String actionName)
Generic method to invoke commands available from the menu bar.
|
static void |
selectObject(org.opensim.modeling.OpenSimObject obj)
sleectObject marks the passed in object as selected in the application if it has a visual representation
|
static void |
setCoordinateValue(org.opensim.modeling.Coordinate coordinate,
double newValue)
setCoordinateValue() allows the user to set the value of the passed in Coordinate to the specified newValue
This call, also updates the Graphics window if needed.
|
static void |
setCoordinateValueDegrees(org.opensim.modeling.Coordinate coordinate,
double newValue)
setCoordinateValueDegrees allows the user to set the value of the passed in Coordinate to the specified newValue
This call, also updates the Graphics window if needed.
|
static void |
setCurrentModel(org.opensim.modeling.Model aModel)
setCurrentModel, makes a model that is loaded in the OpenSim application current.
|
static void |
setObjectColor(org.opensim.modeling.OpenSimObject obj,
double[] colorComponents)
setObjectColor marks the passed in object if it has a visual representation with passed in color
|
static void |
setObjectOpacity(org.opensim.modeling.OpenSimObject obj,
double newOpacity0To1)
Set the opacity of an object.
|
static void |
setSimulationToolBarVisibility(boolean show) |
static void |
toggleObjectDisplay(org.opensim.modeling.OpenSimObject obj,
boolean onOrOff)
Turn on/off the display of the passed in object according to the passed in flag
Valid only for objects can be shown/hidden from the navigator
|
static void |
updateDisplay()
updateDisplay to be in sync.
|
public static org.opensim.modeling.Model getCurrentModel()
public static void setCurrentModel(org.opensim.modeling.Model aModel)
aModel
- to be made currentpublic static java.lang.String dumpModelState(org.opensim.modeling.Model aModel)
public static org.opensim.modeling.State getStateRef(org.opensim.modeling.Model aModel)
public static org.opensim.modeling.Storage getCurrentMotion()
public static org.opensim.modeling.Coordinate getCoordinate(org.opensim.modeling.Model aModel, java.lang.String name)
aModel
- name
- public static void setCoordinateValue(org.opensim.modeling.Coordinate coordinate, double newValue)
coordinate
- newValue
- public static void setCoordinateValueDegrees(org.opensim.modeling.Coordinate coordinate, double newValue)
coordinate
- newValue
- specified in degrees (rather than radians)public static void addModel(java.lang.String fileName)
fileName
- to construct the model frompublic static void loadModel(java.lang.String fileName)
fileName
- to construct the model frompublic static void loadModel(org.opensim.modeling.Model aModel)
aModel
- is the model to be loaded.public static void loadMotion(java.lang.String fileName)
fileName
- to construct the motion frompublic static void performAction(java.lang.String actionName)
actionName
- public static org.opensim.modeling.OpenSimObject findObject(org.opensim.modeling.Model aModel, java.lang.String type, java.lang.String name) throws java.io.IOException
aModel
- type
- : one of Body, Joint, Force (or any force producing object e.g. muscle), Controllername
- : name of the object of the specified typejava.io.IOException
- if the object couldn't be locatedpublic static void selectObject(org.opensim.modeling.OpenSimObject obj)
obj
- public static void setObjectColor(org.opensim.modeling.OpenSimObject obj, double[] colorComponents)
obj
- public static void toggleObjectDisplay(org.opensim.modeling.OpenSimObject obj, boolean onOrOff)
obj
- onOrOff
- public static void setObjectOpacity(org.opensim.modeling.OpenSimObject obj, double newOpacity0To1)
obj
- The object to set the opacity ofnewOpacity0To1
- public static void gfxWindowSendKey(char c)
c
- public static java.lang.String getScriptsDir()
public static java.lang.String getInstallDir()
public static java.lang.String installResources()
public static java.lang.String getResourcesDir()
public static java.lang.String getClassName(java.lang.Object obj)
obj
- public static void methodsview(java.lang.Object obj)
obj
- public static void methodsview(java.lang.Class classObj)
classObj
- public static org.opensim.modeling.Model[] getOpenModels()
public static void updateDisplay()
public static org.opensim.customGui.ParametersTopComponent createParametersWindow()
public static org.opensim.customGui.InstructionsTopComponent createInstructionsWindow(java.lang.String fileName)
public static void setSimulationToolBarVisibility(boolean show)