module Assimp

Constants

AnimBehaviour
BlendMode
CFlags
Components
DefaultLogStream
FALSE
ImporterFlags
LightSourceType
MATH_HALF_PI
MATH_PI
MATH_TWO_PI
MATKEY_BLEND_FUNC
MATKEY_BUMPSCALING
MATKEY_COLOR_AMBIENT
MATKEY_COLOR_DIFFUSE
MATKEY_COLOR_EMISSIVE
MATKEY_COLOR_REFLECTIVE
MATKEY_COLOR_SPECULAR
MATKEY_COLOR_TRANSPARENT
MATKEY_ENABLE_WIREFRAME
MATKEY_GLOBAL_BACKGROUND_IMAGE
MATKEY_MAPPING
MATKEY_MAPPINGMODE_U
MATKEY_MAPPINGMODE_V
MATKEY_MAPPINGMODE_W
MATKEY_NAME
MATKEY_OPACITY
MATKEY_REFLECTIVITY
MATKEY_REFRACTI
MATKEY_SHADING_MODEL
MATKEY_SHININESS
MATKEY_SHININESS_STRENGTH
MATKEY_TEXBLEND
MATKEY_TEXFLAGS
MATKEY_TEXMAP_AXIS
MATKEY_TEXOP
MATKEY_TEXTURE
MATKEY_TWOSIDED
MATKEY_UVTRANSFORM
MATKEY_UVWSRC
MAX_BONE_WEIGHTS
MAX_FACES
MAX_FACE_INDICES
MAX_NUMBER_OF_COLOR_SETS
MAX_NUMBER_OF_TEXTURECOORDS
MAX_VERTICES
MetadataType
MorphingMethod
Origin
PostProcessSteps
PrimitiveType
ProcessPreset_ConvertToLeftHanded
ProcessPreset_TargetRealtime_Fast
ProcessPreset_TargetRealtime_MaxQuality
ProcessPreset_TargetRealtime_Quality
PropertyTypeInfo
Return
SceneFlags
ShadingMode
TRUE
TextureFlags
TextureMapMode
TextureMapping
TextureOp
TextureType
UVTRAFO_ALL
UVTRAFO_ROTATION
UVTRAFO_SCALING
UVTRAFO_TRANSLATION

Public Class Methods

compile_flags() click to toggle source
# File lib/assimp/version.rb, line 48
def self.compile_flags
  Assimp::aiGetCompileFlags
end
export_format_descriptions() click to toggle source
# File lib/assimp/export.rb, line 22
def self.export_format_descriptions
  count = Assimp::aiGetExportFormatCount
  count.times.collect { |i|
    Assimp::aiGetExportFormatDescription(i)
  }
end
extension_list() click to toggle source
# File lib/assimp/import.rb, line 246
def self.extension_list
  s = String::new
  Assimp::aiGetExtensionList(s)
  s
end
extension_supported?(extension) click to toggle source
# File lib/assimp/import.rb, line 240
def self.extension_supported?(extension)
  Assimp::aiIsExtensionSupported(extension)
end
import_file(file, flags: 0, fs: nil, props: nil) click to toggle source
# File lib/assimp/import.rb, line 214
def self.import_file(file, flags: 0, fs: nil, props: nil)
  if props
    s = Assimp::aiImportFileExWithProperties(file, flags, fs, props)
  else
    s = Assimp::aiImportFileEx(file, flags, fs)
  end
  raise "Could not load model #{file}: #{Assimp::LogStream::error_string}!" if s.pointer.null?
  s
end
import_file_from_memory(buffer, flags: 0, hint: "", props: nil) click to toggle source
# File lib/assimp/import.rb, line 227
def self.import_file_from_memory(buffer, flags: 0, hint: "", props: nil)
  if props
    s = Assimp::aiImportFileFromMemoryWithProperties(buffer, buffer.size, flags, hint, props)
  else
    s = Assimp::aiImportFileFromMemory(buffer, buffer.size, flags, hint)
  end
  raise "Could not load model: #{Assimp::LogStream::error_string}!" if s.pointer.null?
  s
end
import_format_descriptions() click to toggle source
# File lib/assimp/import.rb, line 267
def self.import_format_descriptions
  count = Assimp::aiGetImportFormatCount
  count.times.collect { |i| aiGetImportFormatDescription(i) }
end
version() click to toggle source
# File lib/assimp/version.rb, line 30
def self.version
  Version::new Assimp::aiGetVersionMajor, Assimp::aiGetVersionMinor, Assimp::aiGetVersionRevision
end

Public Instance Methods

deg_to_rad(x) click to toggle source
# File lib/assimp/defs.rb, line 20
def deg_to_rad(x)
  x * 0.0174532925
end
rad_to_deg(x) click to toggle source
# File lib/assimp/defs.rb, line 24
def rad_to_deg(x)
  x * 57.2957795
end