Documentation ¶
Index ¶
- Constants
- Variables
- func GetFramerateFromTimeMode(f FrameRate, custom float32) float32
- func Vec2FromString(str, end string, val *floatgeom.Point2) string
- func Vec3FromString(str, end string, val *floatgeom.Point3) string
- func Vec4FromString(str, end string, val *floatgeom.Point4) string
- type AnimationCurve
- type AnimationCurveNode
- type AnimationLayer
- type AnimationStack
- type Cluster
- type Color
- type Connection
- type ConnectionType
- type CoordSystem
- type CountReader
- type Cursor
- type Curve
- type CurveMode
- type DataView
- type Element
- type FrameRate
- type FrontVector
- type Geometry
- type Header
- type Material
- type Matrix
- type Mesh
- type NeedsPostProcessing
- type Node
- type NodeAttribute
- type Obj
- type Object
- func (o *Object) Element() *Element
- func (o *Object) ID() uint64
- func (o *Object) IsNode() bool
- func (o *Object) Name() string
- func (o *Object) NodeAttribute() Obj
- func (o *Object) Scene() *Scene
- func (o *Object) SetID(i uint64)
- func (o *Object) SetNodeAttribute(na Obj)
- func (o *Object) String() string
- type Property
- type PropertyType
- type Quat
- type RotationOrder
- type Scene
- type Settings
- type Skin
- type TakeInfo
- type Texture
- type TextureType
- type Type
- type UpVector
- type Vertex
- type VertexDataMapping
Constants ¶
const ( BoneTranslate = "Lcl Translation" BoneRotate = "Lcl Rotation" BoneScale = "Lcl Scaling" )
const MaxUvs = 4
MaxUvs is the highest number of UVs allowed
Variables ¶
var ( UpAxis = UpVectorX UpAxisSign = 1 FrontAxis = FrontVectorParityOdd FrontAxisSign = 1 CoordAxis = CoordSystemRight CoordAxisSign = 1 OriginalUpAxis int OriginalUpAxisSign = 1 UnitScaleFactor float32 = 1 OriginalUnitScaleFactor float32 = 1 TimeSpanStart uint64 TimeSpanStop uint64 TimeMode = FrameRateDefault CustomFrameRate float32 = -1.0 )
Default Settings
Functions ¶
func GetFramerateFromTimeMode ¶
GetFramerateFromTimeMode gets time from a given framerate TODO: Confirm these
func Vec2FromString ¶
Vec2FromString gets a vec from string //Todo: Convert from using pointer math...
func Vec3FromString ¶
Vec3FromString gets a vec from string
Types ¶
type AnimationCurve ¶
type AnimationCurve struct { Object Times []time.Duration Values []float32 AttrFlags []int64 AttrData []float32 AttrRefCount []int64 }
AnimationCurve are a mapping of key frame times to a set of data. Basic need is to have Times mapping with Values while disregarding AttributeFlags and Data
func NewAnimationCurve ¶
func NewAnimationCurve(scene *Scene, element *Element) *AnimationCurve
NewAnimationCurve creates a new stub AnimationCurve
func (*AnimationCurve) String ¶
func (ac *AnimationCurve) String() string
String pretty prints out the AnimationCurve
func (*AnimationCurve) Type ¶
func (ac *AnimationCurve) Type() Type
Type returns the type ANIMATION_CURVE
type AnimationCurveNode ¶
type AnimationCurveNode struct { Object Curves [3]Curve Bone Obj BoneLinkProp string // contains filtered or unexported fields }
AnimationCurveNode is a mapping of Curve to a property
func NewAnimationCurveNode ¶
func NewAnimationCurveNode(s *Scene, e *Element) *AnimationCurveNode
NewAnimationCurveNode creates a new AnimationCurveNode with just the base object
func (*AnimationCurveNode) String ¶
func (acn *AnimationCurveNode) String() string
String pretty formats the AnimationCurveNode
func (*AnimationCurveNode) Type ¶
func (acn *AnimationCurveNode) Type() Type
Type returns ANIMATION_CURVE_NODE
type AnimationLayer ¶
type AnimationLayer struct { Object CurveNodes []*AnimationCurveNode }
AnimationLayer is a collection of AnimationCurveNodes along with possibily some properties
func NewAnimationLayer ¶
func NewAnimationLayer(scene *Scene, element *Element) *AnimationLayer
NewAnimationLayer creates a new AnimationLayer with no curvenodes
func (*AnimationLayer) String ¶
func (as *AnimationLayer) String() string
String pretty formats the AnimationLayers Curve Nodes
func (*AnimationLayer) Type ¶
func (as *AnimationLayer) Type() Type
Type returns the type of Animation_layer
type AnimationStack ¶
type AnimationStack struct { Object Layers []*AnimationLayer }
An AnimationStack is collection of 1 to n AnimationLayers along with possibily some properties
func NewAnimationStack ¶
func NewAnimationStack(scene *Scene, element *Element) *AnimationStack
NewAnimationStack creates a new empty stack
func (*AnimationStack) String ¶
func (as *AnimationStack) String() string
String returns a pretty print version of AnimationStack
func (*AnimationStack) Type ¶
func (as *AnimationStack) Type() Type
Type returns the Animation_stack type
type Cluster ¶
type Cluster struct { Object Link Obj Skin *Skin Indices []int Weights []float64 Transform Matrix TransformLink Matrix }
Cluster is an entity which acts on a subset of a geometry's control points For each control point that the cluster acts on, the intensity of the cluster's action is modulated by a weight. The link mode (ELinkMode) specifies how the weights are taken into account.
func NewCluster ¶
NewCluster creates a new empty Cluster object
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Connection is a connection from an Object to either another Object or a Property
func (*Connection) String ¶
func (c *Connection) String() string
type ConnectionType ¶
type ConnectionType int
ConnectionType dictates what the Object is connecting to
const ( // ObjectConn is a connection to another Object ObjectConn ConnectionType = iota // PropConn is a connection to a proprety PropConn ConnectionType = iota )
Connection Types
func (ConnectionType) String ¶
func (ct ConnectionType) String() string
type CoordSystem ¶
type CoordSystem int
CoordSystem specifies the third vector of the system.
const ( CoordSystemRight CoordSystem = iota CoordSystemLeft CoordSystem = iota )
CoordSystem options
type CountReader ¶
CountReader an io reader that knows how many bytes it has currently read
func NewCountReader ¶
func NewCountReader(r io.Reader) *CountReader
NewCountReader creates a new wrapper around an io.Reader with a count of 0
type Curve ¶
type Curve struct { Curve *AnimationCurve // contains filtered or unexported fields }
Curve is a connection Linkage for an AnimationCurve
type CurveMode ¶
type CurveMode int
CurveMode details how the values in the CurveNode should be interperted and used (translation,rotation,scale)
type DataView ¶
DataView leftover concept that knows how to present different type sof data
func BufferDataView ¶
BufferDataView creates a DataView from the delivered buffer
func NewDataView ¶
NewDataView creates a new Dataview and the underlying bytes reader on the given string
type FrameRate ¶
type FrameRate int
FrameRate enumerates standard rates of how many frames should be advanced per second
const ( FrameRateDefault FrameRate = iota FrameRate120 FrameRate = iota FrameRate100 FrameRate = iota FrameRate60 FrameRate = iota FrameRate50 FrameRate = iota FrameRate48 FrameRate = iota FrameRate30 FrameRate = iota FrameRate30Drop FrameRate = iota FrameRateNTSCDropFrame FrameRate = iota FrameRateNTSCFullFrame FrameRate = iota FrameRatePAL FrameRate = iota FrameRateCinema FrameRate = iota FrameRate1000 FrameRate = iota FrameRateCinemaND FrameRate = iota FrameRateCustom FrameRate = iota )
FrameRate values
type FrontVector ¶
type FrontVector int
FrontVector is a vector with origin at the screen pointing toward the camera.
const ( FrontVectorParityEven FrontVector = 1 FrontVectorParityOdd FrontVector = 2 )
FrontVector Parity Options
type Geometry ¶
type Geometry struct { Object Skin *Skin Vertices, Normals, Tangents []floatgeom.Point3 UVs [MaxUvs][]floatgeom.Point2 Colors []floatgeom.Point4 Materials []int Faces [][]int // contains filtered or unexported fields }
Geometry is the base geometric shape objec that is implemented in forms such as meshes that dictate control point deformations
func NewGeometry ¶
NewGeometry makes a stub Geometry
func (*Geometry) GetOldVerts ¶ added in v1.0.1
type Material ¶
type Material struct { Object EmissiveColor Color EmissiveFactor float64 AmbientColor Color DiffuseColor Color DiffuseFactor float64 TransparentColor Color SpecularColor Color SpecularFactor float64 Shininess float64 ShininessExponent float64 ReflectionColor Color ReflectionFactor float64 Textures [TextureCOUNT]*Texture }
Material stores texture pointers and how to apply them
func NewMaterial ¶
NewMaterial makes a stub Material
type Matrix ¶
type Matrix struct {
// contains filtered or unexported fields
}
Matrix is a 16 sized slice that we operate on as if it was actually a matrix
func GetGlobalMatrix ¶ added in v1.0.1
type Mesh ¶
Mesh is a geometry made of polygon https://help.autodesk.com/view/FBX/2017/ENU/?guid=__cpp_ref_class_fbx_mesh_html
func (*Mesh) Animations ¶
func (m *Mesh) Animations() []*AnimationStack
Animations returns the Animation Stacks connected to this mesh
func (*Mesh) GetGeometricMatrix ¶ added in v1.0.1
type NeedsPostProcessing ¶
type NeedsPostProcessing interface {
// contains filtered or unexported methods
}
NeedsPostProcessing note objects that require post processing
type Node ¶
type Node struct { Object // contains filtered or unexported fields }
Node is a typed object
type NodeAttribute ¶
NodeAttribute is an formattable Attribute on a Node
func NewNodeAttribute ¶
func NewNodeAttribute(scene *Scene, element *Element) *NodeAttribute
NewNodeAttribute creates a stube NodeAttribute
func (*NodeAttribute) String ¶
func (na *NodeAttribute) String() string
type Obj ¶
type Obj interface { ID() uint64 SetID(uint64) Name() string Element() *Element NodeAttribute() Obj SetNodeAttribute(na Obj) IsNode() bool Scene() *Scene Type() Type String() string // contains filtered or unexported methods }
Obj interface version of Object
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
Object is the top level general class in fbx
func (*Object) NodeAttribute ¶
NodeAttribute should be deprecated and in favor of exporting the attribute
func (*Object) SetNodeAttribute ¶
SetNodeAttribute sets the attribute but should just exported field
type Property ¶
type Property struct { Count int Type PropertyType Encoding uint32 // contains filtered or unexported fields }
A Property is template class is used to ensure that the data of a FbxObject is strongly typed
type PropertyType ¶
type PropertyType rune
PropertyType is a mapping of letter to data type
const ( BOOL PropertyType = 'C' INT16 PropertyType = 'Y' LONG PropertyType = 'L' INTEGER PropertyType = 'I' STRING PropertyType = 'S' RAWSTRING PropertyType = 'R' FLOAT PropertyType = 'F' DOUBLE PropertyType = 'D' ArrayDOUBLE PropertyType = 'd' ArrayINT PropertyType = 'i' ArrayLONG PropertyType = 'l' ArrayFLOAT PropertyType = 'f' ArrayBOOL PropertyType = 'b' ArrayBYTE PropertyType = 'c' )
Property types block
func (PropertyType) IsArray ¶
func (pt PropertyType) IsArray() bool
IsArray checks whether the property is an array
func (PropertyType) Size ¶
func (pt PropertyType) Size() int
Size returns the current property type's size
type Quat ¶
type Quat struct {
X, Y, Z float64
// contains filtered or unexported fields
}
Quat probably can bve removed
type RotationOrder ¶
type RotationOrder int
RotationOrder determines the dimension order for rotation
const ( EulerXYZ RotationOrder = iota EulerXZY RotationOrder = iota EulerYZX RotationOrder = iota EulerYXZ RotationOrder = iota EulerZXY RotationOrder = iota EulerZYX RotationOrder = iota SphericXYZ RotationOrder = iota // Currently unsupported. Treated as EulerXYZ. )
A block of rotation order sets
type Scene ¶
type Scene struct { RootElement *Element RootNode *Node FrameRate float32 // = -1 Settings ObjectMap map[uint64]Obj Meshes []*Mesh AnimationStacks []*AnimationStack Connections []Connection TakeInfos []TakeInfo }
A Scene is an overarching FBX costruct containing objects and animations
func (*Scene) Geometries ¶
Geometries returns a scene's geometries
type Settings ¶
type Settings struct { UpAxis UpVector UpAxisSign int FrontAxis FrontVector FrontAxisSign int CoordAxis CoordSystem CoordAxisSign int OriginalUpAxis int OriginalUpAxisSign int UnitScaleFactor float32 OriginalUnitScaleFactor float32 TimeSpanStart uint64 TimeSpanStop uint64 TimeMode FrameRate CustomFrameRate float32 }
Settings is the overall scene fbx settings
type TakeInfo ¶
type TakeInfo struct {
// contains filtered or unexported fields
}
TakeInfo is a set of data for a time data set
type Texture ¶
type Texture struct { Object // contains filtered or unexported fields }
Texture is a texture file on an object
func NewTexture ¶
NewTexture creates a texture
func (*Texture) GetFileName ¶ added in v1.0.1
func (*Texture) GetRelativeFileName ¶ added in v1.0.1
type TextureType ¶
type TextureType int
TextureType determines how a texture be used
const ( DIFFUSE TextureType = iota NORMAL TextureType = iota TextureCOUNT TextureType = iota )
Texture type block
type Type ¶
type Type int
Type of the object
const ( ROOT Type = iota GEOMETRY Type = iota MATERIAL Type = iota MESH Type = iota TEXTURE Type = iota LIMB_NODE Type = iota NULL_NODE Type = iota NODE_ATTRIBUTE Type = iota CLUSTER Type = iota SKIN Type = iota ANIMATION_STACK Type = iota ANIMATION_LAYER Type = iota ANIMATION_CURVE Type = iota ANIMATION_CURVE_NODE Type = iota NOTYPE Type = iota )
Types of objects
type UpVector ¶
type UpVector int
UpVector specifies which canonical axis represents up in the system (typically Y or Z).
type Vertex ¶
type Vertex struct {
// contains filtered or unexported fields
}
Vertex hey wit its a linked list of indices!.....
type VertexDataMapping ¶
type VertexDataMapping int
VertexDataMapping dictates how the vertex is mapped
const ( ByPolygonVertex VertexDataMapping = iota ByPolygon VertexDataMapping = iota ByVertex VertexDataMapping = iota )
VertexDataMapping Options
Source Files ¶
- animation.go
- animationCurve.go
- cluster.go
- color.go
- connection.go
- countReader.go
- dataview.go
- element.go
- fileCheck.go
- framerate.go
- geometry.go
- material.go
- math.go
- mesh.go
- misc.go
- node.go
- nodeAttribute.go
- object.go
- parse.go
- property.go
- rotationOrder.go
- scene.go
- settings.go
- skin.go
- strconv.go
- stringPrefixer.go
- takeInfo.go
- texture.go
- tokenize.go
- tokenizeText.go
- type.go