core

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: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AI_DEFAULT_MATERIAL_NAME = "DefaultMaterial"
)

Variables

View Source
var (
	//Supported number of texture coord sets (UV(W) channels) per mesh
	AI_MAX_NUMBER_OF_COLOR_SETS = 0x8
	//Supported number of vertex color sets per mesh.
	AI_MAX_NUMBER_OF_TEXTURECOORDS uint32 = 0x8
	//Maximum number of faces per mesh.
	AI_MAX_FACES = 0x7fffffff
	//Maximum number of vertices per mesh
	AI_MAX_VERTICES = 0x7fffffff
	//Maximum number of indices per face (polygon).
	AI_MAX_BONE_WEIGHTS = 0x7fffffff
	// AI_MAX_FACE_INDICES Maximum number of indices per face (polygon).
	AI_MAX_FACE_INDICES = 0x7fff
)
View Source
var (
	AI_MATKEY_NAME                    = NewAiMaterialProperty("?mat.name", 0, 0)
	AI_MATKEY_TWOSIDED                = NewAiMaterialProperty("$mat.twosided", 0, 0)
	AI_MATKEY_SHADING_MODEL           = NewAiMaterialProperty("$mat.shadingm", 0, 0)
	AI_MATKEY_ENABLE_WIREFRAME        = NewAiMaterialProperty("$mat.wireframe", 0, 0)
	AI_MATKEY_BLEND_FUNC              = NewAiMaterialProperty("$mat.blend", 0, 0)
	AI_MATKEY_OPACITY                 = NewAiMaterialProperty("$mat.opacity", 0, 0)
	AI_MATKEY_TRANSPARENCYFACTOR      = NewAiMaterialProperty("$mat.transparencyfactor", 0, 0)
	AI_MATKEY_BUMPSCALING             = NewAiMaterialProperty("$mat.bumpscaling", 0, 0)
	AI_MATKEY_SHININESS               = NewAiMaterialProperty("$mat.shininess", 0, 0)
	AI_MATKEY_REFLECTIVITY            = NewAiMaterialProperty("$mat.reflectivity", 0, 0)
	AI_MATKEY_SHININESS_STRENGTH      = NewAiMaterialProperty("$mat.shinpercent", 0, 0)
	AI_MATKEY_REFRACTI                = NewAiMaterialProperty("$mat.refracti", 0, 0)
	AI_MATKEY_COLOR_DIFFUSE           = NewAiMaterialProperty("$clr.diffuse", 0, 0)
	AI_MATKEY_COLOR_AMBIENT           = NewAiMaterialProperty("$clr.ambient", 0, 0)
	AI_MATKEY_COLOR_SPECULAR          = NewAiMaterialProperty("$clr.specular", 0, 0)
	AI_MATKEY_COLOR_EMISSIVE          = NewAiMaterialProperty("$clr.emissive", 0, 0)
	AI_MATKEY_COLOR_TRANSPARENT       = NewAiMaterialProperty("$clr.transparent", 0, 0)
	AI_MATKEY_COLOR_REFLECTIVE        = NewAiMaterialProperty("$clr.reflective", 0, 0)
	AI_MATKEY_GLOBAL_BACKGROUND_IMAGE = NewAiMaterialProperty("?bg.global", 0, 0)
	AI_MATKEY_GLOBAL_SHADERLANG       = NewAiMaterialProperty("?sh.lang", 0, 0)
	AI_MATKEY_SHADER_VERTEX           = NewAiMaterialProperty("?sh.vs", 0, 0)
	AI_MATKEY_SHADER_FRAGMENT         = NewAiMaterialProperty("?sh.fs", 0, 0)
	AI_MATKEY_SHADER_GEO              = NewAiMaterialProperty("?sh.gs", 0, 0)
	AI_MATKEY_SHADER_TESSELATION      = NewAiMaterialProperty("?sh.ts", 0, 0)
	AI_MATKEY_SHADER_PRIMITIVE        = NewAiMaterialProperty("?sh.ps", 0, 0)
	AI_MATKEY_SHADER_COMPUTE          = NewAiMaterialProperty("?sh.cs", 0, 0)

	AI_MATKEY_USE_COLOR_MAP = NewAiMaterialProperty("$mat.useColorMap", 0, 0)

	// Metallic/Roughness Workflow
	// ---------------------------
	// Base RGBA color factor. Will be multiplied by final base color texture values if extant
	// Note: Importers may choose to copy this into AI_MATKEY_COLOR_DIFFUSE for compatibility
	// with renderers and formats that do not support Metallic/Roughness PBR
	AI_MATKEY_BASE_COLOR = NewAiMaterialProperty("$clr.base", 0, 0)
	//AI_MATKEY_BASE_COLOR_TEXTURE =newAiMaterialProperty(AiTextureType_BASE_COLOR, 0)
	AI_MATKEY_USE_METALLIC_MAP = NewAiMaterialProperty("$mat.useMetallicMap", 0, 0)
	// Metallic factor. 0.0 = Full Dielectric, 1.0 = Full Metal
	AI_MATKEY_METALLIC_FACTOR = NewAiMaterialProperty("$mat.metallicFactor", 0, 0)
	//AI_MATKEY_METALLIC_TEXTURE=newAiMaterialProperty( AiTextureType_METALNESS, 0)
	AI_MATKEY_USE_ROUGHNESS_MAP = NewAiMaterialProperty("$mat.useRoughnessMap", 0, 0)
	// Roughness factor. 0.0 = Perfectly Smooth, 1.0 = Completely Rough
	AI_MATKEY_ROUGHNESS_FACTOR = NewAiMaterialProperty("$mat.roughnessFactor", 0, 0)
	//AI_MATKEY_ROUGHNESS_TEXTURE =newAiMaterialProperty(AiTextureType_DIFFUSE_ROUGHNESS, 0)
	// Anisotropy factor. 0.0 = isotropic, 1.0 = anisotropy along tangent direction,
	// -1.0 = anisotropy along bitangent direction
	AI_MATKEY_ANISOTROPY_FACTOR = NewAiMaterialProperty("$mat.anisotropyFactor", 0, 0)

	// Specular/Glossiness Workflow
	// ---------------------------
	// Diffuse/Albedo Color. Note: Pure Metals have a diffuse of {0,0,0}
	// AI_MATKEY_COLOR_DIFFUSE
	// Specular Color.
	// Note: Metallic/Roughness may also have a Specular Color
	// AI_MATKEY_COLOR_SPECULAR
	AI_MATKEY_SPECULAR_FACTOR = NewAiMaterialProperty("$mat.specularFactor", 0, 0)
	// Glossiness factor. 0.0 = Completely Rough, 1.0 = Perfectly Smooth
	AI_MATKEY_GLOSSINESS_FACTOR = NewAiMaterialProperty("$mat.glossinessFactor", 0, 0)

	// Sheen
	// -----
	// Sheen base RGB color. Default {0,0,0}
	AI_MATKEY_SHEEN_COLOR_FACTOR = NewAiMaterialProperty("$clr.sheen.factor", 0, 0)
	// Sheen Roughness Factor.
	AI_MATKEY_SHEEN_ROUGHNESS_FACTOR = NewAiMaterialProperty("$mat.sheen.roughnessFactor", 0, 0)

	// Clearcoat
	// ---------
	// Clearcoat layer intensity. 0.0 = none (disabled)
	AI_MATKEY_CLEARCOAT_FACTOR           = NewAiMaterialProperty("$mat.clearcoat.factor", 0, 0)
	AI_MATKEY_CLEARCOAT_ROUGHNESS_FACTOR = NewAiMaterialProperty("$mat.clearcoat.roughnessFactor", 0, 0)

	// Transmission
	// ------------
	// https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_transmission
	// Base percentage of light transmitted through the surface. 0.0 = Opaque, 1.0 = Fully transparent
	AI_MATKEY_TRANSMISSION_FACTOR = NewAiMaterialProperty("$mat.transmission.factor", 0, 0)

	// Volume
	// ------------
	// https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_volume
	// The thickness of the volume beneath the surface. If the value is 0 the material is thin-walled. Otherwise the material is a volume boundary.
	AI_MATKEY_VOLUME_THICKNESS_FACTOR = NewAiMaterialProperty("$mat.volume.thicknessFactor", 0, 0)
	// Texture that defines the thickness.
	// Multiplied by AI_MATKEY_THICKNESS_FACTOR
	//AI_MATKEY_VOLUME_THICKNESS_TEXTURE =newAiMaterialProperty(AiTextureType_TRANSMISSION, 1)
	// Density of the medium given as the average distance that light travels in the medium before interacting with a particle.
	AI_MATKEY_VOLUME_ATTENUATION_DISTANCE = NewAiMaterialProperty("$mat.volume.attenuationDistance", 0, 0)
	// The color that white light turns into due to absorption when reaching the attenuation distance.
	AI_MATKEY_VOLUME_ATTENUATION_COLOR = NewAiMaterialProperty("$mat.volume.attenuationColor", 0, 0)

	// Emissive
	// --------
	AI_MATKEY_USE_EMISSIVE_MAP   = NewAiMaterialProperty("$mat.useEmissiveMap", 0, 0)
	AI_MATKEY_EMISSIVE_INTENSITY = NewAiMaterialProperty("$mat.emissiveIntensity", 0, 0)
	AI_MATKEY_USE_AO_MAP         = NewAiMaterialProperty("$mat.useAOMap", 0, 0)
)
View Source
var (
	AI_MATKEY_OBJ_ILLUM = NewAiMaterialProperty("$mat.illum", 0, 0)
)
View Source
var AI_SCENE_FLAGS_INCOMPLETE = 0x1

------------------------------------------------------------------------------- *

  • Specifies that the scene data structure that was imported is not complete.
  • This flag bypasses some internal validations and allows the import
  • of animation skeletons, material libraries or camera animation paths
  • using Assimp. Most applications won't support such data.
View Source
var (
	HINTMAXTEXTURELEN = 9
)
View Source
var (
	PlaneInit = *common.NewAiVector3D3(0.8523, 0.34321, 0.5736)
)

------------------------------------------------------------------------------------------------ * A little helper class to quickly find all vertices in the epsilon environment of a given

  • position. Construct an instance with an array of positions. The class stores the given positions
  • by their indices and sorts them by their distance to an arbitrary chosen plane.
  • You can then query the instance for all vertices close to a given position in an average O(log n)
  • time, with O(n) worst case complexity when all vertices lay on the plane. The plane is chosen
  • so that it avoids common planes in usual data sets.

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

Functions

func ComputePositionEpsilon

func ComputePositionEpsilon(pMeshes []*AiMesh) float64

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

func GetAiPropertyTypeInfo

func GetAiPropertyTypeInfo(key string) (res []pb_msg.AiMaterialPropertyType)

func RegisterPropertyTypeInfo

func RegisterPropertyTypeInfo(source, key string, values ...pb_msg.AiMaterialPropertyType)

func UnRegisterPropertyTypeSource

func UnRegisterPropertyTypeSource(source string)

Types

type AiAABB

type AiAABB struct {
	Min *common.AiVector3D
	Max *common.AiVector3D
}

func (*AiAABB) Clone

func (ai *AiAABB) Clone() *AiAABB

func (*AiAABB) FromPbMsg

func (ai *AiAABB) FromPbMsg(p *pb_msg.AiAABB) *AiAABB

func (*AiAABB) ToPbMsg

func (ai *AiAABB) ToPbMsg() *pb_msg.AiAABB

type AiAnimBehaviour

type AiAnimBehaviour int
const (
	/** The value from the default node transformation is taken*/
	AiAnimBehaviour_DEFAULT AiAnimBehaviour = 0x0

	/** The nearest key value is used without interpolation */
	AiAnimBehaviour_CONSTANT AiAnimBehaviour = 0x1

	/** The value of the nearest two keys is linearly
	 *  extrapolated for the current time value.*/
	AiAnimBehaviour_LINEAR AiAnimBehaviour = 0x2

	/** The animation is repeated.
	 *
	 *  If the animation key go from n to m and the current
	 *  time is t, use the value at (t-n) % (|m-n|).*/
	AiAnimBehaviour_REPEAT AiAnimBehaviour = 0x3
)

type AiAnimMesh

