/* ----------------------------------------------------------------------------
 * 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 Frame extends Feature {
  private long swigCPtr;

  protected Frame(long cPtr, boolean cMemoryOwn) {
    super(ModelJNI.SWIGFrameToFeature(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  protected Frame() {
    this(0, false);
  }

  protected void finalize() {
    delete();
  }

  public void delete() {
    if(swigCPtr != 0 && swigCMemOwn) {
      ModelJNI.delete_Frame(swigCPtr);
      swigCMemOwn = false;
      super.delete();
    }
    swigCPtr = 0;
  }

  protected static long getCPtr(Frame obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  public Frame(String name) {
    this(ModelJNI.new_Frame__SWIG_0(name), true);
  }

  public Frame(Frame arg0) {
    this(ModelJNI.new_Frame__SWIG_1(Frame.getCPtr(arg0)), true);
  }

  public Frame assign(Frame arg0) {
    return new Frame(ModelJNI.Frame_assign(swigCPtr, Frame.getCPtr(arg0)), false);
  }

  public Station getOrigin() {
    return new Station(ModelJNI.Frame_getOrigin(swigCPtr), false);
  }

  public Orientation getOrientation() {
    return new Orientation(ModelJNI.Frame_getOrientation(swigCPtr), false);
  }

  public Direction getAxis(int i) {
    return new Direction(ModelJNI.Frame_getAxis(swigCPtr, i), false);
  }

  public Direction x() {
    return new Direction(ModelJNI.Frame_x(swigCPtr), false);
  }

  public Direction y() {
    return new Direction(ModelJNI.Frame_y(swigCPtr), false);
  }

  public Direction z() {
    return new Direction(ModelJNI.Frame_z(swigCPtr), false);
  }

  public static boolean isInstanceOf(Feature arg0) {
    return ModelJNI.Frame_isInstanceOf(Feature.getCPtr(arg0));
  }

}
