ASSETBIN

package
v0.0.0-...-a60ced3 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// these are the magic chunk identifiers for the binary ASS file format
	ASSBIN_CHUNK_AICAMERA           = 0x1234
	ASSBIN_CHUNK_AILIGHT            = 0x1235
	ASSBIN_CHUNK_AITEXTURE          = 0x1236
	ASSBIN_CHUNK_AIMESH             = 0x1237
	ASSBIN_CHUNK_AINODEANIM         = 0x1238
	ASSBIN_CHUNK_AISCENE            = 0x1239
	ASSBIN_CHUNK_AIBONE             = 0x123a
	ASSBIN_CHUNK_AIANIMATION        = 0x123b
	ASSBIN_CHUNK_AINODE             = 0x123c
	ASSBIN_CHUNK_AIMATERIAL         = 0x123d
	ASSBIN_CHUNK_AIMATERIALPROPERTY = 0x123e

	ASSBIN_MESH_HAS_POSITIONS               = 0x1
	ASSBIN_MESH_HAS_NORMALS                 = 0x2
	ASSBIN_MESH_HAS_TANGENTS_AND_BITANGENTS = 0x4
	ASSBIN_MESH_HAS_TEXCOORD_BASE           = 0x100
	ASSBIN_MESH_HAS_COLOR_BASE              = 0x10000

	ASSBIN_VERSION_MAJOR = 1
	ASSBIN_VERSION_MINOR = 0
)

Variables

View Source
var (
	Desc = core.AiImporterDesc{
		"Assimp Binary Importer",
		"Gargaj / Conspiracy",
		"",
		"",
		core.AiImporterFlags_SupportBinaryFlavour | core.AiImporterFlags_SupportCompressedFlavour,
		0,
		0,
		0,
		0,
		[]string{"assbin"},
		"ASSIMP.binary-dump.",
	}
)

Functions

func ASSBIN_MESH_HAS_COLOR

func ASSBIN_MESH_HAS_COLOR(n int32) int32

func ASSBIN_MESH_HAS_TEXCOORD

func ASSBIN_MESH_HAS_TEXCOORD(n int32) int32

func AiGetMaterialColor

func AiGetMaterialColor(pType uint32, data []byte) (v *common.AiColor4D, err error)

------------------------------------------------------------------------------------------------ Get a color (3 or 4 floats) from the material

func AiGetMaterialFloat

func AiGetMaterialFloat(pType uint32, data []byte) (res []float64, err error)