type AiAnimMesh struct {
	/**Anim Mesh name */
	Name string

	/** Replacement for aiMesh::mVertices. If this array is non-nullptr,
	 *  it *must* contain mNumVertices entries. The corresponding
	 *  array in the host mesh must be non-nullptr as well - animation
	 *  meshes may neither add or nor remove vertex components (if
	 *  a replacement array is nullptr and the corresponding source
	 *  array is not, the source data is taken instead)*/
	Vertices []*common.AiVector3D

	/** Replacement for aiMesh::mNormals.  */
	Normals []*common.AiVector3D

	/** Replacement for aiMesh::mTangents. */
	Tangents []*common.AiVector3D

	/** Replacement for aiMesh::mBitangents. */
	Bitangents []*common.AiVector3D

	/** Replacement for aiMesh::mColors */
	Colors [][]*common.AiColor4D

	/** Replacement for aiMesh::mTextureCoords */
	TextureCoords [][]*common.AiVector3D
	/**
	 * Weight of the AnimMesh.
	 */
	Weight float32
}

func NewAiAnimMesh

func NewAiAnimMesh() *AiAnimMesh

func (*AiAnimMesh) Clone

func (ai *AiAnimMesh) Clone() *AiAnimMesh

func (*AiAnimMesh) FromPbMsg

func (ai *AiAnimMesh) FromPbMsg(p *pb_msg.AiAnimMesh) *AiAnimMesh

func (*AiAnimMesh) HasNormals

func (ai *AiAnimMesh) HasNormals() bool

func (*AiAnimMesh) HasPositions

func (ai *AiAnimMesh) HasPositions() bool

*

  • @brief Check whether the anim-mesh overrides the vertex positions
  • of its host mesh.
  • @return true if positions are stored, false if not.

func (*AiAnimMesh) HasTangentsAndBitangents

func (ai *AiAnimMesh) HasTangentsAndBitangents() bool

*

  • @brief Check whether the anim-mesh overrides the vertex tangents
  • and bitangents of its host mesh. As for aiMesh,
  • tangents and bitangents always go together.
  • @return true if tangents and bi-tangents are stored, false if not.

func (*AiAnimMesh) HasTextureCoords

func (ai *AiAnimMesh) HasTextureCoords(pIndex uint32) bool

*

  • @brief Check whether the anim mesh overrides a particular
  • set of texture coordinates on his host mesh.
  • @param pIndex 0<index<AI_MAX_NUMBER_OF_TEXTURECOORDS
  • @return true if texture coordinates are stored, false if not.

func (*AiAnimMesh) HasVertexColors

func (ai *AiAnimMesh) HasVertexColors(pIndex int) bool

func (*AiAnimMesh) ToPbMsg

func (ai *AiAnimMesh) ToPbMsg() *pb_msg.AiAnimMesh

type AiAnimation

type AiAnimation struct {
	/** The name of the animation. If the modeling package this data was
	 *  exported from does support only a single animation channel, this
	 *  name is usually empty (length is zero). */
	Name string

	/** Duration of the animation in ticks.  */
	Duration float64

	/** Ticks per second. 0 if not specified in the imported file */
	TicksPerSecond float64
	/** The node animation channels. Each channel affects a single node.
	 *  The array is mNumChannels in size. */
	Channels []*AiNodeAnim

	/** The mesh animation channels. Each channel affects a single mesh.
	 *  The array is mNumMeshChannels in size. */
	MeshChannels []*AiMeshAnim
	/** The morph mesh animation channels. Each channel affects a single mesh.
	 *  The array is mNumMorphMeshChannels in size. */
	MorphMeshChannels []*AiMeshMorphAnim
}

func (*AiAnimation) Clone

func (ai *AiAnimation) Clone() *AiAnimation

func (*AiAnimation) FromPbMsg

func (ai *AiAnimation) FromPbMsg(p *pb_msg.AiAnimation) *AiAnimation

func (*AiAnimation) ToPbMsg

func (ai *AiAnimation) ToPbMsg() *pb_msg.AiAnimation

type AiBlendMode

type AiBlendMode int

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

  • @brief Defines alpha-blend flags. *
  • If you're familiar with OpenGL or D3D, these flags aren't new to you.
  • They define *how* the final color value of a pixel is computed, basing
  • on the previous color at that pixel and the new color value from the
  • material.
  • The blend formula is:
  • @code
  • SourceColor * SourceBlend + DestColor * DestBlend
  • @endcode
  • where DestColor is the previous color in the frame-buffer at this
  • position and SourceColor is the material color before the transparency
  • calculation.<br>
  • This corresponds to the #AI_MATKEY_BLEND_FUNC property.
const (
	/**
	 *  Formula:
	 *  @code
	 *  SourceColor*SourceAlpha + DestColor*(1-SourceAlpha)
	 *  @endcode
	 */
	AiBlendMode_Default AiBlendMode = 0x0

	/** Additive blending
	 *
	 *  Formula:
	 *  @code
	 *  SourceColor*1 + DestColor*1
	 *  @endcode
	 */
	AiBlendMode_Additive AiBlendMode = 0x1
)

type AiBone

type AiBone struct {
	/**
	 * The name of the bone.
	 */
	Name string
	/**
	 * The bone armature node - used for skeleton conversion
	 * you must enable aiProcess_PopulateArmatureData to populate this
	 */
	Armature []*AiNode

	/**
	 * The bone node in the scene - used for skeleton conversion
	 * you must enable aiProcess_PopulateArmatureData to populate this
	 */
	Node []*AiNode

	/**
	 * The influence weights of this bone, by vertex index.
	 */
	Weights []*common.AiVertexWeight

	/**
	 * Matrix that transforms from mesh space to bone space in bind pose.
	 *
	 * This matrix describes the position of the mesh
	 * in the local space of this bone when the skeleton was bound.
	 * Thus it can be used directly to determine a desired vertex position,
	 * given the world-space transform of the bone when animated,
	 * and the position of the vertex in mesh space.
	 *
	 * It is sometimes called an inverse-bind matrix,
	 * or inverse bind pose matrix.
	 */
	OffsetMatrix *common.AiMatrix4x4
}

func (*AiBone) Clone

func (ai *AiBone) Clone() *AiBone

func (*AiBone) FromPbMsg

func (ai *AiBone) FromPbMsg(p *pb_msg.AiBone) *AiBone

func (*AiBone) ToPbMsg

func (ai *AiBone) ToPbMsg() *pb_msg.AiBone

type AiCamera

type AiCamera struct {
	/** The name of the camera.
	 *
	 *  There must be a node in the scenegraph with the same name.
	 *  This node specifies the position of the camera in the scene
	 *  hierarchy and can be animated.
	 */
	Name string

	/** Position of the camera relative to the coordinate space
	 *  defined by the corresponding node.
	 *
	 *  The default value is 0|0|0.
	 */
	Position *common.AiVector3D

	/** 'Up' - vector of the camera coordinate system relative to
	 *  the coordinate space defined by the corresponding node.
	 *
	 *  The 'right' vector of the camera coordinate system is
	 *  the cross product of  the up and lookAt vectors.
	 *  The default value is 0|1|0. The vector
	 *  may be normalized, but it needn't.
	 */
	Up *common.AiVector3D

	/** 'LookAt' - vector of the camera coordinate system relative to
	 *  the coordinate space defined by the corresponding node.
	 *
	 *  This is the viewing direction of the user.
	 *  The default value is 0|0|1. The vector
	 *  may be normalized, but it needn't.
	 */
	LookAt *common.AiVector3D

	/** Horizontal field of view angle, in radians.
	 *
	 *  The field of view angle is the angle between the center
	 *  line of the screen and the left or right border.
	 *  The default value is 1/4PI.
	 */
	HorizontalFOV float32

	/** Distance of the near clipping plane from the camera.
	 *
	 * The value may not be 0.f (for arithmetic reasons to prevent
	 * a division through zero). The default value is 0.1f.
	 */
	ClipPlaneNear float32

	/** Distance of the far clipping plane from the camera.
	 *
	 * The far clipping plane must, of course, be further away than the
	 * near clipping plane. The default value is 1000.f. The ratio
	 * between the near and the far plane should not be too
	 * large (between 1000-10000 should be ok) to avoid floating-point
	 * inaccuracies which could lead to z-fighting.
	 */
	ClipPlaneFar float32

	/** Screen aspect ratio.
	 *
	 * This is the ration between the width and the height of the
	 * screen. Typical values are 4/3, 1/2 or 1/1. This value is
	 * 0 if the aspect ratio is not defined in the source file.
	 * 0 is also the default value.
	 */
	Aspect float32

	/** Half horizontal orthographic width, in scene units.
	 *
	 *  The orthographic width specifies the half width of the
	 *  orthographic view box. If non-zero the camera is
	 *  orthographic and the mAspect should define to the
	 *  ratio between the orthographic width and height
	 *  and mHorizontalFOV should be set to 0.
	 *  The default value is 0 (not orthographic).
	 */
	OrthographicWidth float32
}

func NewAiCamera

func NewAiCamera() *AiCamera

func (*AiCamera) Clone

func (ai *AiCamera) Clone() *AiCamera

func (*AiCamera) FromPbMsg

func (ai *AiCamera) FromPbMsg(p *pb_msg.AiCamera) *AiCamera

func (*AiCamera) ToPbMsg

func (ai *AiCamera) ToPbMsg() *pb_msg.AiCamera

type AiFace

type AiFace struct {
	//! Pointer to the indices array. Size of the array is given in numIndices.
	Indices []uint32
}

func NewAiFace

func NewAiFace() *AiFace

func (*AiFace) Clone

func (ai *AiFace) Clone() *AiFace

func (*AiFace) FromPbMsg

func (ai *AiFace) FromPbMsg(p *pb_msg.AiFace) *AiFace

func (*AiFace) ToPbMsg

func (ai *AiFace) ToPbMsg() *pb_msg.AiFace

type AiImporterDesc

type AiImporterDesc struct {
	/** Full name of the importer (i.e. Blender3D importer)*/
	Name string

	/** Original author (left blank if unknown or whole assimp team) */
	Author string

	/** Current maintainer, left blank if the author maintains */
	Maintainer string

	/** Implementation comments, i.e. unimplemented features*/
	Comments string

	/** These flags indicate some characteristics common to many
	  importers. */
	Flags AiImporterFlags

	/** Minimum format version that can be loaded im major.minor format,
	  both are set to 0 if there is either no version scheme
	  or if the loader doesn't care. */
	MinMajor int
	MinMinor int

	/** Maximum format version that can be loaded im major.minor format,
	  both are set to 0 if there is either no version scheme
	  or if the loader doesn't care. Loaders that expect to be
	  forward-compatible to potential future format versions should
	  indicate  zero, otherwise they should specify the current
	  maximum version.*/
	MaxMajor int
	MaxMinor int

	/** List of file extensions this importer can handle.
	  List entries are separated by space characters.
	  All entries are lower case without a leading dot (i.e.
	  "xml dae" would be a valid value. Note that multiple
	  importers may respond to the same file extension -
	  assimp calls all importers in the order in which they
	  are registered and each importer gets the opportunity
	  to load the file until one importer "claims" the file. Apart
	  from file extension checks, importers typically use
	  other methods to quickly reject files (i.e. magic
	  words) so this does not mean that common or generic
	  file extensions such as XML would be tediously slow. */
	FileExtensions []string
	Magic          string
}

type AiImporterFlags

type AiImporterFlags int
const (
	/** Indicates that there is a textual encoding of the
	 *  file format; and that it is supported.*/
	AiImporterFlags_SupportTextFlavour AiImporterFlags = 0x1

	/** Indicates that there is a binary encoding of the
	 *  file format; and that it is supported.*/
	AiImporterFlags_SupportBinaryFlavour AiImporterFlags = 0x2

	/** Indicates that there is a compressed encoding of the
	 *  file format; and that it is supported.*/
	AiImporterFlags_SupportCompressedFlavour AiImporterFlags = 0x4

	/** Indicates that the importer reads only a very particular
	 * subset of the file format. This happens commonly for
	 * declarative or procedural formats which cannot easily
	 * be mapped to #aiScene */
	AiImporterFlags_LimitedSupport AiImporterFlags = 0x8

	/** Indicates that the importer is highly experimental and
	 * should be used with care. This only happens for trunk
	 * (i.e. SVN) versions, experimental code is not included
	 * in releases. */
	AiImporterFlags_Experimental AiImporterFlags = 0x10
)

type AiLight

