Class: OpenCV::Cv::Point3f
- Inherits:
-
Object
- Object
- OpenCV::Cv::Point3f
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/ropencv/ropencv_types.rb
Class Method Summary collapse
- .new(*args) ⇒ Object
-
.null ⇒ Object
returns a null pointer to the object.
Instance Method Summary collapse
- #!=(pt) ⇒ Bool
- #*(val) ⇒ Cv::Point3f
- #+(pt) ⇒ Cv::Point3f
- #-(pt) ⇒ Cv::Point3f
- #==(pt) ⇒ Bool
- #cross(pt) ⇒ Cv::Point3f
- #ddot(pt) ⇒ Double
- #dot(pt) ⇒ Float
-
#to_s ⇒ Object
converts Point3f into a string by crawling through all its attributes.
-
#x ⇒ Float
(also: #get_x)
methods.
- #x=(value) ⇒ Void (also: #set_x)
- #y ⇒ Float (also: #get_y)
- #y=(value) ⇒ Void (also: #set_y)
- #z ⇒ Float (also: #get_z)
- #z=(value) ⇒ Void (also: #set_z)
Class Method Details
.point_3f ⇒ Object .point_3f(x, y, z) ⇒ Object .point_3f(pt) ⇒ Object
9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 |
# File 'lib/ropencv/ropencv_types.rb', line 9739 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Point3fStruct) 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::Point3f::Point3f() @@cv_point_3f_point_3f_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) targs = args.clone targs.size.upto(-1) do |i| targs[i] = @@cv_point_3f_point_3f_defaults0[i] end begin return Rbind::cv_point_3f_point_3f(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Point3f::Point3f(float x, float y, float z) @@cv_point_3f_point_3f2_defaults1 ||= [nil, nil, nil] if(args.size >= 3 && args.size <= 3) targs = args.clone targs.size.upto(2) do |i| targs[i] = @@cv_point_3f_point_3f2_defaults1[i] end begin return Rbind::cv_point_3f_point_3f2(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Point3f::Point3f(const cv::Point3f pt) @@cv_point_3f_point_3f3_defaults2 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@cv_point_3f_point_3f3_defaults2[i] end begin return Rbind::cv_point_3f_point_3f3(*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
9726 9727 9728 |
# File 'lib/ropencv/ropencv_types.rb', line 9726 def self.null new(Point3fStruct.new) end |
Instance Method Details
#!=(pt) ⇒ Bool
method wrapper for bool cv::Point3f::operator!=(const cv::Point3f pt)
9977 9978 9979 9980 |
# File 'lib/ropencv/ropencv_types.rb', line 9977 def !=(pt) __validate_pointer__ Rbind::cv_point_3f_operator_unequal( self, pt) end |
#*(val) ⇒ Cv::Point3f
method wrapper for cv::Point3f cv::Point3f::operator*(float val)
9961 9962 9963 9964 |
# File 'lib/ropencv/ropencv_types.rb', line 9961 def *(val) __validate_pointer__ Rbind::cv_point_3f_operator_mult( self, val) end |
#+(pt) ⇒ Cv::Point3f
method wrapper for cv::Point3f cv::Point3f::operator+(const cv::Point3f pt)
9945 9946 9947 9948 |
# File 'lib/ropencv/ropencv_types.rb', line 9945 def +(pt) __validate_pointer__ Rbind::cv_point_3f_operator_plus( self, pt) end |
#-(pt) ⇒ Cv::Point3f
method wrapper for cv::Point3f cv::Point3f::operator-(const cv::Point3f pt)
9953 9954 9955 9956 |
# File 'lib/ropencv/ropencv_types.rb', line 9953 def -(pt) __validate_pointer__ Rbind::cv_point_3f_operator_minus( self, pt) end |
#==(pt) ⇒ Bool
method wrapper for bool cv::Point3f::operator==(const cv::Point3f pt)
9969 9970 9971 9972 |
# File 'lib/ropencv/ropencv_types.rb', line 9969 def ==(pt) __validate_pointer__ Rbind::cv_point_3f_operator_equal( self, pt) end |
#cross(pt) ⇒ Cv::Point3f
method wrapper for cv::Point3f cv::Point3f::cross(const cv::Point3f pt)
9932 9933 9934 9935 9936 9937 9938 9939 9940 |
# File 'lib/ropencv/ropencv_types.rb', line 9932 def cross(pt) __validate_pointer__ result = Rbind::cv_point_3f_cross( self, pt) 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 |
#ddot(pt) ⇒ Double
method wrapper for double cv::Point3f::ddot(const cv::Point3f pt)
9924 9925 9926 9927 |
# File 'lib/ropencv/ropencv_types.rb', line 9924 def ddot(pt) __validate_pointer__ Rbind::cv_point_3f_ddot( self, pt) end |
#dot(pt) ⇒ Float
method wrapper for float cv::Point3f::dot(const cv::Point3f pt)
9916 9917 9918 9919 |
# File 'lib/ropencv/ropencv_types.rb', line 9916 def dot(pt) __validate_pointer__ Rbind::cv_point_3f_dot( self, pt) end |
#to_s ⇒ Object
converts Point3f into a string by crawling through all its attributes
9853 9854 9855 |
# File 'lib/ropencv/ropencv_types.rb', line 9853 def to_s "#<cv::Point3f x=#{self.x} y=#{self.y} z=#{self.z}>" end |
#x ⇒ Float Also known as: get_x
method wrapper for float x
methods
9864 9865 9866 9867 |
# File 'lib/ropencv/ropencv_types.rb', line 9864 def x() __validate_pointer__ Rbind::cv_point_3f_getx( self) end |
#x=(value) ⇒ Void Also known as: set_x
method wrapper for float x
9873 9874 9875 9876 |
# File 'lib/ropencv/ropencv_types.rb', line 9873 def x=(value) __validate_pointer__ Rbind::cv_point_3f_setx( self, value) end |
#y ⇒ Float Also known as: get_y
method wrapper for float y
9881 9882 9883 9884 |
# File 'lib/ropencv/ropencv_types.rb', line 9881 def y() __validate_pointer__ Rbind::cv_point_3f_gety( self) end |
#y=(value) ⇒ Void Also known as: set_y
method wrapper for float y
9890 9891 9892 9893 |
# File 'lib/ropencv/ropencv_types.rb', line 9890 def y=(value) __validate_pointer__ Rbind::cv_point_3f_sety( self, value) end |
#z ⇒ Float Also known as: get_z
method wrapper for float z
9898 9899 9900 9901 |
# File 'lib/ropencv/ropencv_types.rb', line 9898 def z() __validate_pointer__ Rbind::cv_point_3f_getz( self) end |
#z=(value) ⇒ Void Also known as: set_z
method wrapper for float z
9907 9908 9909 9910 |
# File 'lib/ropencv/ropencv_types.rb', line 9907 def z=(value) __validate_pointer__ Rbind::cv_point_3f_setz( self, value) end |