Module: CVFFI::CvPointCastMethods
- Included in:
- CvPointBase, Point
- Defined in:
- lib/opencv-ffi-wrappers/core/point.rb
Instance Method Summary collapse
- #to_a(homogeneous = true) ⇒ Object
- #to_CvPoint ⇒ Object
- #to_CvPoint2D32f ⇒ Object
- #to_CvPoint2D64f ⇒ Object
- #to_Point ⇒ Object
Instance Method Details
#to_a(homogeneous = true) ⇒ Object
108 109 110 111 112 113 114 |
# File 'lib/opencv-ffi-wrappers/core/point.rb', line 108 def to_a(homogeneous=true) if homogeneous [ x, y, 1 ] else [x,y] end end |
#to_CvPoint ⇒ Object
100 101 102 |
# File 'lib/opencv-ffi-wrappers/core/point.rb', line 100 def to_CvPoint CvPoint.new( :x => x.to_i, :y => y.to_i ) end |
#to_CvPoint2D32f ⇒ Object
96 97 98 |
# File 'lib/opencv-ffi-wrappers/core/point.rb', line 96 def to_CvPoint2D32f CvPoint2D32f.new( :x => x, :y => y ) end |
#to_CvPoint2D64f ⇒ Object
92 93 94 |
# File 'lib/opencv-ffi-wrappers/core/point.rb', line 92 def to_CvPoint2D64f CvPoint2D64f.new( :x => x, :y => y ) end |