/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version: 1.3.19
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package SimbodyAPI;


public class RigidBody extends Body {
  private long swigCPtr;

  protected RigidBody(long cPtr, boolean cMemoryOwn) {
    super(ModelJNI.SWIGRigidBodyToBody(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  protected RigidBody() {
    this(0, false);
  }

  protected void finalize() {
    delete();
  }

  public void delete() {
    if(swigCPtr != 0 && swigCMemOwn) {
      ModelJNI.delete_RigidBody(swigCPtr);
      swigCMemOwn = false;
      super.delete();
    }
    swigCPtr = 0;
  }

  protected static long getCPtr(RigidBody obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  public RigidBody(String arg0) {
    this(ModelJNI.new_RigidBody__SWIG_0(arg0), true);
  }

  public RigidBody(RigidBody arg0) {
    this(ModelJNI.new_RigidBody__SWIG_1(RigidBody.getCPtr(arg0)), true);
  }

  public RigidBody assign(RigidBody arg0) {
    return new RigidBody(ModelJNI.RigidBody_assign(swigCPtr, RigidBody.getCPtr(arg0)), false);
  }

  public MassElement addMassElementLike(MassElement arg0, String arg1, Placement arg2) {
    return new MassElement(ModelJNI.RigidBody_addMassElementLike__SWIG_0(swigCPtr, MassElement.getCPtr(arg0), arg1, Placement.getCPtr(arg2)), false);
  }

  public MassElement addMassElementLike(MassElement arg0, String arg1) {
    return new MassElement(ModelJNI.RigidBody_addMassElementLike__SWIG_1(swigCPtr, MassElement.getCPtr(arg0), arg1), false);
  }

  public static boolean isInstanceOf(Feature arg0) {
    return ModelJNI.RigidBody_isInstanceOf(Feature.getCPtr(arg0));
  }

}
