SkinnedSubGeometry provides a SubGeometry extension that contains data needed to skin vertices. In particular, it provides joint indices and weights. Important! Joint indices need to be pre-multiplied by 3, since they index the matrix array (and each matrix has 3 float4 elements)

Constructor

new(jointsPerVertex:Int)

Creates a new SkinnedSubGeometry object.

Parameters:

jointsPerVertex

The amount of joints that can be assigned per vertex.

Variables

read onlyanimatedData:Vector<Float>

read onlycondensedIndexLookUp:Vector<UInt>

read onlynumCondensedJoints:Int

Methods

activateJointIndexBuffer(index:Int, stage3DProxy:Stage3DProxy):Void

Assigns the attribute stream for joint indices

Parameters:

index

The attribute stream index for the vertex shader

stage3DProxy

The Stage3DProxy to assign the stream to

activateJointWeightsBuffer(index:Int, stage3DProxy:Stage3DProxy):Void

Assigns the attribute stream for joint weights

Parameters:

index

The attribute stream index for the vertex shader

stage3DProxy

The Stage3DProxy to assign the stream to

clone():ISubGeometry

Clones the current object.

Returns:

An exact duplicate of the current object.

dispose():Void

Cleans up any resources used by this object.

updateAnimatedData(value:Vector<Float>):Void

Inherited Variables

Defined by CompactSubGeometry

read onlynumVertices:Int

read onlysecondaryUVOffset:Int

read onlysecondaryUVStride:Int

Defined by SubGeometryBase

read onlyUVData:Vector<Float>

read onlyUVOffset:Int

read onlyUVStride:Int

read onlynumTriangles:Int

read onlyscaleU:Float

read onlyscaleV:Float

read onlyvertexData:Vector<Float>

read onlyvertexNormalData:Vector<Float>

read onlyvertexNormalOffset:Int

read onlyvertexNormalStride:Int

read onlyvertexOffset:Int

read onlyvertexPositionData:Vector<Float>

read onlyvertexStride:Int

read onlyvertexTangentData:Vector<Float>

read onlyvertexTangentOffset:Int

read onlyvertexTangentStride:Int

Inherited Methods

Defined by CompactSubGeometry

activateSecondaryUVBuffer(index:Int, stage3DProxy:Stage3DProxy):Void

activateUVBuffer(index:Int, stage3DProxy:Stage3DProxy):Void

activateVertexBuffer(index:Int, stage3DProxy:Stage3DProxy):Void

activateVertexNormalBuffer(index:Int, stage3DProxy:Stage3DProxy):Void

activateVertexTangentBuffer(index:Int, stage3DProxy:Stage3DProxy):Void

fromVectors(verts:Vector<Float>, uvs:Vector<Float>, normals:Vector<Float>, tangents:Vector<Float>):Void

stripBuffer(offset:Int, numEntries:Int):Vector<Float>

Isolate and returns a Vector.Number of a specific buffer type

  • stripBuffer(0, 3), return only the vertices
  • stripBuffer(3, 3): return only the normals
  • stripBuffer(6, 3): return only the tangents
  • stripBuffer(9, 2): return only the uv's
  • stripBuffer(11, 2): return only the secondary uv's

updateData(data:Vector<Float>):Void

Updates the vertex data. All vertex properties are contained in a single Vector, and the order is as follows: 0 - 2: vertex position X, Y, Z 3 - 5: normal X, Y, Z 6 - 8: tangent X, Y, Z 9 - 10: U V 11 - 12: Secondary U V

Defined by SubGeometryBase

getIndexBuffer(stage3DProxy:Stage3DProxy):IndexBuffer3D

Retrieves the VertexBuffer3D object that contains triangle indices.

Parameters:

context

The Context3D for which we request the buffer

Returns:

The VertexBuffer3D object that contains triangle indices.

updateIndexData(indices:Vector<UInt>):Void

Updates the face indices of the SubGeometry.

Parameters:

indices

The face indices to upload.