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)


6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
# File 'lib/ropencv/ropencv_types.rb', line 6720

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_4i2_defaults1 ||= [nil]
    if(args.size >= 1 && args.size <= 1)
        targs = args.clone
        targs.size.upto(0) do |i|
            targs[i] = @@cv_vec_4i_vec_4i2_defaults1[i]
        end
        begin
                return Rbind::cv_vec_4i_vec_4i2(*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_4i3_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_4i3_defaults2[i]
        end
        begin
                return Rbind::cv_vec_4i_vec_4i3(*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



6706
6707
6708
# File 'lib/ropencv/ropencv_types.rb', line 6706

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)


6888
6889
6890
6891
# File 'lib/ropencv/ropencv_types.rb', line 6888

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:



6912
6913
6914
6915
# File 'lib/ropencv/ropencv_types.rb', line 6912

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:



6896
6897
6898
6899
# File 'lib/ropencv/ropencv_types.rb', line 6896

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:



6904
6905
6906
6907
# File 'lib/ropencv/ropencv_types.rb', line 6904

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:



6920
6921
6922
6923
# File 'lib/ropencv/ropencv_types.rb', line 6920

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)


6880
6881
6882
6883
# File 'lib/ropencv/ropencv_types.rb', line 6880

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:



6854
6855
6856
6857
6858
6859
6860
6861
6862
# File 'lib/ropencv/ropencv_types.rb', line 6854

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:



6867
6868
6869
6870
6871
6872
6873
6874
6875
# File 'lib/ropencv/ropencv_types.rb', line 6867

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



6834
6835
6836
# File 'lib/ropencv/ropencv_types.rb', line 6834

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

#valFixnum Also known as: get_val

Note:

method wrapper for int* val

methods

Returns:

  • (Fixnum)


6845
6846
6847
6848
# File 'lib/ropencv/ropencv_types.rb', line 6845

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