Module: Snow::FiddlePointerSupport
- Included in:
- Mat3, Mat3Array, Mat4, Mat4Array, Quat, QuatArray, Vec2, Vec2Array, Vec3, Vec3Array, Vec4, Vec4Array
- Defined in:
- lib/snow-math/ptr.rb
Overview
A module to provide to_ptr methods for all Snow math types. This is optional and only used if you require ‘snow-math/ptr` because it depends on Fiddle, so if you don’t want Fiddle pulled into your environment, you don’t want to require the file for this.
Instance Method Summary collapse
-
#to_ptr ⇒ Object
Returns a Fiddle::Pointer to the memory address of the object that extends through the size of the object.
Instance Method Details
#to_ptr ⇒ Object
Returns a Fiddle::Pointer to the memory address of the object that extends through the size of the object.
This function is only provided if you’ve required ‘snow-math/ptr`.
call-seq: to_ptr -> Fiddle::Pointer
25 26 27 |
# File 'lib/snow-math/ptr.rb', line 25 def to_ptr Fiddle::Pointer.new(self.address, self.size) end |