Skip to content

Commit

Permalink
Upgrade bindings to latest code including PR to modify component API (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanhab authored Jun 4, 2024
1 parent 7b6991c commit 5b7376e
Show file tree
Hide file tree
Showing 86 changed files with 4,785 additions and 499 deletions.
301 changes: 267 additions & 34 deletions Gui/opensim/modeling/src/org/opensim/modeling/ActuatorIterator.java

Large diffs are not rendered by default.

294 changes: 260 additions & 34 deletions Gui/opensim/modeling/src/org/opensim/modeling/BodyIterator.java

Large diffs are not rendered by default.

296 changes: 261 additions & 35 deletions Gui/opensim/modeling/src/org/opensim/modeling/Component.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public synchronized void delete() {
super.delete();
}

public ComponentAlreadyPartOfOwnershipTree(String file, long line, String func, String compName, String thisName) {
this(opensimCommonJNI.new_ComponentAlreadyPartOfOwnershipTree(file, line, func, compName, thisName), true);
public ComponentAlreadyPartOfOwnershipTree(String file, long line, String methodName, String compName, String thisName) {
this(opensimCommonJNI.new_ComponentAlreadyPartOfOwnershipTree(file, line, methodName, compName, thisName), true);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

package org.opensim.modeling;

/**
* Component Exceptions
*/
public class ComponentHasNoName extends OpenSimException {
private transient long swigCPtr;

Expand Down Expand Up @@ -51,8 +48,8 @@ public synchronized void delete() {
super.delete();
}

public ComponentHasNoName(String file, long line, String func, String componentConcreteClassName) {
this(opensimCommonJNI.new_ComponentHasNoName(file, line, func, componentConcreteClassName), true);
public ComponentHasNoName(String file, long line, String methodName, String componentConcreteClassName) {
this(opensimCommonJNI.new_ComponentHasNoName(file, line, methodName, componentConcreteClassName), true);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public synchronized void delete() {
super.delete();
}

public ComponentHasNoSystem(String file, long line, String func, OpenSimObject obj) {
this(opensimCommonJNI.new_ComponentHasNoSystem(file, line, func, OpenSimObject.getCPtr(obj), obj), true);
public ComponentHasNoSystem(String file, long line, String methodName, OpenSimObject obj) {
this(opensimCommonJNI.new_ComponentHasNoSystem(file, line, methodName, OpenSimObject.getCPtr(obj), obj), true);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public synchronized void delete() {
super.delete();
}

public ComponentIsAnOrphan(String file, long line, String func, String thisName, String componentConcreteClassName) {
this(opensimCommonJNI.new_ComponentIsAnOrphan(file, line, func, thisName, componentConcreteClassName), true);
public ComponentIsAnOrphan(String file, long line, String methodName, String thisName, String componentConcreteClassName) {
this(opensimCommonJNI.new_ComponentIsAnOrphan(file, line, methodName, thisName, componentConcreteClassName), true);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public synchronized void delete() {
super.delete();
}

public ComponentIsRootWithNoSubcomponents(String file, long line, String func, String thisName, String componentConcreteClassName) {
this(opensimCommonJNI.new_ComponentIsRootWithNoSubcomponents(file, line, func, thisName, componentConcreteClassName), true);
public ComponentIsRootWithNoSubcomponents(String file, long line, String methodName, String thisName, String componentConcreteClassName) {
this(opensimCommonJNI.new_ComponentIsRootWithNoSubcomponents(file, line, methodName, thisName, componentConcreteClassName), true);
}

}
292 changes: 259 additions & 33 deletions Gui/opensim/modeling/src/org/opensim/modeling/ComponentIterator.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public synchronized void delete() {
super.delete();
}

public ComponentNotFoundOnSpecifiedPath(String file, long line, String func, String toFindName, String toFindClassName, String thisName) {
this(opensimCommonJNI.new_ComponentNotFoundOnSpecifiedPath(file, line, func, toFindName, toFindClassName, thisName), true);
public ComponentNotFoundOnSpecifiedPath(String file, long line, String methodName, String toFindName, String toFindClassName, String thisName) {
this(opensimCommonJNI.new_ComponentNotFoundOnSpecifiedPath(file, line, methodName, toFindName, toFindClassName, thisName), true);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */

package org.opensim.modeling;

/**
* Component Exceptions
*/
public class EmptyComponentPath extends OpenSimException {
private transient long swigCPtr;

public EmptyComponentPath(long cPtr, boolean cMemoryOwn) {
super(opensimCommonJNI.EmptyComponentPath_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}

public static long getCPtr(EmptyComponentPath obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}

public static long swigRelease(EmptyComponentPath obj) {
long ptr = 0;
if (obj != null) {
if (!obj.swigCMemOwn)
throw new RuntimeException("Cannot release ownership as memory is not owned");
ptr = obj.swigCPtr;
obj.swigCMemOwn = false;
obj.delete();
}
return ptr;
}

@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}

public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
opensimCommonJNI.delete_EmptyComponentPath(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}

public EmptyComponentPath(String file, long line, String methodName, String componentName) {
this(opensimCommonJNI.new_EmptyComponentPath(file, line, methodName, componentName), true);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
package org.opensim.modeling;

/**
* A point-to-point Force who's force magnitude is determined by a user-defined<br>
* A point-to-point Force whose force magnitude is determined by a user-defined<br>
* expression, with the distance (d) and its time derivative (ddot) as variables. <br>
* The direction of the force is directed along the line connecting the two <br>
* points. <br>
Expand Down
9 changes: 8 additions & 1 deletion Gui/opensim/modeling/src/org/opensim/modeling/Force.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public boolean get_has_output_potential_energy() {
}

/**
* Tell SimBody to parallelize this force. Should be <br>
* Tell Simbody to parallelize this force. Should be <br>
* set to true for any forces that will take time to <br>
* complete their calcForce method. Note that all forces<br>
* that set this flag to false will be put in series on a<br>
Expand Down Expand Up @@ -176,4 +176,11 @@ public boolean hasVisualPath() {
return opensimSimulationJNI.Force_hasVisualPath(swigCPtr, this);
}

/**
* Return the index to the SimTK::Force in the underlying system.
*/
public SWIGTYPE_p_SimTK__ForceIndex getForceIndex() {
return new SWIGTYPE_p_SimTK__ForceIndex(opensimSimulationJNI.Force_getForceIndex(swigCPtr, this), true);
}

}
Loading

0 comments on commit 5b7376e

Please sign in to comment.