Packageaway3d.animators
Classpublic class FaceLink
InheritanceFaceLink Inheritance Object



Public Properties
 PropertyDefined By
  align : Boolean
Defines if the object is aligned along the normal
FaceLink
  face : Face
efines another face to be used as anchor
FaceLink
  faceindex : int
[write-only] efines another face to be used as anchor by its index
FaceLink
  object : Object3D
efines another object3D to be attached to the face.
FaceLink
  offset : Number
The offset multiplyer value along the normal vector of the face
FaceLink
  offsetX : Number
An extra offset x value added to model position
FaceLink
  offsetY : Number
An extra offset y value added to model position
FaceLink
  offsetZ : Number
An extra offset z value added to model position
FaceLink
  target : Vector3D
The object will lookAt a given Vector3D while remaining on it's position: the center of the face with the optional offset.
FaceLink
Public Methods
 MethodDefined By
  
FaceLink(obj:Object3D, meshsource:Mesh, face:Face, offset:Number = 0, align:Boolean = false, target:Vector3D = null)
Creates a new FaceLink object.
FaceLink
  
update(updateNormal:Boolean = false):void
FaceLink
Property Detail
alignproperty
align:Boolean

Defines if the object is aligned along the normal


Implementation
    public function get align():Boolean
    public function set align(value:Boolean):void
faceproperty 
face:Face

efines another face to be used as anchor


Implementation
    public function get face():Face
    public function set face(value:Face):void
faceindexproperty 
faceindex:int  [write-only]

efines another face to be used as anchor by its index


Implementation
    public function set faceindex(value:int):void
objectproperty 
object:Object3D

efines another object3D to be attached to the face.


Implementation
    public function get object():Object3D
    public function set object(value:Object3D):void
offsetproperty 
offset:Number

The offset multiplyer value along the normal vector of the face


Implementation
    public function get offset():Number
    public function set offset(value:Number):void
offsetXproperty 
offsetX:Number

An extra offset x value added to model position


Implementation
    public function get offsetX():Number
    public function set offsetX(value:Number):void
offsetYproperty 
offsetY:Number

An extra offset y value added to model position


Implementation
    public function get offsetY():Number
    public function set offsetY(value:Number):void
offsetZproperty 
offsetZ:Number

An extra offset z value added to model position


Implementation
    public function get offsetZ():Number
    public function set offsetZ(value:Number):void
targetproperty 
target:Vector3D

The object will lookAt a given Vector3D while remaining on it's position: the center of the face with the optional offset.


Implementation
    public function get target():Vector3D
    public function set target(value:Vector3D):void
Constructor Detail
FaceLink()Constructor
public function FaceLink(obj:Object3D, meshsource:Mesh, face:Face, offset:Number = 0, align:Boolean = false, target:Vector3D = null)

Creates a new FaceLink object. This class allows to link two objects together by a face object of one of the two, like a man and a his gun etc... ideal for animated meshes or simple systems.

Parameters
obj:Object3D — The Object3D to be linked to the face during animations.
 
meshsource:Mesh — The Mesh witch hold the Face object reference.
 
face:Face — The Face object reference to be used as anchor.
 
offset:Number (default = 0) — [optional] The multiplier of the objectposition along the face normal, defines distance from face. Default = 0;
 
align:Boolean (default = false) — [optional] If the mesh must be aligned to the normal vector. Default = false;
 
target:Vector3D (default = null) — [optional] If the mesh points at a given Vector3D. Default = null;
####INIT####
Method Detail
update()method
public function update(updateNormal:Boolean = false):void

Parameters

updateNormal:Boolean (default = false)