/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.36
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */


using System;
using System.Runtime.InteropServices;

public class OBTorsion : IDisposable {
  private HandleRef swigCPtr;
  protected bool swigCMemOwn;

  internal OBTorsion(IntPtr cPtr, bool cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = new HandleRef(this, cPtr);
  }

  internal static HandleRef getCPtr(OBTorsion obj) {
    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  }

  ~OBTorsion() {
    Dispose();
  }

  public virtual void Dispose() {
    lock(this) {
      if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
        swigCMemOwn = false;
        openbabelPINVOKE.delete_OBTorsion(swigCPtr);
      }
      swigCPtr = new HandleRef(null, IntPtr.Zero);
      GC.SuppressFinalize(this);
    }
  }

  public OBTorsion(OBTorsion arg0) : this(openbabelPINVOKE.new_OBTorsion__SWIG_2(OBTorsion.getCPtr(arg0)), true) {
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public void Clear() {
    openbabelPINVOKE.OBTorsion_Clear(swigCPtr);
  }

  public bool Empty() {
    bool ret = openbabelPINVOKE.OBTorsion_Empty(swigCPtr);
    return ret;
  }

  public bool AddTorsion(OBAtom a, OBAtom b, OBAtom c, OBAtom d) {
    bool ret = openbabelPINVOKE.OBTorsion_AddTorsion__SWIG_0(swigCPtr, OBAtom.getCPtr(a), OBAtom.getCPtr(b), OBAtom.getCPtr(c), OBAtom.getCPtr(d));
    return ret;
  }

  public bool AddTorsion(SWIGTYPE_p_OpenBabel__quadT_OpenBabel__OBAtom_p_OpenBabel__OBAtom_p_OpenBabel__OBAtom_p_OpenBabel__OBAtom_p_t atoms) {
    bool ret = openbabelPINVOKE.OBTorsion_AddTorsion__SWIG_1(swigCPtr, SWIGTYPE_p_OpenBabel__quadT_OpenBabel__OBAtom_p_OpenBabel__OBAtom_p_OpenBabel__OBAtom_p_OpenBabel__OBAtom_p_t.getCPtr(atoms));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool SetAngle(double radians, uint index) {
    bool ret = openbabelPINVOKE.OBTorsion_SetAngle__SWIG_0(swigCPtr, radians, index);
    return ret;
  }

  public bool SetAngle(double radians) {
    bool ret = openbabelPINVOKE.OBTorsion_SetAngle__SWIG_1(swigCPtr, radians);
    return ret;
  }

  public bool SetData(OBBond arg0) {
    bool ret = openbabelPINVOKE.OBTorsion_SetData(swigCPtr, OBBond.getCPtr(arg0));
    return ret;
  }

  public bool GetAngle(SWIGTYPE_p_double radians, uint index) {
    bool ret = openbabelPINVOKE.OBTorsion_GetAngle__SWIG_0(swigCPtr, SWIGTYPE_p_double.getCPtr(radians), index);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool GetAngle(SWIGTYPE_p_double radians) {
    bool ret = openbabelPINVOKE.OBTorsion_GetAngle__SWIG_1(swigCPtr, SWIGTYPE_p_double.getCPtr(radians));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public uint GetBondIdx() {
    uint ret = openbabelPINVOKE.OBTorsion_GetBondIdx(swigCPtr);
    return ret;
  }

  public uint GetSize() {
    uint ret = openbabelPINVOKE.OBTorsion_GetSize(swigCPtr);
    return ret;
  }

  public SWIGTYPE_p_std__pairT_OpenBabel__OBAtom_p_OpenBabel__OBAtom_p_t GetBC() {
    SWIGTYPE_p_std__pairT_OpenBabel__OBAtom_p_OpenBabel__OBAtom_p_t ret = new SWIGTYPE_p_std__pairT_OpenBabel__OBAtom_p_OpenBabel__OBAtom_p_t(openbabelPINVOKE.OBTorsion_GetBC(swigCPtr), true);
    return ret;
  }

  public SWIGTYPE_p_std__vectorT_OpenBabel__tripleT_OpenBabel__OBAtom_p_OpenBabel__OBAtom_p_double_t_t GetADs() {
    SWIGTYPE_p_std__vectorT_OpenBabel__tripleT_OpenBabel__OBAtom_p_OpenBabel__OBAtom_p_double_t_t ret = new SWIGTYPE_p_std__vectorT_OpenBabel__tripleT_OpenBabel__OBAtom_p_OpenBabel__OBAtom_p_double_t_t(openbabelPINVOKE.OBTorsion_GetADs(swigCPtr), true);
    return ret;
  }

  public bool IsProtonRotor() {
    bool ret = openbabelPINVOKE.OBTorsion_IsProtonRotor(swigCPtr);
    return ret;
  }

}
