Class: OpenCV::Cv::Vec2i
- Inherits:
-
Object
- Object
- OpenCV::Cv::Vec2i
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/ropencv/ropencv_ruby.rb,
lib/ropencv/ropencv_types.rb
Constant Summary collapse
- SIZE =
2
Class Method Summary collapse
- .new(*args) ⇒ Object
-
.null ⇒ Object
returns a null pointer to the object.
Instance Method Summary collapse
- #!=(vec) ⇒ Bool
- #*(vec) ⇒ Cv::Vec2i
- #+(vec) ⇒ Cv::Vec2i
- #-(vec) ⇒ Cv::Vec2i
- #/(vec) ⇒ Cv::Vec2i
- #==(vec) ⇒ Bool
- #all(alpha) ⇒ Cv::Vec2i
- #mul(other) ⇒ Cv::Vec2i
-
#to_s ⇒ Object
converts Vec2i into a string by crawling through all its attributes.
-
#val ⇒ Fixnum
(also: #get_val)
methods.
Methods included from Vecxi
Class Method Details
.vec_2i ⇒ Object .vec_2i(other) ⇒ Object .vec_2i(_t0, _t1) ⇒ Object
7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 |
# File 'lib/ropencv/ropencv_types.rb', line 7277 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Vec2iStruct) 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::Vec2i::Vec2i() @@cv_vec_2i_vec_2i_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) targs = args.clone targs.size.upto(-1) do |i| targs[i] = @@cv_vec_2i_vec_2i_defaults0[i] end begin return Rbind::cv_vec_2i_vec_2i(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Vec2i::Vec2i(cv::Vec2i other) @@cv_vec_2i_vec_2i__2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@cv_vec_2i_vec_2i__2_defaults1[i] end begin return Rbind::cv_vec_2i_vec_2i__2(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Vec2i::Vec2i(int t0, int t1) @@cv_vec_2i_vec_2i__3_defaults2 ||= [nil, nil] if(args.size >= 2 && args.size <= 2) targs = args.clone targs.size.upto(1) do |i| targs[i] = @@cv_vec_2i_vec_2i__3_defaults2[i] end begin return Rbind::cv_vec_2i_vec_2i__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
7265 7266 7267 |
# File 'lib/ropencv/ropencv_types.rb', line 7265 def self.null new(Vec2iStruct.new) end |
Instance Method Details
#!=(vec) ⇒ Bool
Note:
method wrapper for bool cv::Vec2i::operator!=(cv::Vec2i vec)
7445 7446 7447 7448 |
# File 'lib/ropencv/ropencv_types.rb', line 7445 def !=(vec) __validate_pointer__ Rbind::cv_vec_2i_operator_unequal( self, vec) end |
#*(vec) ⇒ Cv::Vec2i
Note:
method wrapper for cv::Vec2i cv::Vec2i::operator*(int vec)
7469 7470 7471 7472 |
# File 'lib/ropencv/ropencv_types.rb', line 7469 def *(vec) __validate_pointer__ Rbind::cv_vec_2i_operator_mult( self, vec) end |
#+(vec) ⇒ Cv::Vec2i
Note:
method wrapper for cv::Vec2i cv::Vec2i::operator+(cv::Vec2i vec)
7453 7454 7455 7456 |
# File 'lib/ropencv/ropencv_types.rb', line 7453 def +(vec) __validate_pointer__ Rbind::cv_vec_2i_operator_plus( self, vec) end |
#-(vec) ⇒ Cv::Vec2i
Note:
method wrapper for cv::Vec2i cv::Vec2i::operator-(cv::Vec2i vec)
7461 7462 7463 7464 |
# File 'lib/ropencv/ropencv_types.rb', line 7461 def -(vec) __validate_pointer__ Rbind::cv_vec_2i_operator_minus( self, vec) end |
#/(vec) ⇒ Cv::Vec2i
Note:
method wrapper for cv::Vec2i cv::Vec2i::operator/(int vec)
7477 7478 7479 7480 |
# File 'lib/ropencv/ropencv_types.rb', line 7477 def /(vec) __validate_pointer__ Rbind::cv_vec_2i_operator_div( self, vec) end |
#==(vec) ⇒ Bool
Note:
method wrapper for bool cv::Vec2i::operator==(cv::Vec2i vec)
7437 7438 7439 7440 |
# File 'lib/ropencv/ropencv_types.rb', line 7437 def ==(vec) __validate_pointer__ Rbind::cv_vec_2i_operator_equal( self, vec) end |
#all(alpha) ⇒ Cv::Vec2i
Note:
method wrapper for cv::Vec2i cv::Vec2i::all(int alpha)
7411 7412 7413 7414 7415 7416 7417 7418 7419 |
# File 'lib/ropencv/ropencv_types.rb', line 7411 def all(alpha) __validate_pointer__ result = Rbind::cv_vec_2i_all( self, alpha) 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 |
#mul(other) ⇒ Cv::Vec2i
Note:
method wrapper for cv::Vec2i cv::Vec2i::mul(cv::Vec2i other)
7424 7425 7426 7427 7428 7429 7430 7431 7432 |
# File 'lib/ropencv/ropencv_types.rb', line 7424 def mul(other) __validate_pointer__ result = Rbind::cv_vec_2i_mul( self, other) 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 |
#to_s ⇒ Object
converts Vec2i into a string by crawling through all its attributes
7391 7392 7393 |
# File 'lib/ropencv/ropencv_types.rb', line 7391 def to_s "#<cv::Vec2i val=#{self.val}>" end |
#val ⇒ Fixnum Also known as: get_val
Note:
method wrapper for int* val
methods
7402 7403 7404 7405 |
# File 'lib/ropencv/ropencv_types.rb', line 7402 def val() __validate_pointer__ Rbind::cv_vec_2i_get_val( self) end |