Class: OpenCV::Std::Vector::Cv_Point3f
- Inherits:
-
Object
- Object
- OpenCV::Std::Vector::Cv_Point3f
- Extended by:
- FFI::DataConverter
- Includes:
- Enumerable
- 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
- #<<(val) ⇒ Object
- #[](idx) ⇒ Cv::Point3f
- #at(size) ⇒ Cv::Point3f
- #back ⇒ Cv::Point3f
- #capacity ⇒ Size_T
- #clear ⇒ Void
- #data ⇒ Void
- #delete_if(&block) ⇒ Object
- #each(&block) ⇒ Object
- #empty ⇒ Bool
- #front ⇒ Cv::Point3f
- #get_element ⇒ Cv::Point3f
- #pop_back ⇒ Void
- #push_back(other) ⇒ Void
- #reserve(size) ⇒ Void
-
#resize(size, val = Cv::Point3f.new()) ⇒ Void
methods.
- #size ⇒ Size_T
- #swap(other) ⇒ Void
-
#to_s ⇒ Object
converts Vector::Cv_Point3f into a string by crawling through all its attributes.
- #validate_index(idx) ⇒ Object
Class Method Details
.vector ⇒ Object .vector ⇒ Object
38207 38208 38209 38210 38211 38212 38213 38214 38215 38216 38217 38218 38219 38220 38221 38222 38223 38224 38225 38226 38227 38228 38229 38230 38231 38232 38233 38234 38235 38236 38237 38238 38239 38240 38241 |
# File 'lib/ropencv/ropencv_types.rb', line 38207 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Vector::Cv_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 std::vector<cv::Point3f>::vector<cv::Point3f>() @@std_vector_cv_point_3f_vector_cv_point_3f_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) targs = args.clone targs.size.upto(-1) do |i| targs[i] = @@std_vector_cv_point_3f_vector_cv_point_3f_defaults0[i] end begin return Rbind::std_vector_cv_point_3f_vector_cv_point_3f(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for std::vector<cv::Point3f>::vector<cv::Point3f>(std::vector<cv::Point3f> other) @@std_vector_cv_point_3f_vector_cv_point_3f2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@std_vector_cv_point_3f_vector_cv_point_3f2_defaults1[i] end begin return Rbind::std_vector_cv_point_3f_vector_cv_point_3f2(*targs) rescue TypeError => e @error = e end end raise ArgumentError, "no constructor for #{self}(#{args.inspect})" end |
Instance Method Details
#<<(val) ⇒ Object
38468 38469 38470 38471 |
# File 'lib/ropencv/ropencv_types.rb', line 38468 def <<(val) push_back(val) self end |
#[](idx) ⇒ Cv::Point3f
method wrapper for cv::Point3f std::vectorcv::Point3f::operator
38364 38365 38366 38367 38368 38369 38370 38371 38372 38373 |
# File 'lib/ropencv/ropencv_types.rb', line 38364 def [](size) validate_index(size) __validate_pointer__ result = Rbind::std_vector_cv_point_3f_operator_array( self, size) 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 |
#at(size) ⇒ Cv::Point3f
method wrapper for cv::Point3f std::vectorcv::Point3f::at(size_t size)
38378 38379 38380 38381 38382 38383 38384 38385 38386 38387 |
# File 'lib/ropencv/ropencv_types.rb', line 38378 def at(size) validate_index(size) __validate_pointer__ result = Rbind::std_vector_cv_point_3f_at( self, size) 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 |
#back ⇒ Cv::Point3f
method wrapper for cv::Point3f std::vectorcv::Point3f::back()
38403 38404 38405 38406 38407 38408 38409 38410 38411 |
# File 'lib/ropencv/ropencv_types.rb', line 38403 def back() __validate_pointer__ result = Rbind::std_vector_cv_point_3f_back( self) 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 |
#capacity ⇒ Size_T
method wrapper for size_t std::vectorcv::Point3f::capacity()
38341 38342 38343 38344 |
# File 'lib/ropencv/ropencv_types.rb', line 38341 def capacity() __validate_pointer__ Rbind::std_vector_cv_point_3f_capacity( self) end |
#clear ⇒ Void
method wrapper for void std::vectorcv::Point3f::clear()
38334 38335 38336 38337 |
# File 'lib/ropencv/ropencv_types.rb', line 38334 def clear() __validate_pointer__ Rbind::std_vector_cv_point_3f_clear( self) end |
#data ⇒ Void
method wrapper for void* std::vectorcv::Point3f::data()
38415 38416 38417 38418 |
# File 'lib/ropencv/ropencv_types.rb', line 38415 def data() __validate_pointer__ Rbind::std_vector_cv_point_3f_data( self) end |
#delete_if(&block) ⇒ Object
38472 38473 38474 38475 38476 38477 38478 38479 |
# File 'lib/ropencv/ropencv_types.rb', line 38472 def delete_if(&block) v = self.class.new each do |i| v << i if !yield(i) end v.swap(self) self end |
#each(&block) ⇒ Object
38458 38459 38460 38461 38462 38463 38464 38465 38466 38467 |
# File 'lib/ropencv/ropencv_types.rb', line 38458 def each(&block) if block s = size 0.upto(s-1) do |i| yield self[i] end else Enumerator.new(self) end end |
#empty ⇒ Bool
method wrapper for bool std::vectorcv::Point3f::empty()
38348 38349 38350 38351 |
# File 'lib/ropencv/ropencv_types.rb', line 38348 def empty() __validate_pointer__ Rbind::std_vector_cv_point_3f_empty( self) end |
#front ⇒ Cv::Point3f
method wrapper for cv::Point3f std::vectorcv::Point3f::front()
38391 38392 38393 38394 38395 38396 38397 38398 38399 |
# File 'lib/ropencv/ropencv_types.rb', line 38391 def front() __validate_pointer__ result = Rbind::std_vector_cv_point_3f_front( self) 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 |
#get_element ⇒ Cv::Point3f
method wrapper for cv::Point3f std::vectorcv::Point3f::operator
38447 38448 38449 38450 38451 38452 38453 38454 38455 38456 |
# File 'lib/ropencv/ropencv_types.rb', line 38447 def [](size) validate_index(size) __validate_pointer__ result = Rbind::std_vector_cv_point_3f_operator_array( self, size) 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 |
#pop_back ⇒ Void
method wrapper for void std::vectorcv::Point3f::pop_back()
38430 38431 38432 38433 |
# File 'lib/ropencv/ropencv_types.rb', line 38430 def pop_back() __validate_pointer__ Rbind::std_vector_cv_point_3f_pop_back( self) end |
#push_back(other) ⇒ Void
method wrapper for void std::vectorcv::Point3f::push_back(cv::Point3f other)
38423 38424 38425 38426 |
# File 'lib/ropencv/ropencv_types.rb', line 38423 def push_back(other) __validate_pointer__ Rbind::std_vector_cv_point_3f_push_back( self, other) end |
#reserve(size) ⇒ Void
method wrapper for void std::vectorcv::Point3f::reserve(size_t size)
38356 38357 38358 38359 |
# File 'lib/ropencv/ropencv_types.rb', line 38356 def reserve(size) __validate_pointer__ Rbind::std_vector_cv_point_3f_reserve( self, size) end |
#resize(size, val = Cv::Point3f.new()) ⇒ Void
method wrapper for void std::vectorcv::Point3f::resize(size_t size, cv::Point3f val = cv::Point3f())
methods
38320 38321 38322 38323 |
# File 'lib/ropencv/ropencv_types.rb', line 38320 def resize(size, val = Cv::Point3f.new()) __validate_pointer__ Rbind::std_vector_cv_point_3f_resize( self, size, val) end |
#size ⇒ Size_T
method wrapper for size_t std::vectorcv::Point3f::size()
38327 38328 38329 38330 |
# File 'lib/ropencv/ropencv_types.rb', line 38327 def size() __validate_pointer__ Rbind::std_vector_cv_point_3f_size( self) end |
#swap(other) ⇒ Void
method wrapper for void std::vectorcv::Point3f::swap(std::vectorcv::Point3f other)
38438 38439 38440 38441 |
# File 'lib/ropencv/ropencv_types.rb', line 38438 def swap(other) __validate_pointer__ Rbind::std_vector_cv_point_3f_swap( self, other) end |
#to_s ⇒ Object
converts Vector::Cv_Point3f into a string by crawling through all its attributes
38307 38308 38309 |
# File 'lib/ropencv/ropencv_types.rb', line 38307 def to_s "#<std::vector<cv::Point3f> >" end |
#validate_index(idx) ⇒ Object
38453 38454 38455 38456 38457 |
# File 'lib/ropencv/ropencv_types.rb', line 38453 def validate_index(idx) if idx < 0 || idx >= size raise RangeError,"#{idx} is out of range [0..#{size-1}]" end end |