#ifndef __AI_TYPES_BI__
#define __AI_TYPES_BI__


#include once "crt/stddef.bi" ' size_t

' Standard return type for some library functions.
' Rarely used, and if, mostly in the C API.
type aiReturn as long
  ' Indicates that a function was successful
const as aiReturn aiReturn_SUCCESS = 0
  ' Indicates that a function failed 
const as aiReturn aiReturn_FAILURE = -1
  ' Indicates that not enough memory was available to perform the requested operation 
const as aiReturn aiReturn_OUTOFMEMORY = -3

type aiVector2D
 as single x,y
end type

type aiVector3D
  as single x,y,z
end type

' Represents a row-major 3x3 matrix
type aiMatrix3x3
  as single a1, a2, a3
  as single b1, b2, b3
  as single c1, c2, c3
end type

' Represents a row-major 4x4 matrix, use this for homogeneous coordinates.
type aiMatrix4x4
  declare operator cast as string
  as single a1, a2, a3, a4
  as single b1, b2, b3, b4
  as single c1, c2, c3, c4
  as single d1, d2, d3, d4
end type
operator aiMatrix4x4.cast as string
  operator = a1 & "," & a2 & "," & a3 & "," &  a4 & !"\n" & _
             b1 & "," & b2 & "," & b3 & "," &  b4 & !"\n" & _
             c1 & "," & c2 & "," & c3 & "," &  c4 & !"\n" & _
             d1 & "," & d2 & "," & d3 & "," &  d4 & !"\n"
end operator

' Represents a quaternion in a 4D vector.
type aiQuaternion
  as single w, x, y, z
end type

' Represents a color in Red-Green-Blue space including an 
' alpha component. Color values range from 0 to 1.
type aiColor4D
 as single r, g, b, a
end type

' Represents a color in Red-Green-Blue space.
type aiColor3D
  ' ! Red, green and blue color values
  as single r, g, b
end type

' Represents an UTF-8 string, zero byte terminated.
#define MAXLEN 1024
type aiString
  as size_t length
  as zstring * MAXLEN data
end type

' Seek origins (for the virtual file system API).
'  Much cooler than using SEEK_SET, SEEK_CUR or SEEK_END.
type aiOrigin as long
  ' Beginning of the file */
const as aiOrigin aiOrigin_SET = 0
  ' Current position of the file pointer
const as aiOrigin aiOrigin_CUR = 1
  ' End of the file, offsets must be negative
const as aiOrigin  aiOrigin_END = 2

'  Logging to these streams can be enabled with a single call to 
'  LogStream::createDefaultStream or aiAttachPredefinedLogStream(), respectively.
type aiDefaultLogStream as long 
  ' Stream the log to a file
const as aiDefaultLogStream aiDefaultLogStream_FILE    = &H1
  ' Stream the log to std::cout
const as aiDefaultLogStreamaiDefaultLogStream_STDOUT   = &H2
  ' Stream the log to std::cerr
const as aiDefaultLogStreamaiDefaultLogStream_STDERR   = &H4
  ' MSVC only: Stream the log the the debugger
  ' (this relies on OutputDebugString from the Win32 SDK)
const as aiDefaultLogStreamaiDefaultLogStream_DEBUGGER = &H8


' Stores the memory requirements for different components
' (e.g. meshes, materials, animations) of an import.
' All sizes are in bytes. see Importer::GetMemoryRequirements()
type aiMemoryInfo
  ' Storage allocated for texture data
  as ulong textures
  ' Storage allocated for material data
  as ulong materials
  ' Storage allocated for mesh data
  as ulong meshes
  ' Storage allocated for node data
  as ulong nodes
  ' Storage allocated for animation data
  as ulong animations
  ' Storage allocated for camera data
  as ulong cameras
  ' Storage allocated for light data
  as ulong lights
  ' Total storage allocated for the full import.
  as ulong total
end type


#endif ' __AI_TYPES_BI__
