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
5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 |
# File 'lib/ropencv/ropencv_types.rb', line 5157 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_2i2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@cv_vec_2i_vec_2i2_defaults1[i] end begin return Rbind::cv_vec_2i_vec_2i2(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Vec2i::Vec2i(int t0, int t1) @@cv_vec_2i_vec_2i3_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_2i3_defaults2[i] end begin return Rbind::cv_vec_2i_vec_2i3(*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
5145 5146 5147 |
# File 'lib/ropencv/ropencv_types.rb', line 5145 def self.null new(Vec2iStruct.new) end |
Instance Method Details
#!=(vec) ⇒ Bool
Note:
method wrapper for bool cv::Vec2i::operator!=(cv::Vec2i vec)
5325 5326 5327 5328 |
# File 'lib/ropencv/ropencv_types.rb', line 5325 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)
5349 5350 5351 5352 |
# File 'lib/ropencv/ropencv_types.rb', line 5349 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)
5333 5334 5335 5336 |
# File 'lib/ropencv/ropencv_types.rb', line 5333 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)
5341 5342 5343 5344 |
# File 'lib/ropencv/ropencv_types.rb', line 5341 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)
5357 5358 5359 5360 |
# File 'lib/ropencv/ropencv_types.rb', line 5357 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)
5317 5318 5319 5320 |
# File 'lib/ropencv/ropencv_types.rb', line 5317 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)
5291 5292 5293 5294 5295 5296 5297 5298 5299 |
# File 'lib/ropencv/ropencv_types.rb', line 5291 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)
5304 5305 5306 5307 5308 5309 5310 5311 5312 |
# File 'lib/ropencv/ropencv_types.rb', line 5304 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
5271 5272 5273 |
# File 'lib/ropencv/ropencv_types.rb', line 5271 def to_s "#<cv::Vec2i val=#{self.val}>" end |
#val ⇒ Fixnum Also known as: get_val
Note:
method wrapper for int* val
methods
5282 5283 5284 5285 |
# File 'lib/ropencv/ropencv_types.rb', line 5282 def val() __validate_pointer__ Rbind::cv_vec_2i_get_val( self) end |