Class: OpenCV::Cv::Point3f
- Inherits:
-
Object
- Object
- OpenCV::Cv::Point3f
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/ropencv/ropencv_types.rb
Class Method Summary collapse
- .new(*args) ⇒ Object
-
.null ⇒ Object
returns a null pointer to the object.
Instance Method Summary collapse
- #!=(pt) ⇒ Bool
- #*(val) ⇒ Cv::Point3f
- #+(pt) ⇒ Cv::Point3f
- #-(pt) ⇒ Cv::Point3f
- #==(pt) ⇒ Bool
- #cross(pt) ⇒ Cv::Point3f
- #ddot(pt) ⇒ Double
- #dot(pt) ⇒ Float
-
#to_s ⇒ Object
converts Point3f into a string by crawling through all its attributes.
-
#x ⇒ Float
(also: #get_x)
methods.
- #x=(value) ⇒ Void (also: #set_x)
- #y ⇒ Float (also: #get_y)
- #y=(value) ⇒ Void (also: #set_y)
- #z ⇒ Float (also: #get_z)
- #z=(value) ⇒ Void (also: #set_z)
Class Method Details
.point_3f ⇒ Object .point_3f(x, y, z) ⇒ Object .point_3f(pt) ⇒ Object
18963 18964 18965 18966 18967 18968 18969 18970 18971 18972 18973 18974 18975 18976 18977 18978 18979 18980 18981 18982 18983 18984 18985 18986 18987 18988 18989 18990 18991 18992 18993 18994 18995 18996 18997 18998 18999 19000 19001 19002 19003 19004 19005 19006 19007 19008 19009 19010 19011 |
# File 'lib/ropencv/ropencv_types.rb', line 18963 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Point3fStruct) raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1 return super(args.first) end # overloaded method wrapper for cv::Point3f::Point3f() @@cv_point_3f_point_3f_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) targs = args.clone targs.size.upto(-1) do |i| targs[i] = @@cv_point_3f_point_3f_defaults0[i] end begin return Rbind::cv_point_3f_point_3f(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Point3f::Point3f(float x, float y, float z) @@cv_point_3f_point_3f__2_defaults1 ||= [nil, nil, nil] if(args.size >= 3 && args.size <= 3) targs = args.clone targs.size.upto(2) do |i| targs[i] = @@cv_point_3f_point_3f__2_defaults1[i] end begin return Rbind::cv_point_3f_point_3f__2(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Point3f::Point3f(const cv::Point3f pt) @@cv_point_3f_point_3f__3_defaults2 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@cv_point_3f_point_3f__3_defaults2[i] end begin return Rbind::cv_point_3f_point_3f__3(*targs) rescue TypeError => e @error = e end end raise ArgumentError, "no constructor for #{self}(#{args.inspect})" end |
.null ⇒ Object
returns a null pointer to the object
18950 18951 18952 |
# File 'lib/ropencv/ropencv_types.rb', line 18950 def self.null new(Point3fStruct.new) end |
Instance Method Details
#!=(pt) ⇒ Bool
method wrapper for bool cv::Point3f::operator!=(const cv::Point3f pt)
19201 19202 19203 19204 |
# File 'lib/ropencv/ropencv_types.rb', line 19201 def !=(pt) __validate_pointer__ Rbind::cv_point_3f_operator_unequal( self, pt) end |
#*(val) ⇒ Cv::Point3f
method wrapper for const cv::Point3f cv::Point3f::operator*(float val)
19185 19186 19187 19188 |
# File 'lib/ropencv/ropencv_types.rb', line 19185 def *(val) __validate_pointer__ Rbind::cv_point_3f_operator_mult( self, val) end |
#+(pt) ⇒ Cv::Point3f
method wrapper for const cv::Point3f cv::Point3f::operator+(const cv::Point3f pt)
19169 19170 19171 19172 |
# File 'lib/ropencv/ropencv_types.rb', line 19169 def +(pt) __validate_pointer__ Rbind::cv_point_3f_operator_plus( self, pt) end |
#-(pt) ⇒ Cv::Point3f
method wrapper for const cv::Point3f cv::Point3f::operator-(const cv::Point3f pt)
19177 19178 19179 19180 |
# File 'lib/ropencv/ropencv_types.rb', line 19177 def -(pt) __validate_pointer__ Rbind::cv_point_3f_operator_minus( self, pt) end |
#==(pt) ⇒ Bool
method wrapper for bool cv::Point3f::operator==(const cv::Point3f pt)
19193 19194 19195 19196 |
# File 'lib/ropencv/ropencv_types.rb', line 19193 def ==(pt) __validate_pointer__ Rbind::cv_point_3f_operator_equal( self, pt) end |
#cross(pt) ⇒ Cv::Point3f
method wrapper for const cv::Point3f cv::Point3f::cross(const cv::Point3f pt)
19156 19157 19158 19159 19160 19161 19162 19163 19164 |
# File 'lib/ropencv/ropencv_types.rb', line 19156 def cross(pt) __validate_pointer__ result = Rbind::cv_point_3f_cross( self, pt) if result.respond_to?(:__owner__?) && !result.__owner__? # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) end result end |
#ddot(pt) ⇒ Double
method wrapper for double cv::Point3f::ddot(const cv::Point3f pt)
19148 19149 19150 19151 |
# File 'lib/ropencv/ropencv_types.rb', line 19148 def ddot(pt) __validate_pointer__ Rbind::cv_point_3f_ddot( self, pt) end |
#dot(pt) ⇒ Float
method wrapper for float cv::Point3f::dot(const cv::Point3f pt)
19140 19141 19142 19143 |
# File 'lib/ropencv/ropencv_types.rb', line 19140 def dot(pt) __validate_pointer__ Rbind::cv_point_3f_dot( self, pt) end |
#to_s ⇒ Object
converts Point3f into a string by crawling through all its attributes
19077 19078 19079 |
# File 'lib/ropencv/ropencv_types.rb', line 19077 def to_s "#<cv::Point3f x=#{self.x} y=#{self.y} z=#{self.z}>" end |
#x ⇒ Float Also known as: get_x
method wrapper for float x
methods
19088 19089 19090 19091 |
# File 'lib/ropencv/ropencv_types.rb', line 19088 def x() __validate_pointer__ Rbind::cv_point_3f_getx( self) end |
#x=(value) ⇒ Void Also known as: set_x
method wrapper for float x
19097 19098 19099 19100 |
# File 'lib/ropencv/ropencv_types.rb', line 19097 def x=(value) __validate_pointer__ Rbind::cv_point_3f_setx( self, value) end |
#y ⇒ Float Also known as: get_y
method wrapper for float y
19105 19106 19107 19108 |
# File 'lib/ropencv/ropencv_types.rb', line 19105 def y() __validate_pointer__ Rbind::cv_point_3f_gety( self) end |
#y=(value) ⇒ Void Also known as: set_y
method wrapper for float y
19114 19115 19116 19117 |
# File 'lib/ropencv/ropencv_types.rb', line 19114 def y=(value) __validate_pointer__ Rbind::cv_point_3f_sety( self, value) end |
#z ⇒ Float Also known as: get_z
method wrapper for float z
19122 19123 19124 19125 |
# File 'lib/ropencv/ropencv_types.rb', line 19122 def z() __validate_pointer__ Rbind::cv_point_3f_getz( self) end |
#z=(value) ⇒ Void Also known as: set_z
method wrapper for float z
19131 19132 19133 19134 |
# File 'lib/ropencv/ropencv_types.rb', line 19131 def z=(value) __validate_pointer__ Rbind::cv_point_3f_setz( self, value) end |