mdb

package
v0.0.0-...-e0f7b17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Signature uint32  = 0x0062646D
	RoomScale float32 = 0.01
)

Variables

This section is empty.

Functions

func FromPath

func FromPath(mdb *Mdb, filePath string) error

func FromPathWithOffset

func FromPathWithOffset(mdb *Mdb, filePath string, offset uint32) error

func FromStream

func FromStream(mdb *Mdb, stream io.ReadWriteSeeker) error

func FromStreamWithOffset

func FromStreamWithOffset(mdb *Mdb, stream io.ReadWriteSeeker, offset uint32) error

Types

type Mdb

type Mdb struct {
	Offset            uint32          `json:"offset"`
	BoneTotal         uint16          `json:"bone_total"`
	Bones             []*bone.Bone    `json:"bones"`
	VertexBufferTotal uint16          `json:"vertex_buffer_total"`
	VertexBuffers     []*VertexBuffer `json:"vertex_buffers"`
}

func New

func New() *Mdb

type VertexBuffer

type VertexBuffer struct {
	Vertices [][3]float32 `json:"vertices"`
	Indices  [][3]int16   `json:"indices"`
	Normals  [][3]float32 `json:"normals"`
	Uvs      [][2]float32 `json:"uvs"`
	Joints   [][4]uint8   `json:"joints"`
	Weights  [][4]float32 `json:"weights"`
	Material uint16       `json:"material"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL