Class: OpenCV::Cv::Vec3i
- Inherits:
-
Object
- Object
- OpenCV::Cv::Vec3i
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/ropencv/ropencv_ruby.rb,
lib/ropencv/ropencv_types.rb
Constant Summary collapse
- SIZE =
3
Class Method Summary collapse
- .new(*args) ⇒ Object
-
.null ⇒ Object
returns a null pointer to the object.
Instance Method Summary collapse
- #!=(vec) ⇒ Bool
- #*(vec) ⇒ Cv::Vec3i
- #+(vec) ⇒ Cv::Vec3i
- #-(vec) ⇒ Cv::Vec3i
- #/(vec) ⇒ Cv::Vec3i
- #==(vec) ⇒ Bool
- #all(alpha) ⇒ Cv::Vec3i
- #mul(other) ⇒ Cv::Vec3i
-
#to_s ⇒ Object
converts Vec3i into a string by crawling through all its attributes.
-
#val ⇒ Fixnum
(also: #get_val)
methods.
Methods included from Vecxi
Class Method Details
.vec_3i ⇒ Object .vec_3i(other) ⇒ Object .vec_3i(_t0, _t1, _t2) ⇒ Object
8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 |
# File 'lib/ropencv/ropencv_types.rb', line 8099 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Vec3iStruct) 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::Vec3i::Vec3i() @@cv_vec_3i_vec_3i_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) targs = args.clone targs.size.upto(-1) do |i| targs[i] = @@cv_vec_3i_vec_3i_defaults0[i] end begin return Rbind::cv_vec_3i_vec_3i(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Vec3i::Vec3i(cv::Vec3i other) @@cv_vec_3i_vec_3i__2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@cv_vec_3i_vec_3i__2_defaults1[i] end begin return Rbind::cv_vec_3i_vec_3i__2(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Vec3i::Vec3i(int t0, int t1, int t2) @@cv_vec_3i_vec_3i__3_defaults2 ||= [nil, nil, nil] if(args.size >= 3 && args.size <= 3) targs = args.clone targs.size.upto(2) do |i| targs[i] = @@cv_vec_3i_vec_3i__3_defaults2[i] end begin return Rbind::cv_vec_3i_vec_3i__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
8086 8087 8088 |
# File 'lib/ropencv/ropencv_types.rb', line 8086 def self.null new(Vec3iStruct.new) end |
Instance Method Details
#!=(vec) ⇒ Bool
Note:
method wrapper for bool cv::Vec3i::operator!=(cv::Vec3i vec)
8267 8268 8269 8270 |
# File 'lib/ropencv/ropencv_types.rb', line 8267 def !=(vec) __validate_pointer__ Rbind::cv_vec_3i_operator_unequal( self, vec) end |
#*(vec) ⇒ Cv::Vec3i
Note:
method wrapper for cv::Vec3i cv::Vec3i::operator*(int vec)
8291 8292 8293 8294 |
# File 'lib/ropencv/ropencv_types.rb', line 8291 def *(vec) __validate_pointer__ Rbind::cv_vec_3i_operator_mult( self, vec) end |
#+(vec) ⇒ Cv::Vec3i
Note:
method wrapper for cv::Vec3i cv::Vec3i::operator+(cv::Vec3i vec)
8275 8276 8277 8278 |
# File 'lib/ropencv/ropencv_types.rb', line 8275 def +(vec) __validate_pointer__ Rbind::cv_vec_3i_operator_plus( self, vec) end |
#-(vec) ⇒ Cv::Vec3i
Note:
method wrapper for cv::Vec3i cv::Vec3i::operator-(cv::Vec3i vec)
8283 8284 8285 8286 |
# File 'lib/ropencv/ropencv_types.rb', line 8283 def -(vec) __validate_pointer__ Rbind::cv_vec_3i_operator_minus( self, vec) end |
#/(vec) ⇒ Cv::Vec3i
Note:
method wrapper for cv::Vec3i cv::Vec3i::operator/(int vec)
8299 8300 8301 8302 |
# File 'lib/ropencv/ropencv_types.rb', line 8299 def /(vec) __validate_pointer__ Rbind::cv_vec_3i_operator_div( self, vec) end |
#==(vec) ⇒ Bool
Note:
method wrapper for bool cv::Vec3i::operator==(cv::Vec3i vec)
8259 8260 8261 8262 |
# File 'lib/ropencv/ropencv_types.rb', line 8259 def ==(vec) __validate_pointer__ Rbind::cv_vec_3i_operator_equal( self, vec) end |
#all(alpha) ⇒ Cv::Vec3i
Note:
method wrapper for cv::Vec3i cv::Vec3i::all(int alpha)
8233 8234 8235 8236 8237 8238 8239 8240 8241 |
# File 'lib/ropencv/ropencv_types.rb', line 8233 def all(alpha) __validate_pointer__ result = Rbind::cv_vec_3i_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::Vec3i
Note:
method wrapper for cv::Vec3i cv::Vec3i::mul(cv::Vec3i other)
8246 8247 8248 8249 8250 8251 8252 8253 8254 |
# File 'lib/ropencv/ropencv_types.rb', line 8246 def mul(other) __validate_pointer__ result = Rbind::cv_vec_3i_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 Vec3i into a string by crawling through all its attributes
8213 8214 8215 |
# File 'lib/ropencv/ropencv_types.rb', line 8213 def to_s "#<cv::Vec3i val=#{self.val}>" end |
#val ⇒ Fixnum Also known as: get_val
Note:
method wrapper for int* val
methods
8224 8225 8226 8227 |
# File 'lib/ropencv/ropencv_types.rb', line 8224 def val() __validate_pointer__ Rbind::cv_vec_3i_get_val( self) end |