Packagede.nulldesign.nd3d.objects
Classpublic class KeyframeMesh
InheritanceKeyframeMesh Inheritance Mesh Inheritance Object3D
SubclassesMD2

KeyframeMesh provides framework for objects that have keyframed animation. Note that is class is [abstract] in that in itself provides no functionality.

There are a couple very specific details that must be adhered to by all subclasses in order for this to work properly:

[1] The subclass MUST allocate properly sized arrays with memory for faces and vertices
[2] The Face3D objects in faces must have an id cooresponding to their original array order

Please feel free to use, but please mention me!



Public Properties
 PropertyDefined by
 InheritedangleX : Number
Object3D
 InheritedangleY : Number
Object3D
 InheritedangleZ : Number
Object3D
 Inheritedcontainer : Sprite
Object3D
 InheriteddeltaAngleX : Number = 0
Object3D
 InheriteddeltaAngleY : Number = 0
Object3D
 InheriteddeltaAngleZ : Number = 0
Object3D
 Inheriteddirection : Vertex
Object3D
 InheritedfaceList : Array
Object3D
  fps : int
Number of animation frames to display per second
KeyframeMesh
  frames : Array
The array of frames that make up the animation sequence.
KeyframeMesh
 Inheritedhidden : Boolean = false
Object3D
 InheritedisInteractive : Boolean = false
Object3D
  keyframe : int
KeyframeMesh
 Inheritedname : String
Object3D
 InheritedpositionAsVertex : Vertex
Object3D
 Inheritedquaternion : Quaternion
Object3D
 InheritedscaleX : Number = 1
Object3D
 InheritedscaleY : Number = 1
Object3D
 InheritedscaleZ : Number = 1
Object3D
 InheriteduserData : *
Object3D
 InheritedvertexList : Array
Object3D
 InheritedxPos : Number = 0
Object3D
 InheritedyPos : Number = 0
Object3D
 InheritedzPos : Number = 0
Object3D
Public Methods
 MethodDefined by
  
KeyframeMesh(material:Material, fps:int = 24, scale:Number = 1)
KeyframeMesh is a class used [internal] to provide a "keyframe animation"/"vertex animation"/"mesh deformation" framework for subclass loaders.
KeyframeMesh
 Inherited
addFace(v1:Vertex, v2:Vertex, v3:Vertex, material:Material = null, uvList:Array = null):void
Adds a new face to the mesh
Mesh
 Inherited
Clones the mesh
Mesh
 Inherited
deg2rad(deg:Number):Number
[static]
Object3D
 Inherited
flipNormals():void
Flips the normals of every face in the mesh
Mesh
 Inherited
getAngles():String
Object3D
  
gotoAndPlay(frame:int):void
KeyframeMesh
  
gotoAndStop(frame:int):void
KeyframeMesh
 Inherited
Object3D
 Inherited
lookAtTarget(target:Object3D):void
Object3D
  
loop(start:int, end:int):void
KeyframeMesh
 Inherited
moveToDirection(speed:Number):void
Object3D
 Inherited
rad2deg(rad:Number):Number
[static]
Object3D
 Inherited
rotateAround(origin:Object3D, angleX:Number = 0, angleY:Number = 0):void
Object3D
 Inherited
rotateVerticesX(angle:Number):void
Rotate vertices coordinates around X axis
Object3D
 Inherited
rotateVerticesY(angle:Number):void
Rotate vertices coordinates around Y axis
Object3D
 Inherited
rotateVerticesZ(angle:Number):void
Rotate vertices coordinates around Z axis
Object3D
 Inherited
scale(x:Number = 1, y:Number = 1, z:Number = 1):void
Object3D
  
stop():void
KeyframeMesh
 Inherited
toString():String
Object3D
 Inherited
translateVertices(tx:Number, ty:Number, tz:Number):void
Translate vertices coordinates
Object3D
  
update():void
KeyframeMesh
 Inherited
vertexInList(v:Vertex):Boolean
Checks if a mesh already contains a vertex
Mesh
 Inherited
weldVertices(tolerance:Number = 1):void
Welds vertices that are close together
Mesh
Public Constants
 ConstantDefined by
  ANIM_LOOP : int = 2
[static]
KeyframeMesh
  ANIM_NORMAL : int = 1
[static] Three kinds of animation sequences: [1] Normal (sequential, just playing) [2] Loop (a loop) [3] Stop (stopped, not animating)
KeyframeMesh
  ANIM_STOP : int = 4
[static]
KeyframeMesh
Property detail
fpsproperty
public var fps:int

Number of animation frames to display per second

framesproperty 
public var frames:Array

The array of frames that make up the animation sequence.

keyframeproperty 
keyframe:int  [read-write]Implementation
    public function get keyframe():int
    public function set keyframe(value:int):void
Constructor detail
KeyframeMesh()constructor
public function KeyframeMesh(material:Material, fps:int = 24, scale:Number = 1)

KeyframeMesh is a class used [internal] to provide a "keyframe animation"/"vertex animation"/"mesh deformation" framework for subclass loaders. There are some subtleties to using this class, so please, I suggest you don't (not yet). Possible file formats are MD2, MD3, 3DS, etc...

Parameters
material:Material
 
fps:int (default = 24)
 
scale:Number (default = 1)
Method detail
gotoAndPlay()method
public function gotoAndPlay(frame:int):voidParameters
frame:int
gotoAndStop()method 
public function gotoAndStop(frame:int):voidParameters
frame:int
loop()method 
public function loop(start:int, end:int):voidParameters
start:int
 
end:int
stop()method 
public function stop():void
update()method 
public function update():void
Constant detail
ANIM_LOOPconstant
public static const ANIM_LOOP:int = 2
ANIM_NORMALconstant 
public static const ANIM_NORMAL:int = 1

Three kinds of animation sequences: [1] Normal (sequential, just playing) [2] Loop (a loop) [3] Stop (stopped, not animating)

ANIM_STOPconstant 
public static const ANIM_STOP:int = 4