type AiLight struct {
	/** The name of the light source.
	 *
	 *  There must be a node in the scene-graph with the same name.
	 *  This node specifies the position of the light in the scene
	 *  hierarchy and can be animated.
	 */
	Name string

	/** The type of the light source.
	 *
	 * aiLightSource_UNDEFINED is not a valid value for this member.
	 */
	Type AiLightSourceType

	/** Position of the light source in space. Relative to the
	 *  transformation of the node corresponding to the light.
	 *
	 *  The position is undefined for directional lights.
	 */
	Position *common.AiVector3D

	/** Direction of the light source in space. Relative to the
	 *  transformation of the node corresponding to the light.
	 *
	 *  The direction is undefined for point lights. The vector
	 *  may be normalized, but it needn't.
	 */
	Direction *common.AiVector3D

	/** Up direction of the light source in space. Relative to the
	 *  transformation of the node corresponding to the light.
	 *
	 *  The direction is undefined for point lights. The vector
	 *  may be normalized, but it needn't.
	 */
	Up *common.AiVector3D

	/** Constant light attenuation factor.
	 *
	 *  The intensity of the light source at a given distance 'd' from
	 *  the light's position is
	 *  @code
	 *  Atten = 1/( att0 + att1 * d + att2 * d*d)
	 *  @endcode
	 *  This member corresponds to the att0 variable in the equation.
	 *  Naturally undefined for directional lights.
	 */
	AttenuationConstant float32

	/** Linear light attenuation factor.
	 *
	 *  The intensity of the light source at a given distance 'd' from
	 *  the light's position is
	 *  @code
	 *  Atten = 1/( att0 + att1 * d + att2 * d*d)
	 *  @endcode
	 *  This member corresponds to the att1 variable in the equation.
	 *  Naturally undefined for directional lights.
	 */
	AttenuationLinear float32

	/** Quadratic light attenuation factor.
	 *
	 *  The intensity of the light source at a given distance 'd' from
	 *  the light's position is
	 *  @code
	 *  Atten = 1/( att0 + att1 * d + att2 * d*d)
	 *  @endcode
	 *  This member corresponds to the att2 variable in the equation.
	 *  Naturally undefined for directional lights.
	 */
	AttenuationQuadratic float32

	/** Diffuse color of the light source
	 *
	 *  The diffuse light color is multiplied with the diffuse
	 *  material color to obtain the final color that contributes
	 *  to the diffuse shading term.
	 */
	ColorDiffuse *common.AiColor3D

	/** Specular color of the light source
	 *
	 *  The specular light color is multiplied with the specular
	 *  material color to obtain the final color that contributes
	 *  to the specular shading term.
	 */
	ColorSpecular *common.AiColor3D

	/** Ambient color of the light source
	 *
	 *  The ambient light color is multiplied with the ambient
	 *  material color to obtain the final color that contributes
	 *  to the ambient shading term. Most renderers will ignore
	 *  this value it, is just a remaining of the fixed-function pipeline
	 *  that is still supported by quite many file formats.
	 */
	ColorAmbient *common.AiColor3D

	/** Inner angle of a spot light's light cone.
	 *
	 *  The spot light has maximum influence on objects inside this
	 *  angle. The angle is given in radians. It is 2PI for point
	 *  lights and undefined for directional lights.
	 */
	AngleInnerCone float32

	/** Outer angle of a spot light's light cone.
	 *
	 *  The spot light does not affect objects outside this angle.
	 *  The angle is given in radians. It is 2PI for point lights and
	 *  undefined for directional lights. The outer angle must be
	 *  greater than or equal to the inner angle.
	 *  It is assumed that the application uses a smooth
	 *  interpolation between the inner and the outer cone of the
	 *  spot light.
	 */
	AngleOuterCone float32

	/** Size of area light source. */
	Size *common.AiVector2D
}

func NewAiLight

func NewAiLight() *AiLight

func (*AiLight) Clone

func (ai *AiLight) Clone() *AiLight

func (*AiLight) FromPbMsg

func (ai *AiLight) FromPbMsg(p *pb_msg.AiLight) *AiLight

func (*AiLight) ToPbMsg

func (ai *AiLight) ToPbMsg() *pb_msg.AiLight

type AiLightSourceType

type AiLightSourceType int
const (
	AiLightSource_UNDEFINED AiLightSourceType = 0x0

	//! A directional light source has a well-defined direction
	//! but is infinitely far away. That's quite a good
	//! approximation for sun light.
	AiLightSource_DIRECTIONAL AiLightSourceType = 0x1

	//! A point light source has a well-defined position
	//! in space but no direction - it emits light in all
	//! directions. A normal bulb is a point light.
	AiLightSource_POINT AiLightSourceType = 0x2

	//! A spot light source emits light in a specific
	//! angle. It has a position and a direction it is pointing to.
	//! A good example for a spot light is a light spot in
	//! sport arenas.
	AiLightSource_SPOT AiLightSourceType = 0x3

	//! The generic light level of the world, including the bounces
	//! of all other light sources.
	//! Typically, there's at most one ambient light in a scene.
	//! This light type doesn't have a valid position, direction, or
	//! other properties, just a color.
	AiLightSource_AMBIENT AiLightSourceType = 0x4

	//! An area light is a rectangle with predefined size that uniformly
	//! emits light from one of its sides. The position is center of the
	//! rectangle and direction is its normal vector.
	AiLightSource_AREA AiLightSourceType = 0x5
)

type AiMaterial

type AiMaterial struct {
	/** List of all material properties loaded. */
	Properties []*AiMaterialProperty
}

func (*AiMaterial) AddAiColor3DPropertyVar

func (ai *AiMaterial) AddAiColor3DPropertyVar(pro AiMaterialProperty, data *common.AiColor3D)

func (*AiMaterial) AddAiUVTransformPropertyVar

func (ai *AiMaterial) AddAiUVTransformPropertyVar(pro AiMaterialProperty, data AiUVTransform)

func (*AiMaterial) AddAiVector3DPropertyVar

func (ai *AiMaterial) AddAiVector3DPropertyVar(pro AiMaterialProperty, data *common.AiVector3D)

func (*AiMaterial) AddFloat32PropertyVar

func (ai *AiMaterial) AddFloat32PropertyVar(pro AiMaterialProperty, data ...float32)

func (*AiMaterial) AddInt64PropertyVar

func (ai *AiMaterial) AddInt64PropertyVar(pro AiMaterialProperty, data ...int64)

func (*AiMaterial) AddProperty

func (ai *AiMaterial) AddProperty(pro AiMaterialProperty)

func (*AiMaterial) AddStringPropertyVar

func (ai *AiMaterial) AddStringPropertyVar(pro AiMaterialProperty, data ...string)

func (*AiMaterial) Clone

func (ai *AiMaterial) Clone() *AiMaterial

func (*AiMaterial) FromPbMsg

func (ai *AiMaterial) FromPbMsg(p *pb_msg.AiMaterial) *AiMaterial

func (*AiMaterial) GetGetMaterialTextureCount

func (ai *AiMaterial) GetGetMaterialTextureCount(Type AiTextureType) int

func (*AiMaterial) GetPropByKey

func (ai *AiMaterial) GetPropByKey(Type AiTextureType, key string, index int) interface{}

func (*AiMaterial) ToPbMsg

func (ai *AiMaterial) ToPbMsg() *pb_msg.AiMaterial

type AiMaterialProperty

type AiMaterialProperty struct {
	/** Specifies the name of the property (key)
	 *  Keys are generally case insensitive.
	 */
	Key string

	/** Textures: Specifies their exact usage semantic.
	 * For non-texture properties, this member is always 0
	 * (or, better-said, #AiTextureType_NONE).
	 */
	Semantic uint32

	/** Textures: Specifies the index of the texture.
	 *  For non-texture properties, this member is always 0.
	 */
	Index uint32
	/** Type information for the property.
	 *
	 * Defines the data layout inside the data buffer. This is used
	 * by the library internally to perform debug checks and to
	 * utilize proper type conversions.
	 * (It's probably a hacky solution, but it works.)
	 */
	Type pb_msg.AiMaterialPropertyType
	Data []byte
}

func AI_MATKEY_MAPPING

func AI_MATKEY_MAPPING(Type AiTextureType, N int) AiMaterialProperty

! @endcond ---------------------------------------------------------------------------

func AI_MATKEY_MAPPINGMODE_U

func AI_MATKEY_MAPPINGMODE_U(Type AiTextureType, N int) AiMaterialProperty

! @endcond ---------------------------------------------------------------------------

func AI_MATKEY_MAPPINGMODE_U_AMBIENT

func AI_MATKEY_MAPPINGMODE_U_AMBIENT(N int) AiMaterialProperty

func AI_MATKEY_MAPPINGMODE_U_DIFFUSE

func AI_MATKEY_MAPPINGMODE_U_DIFFUSE(N int) AiMaterialProperty

For backward compatibility and simplicity ! @cond MATS_DOC_FULL

func AI_MATKEY_MAPPINGMODE_U_DISPLACEMENT

func AI_MATKEY_MAPPINGMODE_U_DISPLACEMENT(N int) AiMaterialProperty

func AI_MATKEY_MAPPINGMODE_U_EMISSIVE

func AI_MATKEY_MAPPINGMODE_U_EMISSIVE(N int) AiMaterialProperty

func AI_MATKEY_MAPPINGMODE_U_HEIGHT

func AI_MATKEY_MAPPINGMODE_U_HEIGHT(N int) AiMaterialProperty

func AI_MATKEY_MAPPINGMODE_U_LIGHTMAP

func AI_MATKEY_MAPPINGMODE_U_LIGHTMAP(N int) AiMaterialProperty

func AI_MATKEY_MAPPINGMODE_U_NORMALS

func AI_MATKEY_MAPPINGMODE_U_NORMALS(N int) AiMaterialProperty

func AI_MATKEY_MAPPINGMODE_U_OPACITY

func AI_MATKEY_MAPPINGMODE_U_OPACITY(N int) AiMaterialProperty

func AI_MATKEY_MAPPINGMODE_U_REFLECTION

func AI_MATKEY_MAPPINGMODE_U_REFLECTION(N int) AiMaterialProperty

func AI_MATKEY_MAPPINGMODE_U_SHININESS

func AI_MATKEY_MAPPINGMODE_U_SHININESS(N int) AiMaterialProperty

func AI_MATKEY_MAPPINGMODE_U_SPECULAR

func AI_MATKEY_MAPPINGMODE_U_SPECULAR(N int) AiMaterialProperty

func AI_MATKEY_MAPPINGMODE_V

func AI_MATKEY_MAPPINGMODE_V(Type AiTextureType, N int) AiMaterialProperty

! @endcond ---------------------------------------------------------------------------

func AI_MATKEY_MAPPINGMODE_V_AMBIENT

func AI_MATKEY_MAPPINGMODE_V_AMBIENT(N int) AiMaterialProperty

func AI_MATKEY_MAPPINGMODE_V_DIFFUSE

func AI_MATKEY_MAPPINGMODE_V_DIFFUSE(N int) AiMaterialProperty

For backward compatibility and simplicity ! @cond MATS_DOC_FULL

func AI_MATKEY_MAPPINGMODE_V_DISPLACEMENT

func AI_MATKEY_MAPPINGMODE_V_DISPLACEMENT(N int) AiMaterialProperty

func AI_MATKEY_MAPPINGMODE_V_EMISSIVE

func AI_MATKEY_MAPPINGMODE_V_EMISSIVE(N int) AiMaterialProperty

func AI_MATKEY_MAPPINGMODE_V_HEIGHT

func AI_MATKEY_MAPPINGMODE_V_HEIGHT(N int) AiMaterialProperty

func AI_MATKEY_MAPPINGMODE_V_LIGHTMAP

func AI_MATKEY_MAPPINGMODE_V_LIGHTMAP(N int) AiMaterialProperty

func AI_MATKEY_MAPPINGMODE_V_NORMALS

func AI_MATKEY_MAPPINGMODE_V_NORMALS(N int) AiMaterialProperty

func AI_MATKEY_MAPPINGMODE_V_OPACITY

func AI_MATKEY_MAPPINGMODE_V_OPACITY(N int) AiMaterialProperty

func AI_MATKEY_MAPPINGMODE_V_REFLECTION

func AI_MATKEY_MAPPINGMODE_V_REFLECTION(N int) AiMaterialProperty

func AI_MATKEY_MAPPINGMODE_V_SHININESS

func AI_MATKEY_MAPPINGMODE_V_SHININESS(N int) AiMaterialProperty

