Class: OpenCV::Cv::Vec3i

Inherits:
Object
  • Object
show all
Extended by:
FFI::DataConverter
Includes:
Vec3x, Vecxi
Defined in:
lib/ropencv/ropencv_ruby.rb,
lib/ropencv/ropencv_types.rb

Constant Summary collapse

SIZE =
3

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Vecxi

#[], #[]=, #to_a

Class Method Details

.vec_3iObject .vec_3i(other) ⇒ Object .vec_3i(_t0, _t1, _t2) ⇒ Object

Overloads:

  • .vec_3i(other) ⇒ Object

    Parameters:

  • .vec_3i(_t0, _t1, _t2) ⇒ Object

    Parameters:

    • _t0 (Fixnum)
    • _t1 (Fixnum)
    • _t2 (Fixnum)

Raises:

  • (ArgumentError)


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

.nullObject

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)

Parameters:

Returns:

  • (Bool)


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)

Parameters:

  • vec (Fixnum)

Returns:



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)

Parameters:

Returns:



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)

Parameters:

Returns:



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)

Parameters:

  • vec (Fixnum)

Returns:



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)

Parameters:

Returns:

  • (Bool)


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)

Parameters:

  • alpha (Fixnum)

Returns:



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)

Parameters:

Returns:



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_sObject

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

#valFixnum Also known as: get_val

Note:

method wrapper for int* val

methods

Returns:

  • (Fixnum)


8224
8225
8226
8227
# File 'lib/ropencv/ropencv_types.rb', line 8224

def val()
    __validate_pointer__
    Rbind::cv_vec_3i_get_val( self)
end