--------------------------------------------------------------------------- * @brief Retrieve a single float property with a specific key from the material. * * Pass one of the AI_MATKEY_XXX constants for the last three parameters (the * example reads the #AI_MATKEY_SHININESS_STRENGTH property of the first diffuse texture) * @code * float specStrength = 1.f; // default value, remains unmodified if we fail. * aiGetMaterialFloat(mat, AI_MATKEY_SHININESS_STRENGTH, * (float*)&specStrength); * @endcode * * @param pMat Pointer to the input material. May not be NULL * @param pKey Key to search for. One of the AI_MATKEY_XXX constants. * @param pOut Receives the output float. * @param type (see the code sample above) * @param index (see the code sample above) * @return Specifies whether the key has been found. If not, the output * float remains unmodified. ---------------------------------------------------------------------------

func AiGetMaterialFloatArray

func AiGetMaterialFloatArray(tType uint32, data []byte, pMax *int) (res []float64, err error)

------------------------------------------------------------------------------------------------ Get an array of floating-point values from the material.

func AiGetMaterialInteger

func AiGetMaterialInteger(pType uint32, data []byte) (res []int64, err error)

---------------------------------------------------------------------------

  • @brief Retrieve an integer property with a specific key from a material *
  • See the sample for aiGetMaterialFloat for more information.

---------------------------------------------------------------------------

func AiGetMaterialIntegerArray

func AiGetMaterialIntegerArray(tType uint32, data []byte, pMax *int) (res []int64, err error)

------------------------------------------------------------------------------------------------ Get an array if integers from the material

func AiGetMaterialUVTransform

func AiGetMaterialUVTransform(pType uint32, data []byte) (v *core.AiUVTransform, err error)

------------------------------------------------------------------------------------------------ Get a aiUVTransform (5 floats) from the material

func AiGetMaterialVector

func AiGetMaterialVector(pType uint32, data []byte) (v *common.AiVector4D, err error)

------------------------------------------------------------------------------------------------ Get a color (3 or 4 floats) from the material

func AiGetPropertyString

func AiGetPropertyString(pType uint32, data []byte) (res string, err error)

------------------------------------------------------------------------------------------------ Get a string from the material

func NewAssBinImporter

func NewAssBinImporter(data []byte) (iassimp.Loader, error)

Types

type AssBinImporter

type AssBinImporter struct {
	reader.StreamReader
}

func (*AssBinImporter) CanRead

func (ai *AssBinImporter) CanRead(checkSig bool) bool

func (*AssBinImporter) InitConfig

func (ai *AssBinImporter) InitConfig(cfg *config.Config)

func (*AssBinImporter) Read

func (ai *AssBinImporter) Read(pScene *core.AiScene) (err error)

func (*AssBinImporter) ReadAiColor3D

func (ai *AssBinImporter) ReadAiColor3D() (v *common.AiColor3D, err error)

func (*AssBinImporter) ReadAiColor4D

func (ai *AssBinImporter) ReadAiColor4D() (c *common.AiColor4D, err error)

func (*AssBinImporter) ReadAiMatrix4x4

func (ai *AssBinImporter) ReadAiMatrix4x4() (m *common.AiMatrix4x4, err error)

func (*AssBinImporter) ReadAiQuatKey

func (ai *AssBinImporter) ReadAiQuatKey() (v *common.AiQuatKey, err error)

func (*AssBinImporter) ReadAiQuaternion

func (ai *AssBinImporter) ReadAiQuaternion() (v *common.AiQuaternion, err error)

func (*AssBinImporter) ReadAiReal

func (ai *AssBinImporter) ReadAiReal() (v float32, err error)

func (*AssBinImporter) ReadAiString

func (ai *AssBinImporter) ReadAiString() (string, error)

func (*AssBinImporter) ReadAiVector3D

func (ai *AssBinImporter) ReadAiVector3D() (v *common.AiVector3D, err error)

func (*AssBinImporter) ReadAiVectorKey

func (ai *AssBinImporter) ReadAiVectorKey() (v *common.AiVectorKey, err error)

func (*AssBinImporter) ReadAiVertexWeight

func (ai *AssBinImporter) ReadAiVertexWeight() (*common.AiVertexWeight, error)

func (*AssBinImporter) ReadBinaryAnim

func (ai *AssBinImporter) ReadBinaryAnim(anim *core.AiAnimation) error

-----------------------------------------------------------------------------------

func (*AssBinImporter) ReadBinaryBone

func (ai *AssBinImporter) ReadBinaryBone(b *core.AiBone) error

-----------------------------------------------------------------------------------

func (*AssBinImporter) ReadBinaryCamera

func (ai *AssBinImporter) ReadBinaryCamera(cam *core.AiCamera) error

-----------------------------------------------------------------------------------

func (*AssBinImporter) ReadBinaryLight

func (ai *AssBinImporter) ReadBinaryLight(l *core.AiLight) error

-----------------------------------------------------------------------------------

func (*AssBinImporter) ReadBinaryMaterial

func (ai *AssBinImporter) ReadBinaryMaterial(mat *core.AiMaterial) error

-----------------------------------------------------------------------------------

func (*AssBinImporter) ReadBinaryMaterialProperty

func (ai *AssBinImporter) ReadBinaryMaterialProperty(prop *core.AiMaterialProperty) error

-----------------------------------------------------------------------------------

func (*AssBinImporter) ReadBinaryMesh

func (ai *AssBinImporter) ReadBinaryMesh(mesh *core.AiMesh) error

-----------------------------------------------------------------------------------

func (*AssBinImporter) ReadBinaryNode

func (ai *AssBinImporter) ReadBinaryNode(parent *core.AiNode) (node *core.AiNode, err error)

-----------------------------------------------------------------------------------

func (*AssBinImporter) ReadBinaryNodeAnim

func (ai *AssBinImporter) ReadBinaryNodeAnim(nd *core.AiNodeAnim) error

-----------------------------------------------------------------------------------

func (*AssBinImporter) ReadBinaryScene

func (ai *AssBinImporter) ReadBinaryScene(scene *core.AiScene) error

-----------------------------------------------------------------------------------

func (*AssBinImporter) ReadBinaryTex

func (ai *AssBinImporter) ReadBinaryTex(t *core.AiTexel) (err error)

func (*AssBinImporter) ReadBinaryTexture

func (ai *AssBinImporter) ReadBinaryTexture(tex *core.AiTexture) error

-----------------------------------------------------------------------------------

Jump to

Keyboard shortcuts

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