Class: OpenCV::VectorPoint3d
- Inherits:
-
Object
- Object
- OpenCV::VectorPoint3d
- Extended by:
- FFI::DataConverter
- Includes:
- Enumerable
- Defined in:
- lib/ruby/ropencv/ropencv_types.rb
Instance Attribute Summary collapse
- #__obj_ptr__ ⇒ Object readonly private
Class Method Summary collapse
-
.from_native(ptr, context) ⇒ Object
private
can be overwritten by the user.
- .new(*args) ⇒ Object
- .rbind_from_native(ptr, context) ⇒ Object private
- .rbind_to_native(obj, context) ⇒ Object private
-
.to_native(obj, context) ⇒ Object
private
can be overwritten by the user.
Instance Method Summary collapse
- #<<(val) ⇒ Object
-
#[](size) ⇒ Object
wrapper for cv::Point3d vector_Point3d::operator[](size_t size).
-
#__owner__? ⇒ Boolean
private
returns true if the underlying pointer is owner of the real object.
-
#at(size) ⇒ Object
wrapper for cv::Point3d vector_Point3d::at(size_t size).
-
#back ⇒ Object
wrapper for cv::Point3d vector_Point3d::back().
-
#capacity ⇒ Object
wrapper for size_t vector_Point3d::capacity().
-
#data ⇒ Object
wrapper for void * vector_Point3d::data().
- #each(&block) ⇒ Object
-
#empty ⇒ Object
wrapper for bool vector_Point3d::empty().
-
#front ⇒ Object
wrapper for cv::Point3d vector_Point3d::front().
-
#initialize(ptr) ⇒ VectorPoint3d
constructor
private
A new instance of VectorPoint3d.
-
#pop_back ⇒ Object
wrapper for void vector_Point3d::pop_back().
-
#push_back(other) ⇒ Object
wrapper for void vector_Point3d::push_back(const cv::Point3d other).
-
#reserve(size) ⇒ Object
wrapper for void vector_Point3d::reserve(size_t size).
-
#resize(size, val = cv::Point3d) ⇒ Object
methods wrapper for void vector_Point3d::resize(size_t size, const cv::Point3d val=cv::Point3d).
-
#size ⇒ Object
wrapper for size_t vector_Point3d::size().
-
#swap(other) ⇒ Object
wrapper for void vector_Point3d::swap(vector_Point3d other).
Constructor Details
#initialize(ptr) ⇒ VectorPoint3d
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of VectorPoint3d.
22795 22796 22797 22798 22799 22800 22801 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22795 def initialize(ptr) @__obj_ptr__ = if ptr.is_a? VectorPoint3dStruct ptr else VectorPoint3dStruct.new(FFI::AutoPointer.new(ptr,VectorPoint3dStruct.method(:release))) end end |
Instance Attribute Details
#__obj_ptr__ ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22792 22793 22794 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22792 def __obj_ptr__ @__obj_ptr__ end |
Class Method Details
.from_native(ptr, context) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
can be overwritten by the user
22787 22788 22789 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22787 def self.from_native(ptr,context) rbind_from_native(ptr,context) end |
.new(*args) ⇒ Object
22731 22732 22733 22734 22735 22736 22737 22738 22739 22740 22741 22742 22743 22744 22745 22746 22747 22748 22749 22750 22751 22752 22753 22754 22755 22756 22757 22758 22759 22760 22761 22762 22763 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22731 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(VectorPoint3dStruct) raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1 return super(args.first) end # wrapper for vector_Point3d::vector_Point3d() @@vector_point_3d_vector_point_3d_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) args.size.upto(-1) do |i| args[i] = @@vector_point_3d_vector_point_3d_defaults0[i] end begin return Rbind::vector_point_3d_vector_point_3d(*args) rescue TypeError => e @error = e end end # wrapper for vector_Point3d::vector_Point3d(const vector_Point3d other) @@vector_point_3d_vector_point_3d2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) args.size.upto(0) do |i| args[i] = @@vector_point_3d_vector_point_3d2_defaults1[i] end begin return Rbind::vector_point_3d_vector_point_3d2(*args) rescue TypeError => e @error = e end end raise ArgumentError, "no constructor for #{self}(#{args.inspect})" end |
.rbind_from_native(ptr, context) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22775 22776 22777 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22775 def self.rbind_from_native(ptr,context) VectorPoint3d.new(ptr) end |
.rbind_to_native(obj, context) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22766 22767 22768 22769 22770 22771 22772 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22766 def self.rbind_to_native(obj,context) if obj.is_a? VectorPoint3d obj.__obj_ptr__ else raise TypeError, "expected kind of #{name}, was #{obj.class}" end end |
.to_native(obj, context) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
can be overwritten by the user
22781 22782 22783 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22781 def self.to_native(obj,context) rbind_to_native(obj,context) end |
Instance Method Details
#<<(val) ⇒ Object
22822 22823 22824 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22822 def <<(val) push_back(val) end |
#[](size) ⇒ Object
wrapper for cv::Point3d vector_Point3d::operator[](size_t size)
22867 22868 22869 22870 22871 22872 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22867 def [](size) result = Rbind::vector_point_3d_operator_array( self, size) # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__? result end |
#__owner__? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
returns true if the underlying pointer is owner of the real object
22806 22807 22808 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22806 def __owner__? @__obj_ptr__[:bowner] end |
#at(size) ⇒ Object
wrapper for cv::Point3d vector_Point3d::at(size_t size)
22875 22876 22877 22878 22879 22880 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22875 def at(size) result = Rbind::vector_point_3d_at( self, size) # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__? result end |
#back ⇒ Object
wrapper for cv::Point3d vector_Point3d::back()
22891 22892 22893 22894 22895 22896 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22891 def back() result = Rbind::vector_point_3d_back( self) # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__? result end |
#capacity ⇒ Object
wrapper for size_t vector_Point3d::capacity()
22852 22853 22854 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22852 def capacity() Rbind::vector_point_3d_capacity( self) end |
#data ⇒ Object
wrapper for void * vector_Point3d::data()
22899 22900 22901 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22899 def data() Rbind::vector_point_3d_data( self) end |
#each(&block) ⇒ Object
22812 22813 22814 22815 22816 22817 22818 22819 22820 22821 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22812 def each(&block) if block s = size 0.upto(s-1) do |i| yield self[i] end else Enumerator.new(self) end end |
#empty ⇒ Object
wrapper for bool vector_Point3d::empty()
22857 22858 22859 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22857 def empty() Rbind::vector_point_3d_empty( self) end |
#front ⇒ Object
wrapper for cv::Point3d vector_Point3d::front()
22883 22884 22885 22886 22887 22888 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22883 def front() result = Rbind::vector_point_3d_front( self) # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__? result end |
#pop_back ⇒ Object
wrapper for void vector_Point3d::pop_back()
22909 22910 22911 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22909 def pop_back() Rbind::vector_point_3d_pop_back( self) end |
#push_back(other) ⇒ Object
wrapper for void vector_Point3d::push_back(const cv::Point3d other)
22904 22905 22906 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22904 def push_back(other) Rbind::vector_point_3d_push_back( self, other) end |
#reserve(size) ⇒ Object
wrapper for void vector_Point3d::reserve(size_t size)
22862 22863 22864 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22862 def reserve(size) Rbind::vector_point_3d_reserve( self, size) end |
#resize(size, val = cv::Point3d) ⇒ Object
methods wrapper for void vector_Point3d::resize(size_t size, const cv::Point3d val=cv::Point3d)
22842 22843 22844 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22842 def resize(size, val = cv::Point3d) Rbind::vector_point_3d_resize( self, size, val) end |
#size ⇒ Object
wrapper for size_t vector_Point3d::size()
22847 22848 22849 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22847 def size() Rbind::vector_point_3d_size( self) end |
#swap(other) ⇒ Object
wrapper for void vector_Point3d::swap(vector_Point3d other)
22914 22915 22916 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 22914 def swap(other) Rbind::vector_point_3d_swap( self, other) end |