| Package | alternativa.engine3d.primitives |
| Class | public class Plane |
| Inheritance | Plane Mesh Object3D |
| Method | Defined by | ||
|---|---|---|---|
|
Plane(width:Number = 100, length:Number = 100, widthSegments:uint = 1, lengthSegments:uint = 1, twoSided:Boolean = true, reverse:Boolean = false, triangulate:Boolean = false)
Creates plane.
| Plane | ||
![]() |
Adds a child object.
| Object3D | |
![]() |
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener.
| Object3D | |
![]() |
Clones object.
| Object3D | |
![]() |
cloneMaterialToAllSurfaces(material:SurfaceMaterial):void
Setting a material for all surfaces of the object.
| Mesh | |
![]() |
createFace(vertices:Array, id:Object = null):Face
Add new face.
| Mesh | |
![]() |
createSurface(faces:Array = null, id:Object = null):Surface
Add new surface.
| Mesh | |
![]() |
createVertex(x:Number = 0, y:Number = 0, z:Number = 0, id:Object = null):Vertex
Add new vertex.
| Mesh | |
![]() |
dispatchEvent(event:Event):Boolean
Dispatches an event.
| Object3D | |
![]() |
forEach(func:Function):void
Calls the specified function for the object an all its children, passing the current object as an argument.
| Object3D | |
![]() |
getChildByName(name:String, deep:Boolean = false):Object3D
Gets a child object with the given name.
| Object3D | |
![]() |
getFaceById(id:Object):Face
Get face by it's identifier
| Mesh | |
![]() |
Get face identifier.
| Mesh | |
![]() |
getSurfaceById(id:Object):Surface
Get surface by it's identifier
| Mesh | |
![]() |
getSurfaceId(surface:Surface):Object
Get surface identifier.
| Mesh | |
![]() |
getVertexById(id:Object):Vertex
Get vertex by it's identifier
| Mesh | |
![]() |
getVertexId(vertex:Vertex):Object
Get vertex identifier
| Mesh | |
![]() |
Transforms a point form global coordinate system to an object's coordinate system
| Object3D | |
![]() |
hasEventListener(type:String):Boolean
Checks if there are registered event listeners for events of the specified type.
| Object3D | |
![]() |
hasFace(face:Object):Boolean
Check if face is present in object.
| Mesh | |
![]() |
hasSurface(surface:Object):Boolean
Check if surface is present in object.
| Mesh | |
![]() |
hasVertex(vertex:Object):Boolean
Check if vertex is present in object.
| Mesh | |
![]() |
Transforms a point from local coordinate system of an object to global coordinate system.
| Object3D | |
![]() |
moveAllFacesToSurface(surface:Object = null, removeSurfaces:Boolean = false):Surface
Adds all object faces to a given surface.
| Mesh | |
![]() |
Delete child object.
| Object3D | |
![]() |
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes an event listener.
| Object3D | |
![]() |
removeFace(face:Object):Face
Delete face.
| Mesh | |
![]() |
removeSurface(surface:Object):Surface
Delete surface.
| Mesh | |
![]() |
removeVertex(vertex:Object):Vertex
Delete vertex.
| Mesh | |
![]() |
setMaterialToSurface(material:SurfaceMaterial, surface:Object):void
Set material to a given surface.
| Mesh | |
![]() |
setUVsToFace(aUV:Point, bUV:Point, cUV:Point, face:Object):void
Set UV-coordinates to a given face.
| Mesh | |
![]() |
toString():String
Get string representation of object.
| Mesh | |
![]() |
willTrigger(type:String):Boolean
| Object3D | |
| Method | Defined by | ||
|---|---|---|---|
![]() |
addToScene(scene:Scene3D):void
Method is being called when adding object to scene.
| Object3D | |
![]() |
clonePropertiesFrom(source:Object3D):void
Copy source object properties.
| Mesh | |
|
Create empty object without inner structure.
| Plane | ||
|
defaultName():String
Default object name.
| Plane | ||
![]() |
removeFromScene(scene:Scene3D):void
Method is being called whed deleting object from a scene.
| Object3D | |
| Plane | () | constructor |
public function Plane(width:Number = 100, length:Number = 100, widthSegments:uint = 1, lengthSegments:uint = 1, twoSided:Boolean = true, reverse:Boolean = false, triangulate:Boolean = false)Creates plane.
Primitive may contain one or two surfaces, depending on parameters. If reverse is true, the primitive will have only "back" surface.If reverse is false, the primitive will have only "front" surface. Setting twoSided will tell method to create both surfaces.
width:Number (default = 100) — width. Size along X axis. Can't be negative. |
|
length:Number (default = 100) — lenght. Size along Y axis. Can't be negative. |
|
widthSegments:uint (default = 1) — quantity of width segments |
|
lengthSegments:uint (default = 1) — quantity of length segments |
|
twoSided:Boolean (default = true) — if set to true, it will form two-sided plane |
|
reverse:Boolean (default = false) — invert normals |
|
triangulate:Boolean (default = false) — triangulation flag. If true, all rectangulars of the plane will be triangulated |
| createEmptyObject | () | method |
protected override function createEmptyObject():Object3DCreate empty object without inner structure. For example, if geometrical primitive, when added, forms a bunch of vertices, faces and surfaces, this method don't create them. This method is being used in clone() and has to be redefined in descendants in order to get the right object.
ReturnsObject3D — a new empty object |
| defaultName | () | method |
protected override function defaultName():StringDefault object name.
ReturnsString — default object name |