func AI_MATKEY_MAPPINGMODE_V_SPECULAR

func AI_MATKEY_MAPPINGMODE_V_SPECULAR(N int) AiMaterialProperty

func AI_MATKEY_MAPPING_AMBIENT

func AI_MATKEY_MAPPING_AMBIENT(N int) AiMaterialProperty

func AI_MATKEY_MAPPING_DIFFUSE

func AI_MATKEY_MAPPING_DIFFUSE(N int) AiMaterialProperty

For backward compatibility and simplicity ! @cond MATS_DOC_FULL

func AI_MATKEY_MAPPING_DISPLACEMENT

func AI_MATKEY_MAPPING_DISPLACEMENT(N int) AiMaterialProperty

func AI_MATKEY_MAPPING_EMISSIVE

func AI_MATKEY_MAPPING_EMISSIVE(N int) AiMaterialProperty

func AI_MATKEY_MAPPING_HEIGHT

func AI_MATKEY_MAPPING_HEIGHT(N int) AiMaterialProperty

func AI_MATKEY_MAPPING_LIGHTMAP

func AI_MATKEY_MAPPING_LIGHTMAP(N int) AiMaterialProperty

func AI_MATKEY_MAPPING_NORMALS

func AI_MATKEY_MAPPING_NORMALS(N int) AiMaterialProperty

func AI_MATKEY_MAPPING_OPACITY

func AI_MATKEY_MAPPING_OPACITY(N int) AiMaterialProperty

func AI_MATKEY_MAPPING_REFLECTION

func AI_MATKEY_MAPPING_REFLECTION(N int) AiMaterialProperty

func AI_MATKEY_MAPPING_SHININESS

func AI_MATKEY_MAPPING_SHININESS(N int) AiMaterialProperty

func AI_MATKEY_MAPPING_SPECULAR

func AI_MATKEY_MAPPING_SPECULAR(N int) AiMaterialProperty

func AI_MATKEY_TEXBLEND

func AI_MATKEY_TEXBLEND(Type AiTextureType, N int) AiMaterialProperty

! @endcond ---------------------------------------------------------------------------

func AI_MATKEY_TEXBLEND_AMBIENT

func AI_MATKEY_TEXBLEND_AMBIENT(N int) AiMaterialProperty

func AI_MATKEY_TEXBLEND_DIFFUSE

func AI_MATKEY_TEXBLEND_DIFFUSE(N int) AiMaterialProperty

For backward compatibility and simplicity ! @cond MATS_DOC_FULL

func AI_MATKEY_TEXBLEND_DISPLACEMENT

func AI_MATKEY_TEXBLEND_DISPLACEMENT(N int) AiMaterialProperty

func AI_MATKEY_TEXBLEND_EMISSIVE

func AI_MATKEY_TEXBLEND_EMISSIVE(N int) AiMaterialProperty

func AI_MATKEY_TEXBLEND_HEIGHT

func AI_MATKEY_TEXBLEND_HEIGHT(N int) AiMaterialProperty

func AI_MATKEY_TEXBLEND_LIGHTMAP

func AI_MATKEY_TEXBLEND_LIGHTMAP(N int) AiMaterialProperty

func AI_MATKEY_TEXBLEND_NORMALS

func AI_MATKEY_TEXBLEND_NORMALS(N int) AiMaterialProperty

func AI_MATKEY_TEXBLEND_OPACITY

func AI_MATKEY_TEXBLEND_OPACITY(N int) AiMaterialProperty

func AI_MATKEY_TEXBLEND_REFLECTION

func AI_MATKEY_TEXBLEND_REFLECTION(N int) AiMaterialProperty

func AI_MATKEY_TEXBLEND_SHININESS

func AI_MATKEY_TEXBLEND_SHININESS(N int) AiMaterialProperty

func AI_MATKEY_TEXBLEND_SPECULAR

func AI_MATKEY_TEXBLEND_SPECULAR(N int) AiMaterialProperty

func AI_MATKEY_TEXFLAGS

func AI_MATKEY_TEXFLAGS(Type AiTextureType, N int) AiMaterialProperty

! @endcond ---------------------------------------------------------------------------

func AI_MATKEY_TEXFLAGS_AMBIENT

func AI_MATKEY_TEXFLAGS_AMBIENT(N int) AiMaterialProperty

func AI_MATKEY_TEXFLAGS_DIFFUSE

func AI_MATKEY_TEXFLAGS_DIFFUSE(N int) AiMaterialProperty

For backward compatibility and simplicity ! @cond MATS_DOC_FULL

func AI_MATKEY_TEXFLAGS_DISPLACEMENT

func AI_MATKEY_TEXFLAGS_DISPLACEMENT(N int) AiMaterialProperty

func AI_MATKEY_TEXFLAGS_EMISSIVE

func AI_MATKEY_TEXFLAGS_EMISSIVE(N int) AiMaterialProperty

func AI_MATKEY_TEXFLAGS_HEIGHT

func AI_MATKEY_TEXFLAGS_HEIGHT(N int) AiMaterialProperty

func AI_MATKEY_TEXFLAGS_LIGHTMAP

func AI_MATKEY_TEXFLAGS_LIGHTMAP(N int) AiMaterialProperty

func AI_MATKEY_TEXFLAGS_NORMALS

func AI_MATKEY_TEXFLAGS_NORMALS(N int) AiMaterialProperty

func AI_MATKEY_TEXFLAGS_OPACITY

func AI_MATKEY_TEXFLAGS_OPACITY(N int) AiMaterialProperty

func AI_MATKEY_TEXFLAGS_REFLECTION

func AI_MATKEY_TEXFLAGS_REFLECTION(N int) AiMaterialProperty

func AI_MATKEY_TEXFLAGS_SHININESS

func AI_MATKEY_TEXFLAGS_SHININESS(N int) AiMaterialProperty

func AI_MATKEY_TEXFLAGS_SPECULAR

func AI_MATKEY_TEXFLAGS_SPECULAR(N int) AiMaterialProperty

func AI_MATKEY_TEXFLAGS_UNKNOWN

func AI_MATKEY_TEXFLAGS_UNKNOWN(N int) AiMaterialProperty

func AI_MATKEY_TEXMAP_AXIS

func AI_MATKEY_TEXMAP_AXIS(Type AiTextureType, N int) AiMaterialProperty

! @endcond ---------------------------------------------------------------------------

func AI_MATKEY_TEXMAP_AXIS_AMBIENT

func AI_MATKEY_TEXMAP_AXIS_AMBIENT(N int) AiMaterialProperty

func AI_MATKEY_TEXMAP_AXIS_DIFFUSE

func AI_MATKEY_TEXMAP_AXIS_DIFFUSE(N int) AiMaterialProperty

For backward compatibility and simplicity ! @cond MATS_DOC_FULL

func AI_MATKEY_TEXMAP_AXIS_DISPLACEMENT

func AI_MATKEY_TEXMAP_AXIS_DISPLACEMENT(N int) AiMaterialProperty

func AI_MATKEY_TEXMAP_AXIS_EMISSIVE

func AI_MATKEY_TEXMAP_AXIS_EMISSIVE(N int) AiMaterialProperty

func AI_MATKEY_TEXMAP_AXIS_HEIGHT

func AI_MATKEY_TEXMAP_AXIS_HEIGHT(N int) AiMaterialProperty

func AI_MATKEY_TEXMAP_AXIS_LIGHTMAP

func AI_MATKEY_TEXMAP_AXIS_LIGHTMAP(N int) AiMaterialProperty

func AI_MATKEY_TEXMAP_AXIS_NORMALS

func AI_MATKEY_TEXMAP_AXIS_NORMALS(N int) AiMaterialProperty

func AI_MATKEY_TEXMAP_AXIS_OPACITY

func AI_MATKEY_TEXMAP_AXIS_OPACITY(N int) AiMaterialProperty

func AI_MATKEY_TEXMAP_AXIS_REFLECTION

func AI_MATKEY_TEXMAP_AXIS_REFLECTION(N int) AiMaterialProperty

func AI_MATKEY_TEXMAP_AXIS_SHININESS

func AI_MATKEY_TEXMAP_AXIS_SHININESS(N int) AiMaterialProperty

func AI_MATKEY_TEXMAP_AXIS_SPECULAR

func AI_MATKEY_TEXMAP_AXIS_SPECULAR(N int) AiMaterialProperty

func AI_MATKEY_TEXOP

func AI_MATKEY_TEXOP(Type AiTextureType, N int) AiMaterialProperty

! @endcond ---------------------------------------------------------------------------

func AI_MATKEY_TEXOP_AMBIENT

func AI_MATKEY_TEXOP_AMBIENT(N int) AiMaterialProperty

func AI_MATKEY_TEXOP_DIFFUSE

func AI_MATKEY_TEXOP_DIFFUSE(N int) AiMaterialProperty

For backward compatibility and simplicity ! @cond MATS_DOC_FULL

func AI_MATKEY_TEXOP_DISPLACEMENT

func AI_MATKEY_TEXOP_DISPLACEMENT(N int) AiMaterialProperty

func AI_MATKEY_TEXOP_EMISSIVE

func AI_MATKEY_TEXOP_EMISSIVE(N int) AiMaterialProperty

func AI_MATKEY_TEXOP_HEIGHT

func AI_MATKEY_TEXOP_HEIGHT(N int) AiMaterialProperty

func AI_MATKEY_TEXOP_LIGHTMAP

func AI_MATKEY_TEXOP_LIGHTMAP(N int) AiMaterialProperty

func AI_MATKEY_TEXOP_NORMALS

func AI_MATKEY_TEXOP_NORMALS(N int) AiMaterialProperty

func AI_MATKEY_TEXOP_OPACITY

func AI_MATKEY_TEXOP_OPACITY(N int) AiMaterialProperty

func AI_MATKEY_TEXOP_REFLECTION

func AI_MATKEY_TEXOP_REFLECTION(N int) AiMaterialProperty

func AI_MATKEY_TEXOP_SHININESS

func AI_MATKEY_TEXOP_SHININESS(N int) AiMaterialProperty

func AI_MATKEY_TEXOP_SPECULAR

func AI_MATKEY_TEXOP_SPECULAR(N int) AiMaterialProperty

func AI_MATKEY_TEXTURE

func AI_MATKEY_TEXTURE(Type AiTextureType, N int) AiMaterialProperty

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

func AI_MATKEY_TEXTURE_AMBIENT

func AI_MATKEY_TEXTURE_AMBIENT(N int) AiMaterialProperty

func AI_MATKEY_TEXTURE_DIFFUSE

func AI_MATKEY_TEXTURE_DIFFUSE(N int) AiMaterialProperty

For backward compatibility and simplicity ! @cond MATS_DOC_FULL

func AI_MATKEY_TEXTURE_DISPLACEMENT

func AI_MATKEY_TEXTURE_DISPLACEMENT(N int) AiMaterialProperty

func AI_MATKEY_TEXTURE_EMISSIVE

func AI_MATKEY_TEXTURE_EMISSIVE(N int) AiMaterialProperty

func AI_MATKEY_TEXTURE_HEIGHT

func AI_MATKEY_TEXTURE_HEIGHT(N int) AiMaterialProperty

func AI_MATKEY_TEXTURE_LIGHTMAP

func AI_MATKEY_TEXTURE_LIGHTMAP(N int) AiMaterialProperty

func AI_MATKEY_TEXTURE_NORMALS

func AI_MATKEY_TEXTURE_NORMALS(N int) AiMaterialProperty

func AI_MATKEY_TEXTURE_OPACITY

func AI_MATKEY_TEXTURE_OPACITY(N int) AiMaterialProperty

func AI_MATKEY_TEXTURE_REFLECTION

func AI_MATKEY_TEXTURE_REFLECTION(N int) AiMaterialProperty

func AI_MATKEY_TEXTURE_SHININESS

func AI_MATKEY_TEXTURE_SHININESS(N int) AiMaterialProperty

func AI_MATKEY_TEXTURE_SPECULAR

func AI_MATKEY_TEXTURE_SPECULAR(N int) AiMaterialProperty

func AI_MATKEY_UVTRANSFORM

func AI_MATKEY_UVTRANSFORM(Type AiTextureType, N int) AiMaterialProperty

! @endcond ---------------------------------------------------------------------------

func AI_MATKEY_UVTRANSFORM_AMBIENT

func AI_MATKEY_UVTRANSFORM_AMBIENT(N int) AiMaterialProperty

