func NewAABB(vals ...float64) AABB {
	return AABB(NewVector(6, 1, vals...))
}
NewAABB returns a new AABB instance.
package ode
import "C"
import (
	"unsafe"
)
const (
	ManualThreadCleanupIFlag = C.dInitFlagManualThreadCleanup
)
const (
	BasicDataAFlag     = C.dAllocateFlagBasicData
	CollisionDataAFlag = C.dAllocateFlagCollisionData
	AllAFlag           = C.dAllocateMaskAll
)
var (
	V3 = NewVector3
	V4 = NewVector4
	M3 = NewMatrix3
	M4 = NewMatrix4
	Q  = NewQuaternion
	BB = NewAABB
)
type NearCallback func(data interface{}, obj1, obj2 Geom)
type nearCallbackData struct {
	data interface{}
	fn   NearCallback
}
func nearCallback(data unsafe.Pointer, obj1, obj2 C.dGeomID) {
	cbData := (*nearCallbackData)(data)
	cbData.fn(cbData.data, cToGeom(obj1), cToGeom(obj2))
}
func alignNum(num, align int) int {
	return (num + (align - 1)) &^ (align - 1)
}
type Vector []float64
func NewVector(size, align int, vals ...float64) Vector {
	alignSize := alignNum(size, align)
	v := make(Vector, size, alignSize)
	copy(v, vals)
	return v
}
func (v Vector) convertC(c *C.dReal, toC bool) {
	for i := range v {
		if toC {
			*c = C.dReal(v[i])
		} else {
			v[i] = float64(*c)
		}
		c = (*C.dReal)(unsafe.Pointer(uintptr(unsafe.Pointer(c)) + unsafe.Sizeof(*c)))
	}
}
func (v Vector) toC(c *C.dReal) {
	v.convertC(c, true)
}
func (v Vector) fromC(c *C.dReal) {
	v.convertC(c, false)
}
type Vector3 Vector
func cToVector3(a *C.dReal) Vector3 {
	vec := NewVector3()
	Vector(vec).fromC(a)
	return vec
}
func NewVector3(vals ...float64) Vector3 {
	return Vector3(NewVector(3, 4, vals...))
}
type Vector4 Vector
func NewVector4(vals ...float64) Vector4 {
	return Vector4(NewVector(4, 4, vals...))
}
type Quaternion Vector
func NewQuaternion(vals ...float64) Quaternion {
	return Quaternion(NewVector(4, 1, vals...))
}
type AABB Vector