| Package | alternativa.engine3d.core |
| Class | public class Scene3D |
See also
| Property | Defined by | ||
|---|---|---|---|
| planeOffsetThreshold : Number The distance measurement threshold.
| Scene3D | ||
| root : Object3D
Scene root object.
| Scene3D | ||
| sectors : Array Scene sectors.
| Scene3D | ||
| splitAnalysis : Boolean Splitter analysis mode flag.
| Scene3D | ||
| splitBalance : Number BSP-tree balancing parameter (works when analysis is turned on).
| Scene3D | ||
| splitters : Array List of scene splitters.
| Scene3D | ||
| Method | Defined by | ||
|---|---|---|---|
|
Scene3D()
Create an instance of class.
| Scene3D | ||
|
calculate():void
Scene calculating.
| Scene3D | ||
|
drawBSP(container:Sprite):void
BSP-tree visualization.
| Scene3D | ||
|
hasChanges():Boolean
Checks if a scene has changed since the last call of
calculate() method. | Scene3D | ||
| planeOffsetThreshold | property |
planeOffsetThreshold:Number [read-write]The distance measurement threshold. When BSP-tree is being built, a point is considered to be on the splitter's plane if distance from the point to the plane is less than specified threshold.
The default value is 0.01.
public function get planeOffsetThreshold():Number
public function set planeOffsetThreshold(value:Number):void
| root | property |
root:Object3D [read-write]Scene root object.
Implementation public function get root():Object3D
public function set root(value:Object3D):void
| sectors | property |
sectors:Array [read-write]Scene sectors. Sectors specify visibility between parts of the scene which have been formed by splitters.
Implementation public function get sectors():Array
public function set sectors(value:Array):void
SectorInOtherSceneError — throws when a sector has already been added to another scene |
See also
| splitAnalysis | property |
splitAnalysis:Boolean [read-write]Splitter analysis mode flag. If active, every adding polygon is being evaluated as a dividing plane (splitter). Splitters with the most quality are being added to BSP-tree first.
The default value is true.
public function get splitAnalysis():Boolean
public function set splitAnalysis(value:Boolean):void
See also
| splitBalance | property |
splitBalance:Number [read-write]BSP-tree balancing parameter (works when analysis is turned on). May vary from 0 (minimal polygon fragmentation) to 1 (maximum balance).
The default value is 0.
public function get splitBalance():Number
public function set splitBalance(value:Number):void
See also
| splitters | property |
splitters:Array [read-write]List of scene splitters. Each element is an instance of Splitter class. The order of scene division is determined by the order of splitters in the specified array.
public function get splitters():Array
public function set splitters(value:Array):void
SplitterInOtherSceneError — throws when a splitter has already been added to another scene |
See also
| Scene3D | () | constructor |
public function Scene3D()Create an instance of class.
| calculate | () | method |
public function calculate():voidScene calculating. Method analyzes all changes happened since last iteration, forms command list and complete these commands in necessary order. As a result, all the views with cameras in scene are being redraw.
| drawBSP | () | method |
public function drawBSP(container:Sprite):voidBSP-tree visualization. Tree is being draw in given container. Every tree node is marked as a dot with first node polyigon material color (when texture is applied, dot is colored by first texture pixel color).
Parameterscontainer:Sprite — container that is used to draw BSP-tree |
| hasChanges | () | method |
public function hasChanges():BooleanChecks if a scene has changed since the last call of calculate() method.
Boolean — true if a scene has changed since the last call of calculate() method, otherwise false |
See also