fbx

package module
v0.0.0-...-74396d3 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2020 License: MIT Imports: 6 Imported by: 0

README

FBX

Golang FBX file reader

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Array

type Array struct {
	ArrayLength      uint32
	Encoding         uint32
	CompressedLength uint32
	Data             interface{}
}

func (*Array) String

func (a *Array) String() string

type FBX

type FBX struct {
	Header *Header
	Top    *Node
	Nodes  []*Node
}

func ReadFrom

func ReadFrom(r io.Reader) (*FBX, error)

func (*FBX) Filter

func (f *FBX) Filter(filter NodeFilter) (nodes []*Node)

type FBXReader

type FBXReader struct {
	FBX      *FBX
	Position int64
	Error    error
}

func NewReader

func NewReader() *FBXReader

func (*FBXReader) ReadEndOffset

func (fr *FBXReader) ReadEndOffset(r io.Reader) uint64

func (*FBXReader) ReadFrom

func (fr *FBXReader) ReadFrom(r io.Reader) (n int64, err error)

func (*FBXReader) ReadHeaderFrom

func (fr *FBXReader) ReadHeaderFrom(r io.Reader) (header *Header)

func (*FBXReader) ReadNodeFrom

func (fr *FBXReader) ReadNodeFrom(r io.Reader) (node *Node)

func (*FBXReader) ReadNumProperties

func (fr *FBXReader) ReadNumProperties(r io.Reader) uint64

func (*FBXReader) ReadPropertyFrom

func (fr *FBXReader) ReadPropertyFrom(r io.Reader) (p *Property)

func (*FBXReader) ReadPropertyListLen

func (fr *FBXReader) ReadPropertyListLen(r io.Reader) uint64
type Header [27]byte

func (Header) String

func (h Header) String() string

func (Header) Version

func (h Header) Version() uint32

type Node

type Node struct {
	EndOffset       uint64
	NumProperties   uint64
	PropertyListLen uint64
	NameLen         uint8
	Name            string
	Properties      []*Property
	NestedNodes     []*Node
}

func (*Node) Filter

func (node *Node) Filter(f NodeFilter) (nodes []*Node)

func (*Node) FilterName

func (node *Node) FilterName(name string) []*Node

func (*Node) Float64Slice

func (node *Node) Float64Slice(name string) ([]float64, bool)

func (*Node) Int32Slice

func (node *Node) Int32Slice(name string) ([]int32, bool)

func (*Node) IsEmpty

func (node *Node) IsEmpty() bool

func (*Node) String

func (n *Node) String() string

type NodeFilter

type NodeFilter func(*Node) bool

func FilterName

func FilterName(name string) NodeFilter

type Property

type Property struct {
	TypeCode byte
	Data     interface{}
}

func (*Property) AsBytes

func (p *Property) AsBytes() []byte

func (*Property) AsFloat32

func (p *Property) AsFloat32() float32

func (*Property) AsFloat32Slice

func (p *Property) AsFloat32Slice() (a []float32, ok bool)

func (*Property) AsFloat64

func (p *Property) AsFloat64() float64

func (*Property) AsFloat64Slice

func (p *Property) AsFloat64Slice() (a []float64, ok bool)

func (*Property) AsInt16

func (p *Property) AsInt16() int16

func (*Property) AsInt32

func (p *Property) AsInt32() int32

func (*Property) AsInt32Slice

func (p *Property) AsInt32Slice() (a []int32, ok bool)

func (*Property) AsInt64

func (p *Property) AsInt64() int64

func (*Property) AsInt64Slice

func (p *Property) AsInt64Slice() (a []int64, ok bool)

func (*Property) AsInt8

func (p *Property) AsInt8() int8

func (*Property) AsString

func (p *Property) AsString() string

func (*Property) String

func (p *Property) String() string

Jump to

Keyboard shortcuts

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