Class: OpenCV::Cv::Vec3f
- Inherits:
-
Object
- Object
- OpenCV::Cv::Vec3f
- 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::Vec3f
- #+(vec) ⇒ Cv::Vec3f
- #-(vec) ⇒ Cv::Vec3f
- #/(vec) ⇒ Cv::Vec3f
- #==(vec) ⇒ Bool
- #all(alpha) ⇒ Cv::Vec3f
- #cross(val) ⇒ Cv::Vec3f
- #dot(val) ⇒ Float
- #mul(other) ⇒ Cv::Vec3f
-
#to_s ⇒ Object
converts Vec3f into a string by crawling through all its attributes.
-
#val ⇒ Float
(also: #get_val)
methods.
Methods included from Vecxf
Class Method Details
.vec_3f ⇒ Object .vec_3f(other) ⇒ Object .vec_3f(_t0, _t1, _t2) ⇒ Object
7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 |
# File 'lib/ropencv/ropencv_types.rb', line 7818 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Vec3fStruct) 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::Vec3f::Vec3f() @@cv_vec_3f_vec_3f_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) targs = args.clone targs.size.upto(-1) do |i| targs[i] = @@cv_vec_3f_vec_3f_defaults0[i] end begin return Rbind::cv_vec_3f_vec_3f(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Vec3f::Vec3f(cv::Vec3f other) @@cv_vec_3f_vec_3f__2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@cv_vec_3f_vec_3f__2_defaults1[i] end begin return Rbind::cv_vec_3f_vec_3f__2(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Vec3f::Vec3f(float t0, float t1, float t2) @@cv_vec_3f_vec_3f__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_3f_vec_3f__3_defaults2[i] end begin return Rbind::cv_vec_3f_vec_3f__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
7805 7806 7807 |
# File 'lib/ropencv/ropencv_types.rb', line 7805 def self.null new(Vec3fStruct.new) end |
Instance Method Details
#!=(vec) ⇒ Bool
method wrapper for bool cv::Vec3f::operator!=(cv::Vec3f vec)
7986 7987 7988 7989 |
# File 'lib/ropencv/ropencv_types.rb', line 7986 def !=(vec) __validate_pointer__ Rbind::cv_vec_3f_operator_unequal( self, vec) end |
#*(vec) ⇒ Cv::Vec3f
method wrapper for cv::Vec3f cv::Vec3f::operator*(float vec)
8010 8011 8012 8013 |
# File 'lib/ropencv/ropencv_types.rb', line 8010 def *(vec) __validate_pointer__ Rbind::cv_vec_3f_operator_mult( self, vec) end |
#+(vec) ⇒ Cv::Vec3f
method wrapper for cv::Vec3f cv::Vec3f::operator+(cv::Vec3f vec)
7994 7995 7996 7997 |
# File 'lib/ropencv/ropencv_types.rb', line 7994 def +(vec) __validate_pointer__ Rbind::cv_vec_3f_operator_plus( self, vec) end |
#-(vec) ⇒ Cv::Vec3f
method wrapper for cv::Vec3f cv::Vec3f::operator-(cv::Vec3f vec)
8002 8003 8004 8005 |
# File 'lib/ropencv/ropencv_types.rb', line 8002 def -(vec) __validate_pointer__ Rbind::cv_vec_3f_operator_minus( self, vec) end |
#/(vec) ⇒ Cv::Vec3f
method wrapper for cv::Vec3f cv::Vec3f::operator/(float vec)
8018 8019 8020 8021 |
# File 'lib/ropencv/ropencv_types.rb', line 8018 def /(vec) __validate_pointer__ Rbind::cv_vec_3f_operator_div( self, vec) end |
#==(vec) ⇒ Bool
method wrapper for bool cv::Vec3f::operator==(cv::Vec3f vec)
7978 7979 7980 7981 |
# File 'lib/ropencv/ropencv_types.rb', line 7978 def ==(vec) __validate_pointer__ Rbind::cv_vec_3f_operator_equal( self, vec) end |
#all(alpha) ⇒ Cv::Vec3f
method wrapper for cv::Vec3f cv::Vec3f::all(float alpha)
7952 7953 7954 7955 7956 7957 7958 7959 7960 |
# File 'lib/ropencv/ropencv_types.rb', line 7952 def all(alpha) __validate_pointer__ result = Rbind::cv_vec_3f_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 |
#cross(val) ⇒ Cv::Vec3f
method wrapper for const cv::Vec3f cv::Vec3f::cross(const cv::Vec3f val)
8034 8035 8036 8037 8038 8039 8040 8041 8042 |
# File 'lib/ropencv/ropencv_types.rb', line 8034 def cross(val) __validate_pointer__ result = Rbind::cv_vec_3f_cross( self, val) 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 |
#dot(val) ⇒ Float
method wrapper for float cv::Vec3f::dot(const cv::Vec3f val)
8026 8027 8028 8029 |
# File 'lib/ropencv/ropencv_types.rb', line 8026 def dot(val) __validate_pointer__ Rbind::cv_vec_3f_dot( self, val) end |
#mul(other) ⇒ Cv::Vec3f
method wrapper for cv::Vec3f cv::Vec3f::mul(cv::Vec3f other)
7965 7966 7967 7968 7969 7970 7971 7972 7973 |
# File 'lib/ropencv/ropencv_types.rb', line 7965 def mul(other) __validate_pointer__ result = Rbind::cv_vec_3f_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 Vec3f into a string by crawling through all its attributes
7932 7933 7934 |
# File 'lib/ropencv/ropencv_types.rb', line 7932 def to_s "#<cv::Vec3f val=#{self.val}>" end |
#val ⇒ Float Also known as: get_val
method wrapper for float* val
methods
7943 7944 7945 7946 |
# File 'lib/ropencv/ropencv_types.rb', line 7943 def val() __validate_pointer__ Rbind::cv_vec_3f_get_val( self) end |