Module: Jolt::Native

Extended by:
FFI::Library
Defined in:
lib/jolt/native.rb,
lib/jolt/native/types.rb,
lib/jolt/native/platform.rb,
lib/jolt/native/generated.rb,
lib/jolt/native/core_functions.rb,
lib/jolt/native/query_functions.rb,
lib/jolt/native/character_functions.rb,
lib/jolt/native/constraint_functions.rb

Defined Under Namespace

Modules: CharacterFunctions, ConstraintFunctions, CoreFunctions, Generated, Loader, Platform, QueryFunctions Classes: ContactEvent

Constant Summary collapse

Vec3 =
Generated::Vec3
Vec4 =
Generated::Vec4
Quat =
Generated::Quat
Mat4 =
Generated::Mat4
MassProperties =
Generated::MassProperties
PhysicsSystemSettings =
Generated::PhysicsSystemSettings
RayCastResult =
Generated::RayCastResult
IndexedTriangle =
Generated::IndexedTriangle
ObjectLayerFilterProcs =
Generated::ObjectLayerFilter_Procs

Class Method Summary collapse

Class Method Details

.load!Object



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/jolt/native.rb', line 17

def load!
  return self if @loaded

  ffi_lib(*Loader.library_paths)
  Generated.attach(self)
  [
    CoreFunctions,
    QueryFunctions,
    ConstraintFunctions,
    CharacterFunctions
  ].each { |functions| functions.attach(self) }
  @loaded = true
  self
rescue LoadError => error
  raise NativeLoadError, error.message
end

.loaded?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/jolt/native.rb', line 34

def loaded?
  @loaded == true
end