Class: Hornetseye::KinectInput
- Inherits:
-
Object
- Object
- Hornetseye::KinectInput
- Includes:
- ReaderConversion
- Defined in:
- lib/hornetseye-kinect/kinectinput.rb
Overview
Class for handling a Kinect sensor
This Ruby-extension is based on libfreenect.
Constant Summary collapse
- @@context =
libfreenect handle
nil
Class Method Summary collapse
-
.new(node = 0) ⇒ Object
Open the Kinect sensor.
-
.orig_new ⇒ Object
Alias for overriding native method.
Class Method Details
.new(node = 0) ⇒ Object
Open the Kinect sensor
return [KinectInput] An object for accessing the Kinect sensor.
44 45 46 47 48 49 50 51 52 53 |
# File 'lib/hornetseye-kinect/kinectinput.rb', line 44 def new( node = 0 ) context = @@context || KinectContext.new begin retval = orig_new context, node @@context = context retval ensure context.close unless @@context end end |
.orig_new ⇒ Object
Alias for overriding native method
37 |
# File 'lib/hornetseye-kinect/kinectinput.rb', line 37 alias_method :orig_new, :new |