Class: CVFFI::Point3D

Inherits:
Object
  • Object
show all
Includes:
CvPoint3DCastMethods, CvPoint3DMethods
Defined in:
lib/opencv-ffi-wrappers/core/point.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from CvPoint3DMethods

#*, #+, #-, #/, #==, #===, #got_what_i_need, #to_Vector, #to_a

Methods included from CvPoint3DCastMethods

#to_CvPoint3D32f, #to_CvPoint3D64f, #to_a

Constructor Details

#initialize(*args) ⇒ Point3D

Returns a new instance of Point3D.



254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# File 'lib/opencv-ffi-wrappers/core/point.rb', line 254

def initialize( *args )
  if args.length == 3
    @x = args[0]
    @y = args[1]
    @z = args[2]
  else
    args = args.shift

    case args
    when Hash
      @z = args[:z]
      @y = args[:y]
      @x = args[:x]
    when Array
      @x = args[0]
      @y = args[1]
      @z = args[2]
  else
    @x = args.x
    @y = args.y
    @z = args.z
  end
  end

  @w = 1
end

Instance Attribute Details

#wObject

Returns the value of attribute w.



252
253
254
# File 'lib/opencv-ffi-wrappers/core/point.rb', line 252

def w
  @w
end

#xObject

Returns the value of attribute x.



252
253
254
# File 'lib/opencv-ffi-wrappers/core/point.rb', line 252

def x
  @x
end

#yObject

Returns the value of attribute y.



252
253
254
# File 'lib/opencv-ffi-wrappers/core/point.rb', line 252

def y
  @y
end

#zObject

Returns the value of attribute z.



252
253
254
# File 'lib/opencv-ffi-wrappers/core/point.rb', line 252

def z
  @z
end