func AI_MATKEY_UVTRANSFORM_DIFFUSE

func AI_MATKEY_UVTRANSFORM_DIFFUSE(N int) AiMaterialProperty

For backward compatibility and simplicity ! @cond MATS_DOC_FULL

func AI_MATKEY_UVTRANSFORM_DISPLACEMENT

func AI_MATKEY_UVTRANSFORM_DISPLACEMENT(N int) AiMaterialProperty

func AI_MATKEY_UVTRANSFORM_EMISSIVE

func AI_MATKEY_UVTRANSFORM_EMISSIVE(N int) AiMaterialProperty

func AI_MATKEY_UVTRANSFORM_HEIGHT

func AI_MATKEY_UVTRANSFORM_HEIGHT(N int) AiMaterialProperty

func AI_MATKEY_UVTRANSFORM_LIGHTMAP

func AI_MATKEY_UVTRANSFORM_LIGHTMAP(N int) AiMaterialProperty

func AI_MATKEY_UVTRANSFORM_NORMALS

func AI_MATKEY_UVTRANSFORM_NORMALS(N int) AiMaterialProperty

func AI_MATKEY_UVTRANSFORM_OPACITY

func AI_MATKEY_UVTRANSFORM_OPACITY(N int) AiMaterialProperty

func AI_MATKEY_UVTRANSFORM_REFLECTION

func AI_MATKEY_UVTRANSFORM_REFLECTION(N int) AiMaterialProperty

func AI_MATKEY_UVTRANSFORM_SHININESS

func AI_MATKEY_UVTRANSFORM_SHININESS(N int) AiMaterialProperty

func AI_MATKEY_UVTRANSFORM_SPECULAR

func AI_MATKEY_UVTRANSFORM_SPECULAR(N int) AiMaterialProperty

func AI_MATKEY_UVTRANSFORM_UNKNOWN

func AI_MATKEY_UVTRANSFORM_UNKNOWN(N int) AiMaterialProperty

func AI_MATKEY_UVWSRC

func AI_MATKEY_UVWSRC(Type AiTextureType, N int) AiMaterialProperty

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

func AI_MATKEY_UVWSRC_AMBIENT

func AI_MATKEY_UVWSRC_AMBIENT(N int) AiMaterialProperty

func AI_MATKEY_UVWSRC_DIFFUSE

func AI_MATKEY_UVWSRC_DIFFUSE(N int) AiMaterialProperty

For backward compatibility and simplicity ! @cond MATS_DOC_FULL

func AI_MATKEY_UVWSRC_DISPLACEMENT

func AI_MATKEY_UVWSRC_DISPLACEMENT(N int) AiMaterialProperty

func AI_MATKEY_UVWSRC_EMISSIVE

func AI_MATKEY_UVWSRC_EMISSIVE(N int) AiMaterialProperty

func AI_MATKEY_UVWSRC_HEIGHT

func AI_MATKEY_UVWSRC_HEIGHT(N int) AiMaterialProperty

func AI_MATKEY_UVWSRC_LIGHTMAP

func AI_MATKEY_UVWSRC_LIGHTMAP(N int) AiMaterialProperty

func AI_MATKEY_UVWSRC_NORMALS

func AI_MATKEY_UVWSRC_NORMALS(N int) AiMaterialProperty

func AI_MATKEY_UVWSRC_OPACITY

func AI_MATKEY_UVWSRC_OPACITY(N int) AiMaterialProperty

func AI_MATKEY_UVWSRC_REFLECTION

func AI_MATKEY_UVWSRC_REFLECTION(N int) AiMaterialProperty

func AI_MATKEY_UVWSRC_SHININESS

func AI_MATKEY_UVWSRC_SHININESS(N int) AiMaterialProperty

func AI_MATKEY_UVWSRC_SPECULAR

func AI_MATKEY_UVWSRC_SPECULAR(N int) AiMaterialProperty

func NewAiMaterialProperty

func NewAiMaterialProperty(key string, Type int, index int) AiMaterialProperty

func (*AiMaterialProperty) Clone

func (*AiMaterialProperty) FromPbMsg

func (*AiMaterialProperty) GetData

func (ai *AiMaterialProperty) GetData() (res interface{})

func (*AiMaterialProperty) GetProtoData

func (ai *AiMaterialProperty) GetProtoData() (msg proto.Message)

func (AiMaterialProperty) ResetData

func (ai AiMaterialProperty) ResetData() AiMaterialProperty

func (*AiMaterialProperty) ToPbMsg

func (*AiMaterialProperty) UpdateData

func (ai *AiMaterialProperty) UpdateData(fn func(v proto.Message))

type AiMesh

type AiMesh struct {
	/**
	 * Bitwise combination of the members of the #AiPrimitiveType enum.
	 * This specifies which types of primitives are present in the mesh.
	 * The "SortByPrimitiveType"-Step can be used to make sure the
	 * output meshes consist of one primitive type each.
	 */
	PrimitiveTypes AiPrimitiveType
	/**
	 * @brief Vertex positions.
	 *
	 * This array is always present in a mesh. The array is
	 * mNumVertices in size.
	 */
	Vertices []*common.AiVector3D

	/**
	 * @brief Vertex normals.
	 *
	 * The array contains normalized vectors, nullptr if not present.
	 * The array is mNumVertices in size. Normals are undefined for
	 * point and line primitives. A mesh consisting of points and
	 * lines only may not have normal vectors. Meshes with mixed
	 * primitive types (i.e. lines and triangles) may have normals,
	 * but the normals for vertices that are only referenced by
	 * point or line primitives are undefined and set to QNaN (WARN:
	 * qNaN compares to inequal to *everything*, even to qNaN itself.
	 * Using code like this to check whether a field is qnan is:
	 * @code
	 * IS_QNAN(f) (f != f)
	 * @endcode
	 * still dangerous because even 1.f == 1.f could evaluate to false! (
	 * remember the subtleties of IEEE754 artithmetics). Use stuff like
	 * @c fpclassify instead.
	 * @note Normal vectors computed by Assimp are always unit-length.
	 * However, this needn't apply for normals that have been taken
	 * directly from the model file.
	 */
	Normals []*common.AiVector3D

	/**
	 * @brief Vertex tangents.
	 *
	 * The tangent of a vertex points in the direction of the positive
	 * X texture axis. The array contains normalized vectors, nullptr if
	 * not present. The array is mNumVertices in size. A mesh consisting
	 * of points and lines only may not have normal vectors. Meshes with
	 * mixed primitive types (i.e. lines and triangles) may have
	 * normals, but the normals for vertices that are only referenced by
	 * point or line primitives are undefined and set to qNaN.  See
	 * the #mNormals member for a detailed discussion of qNaNs.
	 * @note If the mesh contains tangents, it automatically also
	 * contains bitangents.
	 */
	Tangents []*common.AiVector3D

	/**
	 * @brief Vertex bitangents.
	 *
	 * The bitangent of a vertex points in the direction of the positive
	 * Y texture axis. The array contains normalized vectors, nullptr if not
	 * present. The array is mNumVertices in size.
	 * @note If the mesh contains tangents, it automatically also contains
	 * bitangents.
	 */
	Bitangents []*common.AiVector3D

	/**
	 * @brief Vertex color sets.
	 *
	 * A mesh may contain 0 to #AI_MAX_NUMBER_OF_COLOR_SETS vertex
	 * colors per vertex. nullptr if not present. Each array is
	 * mNumVertices in size if present.
	 */
	Colors [][]*common.AiColor4D

	/**
	 * @brief Vertex texture coordinates, also known as UV channels.
	 *
	 * A mesh may contain 0 to AI_MAX_NUMBER_OF_TEXTURECOORDS per
	 * vertex. nullptr if not present. The array is mNumVertices in size.
	 */
	TextureCoords [][]*common.AiVector3D

	/**
	 * @brief Specifies the number of components for a given UV channel.
	 *
	 * Up to three channels are supported (UVW, for accessing volume
	 * or cube maps). If the value is 2 for a given channel n, the
	 * component p.z of mTextureCoords[n][p] is set to 0.0f.
	 * If the value is 1 for a given channel, p.y is set to 0.0f, too.
	 * @note 4D coordinates are not supported
	 */
	NumUVComponents []uint32

	/**
	 * @brief The faces the mesh is constructed from.
	 *
	 * Each face refers to a number of vertices by their indices.
	 * This array is always present in a mesh, its size is given
	 *  in mNumFaces. If the #AI_SCENE_FLAGS_NON_VERBOSE_FORMAT
	 * is NOT set each face references an unique set of vertices.
	 */
	Faces []*AiFace
	/**
	 * @brief The bones of this mesh.
	 *
	 * A bone consists of a name by which it can be found in the
	 * frame hierarchy and a set of vertex weights.
	 */
	Bones []*AiBone

	/**
	 * @brief The material used by this mesh.
	 *
	 * A mesh uses only a single material. If an imported model uses
	 * multiple materials, the import splits up the mesh. Use this value
	 * as index into the scene's material list.
	 */
	MaterialIndex int32

	/**
	 *  Name of the mesh. Meshes can be named, but this is not a
	 *  requirement and leaving this field empty is totally fine.
	 *  There are mainly three uses for mesh names:
	 *   - some formats name nodes and meshes independently.
	 *   - importers tend to split meshes up to meet the
	 *      one-material-per-mesh requirement. Assigning
	 *      the same (dummy) name to each of the result meshes
	 *      aids the caller at recovering the original mesh
	 *      partitioning.
	 *   - Vertex animations refer to meshes by their names.
	 */
	Name string
	/**
	 * Attachment meshes for this mesh, for vertex-based animation.
	 * Attachment meshes carry replacement data for some of the
	 * mesh'es vertex components (usually positions, normals).
	 * Currently known to work with loaders:
	 * - Collada
	 * - gltf
	 */
	AnimMeshes []*AiAnimMesh

	/**
	 *  Method of morphing when anim-meshes are specified.
	 *  @see aiMorphingMethod to learn more about the provided morphing targets.
	 */
	Method AiMorphingMethod

	/**
	 *  The bounding box.
	 */
	AABB *AiAABB

	/**
	 * Vertex UV stream names. Pointer to array of size AI_MAX_NUMBER_OF_TEXTURECOORDS
	 */
	TextureCoordsNames []string
}

func NewAiMesh

func NewAiMesh() *AiMesh

func (*AiMesh) Clone

func (ai *AiMesh) Clone() *AiMesh

func (*AiMesh) FromPbMsg

func (ai *AiMesh) FromPbMsg(p *pb_msg.AiMesh) *AiMesh

func (*AiMesh) GetNumColorChannels

func (ai *AiMesh) GetNumColorChannels() int

! @brief Get the number of vertex color channels the mesh contains. ! @return The number of stored color channels.

func (*AiMesh) GetNumUVChannels

func (ai *AiMesh) GetNumUVChannels() int

! @brief Get the number of UV channels the mesh contains. ! @return the number of stored uv-channels.

func (*AiMesh) GetTextureCoordsName

func (ai *AiMesh) GetTextureCoordsName(index uint32) string

! @brief Get a texture coordinate set name ! @param pIndex Index of the texture coordinates set ! @return The texture coordinate name.

func (*AiMesh) HasBones

func (ai *AiMesh) HasBones() bool

! @brief Check whether the mesh contains bones. ! @return true, if bones are stored.

func (*AiMesh) HasFaces

func (ai *AiMesh) HasFaces() bool

! @brief Check whether the mesh contains faces. If no special scene flags ! are set this should always return true ! @return true, if faces are stored, false if not.

func (*AiMesh) HasNormals

func (ai *AiMesh) HasNormals() bool

! @brief Check whether the mesh contains normal vectors ! @return true, if normals are stored, false if not.

func (*AiMesh) HasPositions

func (ai *AiMesh) HasPositions() bool

! @brief Check whether the mesh contains positions. Provided no special ! scene flags are set, this will always be true ! @return true, if positions are stored, false if not.

func (*AiMesh) HasTangentsAndBitangents

func (ai *AiMesh) HasTangentsAndBitangents() bool

! @brief Check whether the mesh contains tangent and bitangent vectors. ! ! It is not possible that it contains tangents and no bitangents ! (or the other way round). The existence of one of them ! implies that the second is there, too. ! @return true, if tangents and bi-tangents are stored, false if not.

func (*AiMesh) HasTextureCoords

