Class: OpenCV::Cv::Vec4i

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

Constant Summary collapse

SIZE =
4

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Vecxi

#[], #[]=, #to_a

Class Method Details

.vec_4iObject .vec_4i(other) ⇒ Object .vec_4i(_t0, _t1, _t2, _t3) ⇒ Object

Overloads:

  • .vec_4i(other) ⇒ Object

    Parameters:

  • .vec_4i(_t0, _t1, _t2, _t3) ⇒ Object

    Parameters:

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

Raises:

  • (ArgumentError)


8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
# File 'lib/ropencv/ropencv_types.rb', line 8882

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Vec4iStruct)
        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::Vec4i::Vec4i()
    @@cv_vec_4i_vec_4i_defaults0 ||= []
    if(args.size >= 0 && args.size <= 0)
        targs = args.clone
        targs.size.upto(-1) do |i|
            targs[i] = @@cv_vec_4i_vec_4i_defaults0[i]
        end
        begin
                return Rbind::cv_vec_4i_vec_4i(*targs)
        rescue TypeError => e
            @error = e
        end
    end

    # overloaded method wrapper for cv::Vec4i::Vec4i(cv::Vec4i other)
    @@cv_vec_4i_vec_4i__2_defaults1 ||= [nil]
    if(args.size >= 1 && args.size <= 1)
        targs = args.clone
        targs.size.upto(0) do |i|
            targs[i] = @@cv_vec_4i_vec_4i__2_defaults1[i]
        end
        begin
                return Rbind::cv_vec_4i_vec_4i__2(*targs)
        rescue TypeError => e
            @error = e
        end
    end

    # overloaded method wrapper for cv::Vec4i::Vec4i(int t0, int t1, int t2, int t3)
    @@cv_vec_4i_vec_4i__3_defaults2 ||= [nil, nil, nil, nil]
    if(args.size >= 4 && args.size <= 4)
        targs = args.clone
        targs.size.upto(3) do |i|
            targs[i] = @@cv_vec_4i_vec_4i__3_defaults2[i]
        end
        begin
                return Rbind::cv_vec_4i_vec_4i__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



8868
8869
8870
# File 'lib/ropencv/ropencv_types.rb', line 8868

def self.null
    new(Vec4iStruct.new)
end

Instance Method Details

#!=(vec) ⇒ Bool

Note:

method wrapper for bool cv::Vec4i::operator!=(cv::Vec4i vec)

Parameters:

Returns:

  • (Bool)


9050
9051
9052
9053
# File 'lib/ropencv/ropencv_types.rb', line 9050

def !=(vec)
    __validate_pointer__
    Rbind::cv_vec_4i_operator_unequal( self, vec)
end

#*(vec) ⇒ Cv::Vec4i

Note:

method wrapper for cv::Vec4i cv::Vec4i::operator*(int vec)

Parameters:

  • vec (Fixnum)

Returns:



9074
9075
9076
9077
# File 'lib/ropencv/ropencv_types.rb', line 9074

def *(vec)
    __validate_pointer__
    Rbind::cv_vec_4i_operator_mult( self, vec)
end

#+(vec) ⇒ Cv::Vec4i

Note:

method wrapper for cv::Vec4i cv::Vec4i::operator+(cv::Vec4i vec)

Parameters:

Returns:



9058
9059
9060
9061
# File 'lib/ropencv/ropencv_types.rb', line 9058

def +(vec)
    __validate_pointer__
    Rbind::cv_vec_4i_operator_plus( self, vec)
end

#-(vec) ⇒ Cv::Vec4i

Note:

method wrapper for cv::Vec4i cv::Vec4i::operator-(cv::Vec4i vec)

Parameters:

Returns:



9066
9067
9068
9069
# File 'lib/ropencv/ropencv_types.rb', line 9066

def -(vec)
    __validate_pointer__
    Rbind::cv_vec_4i_operator_minus( self, vec)
end

#/(vec) ⇒ Cv::Vec4i

Note:

method wrapper for cv::Vec4i cv::Vec4i::operator/(int vec)

Parameters:

  • vec (Fixnum)

Returns:



9082
9083
9084
9085
# File 'lib/ropencv/ropencv_types.rb', line 9082

def /(vec)
    __validate_pointer__
    Rbind::cv_vec_4i_operator_div( self, vec)
end

#==(vec) ⇒ Bool

Note:

method wrapper for bool cv::Vec4i::operator==(cv::Vec4i vec)

Parameters:

Returns:

  • (Bool)


9042
9043
9044
9045
# File 'lib/ropencv/ropencv_types.rb', line 9042

def ==(vec)
    __validate_pointer__
    Rbind::cv_vec_4i_operator_equal( self, vec)
end

#all(alpha) ⇒ Cv::Vec4i

Note:

method wrapper for cv::Vec4i cv::Vec4i::all(int alpha)

Parameters:

  • alpha (Fixnum)

Returns:



9016
9017
9018
9019
9020
9021
9022
9023
9024
# File 'lib/ropencv/ropencv_types.rb', line 9016

def all(alpha)
    __validate_pointer__
    result = Rbind::cv_vec_4i_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::Vec4i

Note:

method wrapper for cv::Vec4i cv::Vec4i::mul(cv::Vec4i other)

Parameters:

Returns:



9029
9030
9031
9032
9033
9034
9035
9036
9037
# File 'lib/ropencv/ropencv_types.rb', line 9029

def mul(other)
    __validate_pointer__
    result = Rbind::cv_vec_4i_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 Vec4i into a string by crawling through all its attributes



8996
8997
8998
# File 'lib/ropencv/ropencv_types.rb', line 8996

def to_s
    "#<cv::Vec4i val=#{self.val}>"
end

#valFixnum Also known as: get_val

Note:

method wrapper for int* val

methods

Returns:

  • (Fixnum)


9007
9008
9009
9010
# File 'lib/ropencv/ropencv_types.rb', line 9007

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