Skip to content

Commit

Permalink
Update bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanhab committed Oct 30, 2023
1 parent 336a4f4 commit 1c5603f
Show file tree
Hide file tree
Showing 57 changed files with 3,592 additions and 106 deletions.
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

0 comments on commit 1c5603f

Please sign in to comment.