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

namespace LizardTech.LidarSDK {

using System;
using System.Runtime.InteropServices;

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

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

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

  ~PointInfo() {
    Dispose();
  }

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

      private System.Object refToOwner;
      internal void setOwnerObject(System.Object owner) { refToOwner = owner; }
   
  public PointInfo() : this(LidarDSDKPINVOKE.new_PointInfo(), true) {
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
  }

  public void init(uint numChannels) {
    LidarDSDKPINVOKE.PointInfo_init__SWIG_0(swigCPtr, numChannels);
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
  }

  public void init(PointInfo pointInfo) {
    LidarDSDKPINVOKE.PointInfo_init__SWIG_1(swigCPtr, PointInfo.getCPtr(pointInfo));
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
  }

  public void init(PointData pointData) {
    LidarDSDKPINVOKE.PointInfo_init__SWIG_2(swigCPtr, PointData.getCPtr(pointData));
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
  }

  public void init(PointInfo pointInfo, SWIGTYPE_p_p_char channels, uint numChannels) {
    LidarDSDKPINVOKE.PointInfo_init__SWIG_3(swigCPtr, PointInfo.getCPtr(pointInfo), SWIGTYPE_p_p_char.getCPtr(channels), numChannels);
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
  }

  public void init(PointData pointData, SWIGTYPE_p_p_char channels, uint numChannels) {
    LidarDSDKPINVOKE.PointInfo_init__SWIG_4(swigCPtr, PointData.getCPtr(pointData), SWIGTYPE_p_p_char.getCPtr(channels), numChannels);
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
  }

  public void init(PointInfo pointInfo, SWIGTYPE_p_size_t channels, uint numChannels) {
    LidarDSDKPINVOKE.PointInfo_init__SWIG_5(swigCPtr, PointInfo.getCPtr(pointInfo), SWIGTYPE_p_size_t.getCPtr(channels), numChannels);
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
  }

  public void init(PointData pointData, SWIGTYPE_p_size_t channels, uint numChannels) {
    LidarDSDKPINVOKE.PointInfo_init__SWIG_6(swigCPtr, PointData.getCPtr(pointData), SWIGTYPE_p_size_t.getCPtr(channels), numChannels);
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
  }

  public uint getNumChannels() {
    uint ret = LidarDSDKPINVOKE.PointInfo_getNumChannels(swigCPtr);
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public ChannelInfo getChannel(uint idx) {
      IntPtr cPtr = LidarDSDKPINVOKE.PointInfo_getChannel__SWIG_0(swigCPtr, idx);
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
      ChannelInfo ret = null;
      if(cPtr != IntPtr.Zero)
      {
         ret = new ChannelInfo(cPtr, false);
         ret.setOwnerObject(this);
      }
      return ret;
   }

  public bool hasChannel(string name) {
    bool ret = LidarDSDKPINVOKE.PointInfo_hasChannel(swigCPtr, name);
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public ChannelInfo getChannel(string name) {
      IntPtr cPtr = LidarDSDKPINVOKE.PointInfo_getChannel__SWIG_2(swigCPtr, name);
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
      ChannelInfo ret = null;
      if(cPtr != IntPtr.Zero)
      {
         ret = new ChannelInfo(cPtr, false);
         ret.setOwnerObject(this);
      }
      return ret;
   }

  public uint getChannelIndex(string name) {
    uint ret = LidarDSDKPINVOKE.PointInfo_getChannelIndex(swigCPtr, name);
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool hasValidXYZ() {
    bool ret = LidarDSDKPINVOKE.PointInfo_hasValidXYZ(swigCPtr);
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool Equals(PointInfo rhs) {
    bool ret = LidarDSDKPINVOKE.PointInfo_Equals(swigCPtr, PointInfo.getCPtr(rhs));
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

}

}
