| Package | alternativa.engine3d.core |
| Class | public final class Face |
| Implements | flash.events.IEventDispatcher |
The class implements flash.events.IEventDispatcher interface and can dispatch mouse events which contain an information about point in the 3d-space where an event has occured.
| Property | Defined by | ||
|---|---|---|---|
| aUV : Point UV-coordinates of the first face's vertex
| Face | ||
| bUV : Point UV-coordinates of the second face's vertex
| Face | ||
| cUV : Point UV-coordinates of the third face's vertex
| Face | ||
| edgeJoinedFaces : Set
[read-only] A set of faces which have common edges with current one.
| Face | ||
| id : Object [read-only] Face identifier in Mesh-object.
| Face | ||
| mesh : Mesh
[read-only] Mesh-object containing given face.
| Face | ||
| mouseEnabled : Boolean = true Specifies whether this face receives mouse messages.
| Face | ||
| normal : Point3D
[read-only] Face normal in local coordinates system.
| Face | ||
| surface : Surface
[read-only] Get surface in which given face is located.
| Face | ||
| vertices : Array [read-only] A set of face vertices, represented as
alternativa. | Face | ||
| verticesCount : uint [read-only] Get number of given face vertices.
| Face | ||
| Method | Defined by | ||
|---|---|---|---|
|
Face(vertices:Array)
Create face instance.
| Face | ||
|
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener.
| Face | ||
|
dispatchEvent(event:Event):Boolean
Dispatches an event.
| Face | ||
|
Count UV-coordinates for any given point in mesh coordinates system.
| Face | ||
|
hasEventListener(type:String):Boolean
Checks if there are registered event listeners for events with the specified type.
| Face | ||
|
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes an event listener.
| Face | ||
|
toString():String
Creates a string representation of a Face object.
| Face | ||
|
willTrigger(type:String):Boolean
| Face | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when a user presses and releases left mouse button over the same face. | Face | |||
| Dispatched when a user presses left mouse button over a face. | Face | |||
| Dispatched when a user moves mouse pointer while it is over a face. | Face | |||
| Dispatched when a user moves mouse pointer away from a face. | Face | |||
| Dispatched when a user moves mouse pointer over a face. | Face | |||
| Dispatched when a user releases left mouse button over a face. | Face | |||
| Dispatched when a user spins mouse wheel over a face. | Face | |||
| aUV | property |
aUV:Point [read-write]UV-coordinates of the first face's vertex
Implementation public function get aUV():Point
public function set aUV(value:Point):void
| bUV | property |
bUV:Point [read-write]UV-coordinates of the second face's vertex
Implementation public function get bUV():Point
public function set bUV(value:Point):void
| cUV | property |
cUV:Point [read-write]UV-coordinates of the third face's vertex
Implementation public function get cUV():Point
public function set cUV(value:Point):void
| edgeJoinedFaces | property |
edgeJoinedFaces:Set [read-only]A set of faces which have common edges with current one.
Implementation public function get edgeJoinedFaces():Set
| id | property |
id:Object [read-only]Face identifier in Mesh-object. If face is not a part of any Mesh object, null is returned.
public function get id():Object
| mesh | property |
mesh:Mesh [read-only]Mesh-object containing given face.
Implementation public function get mesh():Mesh
| mouseEnabled | property |
public var mouseEnabled:Boolean = trueSpecifies whether this face receives mouse messages.
| normal | property |
normal:Point3D [read-only]Face normal in local coordinates system.
Implementation public function get normal():Point3D
| surface | property |
surface:Surface [read-only]Get surface in which given face is located.
Implementation public function get surface():Surface
| vertices | property |
vertices:Array [read-only]A set of face vertices, represented as alternativa.engine3d.core.Vertex class objects.
public function get vertices():Array
See also
| verticesCount | property |
verticesCount:uint [read-only]Get number of given face vertices.
Implementation public function get verticesCount():uint
| Face | () | constructor |
public function Face(vertices:Array)Create face instance.
Parametersvertices:Array — an array with alternativa.engine3d.core.core.Vertex type objects, which set faces' vertices in clockwise order. |
See also
| addEventListener | () | method |
public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):voidRegisters an event listener.
Parameterstype:String — the type of an event |
|
listener:Function — the listener function |
|
useCapture:Boolean (default = false) — not used |
|
priority:int (default = 0) — the priority level of the event listener. All listeners with priority n are processed before listeners of priority n-1. If two or more listeners share the same priority, they are processed in the order in which they were added. |
|
useWeakReference:Boolean (default = false) — Determines whether the reference to the listener is strong or weak. A strong reference prevents your listener from being garbage-collected. A weak reference does not. |
| dispatchEvent | () | method |
public function dispatchEvent(event:Event):BooleanDispatches an event.
Parametersevent:Event — the event to dispatch |
Boolean — false |
| getUV | () | method |
public function getUV(point:Point3D):PointCount UV-coordinates for any given point in mesh coordinates system.
Parameterspoint:Point3D — a point at face surface, for which UV-coordinates are being calculated |
Point — UV-coordinates of the given point |
| hasEventListener | () | method |
public function hasEventListener(type:String):BooleanChecks if there are registered event listeners for events with the specified type.
Parameterstype:String — the type of an event |
Boolean — true if there are listeners of events with the specified type, otherwise false |
| removeEventListener | () | method |
public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):voidRemoves an event listener.
Parameterstype:String — the type of an event |
|
listener:Function — the listener function |
|
useCapture:Boolean (default = false) — not used |
| toString | () | method |
public function toString():StringCreates a string representation of a Face object.
ReturnsString — string object representation |
| willTrigger | () | method |
public function willTrigger(type:String):BooleanParameters
type:String |
Boolean |
| click | event |
alternativa.engine3d.events.MouseEvent3D
alternativa.engine3d.events.MouseEvent3D.CLICK
Dispatched when a user presses and releases left mouse button over the same face.
The value of thetype property of a click event object.| mouseDown | event |
alternativa.engine3d.events.MouseEvent3D
alternativa.engine3d.events.MouseEvent3D.MOUSE_DOWN
Dispatched when a user presses left mouse button over a face.
The value of thetype property of a mouseDown event object.| mouseMove | event |
alternativa.engine3d.events.MouseEvent3D
alternativa.engine3d.events.MouseEvent3D.MOUSE_MOVE
Dispatched when a user moves mouse pointer while it is over a face.
The value of thetype property of a mouseMove event object.| mouseOut | event |
alternativa.engine3d.events.MouseEvent3D
alternativa.engine3d.events.MouseEvent3D.MOUSE_OUT
Dispatched when a user moves mouse pointer away from a face.
The value of thetype property of a mouseOut event object.| mouseOver | event |
alternativa.engine3d.events.MouseEvent3D
alternativa.engine3d.events.MouseEvent3D.MOUSE_OVER
Dispatched when a user moves mouse pointer over a face.
The value of thetype property of a mouseOver event object.| mouseUp | event |
alternativa.engine3d.events.MouseEvent3D
alternativa.engine3d.events.MouseEvent3D.MOUSE_UP
Dispatched when a user releases left mouse button over a face.
The value of thetype property of a mouseUp event object.| mouseWheel | event |
alternativa.engine3d.events.MouseEvent3D
alternativa.engine3d.events.MouseEvent3D.MOUSE_WHEEL
Dispatched when a user spins mouse wheel over a face.
The value of thetype property of a mouseWheel event object.