Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bindings #1464

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 36 additions & 31 deletions Gui/opensim/modeling/src/org/opensim/modeling/AbstractPath.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,37 +137,6 @@ public void set_Appearance(Appearance value) {
opensimSimulationJNI.AbstractPath_set_Appearance__SWIG_1(swigCPtr, this, Appearance.getCPtr(value), value);
}

/**
* Get the current color of the path.<br>
* <br>
* This is the runtime, potentially state-dependent, color of the path. It<br>
* is the color used to display the path in that state (e.g., for UI<br>
* rendering).<br>
* <br>
* This color value is typically initialized with the default color (see:<br>
* `getDefaultColor`), but the color can change between simulation states<br>
* because downstream code (e.g. muscles) might call `setColor` to implement<br>
* state-dependent path coloring.
*/
public Vec3 getColor(State s) {
return new Vec3(opensimSimulationJNI.AbstractPath_getColor(swigCPtr, this, State.getCPtr(s), s), true);
}

/**
* Set the current color of the path.<br>
* <br>
* Internally, sets the current color value of the path for the provided<br>
* state (e.g. using cache variables).<br>
* <br>
* The value of this variable is used as the color when the path is drawn,<br>
* which occurs with the state realized to Stage::Dynamics. Therefore, you<br>
* must call this method during realizeDynamics() or earlier in order for it<br>
* to have any effect.
*/
public void setColor(State s, Vec3 color) {
opensimSimulationJNI.AbstractPath_setColor(swigCPtr, this, State.getCPtr(s), s, Vec3.getCPtr(color), color);
}

/**
* Get the current length of the path.<br>
* <br>
Expand Down Expand Up @@ -251,6 +220,42 @@ public void setDefaultColor(Vec3 color) {
opensimSimulationJNI.AbstractPath_setDefaultColor(swigCPtr, this, Vec3.getCPtr(color), color);
}

/**
* Get the current color of the path.<br>
* <br>
* This is the runtime, potentially state-dependent, color of the path. It<br>
* is the color used to display the path in that state (e.g., for UI<br>
* rendering).<br>
* <br>
* This color value is typically initialized with the default color (see:<br>
* `getDefaultColor`), but the color can change between simulation states<br>
* because downstream code (e.g. muscles) might call `setColor` to implement<br>
* state-dependent path coloring.<br>
* <br>
* If not overridden in concrete implementations, this method returns the<br>
* default color.
*/
public Vec3 getColor(State s) {
return new Vec3(opensimSimulationJNI.AbstractPath_getColor(swigCPtr, this, State.getCPtr(s), s), true);
}

/**
* Set the current color of the path.<br>
* <br>
* Internally, sets the current color value of the path for the provided<br>
* state (e.g. using cache variables).<br>
* <br>
* The value of this variable is used as the color when the path is drawn,<br>
* which occurs with the state realized to Stage::Dynamics. Therefore, you<br>
* must call this method during realizeDynamics() or earlier in order for it<br>
* to have any effect.<br>
* <br>
* If not overridden in concrete implementations, this method does nothing.
*/
public void setColor(State s, Vec3 color) {
opensimSimulationJNI.AbstractPath_setColor(swigCPtr, this, State.getCPtr(s), s, Vec3.getCPtr(color), color);
}

/**
* Get the current length of the path, *before* the last set of scaling<br>
* operations were applied to it.<br>
Expand Down
8 changes: 8 additions & 0 deletions Gui/opensim/modeling/src/org/opensim/modeling/Coordinate.java
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,14 @@ public String getSpeedName() {
return opensimSimulationJNI.Coordinate_getSpeedName(swigCPtr, this);
}

/**
* get the derivative of Coordinate's value from the state. This value is<br>
* not* necessarily equal to the value returned by getSpeedValue().
*/
public double getQDotValue(State s) {
return opensimSimulationJNI.Coordinate_getQDotValue(swigCPtr, this, State.getCPtr(s), s);
}

/**
* get the default value for this coordinate. This is the value <br>
* used if no value has been set prior to a simulation.
Expand Down
Loading
Loading