func (ai *AiMesh) HasTextureCoords(index uint32) bool

! @brief Check whether the mesh contains a texture coordinate set ! @param index Index of the texture coordinates set ! @return true, if texture coordinates are stored, false if not.

func (*AiMesh) HasTextureCoordsName

func (ai *AiMesh) HasTextureCoordsName(pIndex uint32) bool

! @brief Check whether the mesh contains a texture coordinate set name ! @param pIndex Index of the texture coordinates set ! @return true, if texture coordinates for the index exists.

func (*AiMesh) HasVertexColors

func (ai *AiMesh) HasVertexColors(index int) bool

! @brief Check whether the mesh contains a vertex color set ! @param index Index of the vertex color set ! @return true, if vertex colors are stored, false if not.

func (*AiMesh) ToPbMsg

func (ai *AiMesh) ToPbMsg() *pb_msg.AiMesh

type AiMeshAnim

type AiMeshAnim struct {
	/** Name of the mesh to be animated. An empty string is not allowed,
	 *  animated meshes need to be named (not necessarily uniquely,
	 *  the name can basically serve as wild-card to select a group
	 *  of meshes with similar animation setup)*/
	Name string

	/** Key frames of the animation. May not be nullptr. */
	Keys []*AiMeshKey
}

func (*AiMeshAnim) Clone

func (ai *AiMeshAnim) Clone() *AiMeshAnim

func (*AiMeshAnim) FromPbMsg

func (ai *AiMeshAnim) FromPbMsg(p *pb_msg.AiMeshAnim) *AiMeshAnim

func (*AiMeshAnim) ToPbMsg

func (ai *AiMeshAnim) ToPbMsg() *pb_msg.AiMeshAnim

type AiMeshKey

type AiMeshKey struct {
	/** The time of this key */
	Time float64

	/** Index into the aiMesh::mAnimMeshes array of the
	 *  mesh corresponding to the #aiMeshAnim hosting this
	 *  key frame. The referenced anim mesh is evaluated
	 *  according to the rules defined in the docs for #aiAnimMesh.*/
	Value uint32
}

func (*AiMeshKey) Clone

func (ai *AiMeshKey) Clone() *AiMeshKey

func (*AiMeshKey) FromPbMsg

func (ai *AiMeshKey) FromPbMsg(p *pb_msg.AiMeshKey) *AiMeshKey

func (*AiMeshKey) ToPbMsg

func (ai *AiMeshKey) ToPbMsg() *pb_msg.AiMeshKey

type AiMeshMorphAnim

type AiMeshMorphAnim struct {
	/** Name of the mesh to be animated. An empty string is not allowed,
	 *  animated meshes need to be named (not necessarily uniquely,
	 *  the name can basically serve as wildcard to select a group
	 *  of meshes with similar animation setup)*/
	Name string
	/** Key frames of the animation. May not be nullptr. */
	Keys []*AiMeshMorphKey
}

func (*AiMeshMorphAnim) Clone

func (ai *AiMeshMorphAnim) Clone() *AiMeshMorphAnim

func (*AiMeshMorphAnim) FromPbMsg

func (*AiMeshMorphAnim) ToPbMsg

func (ai *AiMeshMorphAnim) ToPbMsg() *pb_msg.AiMeshMorphAnim

type AiMeshMorphKey

type AiMeshMorphKey struct {
	/** The time of this key */
	Time float64

	/** The values and weights at the time of this key
	 *   - mValues: index of attachment mesh to apply weight at the same position in mWeights
	 *   - mWeights: weight to apply to the blend shape index at the same position in mValues
	 */
	Values  []uint32
	Weights []float64
}

func (*AiMeshMorphKey) Clone

func (ai *AiMeshMorphKey) Clone() *AiMeshMorphKey

func (*AiMeshMorphKey) FromPbMsg

func (*AiMeshMorphKey) ToPbMsg

func (ai *AiMeshMorphKey) ToPbMsg() *pb_msg.AiMeshMorphKey

type AiMetadata

type AiMetadata struct {
	/** Arrays of keys, may not be NULL. Entries in this array may not be NULL as well. */
	Keys []string

	/** Arrays of values, may not be NULL. Entries in this array may be NULL if the
	 * corresponding property key has no assigned value. */
	Values []*AiMetadataEntry
}

func (*AiMetadata) Clone

func (ai *AiMetadata) Clone() *AiMetadata

func (*AiMetadata) FromPbMsg

func (ai *AiMetadata) FromPbMsg(data *pb_msg.AiMetadata) *AiMetadata

func (*AiMetadata) ToPbMsg

func (ai *AiMetadata) ToPbMsg() *pb_msg.AiMetadata

type AiMetadataEntry

type AiMetadataEntry struct {
	Type AiMetadataType
	Data any
}

func (*AiMetadataEntry) Clone

func (ai *AiMetadataEntry) Clone() *AiMetadataEntry

func (*AiMetadataEntry) FromPbMsg

func (ai *AiMetadataEntry) FromPbMsg(data *pb_msg.AiMetadataEntry) *AiMetadataEntry

func (*AiMetadataEntry) ToPbMsg

func (ai *AiMetadataEntry) ToPbMsg() *pb_msg.AiMetadataEntry

type AiMetadataType

type AiMetadataType int
const (
	AI_BOOL AiMetadataType = iota
	AI_INT32
	AI_UINT64
	AI_FLOAT
	AI_DOUBLE
	AI_AISTRING
	AI_AIVECTOR3D
	AI_AIMETADATA
	AI_INT64
	AI_UINT32
	AI_META_MAX
)

type AiMorphingMethod

type AiMorphingMethod int

type AiNode

type AiNode struct {
	/** The name of the node.
	 *
	 * The name might be empty (length of zero) but all nodes which
	 * need to be referenced by either bones or animations are named.
	 * Multiple nodes may have the same name, except for nodes which are referenced
	 * by bones (see #aiBone and #aiMesh::mBones). Their names *must* be unique.
	 *
	 * Cameras and lights reference a specific node by name - if there
	 * are multiple nodes with this name, they are assigned to each of them.
	 * <br>
	 * There are no limitations with regard to the characters contained in
	 * the name string as it is usually taken directly from the source file.
	 *
	 * Implementations should be able to handle tokens such as whitespace, tabs,
	 * line feeds, quotation marks, ampersands etc.
	 *
	 * Sometimes assimp introduces new nodes not present in the source file
	 * into the hierarchy (usually out of necessity because sometimes the
	 * source hierarchy format is simply not compatible). Their names are
	 * surrounded by @verbatim <> @endverbatim e.g.
	 *  @verbatim<DummyRootNode> @endverbatim.
	 */
	Name string
	/** The transformation relative to the node's parent. */
	Transformation *common.AiMatrix4x4
	/** Parent node. nullptr if this node is the root node. */
	Parent *AiNode
	/** The child nodes of this node. nullptr if mNumChildren is 0. */
	Children []*AiNode
	/** The meshes of this node. Each entry is an index into the
	 * mesh list of the #aiScene.
	 */
	Meshes []int32
	/** Metadata associated with this node or nullptr if there is no metadata.
	 *  Whether any metadata is generated depends on the source file format. See the
	 * @link importer_notes @endlink page for more information on every source file
	 * format. Importers that don't document any metadata don't write any.
	 */
	MetaData *AiMetadata
}

------------------------------------------------------------------------------- *

  • A node in the imported hierarchy. *
  • Each node has name, a parent node (except for the root node),
  • a transformation relative to its parent and possibly several child nodes.
  • Simple file formats don't support hierarchical structures - for these formats
  • the imported scene does consist of only a single root node without children.

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

func NewAiNode

func NewAiNode(name string) *AiNode

func (*AiNode) Clone

func (node *AiNode) Clone() *AiNode

func (*AiNode) FromPbMsg

func (node *AiNode) FromPbMsg(p *pb_msg.AiNode) *AiNode

func (*AiNode) ToPbMsg

func (node *AiNode) ToPbMsg() *pb_msg.AiNode

type AiNodeAnim

type AiNodeAnim struct {
	/** The name of the node affected by this animation. The node
	 *  must exist and it must be unique.*/
	NodeName string

	/** The position keys of this animation channel. Positions are
	 * specified as 3D vector. The array is mNumPositionKeys in size.
	 *
	 * If there are position keys, there will also be at least one
	 * scaling and one rotation key.*/
	PositionKeys []*common.AiVectorKey
	/** The rotation keys of this animation channel. Rotations are
	 *  given as quaternions,  which are 4D vectors. The array is
	 *  mNumRotationKeys in size.
	 *
	 * If there are rotation keys, there will also be at least one
	 * scaling and one position key. */
	RotationKeys []*common.AiQuatKey
	/** The scaling keys of this animation channel. Scalings are
	 *  specified as 3D vector. The array is mNumScalingKeys in size.
	 *
	 * If there are scaling keys, there will also be at least one
	 * position and one rotation key.*/
	ScalingKeys []*common.AiVectorKey

	/** Defines how the animation behaves before the first
	 *  key is encountered.
	 *
	 *  The default value is aiAnimBehaviour_DEFAULT (the original
	 *  transformation matrix of the affected node is used).*/
	PreState AiAnimBehaviour

	/** Defines how the animation behaves after the last
	 *  key was processed.
	 *
	 *  The default value is aiAnimBehaviour_DEFAULT (the original
	 *  transformation matrix of the affected node is taken).*/
	PostState AiAnimBehaviour
}

func (*AiNodeAnim) Clone

func (ai *AiNodeAnim) Clone() *AiNodeAnim

func (*AiNodeAnim) FromPbMsg

func (ai *AiNodeAnim) FromPbMsg(p *pb_msg.AiNodeAnim) *AiNodeAnim

func (*AiNodeAnim) ToPbMsg

func (ai *AiNodeAnim) ToPbMsg() *pb_msg.AiNodeAnim

type AiPrimitiveType

type AiPrimitiveType int

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

  • @brief Enumerates the types of geometric primitives supported by Assimp. *
  • @see aiFace Face data structure
  • @see aiProcess_SortByPType Per-primitive sorting of meshes
  • @see aiProcess_Triangulate Automatic triangulation
  • @see AI_CONFIG_PP_SBP_REMOVE Removal of specific primitive types.
const (
	/**
	 * @brief A point primitive.
	 *
	 * This is just a single vertex in the virtual world,
	 * #aiFace contains just one index for such a primitive.
	 */
	AiPrimitiveType_POINT AiPrimitiveType = 0x1

	/**
	 * @brief A line primitive.
	 *
	 * This is a line defined through a start and an end position.
	 * #aiFace contains exactly two indices for such a primitive.
	 */
	AiPrimitiveType_LINE AiPrimitiveType = 0x2

	/**
	 * @brief A triangular primitive.
	 *
	 * A triangle consists of three indices.
	 */
	AiPrimitiveType_TRIANGLE AiPrimitiveType = 0x4

	/**
	 * @brief A higher-level polygon with more than 3 edges.
	 *
	 * A triangle is a polygon, but polygon in this context means
	 * "all polygons that are not triangles". The "Triangulate"-Step
	 * is provided for your convenience, it splits all polygons in
	 * triangles (which are much easier to handle).
	 */
	AiPrimitiveType_POLYGON AiPrimitiveType = 0x8

	/**
	 * @brief A flag to determine whether this triangles only mesh is NGON encoded.
	 *
	 * NGON encoding is a special encoding that tells whether 2 or more consecutive triangles
	 * should be considered as a triangle fan. This is identified by looking at the first vertex index.
	 * 2 consecutive triangles with the same 1st vertex index are part of the same
	 * NGON.
	 *
	 * At the moment, only quads (concave or convex) are supported, meaning that polygons are 'seen' as
	 * triangles, as usual after a triangulation pass.
	 *
	 * To get an NGON encoded mesh, please use the aiProcess_Triangulate post process.
	 *
	 * @see aiProcess_Triangulate
	 * @link https://github.com/KhronosGroup/glTF/pull/1620
	 */
	AiPrimitiveType_NGONEncodingFlag AiPrimitiveType = 0x10
)

type AiPropertyTypeInfo

type AiPropertyTypeInfo uint32

! @cond AI_DOX_INCLUDE_INTERNAL --------------------------------------------------------------------------- * @brief A very primitive RTTI system for the contents of material

  • properties.
