Sha256: c5e26e905cee4e104aa4a03aa82c8eb3c8318f4d99ead59d7358dc8ffe19dea5
Contents?: true
Size: 1004 Bytes
Versions: 2
Compression:
Stored size: 1004 Bytes
Contents
module GDAL module Transformers class TPSTransformer # @return [FFI::Function] def self.function FFI::GDAL::Alg::TPSTransform end # @return [FFI::Pointer] C pointer to the C TPS transformer. attr_reader :c_pointer # @param gcp_list [Array<FFI::GDAL::GCP>] # @param reversed [Boolean] def initialize(gcp_list, reversed = false) gcp_list_ptr = FFI::MemoryPointer.new(:pointer, gcp_list.size) # TODO: fasterer: each_with_index is slower than loop gcp_list.each_with_index do |gcp, i| gcp_list_ptr[i].put_pointer(0, gcp.to_ptr) end @c_pointer = FFI::GDAL::Alg.GDALCreateTPSTransformer(gcp_list.size, gcp_list_ptr, reversed) end def destroy! return unless @c_pointer FFI::GDAL::Alg.GDALDestroyTPSTransformer(@c_pointer) @c_pointer = nil end # @return [FFI::Function] def function self.class.function end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ffi-gdal-1.0.0.beta7 | lib/gdal/transformers/tps_transformer.rb |
ffi-gdal-1.0.0.beta6 | lib/gdal/transformers/tps_transformer.rb |