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
5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 |
# File 'lib/ropencv/ropencv_types.rb', line 5937 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_3i2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@cv_vec_3i_vec_3i2_defaults1[i] end begin return Rbind::cv_vec_3i_vec_3i2(*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_3i3_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_3i3_defaults2[i] end begin return Rbind::cv_vec_3i_vec_3i3(*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
5924 5925 5926 |
# File 'lib/ropencv/ropencv_types.rb', line 5924 def self.null new(Vec3iStruct.new) end |
Instance Method Details
#!=(vec) ⇒ Bool
Note:
method wrapper for bool cv::Vec3i::operator!=(cv::Vec3i vec)
6105 6106 6107 6108 |
# File 'lib/ropencv/ropencv_types.rb', line 6105 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)
6129 6130 6131 6132 |
# File 'lib/ropencv/ropencv_types.rb', line 6129 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)
6113 6114 6115 6116 |
# File 'lib/ropencv/ropencv_types.rb', line 6113 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)
6121 6122 6123 6124 |
# File 'lib/ropencv/ropencv_types.rb', line 6121 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)
6137 6138 6139 6140 |
# File 'lib/ropencv/ropencv_types.rb', line 6137 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)
6097 6098 6099 6100 |
# File 'lib/ropencv/ropencv_types.rb', line 6097 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)
6071 6072 6073 6074 6075 6076 6077 6078 6079 |
# File 'lib/ropencv/ropencv_types.rb', line 6071 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)
6084 6085 6086 6087 6088 6089 6090 6091 6092 |
# File 'lib/ropencv/ropencv_types.rb', line 6084 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
6051 6052 6053 |
# File 'lib/ropencv/ropencv_types.rb', line 6051 def to_s "#<cv::Vec3i val=#{self.val}>" end |
#val ⇒ Fixnum Also known as: get_val
Note:
method wrapper for int* val
methods
6062 6063 6064 6065 |
# File 'lib/ropencv/ropencv_types.rb', line 6062 def val() __validate_pointer__ Rbind::cv_vec_3i_get_val( self) end |