const (
	/** Array of single-precision (32 Bit) floats
	 *
	 *  It is possible to use aiGetMaterialInteger[Array]() (or the C++-API
	 *  aiMaterial::Get()) to query properties stored in floating-point format.
	 *  The material system performs the type conversion automatically.
	 */
	AiPTI_Float AiPropertyTypeInfo = 0x1

	/** Array of double-precision (64 Bit) floats
	 *
	 *  It is possible to use aiGetMaterialInteger[Array]() (or the C++-API
	 *  aiMaterial::Get()) to query properties stored in floating-point format.
	 *  The material system performs the type conversion automatically.
	 */
	AiPTI_Double AiPropertyTypeInfo = 0x2

	/** The material property is an aiString.
	 *
	 *  Arrays of strings aren't possible, aiGetMaterialString() (or the
	 *  C++-API aiMaterial::Get()) *must* be used to query a string property.
	 */
	AiPTI_String AiPropertyTypeInfo = 0x3
	/** Array of (32 Bit) integers
	 *
	 *  It is possible to use aiGetMaterialFloat[Array]() (or the C++-API
	 *  aiMaterial::Get()) to query properties stored in integer format.
	 *  The material system performs the type conversion automatically.
	 */
	AiPTI_Integer AiPropertyTypeInfo = 0x4
	/** Simple binary buffer, content undefined. Not convertible to anything.
	 */
	AiPTI_Buffer AiPropertyTypeInfo = 0x5
)

type AiScene

type AiScene struct {
	/** Any combination of the AI_SCENE_FLAGS_XXX flags. By default
	 * this value is 0, no flags are set. Most applications will
	 * want to reject all scenes with the AI_SCENE_FLAGS_INCOMPLETE
	 * bit set.
	 */
	Flags uint32

	/** The root node of the hierarchy.
	 *
	 * There will always be at least the root node if the import
	 * was successful (and no special flags have been set).
	 * Presence of further nodes depends on the format and content
	 * of the imported file.
	 */
	RootNode *AiNode
	/** The array of meshes.
	 *
	 * Use the indices given in the aiNode structure to access
	 * this array. The array is mNumMeshes in size. If the
	 * AI_SCENE_FLAGS_INCOMPLETE flag is not set there will always
	 * be at least ONE material.
	 */
	Meshes []*AiMesh
	/** The array of materials.
	 *
	 * Use the index given in each aiMesh structure to access this
	 * array. The array is mNumMaterials in size. If the
	 * AI_SCENE_FLAGS_INCOMPLETE flag is not set there will always
	 * be at least ONE material.
	 */
	Materials []*AiMaterial
	/** The array of animations.
	 *
	 * All animations imported from the given file are listed here.
	 * The array is mNumAnimations in size.
	 */
	Animations []*AiAnimation
	/** The array of embedded textures.
	 *
	 * Not many file formats embed their textures into the file.
	 * An example is Quake's MDL format (which is also used by
	 * some GameStudio versions)
	 */
	Textures []*AiTexture
	/** The array of light sources.
	 *
	 * All light sources imported from the given file are
	 * listed here. The array is mNumLights in size.
	 */
	Lights []*AiLight
	/** The array of cameras.
	 *
	 * All cameras imported from the given file are listed here.
	 * The array is mNumCameras in size. The first camera in the
	 * array (if existing) is the default camera view into
	 * the scene.
	 */
	Cameras []*AiCamera

	/**
	 *  @brief  The global metadata assigned to the scene itself.
	 *
	 *  This data contains global metadata which belongs to the scene like
	 *  unit-conversions, versions, vendors or other model-specific data. This
	 *  can be used to store format-specific metadata as well.
	 */
	MetaData []*AiMetadata

	/** The name of the scene itself.
	 */
	Name string
	/**
	 *
	 */
	Skeletons []*AiSkeleton
}

func (*AiScene) Clone

func (ai *AiScene) Clone() *AiScene

func (*AiScene) FromPbMsg

func (ai *AiScene) FromPbMsg(p *pb_msg.AiScene) *AiScene

func (*AiScene) ToPbMsg

func (ai *AiScene) ToPbMsg() *pb_msg.AiScene

type AiShadingMode

type AiShadingMode int
const (
	/** Flat shading. Shading is done on per-face base,
	 *  diffuse only. Also known as 'faceted shading'.
	 */
	AiShadingMode_Flat AiShadingMode = 0x1

	/** Simple Gouraud shading.
	 */
	AiShadingMode_Gouraud AiShadingMode = 0x2

	/** Phong-Shading -
	 */
	AiShadingMode_Phong AiShadingMode = 0x3

	/** Phong-Blinn-Shading
	 */
	AiShadingMode_Blinn AiShadingMode = 0x4

	/** Toon-Shading per pixel
	 *
	 *  Also known as 'comic' shader.
	 */
	AiShadingMode_Toon AiShadingMode = 0x5

	/** OrenNayar-Shading per pixel
	 *
	 *  Extension to standard Lambertian shading, taking the
	 *  roughness of the material into account
	 */
	AiShadingMode_OrenNayar AiShadingMode = 0x6

	/** Minnaert-Shading per pixel
	 *
	 *  Extension to standard Lambertian shading, taking the
	 *  "darkness" of the material into account
	 */
	AiShadingMode_Minnaert AiShadingMode = 0x7

	/** CookTorrance-Shading per pixel
	 *
	 *  Special shader for metallic surfaces.
	 */
	AiShadingMode_CookTorrance AiShadingMode = 0x8

	/** No shading at all. Constant light influence of 1.0.
	 * Also known as "Unlit"
	 */
	AiShadingMode_NoShading AiShadingMode = 0x9
	AiShadingMode_Unlit     AiShadingMode = AiShadingMode_NoShading // Alias

	/** Fresnel shading
	 */
	AiShadingMode_Fresnel AiShadingMode = 0xa

	/** Physically-Based Rendering (PBR) shading using
	 * Bidirectional scattering/reflectance distribution function (BSDF/BRDF)
	 * There are multiple methods under this banner, and model files may provide
	 * data for more than one PBR-BRDF method.
	 * Applications should use the set of provided properties to determine which
	 * of their preferred PBR rendering methods are likely to be available
	 * eg:
	 * - If AI_MATKEY_METALLIC_FACTOR is set, then a Metallic/Roughness is available
	 * - If AI_MATKEY_GLOSSINESS_FACTOR is set, then a Specular/Glossiness is available
	 * Note that some PBR methods allow layering of techniques
	 */
	AiShadingMode_PBR_BRDF AiShadingMode = 0xb
)

type AiSkeleton

type AiSkeleton struct {
	/**
	 *  @brief The name of the skeleton instance.
	 */
	Name string
	/**
	 *  @brief The bone instance in the skeleton.
	 */
	Bones []*AiSkeletonBone
}

func (*AiSkeleton) Clone

func (ai *AiSkeleton) Clone() *AiSkeleton

func (*AiSkeleton) FromPbMsg

func (ai *AiSkeleton) FromPbMsg(p *pb_msg.AiSkeleton) *AiSkeleton

func (*AiSkeleton) ToPbMsg

func (ai *AiSkeleton) ToPbMsg() *pb_msg.AiSkeleton

type AiSkeletonBone

type AiSkeletonBone struct {
	/// The parent bone index, is -1 one if this bone represents the root bone.
	Parent int32
	/// @brief The bone armature node - used for skeleton conversion
	/// you must enable aiProcess_PopulateArmatureData to populate this
	Armature []*AiNode

	/// @brief The bone node in the scene - used for skeleton conversion
	/// you must enable aiProcess_PopulateArmatureData to populate this
	Node []*AiNode
	/// The mesh index, which will get influenced by the weight.
	MeshId []*AiMesh

	/// The influence weights of this bone, by vertex index.
	Weights []*common.AiVertexWeight

	/** Matrix that transforms from bone space to mesh space in bind pose.
	 *
	 * This matrix describes the position of the mesh
	 * in the local space of this bone when the skeleton was bound.
	 * Thus it can be used directly to determine a desired vertex position,
	 * given the world-space transform of the bone when animated,
	 * and the position of the vertex in mesh space.
	 *
	 * It is sometimes called an inverse-bind matrix,
	 * or inverse bind pose matrix.
	 */
	OffsetMatrix common.AiMatrix4x4

	/// Matrix that transforms the locale bone in bind pose.
	LocalMatrix common.AiMatrix4x4
}

func (*AiSkeletonBone) Clone

func (ai *AiSkeletonBone) Clone() *AiSkeletonBone

func (*AiSkeletonBone) FromPbMsg

func (*AiSkeletonBone) ToPbMsg

func (ai *AiSkeletonBone) ToPbMsg() *pb_msg.AiSkeletonBone

type AiTexel

type AiTexel struct {
	B, G, R, A uint8
}

func BytesToAiTexel

func BytesToAiTexel(bytes []byte) (res []*AiTexel)

func (*AiTexel) Clone

func (ai *AiTexel) Clone() *AiTexel

func (*AiTexel) FromPbMsg

func (ai *AiTexel) FromPbMsg(p *pb_msg.AiTexel) *AiTexel

func (*AiTexel) ToPbMsg

func (ai *AiTexel) ToPbMsg() *pb_msg.AiTexel

type AiTexture

type AiTexture struct {
	/** Width of the texture, in pixels
	 *
	 * If mHeight is zero the texture is compressed in a format
	 * like JPEG. In this case mWidth specifies the size of the
	 * memory area pcData is pointing to, in bytes.
	 */
	Width uint32

	/** Height of the texture, in pixels
	 *
	 * If this value is zero, pcData points to an compressed texture
	 * in any format (e.g. JPEG).
	 */
	Height uint32

	/** A hint from the loader to make it easier for applications
	 *  to determine the type of embedded textures.
	 *
	 * If mHeight != 0 this member is show how data is packed. Hint will consist of
	 * two parts: channel order and channel bitness (count of the bits for every
	 * color channel). For simple parsing by the viewer it's better to not omit
	 * absent color channel and just use 0 for bitness. For example:
	 * 1. Image contain RGBA and 8 bit per channel, achFormatHint == "rgba8888";
	 * 2. Image contain ARGB and 8 bit per channel, achFormatHint == "argb8888";
	 * 3. Image contain RGB and 5 bit for R and B channels and 6 bit for G channel, achFormatHint == "rgba5650";
	 * 4. One color image with B channel and 1 bit for it, achFormatHint == "rgba0010";
	 * If mHeight == 0 then achFormatHint is set set to '\\0\\0\\0\\0' if the loader has no additional
	 * information about the texture file format used OR the
	 * file extension of the format without a trailing dot. If there
	 * are multiple file extensions for a format, the shortest
	 * extension is chosen (JPEG maps to 'jpg', not to 'jpeg').
	 * E.g. 'dds\\0', 'pcx\\0', 'jpg\\0'.  All characters are lower-case.
	 * The fourth character will always be '\\0'.
	 */
	AchFormatHint []uint8 // 8 for string + 1 for terminator.

	/** Data of the texture.
	 *
	 * Points to an array of mWidth * mHeight aiTexel's.
	 * The format of the texture data is always ARGB8888 to
	 * make the implementation for user of the library as easy
	 * as possible. If mHeight = 0 this is a pointer to a memory
	 * buffer of size mWidth containing the compressed texture
	 * data. Good luck, have fun!
	 */
	PcData []*AiTexel

	/** Texture original filename
	 *
	 * Used to get the texture reference
	 */
	Filename string
}

func NewAiTexture

func NewAiTexture() *AiTexture

func (*AiTexture) Clone

func (ai *AiTexture) Clone() *AiTexture

func (*AiTexture) FromPbMsg

func (ai *AiTexture) FromPbMsg(p *pb_msg.AiTexture) *AiTexture

func (*AiTexture) ToPbMsg

func (ai *AiTexture) ToPbMsg() *pb_msg.AiTexture

type AiTextureFlags

type AiTextureFlags int
const (
	/** The texture's color values have to be inverted (component-wise 1-n)
	 */
	AiTextureFlags_Invert AiTextureFlags = 0x1

	/** Explicit request to the application to process the alpha channel
	 *  of the texture.
	 *
	 *  Mutually exclusive with #aiTextureFlags_IgnoreAlpha. These
	 *  flags are set if the library can say for sure that the alpha
	 *  channel is used/is not used. If the model format does not
	 *  define this, it is left to the application to decide whether
	 *  the texture alpha channel - if any - is evaluated or not.
	 */
	AiTextureFlags_UseAlpha AiTextureFlags = 0x2

	/** Explicit request to the application to ignore the alpha channel
	 *  of the texture.
	 *
	 *  Mutually exclusive with #aiTextureFlags_UseAlpha.
	 */
	AiTextureFlags_IgnoreAlpha AiTextureFlags = 0x4
)

