internal DepthGenerator(Context context, IntPtr nodeHandle, bool addRef) : base(context, nodeHandle, addRef) { this.fovChanged = new StateChangedEvent(this, SafeNativeMethods.xnRegisterToDepthFieldOfViewChange, SafeNativeMethods.xnUnregisterFromDepthFieldOfViewChange); if (IsCapabilitySupported(Capabilities.UserPosition)) m_userPositionCapability = new UserPositionCapability(this); else m_userPositionCapability = null; }
internal DepthGenerator(Context context, IntPtr nodeHandle, bool addRef) : base(context, nodeHandle, addRef) { this.fovChanged = new StateChangedEvent(this, SafeNativeMethods.xnRegisterToDepthFieldOfViewChange, SafeNativeMethods.xnUnregisterFromDepthFieldOfViewChange); if (IsCapabilitySupported(Capabilities.UserPosition)) { m_userPositionCapability = new UserPositionCapability(this); } else { m_userPositionCapability = null; } }
public override void Dispose() { if(m_userPositionCapability!=null) m_userPositionCapability.InternalDispose(); m_userPositionCapability = null; base.Dispose(); }