| Package | alternativa.engine3d.core |
| Class | public class Splitter |
For example, imagine the scene has a single splitter, and the camera is located in the left child branch of the node, formed by the splitter. When the splitter is open, then the camera can potentially see the contents of the right branch. Otherwise, when the splitter is closed, the camera cannot see the contents of the right branch at all.
The depth of every splitter in the BSP-tree is determined by the order in which the splitters have been specified in the Scene3D.splitters property. Each subsequent splitter divides the subspaces formed by all previous splitters. As any regular polygon, a splitter itself can be split during the BSP procedure.
For additional visibility control objects of the class Sector can be used.
See also
| Property | Defined by | ||
|---|---|---|---|
| name : String Object name.
| Splitter | ||
| open : Boolean Shows whether the splitter is open or not.
| Splitter | ||
| vertices : Array [read-only] The list of the splitter's vertices.
| Splitter | ||
| Method | Defined by | ||
|---|---|---|---|
|
Splitter(vertices:Array, name:String = null)
Creates a new instance of a splitter.
| Splitter | ||
|
[static]Creates a splitter from a face.
| Splitter | ||
|
toString():String
Creates a string representation of an object.
| Splitter | ||
| name | property |
public var name:StringObject name.
| open | property |
open:Boolean [read-write]Shows whether the splitter is open or not. If the splitter is closed, a camera which is located in one of its branches doesn't render the other branch.
Implementation public function get open():Boolean
public function set open(value:Boolean):void
| vertices | property |
vertices:Array [read-only]The list of the splitter's vertices. Each element is an instance of the Point3D class.
public function get vertices():Array
| Splitter | () | constructor |
public function Splitter(vertices:Array, name:String = null)Creates a new instance of a splitter.
Parametersvertices:Array — list of the splitter's vertices. The plane which contains the vertices will be used as the plane of the splitter. |
|
name:String (default = null) — the name of the splitter. If null have been specified, the name will be generated automatically. |
SplitterNeedMoreVerticesError — throws when less than three vertices have been specified |
| createFromFace | () | method |
public static function createFromFace(face:Face, name:String = null):SplitterCreates a splitter from a face. If the parent object of the face is on a scene, then global coordinates of the face's vertices are used. Otherwise local coordinates of the face's vertices are used.
Parametersface:Face — the face from which the splitter is constructed |
|
name:String (default = null) — the name of the new splitter. If |
Splitter |
| toString | () | method |
public function toString():StringCreates a string representation of an object.
ReturnsString — string object representation |