type AiTextureType

type AiTextureType int
const (
	/** Dummy value.
	 *
	 *  No texture, but the value to be used as 'texture semantic'
	 *  (#aiMaterialProperty::mSemantic) for all material properties
	 *  *not* related to textures.
	 */
	AiTextureType_NONE AiTextureType = 0

	/** The texture is combined with the result of the diffuse
	 *  lighting equation.
	 *  OR
	 *  PBR Specular/Glossiness
	 */
	AiTextureType_DIFFUSE AiTextureType = 1

	/** The texture is combined with the result of the specular
	 *  lighting equation.
	 *  OR
	 *  PBR Specular/Glossiness
	 */
	AiTextureType_SPECULAR AiTextureType = 2

	/** The texture is combined with the result of the ambient
	 *  lighting equation.
	 */
	AiTextureType_AMBIENT AiTextureType = 3

	/** The texture is added to the result of the lighting
	 *  calculation. It isn't influenced by incoming light.
	 */
	AiTextureType_EMISSIVE AiTextureType = 4

	/** The texture is a height map.
	 *
	 *  By convention, higher gray-scale values stand for
	 *  higher elevations from the base height.
	 */
	AiTextureType_HEIGHT AiTextureType = 5

	/** The texture is a (tangent space) normal-map.
	 *
	 *  Again, there are several conventions for tangent-space
	 *  normal maps. Assimp does (intentionally) not
	 *  distinguish here.
	 */
	AiTextureType_NORMALS AiTextureType = 6

	/** The texture defines the glossiness of the material.
	 *
	 *  The glossiness is in fact the exponent of the specular
	 *  (phong) lighting equation. Usually there is a conversion
	 *  function defined to map the linear color values in the
	 *  texture to a suitable exponent. Have fun.
	 */
	AiTextureType_SHININESS AiTextureType = 7

	/** The texture defines per-pixel opacity.
	 *
	 *  Usually 'white' means opaque and 'black' means
	 *  'transparency'. Or quite the opposite. Have fun.
	 */
	AiTextureType_OPACITY AiTextureType = 8

	/** Displacement texture
	 *
	 *  The exact purpose and format is application-dependent.
	 *  Higher color values stand for higher vertex displacements.
	 */
	AiTextureType_DISPLACEMENT AiTextureType = 9

	/** Lightmap texture (aka Ambient Occlusion)
	 *
	 *  Both 'Lightmaps' and dedicated 'ambient occlusion maps' are
	 *  covered by this material property. The texture contains a
	 *  scaling value for the final color value of a pixel. Its
	 *  intensity is not affected by incoming light.
	 */
	AiTextureType_LIGHTMAP AiTextureType = 10

	/** Reflection texture
	 *
	 * Contains the color of a perfect mirror reflection.
	 * Rarely used, almost never for real-time applications.
	 */
	AiTextureType_REFLECTION AiTextureType = 11

	AiTextureType_BASE_COLOR        AiTextureType = 12
	AiTextureType_NORMAL_CAMERA     AiTextureType = 13
	AiTextureType_EMISSION_COLOR    AiTextureType = 14
	AiTextureType_METALNESS         AiTextureType = 15
	AiTextureType_DIFFUSE_ROUGHNESS AiTextureType = 16
	AiTextureType_AMBIENT_OCCLUSION AiTextureType = 17

	/** Sheen
	 * Generally used to simulate textiles that are covered in a layer of microfibers
	 * eg velvet
	 * https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_sheen
	 */
	AiTextureType_SHEEN AiTextureType = 19

	/** Clearcoat
	 * Simulates a layer of 'polish' or 'lacquer' layered on top of a PBR substrate
	 * https://autodesk.github.io/standard-surface/#closures/coating
	 * https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_clearcoat
	 */
	AiTextureType_CLEARCOAT AiTextureType = 20

	/** Transmission
	 * Simulates transmission through the surface
	 * May include further information such as wall thickness
	 */
	AiTextureType_TRANSMISSION AiTextureType = 21

	/** Unknown texture
	 *
	 *  A texture reference that does not match any of the definitions
	 *  above is considered to be 'unknown'. It is still imported,
	 *  but is excluded from any further post-processing.
	 */
	AiTextureType_UNKNOWN AiTextureType = 18
)

func (AiTextureType) ToString

func (ai AiTextureType) ToString() string

type AiUVTransform

type AiUVTransform struct {
	/** Translation on the u and v axes.
	 *
	 *  The default value is (0|0).
	 */
	Translation *common.AiVector2D

	/** Scaling on the u and v axes.
	 *
	 *  The default value is (1|1).
	 */
	Scaling *common.AiVector2D

	/** Rotation - in counter-clockwise direction.
	 *
	 *  The rotation angle is specified in radians. The
	 *  rotation center is 0.5f|0.5f. The default value
	 *  0.f.
	 */
	Rotation float32
}

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

  • @brief Defines how an UV channel is transformed. *
  • This is just a helper structure for the #AI_MATKEY_UVTRANSFORM key.
  • See its documentation for more details. *
  • Typically you'll want to build a matrix of this information. However,
  • we keep separate scaling/translation/rotation values to make it
  • easier to process and optimize UV transformations internally.

func (*AiUVTransform) FromPbMsg

func (ai *AiUVTransform) FromPbMsg(data *pb_msg.AiUVTransform) *AiUVTransform

func (AiUVTransform) ToPbMsg

func (ai AiUVTransform) ToPbMsg() *pb_msg.AiUVTransform

type Algorithm

type Algorithm int
const (
	CATMULL_CLARKE Algorithm = 0x1
)

type BinFloat

type BinFloat uint64

Binary, signed-integer representation of a single-precision floating-point value. IEEE 754 says: "If two floating-point numbers in the same format are ordered then they are

ordered the same way when their bits are reinterpreted as sign-magnitude integers."

This allows us to convert all floating-point numbers to signed integers of arbitrary size

and then use them to work with ULPs (Units in the Last Place, for high-precision
computations) or to compare them (integer comparisons are faster than floating-point
comparisons on many platforms).

func ToBinary

func ToBinary(pValue float64) BinFloat

-------------------------------------------------------------------------------------------- Converts the bit pattern of a floating-point number to its signed integer representation.

type CatmullClarkSubdivider

type CatmullClarkSubdivider struct {
	EdgeMap    map[int]Edge
	UIntVector []int
}

func (*CatmullClarkSubdivider) InternSubdivide

func (div *CatmullClarkSubdivider) InternSubdivide(smesh []*AiMesh,
	out []*AiMesh,
	num int)

func (*CatmullClarkSubdivider) Subdivide

func (div *CatmullClarkSubdivider) Subdivide(smesh []*AiMesh,
	out []*AiMesh,
	num int,
	discard_input bool)

func (*CatmullClarkSubdivider) SubdivideOneMesh

func (div *CatmullClarkSubdivider) SubdivideOneMesh(mesh *AiMesh, num int, discard_input bool) *AiMesh

type Edge

type Edge struct {
	// contains filtered or unexported fields
}

--------------------------------------------------------------------------- * Intermediate description of an edge between two corners of a polygon ---------------------------------------------------------------------------

func NewEdge

func NewEdge() *Edge

type SpatialSort

type SpatialSort struct {
	/** Normal of the sorting plane, normalized.
	 */
	PlaneNormal common.AiVector3D

	/** The centroid of the positions, which is used as a point on the sorting plane
	 * when calculating distance. This value is calculated in Finalize.
	 */
	Centroid common.AiVector3D

	/** An entry in a spatially sorted position array. Consists of a vertex index,
	 * its position and its pre-calculated distance from the reference plane */
	// all positions, sorted by distance to the sorting plane
	Positions []*SpatialSortEntry

	/// false until the Finalize method is called.
	Finalized bool
}

func NewSpatialSort

func NewSpatialSort() *SpatialSort

func NewSpatialSortWithPos

func NewSpatialSortWithPos(pPositions []*common.AiVector3D) *SpatialSort

func (*SpatialSort) Append

func (s *SpatialSort) Append(pPositions []*common.AiVector3D, pFinalizes ...bool)

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

func (*SpatialSort) CalculateDistance

func (s *SpatialSort) CalculateDistance(pPosition *common.AiVector3D) float64

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

func (*SpatialSort) Fill

func (s *SpatialSort) Fill(pPositions []*common.AiVector3D, pFinalizes ...bool)

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

func (*SpatialSort) Finalize

func (s *SpatialSort) Finalize()

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

func (*SpatialSort) FindIdenticalPositions

func (s *SpatialSort) FindIdenticalPositions(pPosition *common.AiVector3D) (poResults []int)

------------------------------------------------------------------------------------------------ Fills an array with indices of all positions identical to the given position. In opposite to FindPositions(), not an epsilon is used but a (very low) tolerance of four floating-point units.

func (*SpatialSort) FindPositions

func (s *SpatialSort) FindPositions(pPosition *common.AiVector3D,
	pRadius float64) (poResults []int)

------------------------------------------------------------------------------------------------ Returns an iterator for all positions close to the given position.

func (*SpatialSort) GenerateMappingTable

func (s *SpatialSort) GenerateMappingTable(pRadius float64) ([]int, int)

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

type SpatialSortEntry

type SpatialSortEntry struct {
	Index    int               ///< The vertex referred by this entry
	Position common.AiVector3D ///< Position
	/// Distance of this vertex to the sorting plane. This is set by Finalize.
	Distance float64
}

func NewSpatialSortEntry

func NewSpatialSortEntry() *SpatialSortEntry

func NewSpatialSortEntryWithIndex

func NewSpatialSortEntryWithIndex(pIndex int, pPosition common.AiVector3D) *SpatialSortEntry

func (*SpatialSortEntry) Less

type SubDivision

type SubDivision interface {
	// ---------------------------------------------------------------
	/** Create a subdivider of a specific type
	 *
	 *  @param algo Algorithm to be used for subdivision
	 *  @return Subdivider instance. */
	SubdivideOneMesh(mesh *AiMesh,
		num int,
		discard_input bool) *AiMesh
	Subdivide(smesh []*AiMesh,
		out []*AiMesh,
		num int,
		discard_input bool)
}

func NewSubDivision

func NewSubDivision(algo Algorithm) SubDivision

type Vertex

type Vertex struct {
	// contains filtered or unexported fields
}

func NewVertex

func NewVertex() *Vertex

func NewVertexFromAiAnimMesh

func NewVertexFromAiAnimMesh(msh *AiAnimMesh, idx int) *Vertex

---------------------------------------------------------------------------- * Extract a particular vertex from a anim mesh and interleave all components

func NewVertexFromAiMesh

func NewVertexFromAiMesh(msh *AiMesh, idx int) *Vertex

func (*Vertex) Add

func (v *Vertex) Add(v0 *Vertex, v1 *Vertex) *Vertex

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

func (*Vertex) BinaryOp

func (v *Vertex) BinaryOp(v0 *Vertex, f float32, opStr string) *Vertex

---------------------------------------------------------------------------- / This time binary arithmetic of v0 with a floating-point number

func (*Vertex) BinaryOp1

func (v *Vertex) BinaryOp1(f float32, v0 *Vertex, opStr string) *Vertex

---------------------------------------------------------------------------- * This time binary arithmetic of v0 with a floating-point number

func (*Vertex) BinaryOpVertex

func (v *Vertex) BinaryOpVertex(v0 *Vertex, v1 *Vertex, opStr string) *Vertex

---------------------------------------------------------------------------- / Construct from two operands and a binary operation to combine them

func (*Vertex) Div

func (v *Vertex) Div(v0 *Vertex, f float32) *Vertex

func (*Vertex) Mul

func (v *Vertex) Mul(v0 *Vertex, f float32) *Vertex

func (*Vertex) Mul1

func (v *Vertex) Mul1(f float32, v0 *Vertex) *Vertex

func (*Vertex) SortBack

func (v *Vertex) SortBack(out *AiMesh, idx int)

---------------------------------------------------------------------------- / Convert back to non-interleaved storage

func (*Vertex) Sub

func (v *Vertex) Sub(v0 *Vertex, v1 *Vertex) *Vertex

Jump to

Keyboard shortcuts

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