| Package | sandy.primitive |
| Class | public class Sphere |
| Inheritance | Sphere Shape3D ATransformable Node |
| Implements | Primitive3D |
var mySphere:Sphere = new Sphere( "theSphere", 150);
| Property | Defined by | ||
|---|---|---|---|
![]() | aPolygons : Array
The array of polygons building this object.
| Shape3D | |
![]() | appearance : Appearance
The appearance of this object.
| Shape3D | |
![]() | boundingBox : BBox
The bounding box of this node
IMPORTANT: Do not modify it unless you perfectly know what you are doing
| Node | |
![]() | boundingSphere : BSphere
The bounding sphere of this node
IMPORTANT: Do not modify it unless you perfectly know what you are doing
| Node | |
![]() | broadcaster : BubbleEventBroadcaster
The broadcaster
The broadcaster is used to send events to listeners. | Node | |
![]() | changed : Boolean = false
This property set the cache status of the current node.
| Node | |
![]() | children : Array
The children of this node are stored inside this array.
| Node | |
![]() | container : Sprite
The contianer for this object.
| Shape3D | |
![]() | culled : CullingState
This property represent the culling state of the current node.
| Node | |
![]() | DEFAULT_APPEARANCE : Appearance
[static]
Default appearance for Shape3D instances.
| Shape3D | |
![]() | DEFAULT_MATERIAL : Material
[static]
Default material for the DEFAULT_APPEARANCE object
| Shape3D | |
| DEFAULT_RADIUS : Number = 100 [static]
Default radius
| Sphere | ||
| DEFAULT_SCALE : Number = 1 [static]
Default scale
| Sphere | ||
| DEFAULT_SEGMENTSH : Number = 6 [static]
Default value for number of segments vertically
| Sphere | ||
| DEFAULT_SEGMENTSW : Number = 8 [static]
Default value for number of segments horizontally
| Sphere | ||
![]() | depth : Number
The depth of this object.
| Shape3D | |
![]() | disable : Boolean = false
Disable the local transformations applied to this Node if set to false.
| ATransformable | |
![]() | enableBackFaceCulling : Boolean
Should back face culling be enabled for this object?.
| Shape3D | |
![]() | enableClipping : Boolean = false Enable the Frustum clipping on the visible polygons. | Shape3D | |
![]() | enableEvents : Boolean
Enables the event system for mouse events.
| Shape3D | |
![]() | enableForcedDepth : Boolean = false
Should forced depth be enable for this object?.
| Shape3D | |
![]() | enableInteractivity : Boolean | Shape3D | |
![]() | enableNearClipping : Boolean = false Enable the Frustum near plane clipping on the visible polygons. | Shape3D | |
![]() | forcedDepth : Number = 0
The forced depth for this object.
| Shape3D | |
![]() | geometry : Geometry3D
The geometry of this object.
| Shape3D | |
![]() | geometryCenter : Vector
This property call allows you to get the geometryCenter offset vector of the Shape.
| Shape3D | |
![]() | matrix : Matrix4 | ATransformable | |
| MIN_SEGMENTSH : Number = 2 [static]
Minimum value for number of segments vertically
| Sphere | ||
| MIN_SEGMENTSW : Number = 3 [static]
Minimum value for number of segments horizontally
| Sphere | ||
![]() | modelMatrix : Matrix4
Cached matrix corresponding to the transformation to the 0,0,0 frame system
| Node | |
![]() | name : String
Name of this node.
| Node | |
![]() | out : Vector
Forward direction ( local z ) in parent coordinates.
| ATransformable | |
![]() | pan : Number
Pans this object around the local y axis.
| ATransformable | |
![]() | parent : Node
The parent node of this node.
| Node | |
![]() | roll : Number
Rolls this object around the local z axis.
| ATransformable | |
![]() | rotateX : Number
Rotates this object around an axis parallel to the parents x axis.
| ATransformable | |
![]() | rotateY : Number
Rotates this object around an axis parallel to the parents y axis.
| ATransformable | |
![]() | rotateZ : Number
Rotates this object around an axis paralell to the parents z axis.
| ATransformable | |
![]() | scaleX : Number
x scale of this object.
| ATransformable | |
![]() | scaleY : Number
y scale of this object.
| ATransformable | |
![]() | scaleZ : Number
z scale of this object.
| ATransformable | |
![]() | scene : Scene3D = null
Reference to the scene is it linked to.
| Node | |
| segmentsH : Number
Number of segments vertically.
| Sphere | ||
| segmentsW : Number
Number of segments horizontally.
| Sphere | ||
![]() | side : Vector
Side direction ( local x ) in parent coordinates.
| ATransformable | |
![]() | target : Vector
The position in the parent frame this object should "look at".
| ATransformable | |
![]() | tilt : Number
Getter for the tilt value
| ATransformable | |
![]() | up : Vector
Up direction ( local y ) in parent coordinates.
| ATransformable | |
![]() | useSingleContainer : Boolean
setter that allow user to change the way to render this object.
| Shape3D | |
![]() | viewMatrix : Matrix4
Cached matrix corresponding to the transformation to the camera frame system
| Node | |
![]() | visible : Boolean = true
Specify the visibility of this node.
| Node | |
![]() | x : Number
x position of this object in its parent frame.
| ATransformable | |
![]() | y : Number
y position of this object in its parent frame.
| ATransformable | |
![]() | z : Number
z position of the node in its parent frame.
| ATransformable | |
| Method | Defined by | ||
|---|---|---|---|
|
Sphere(p_sName:String = null, p_nRadius:Number = 100, p_nSegmentsW:Number = 8, p_nSegmentsH:Number = 6)
Creates a Sphere primitive.
| Sphere | ||
![]() |
Adds a new child to this node.
| Node | |
![]() |
addEventListener(p_sEvt:String, p_oL:*):void
Adds a listener for the specified event.
| Node | |
![]() |
clear():void
Clears the graphics object of this object's container.
| Shape3D | |
![]() |
This method returns a clone of this Shape3D.
| Shape3D | |
![]() |
Tests this node against the camera frustum to get its visibility.
| Shape3D | |
![]() |
destroy():void
Destroy this object and all its faces
container object is removed, and graphics cleared.
| Shape3D | |
![]() |
Performs a z-sorting and renders the objects visible polygons.
| Shape3D | |
|
generate(... arguments):Geometry3D
Generates the geometry for this Shape3D
| Sphere | ||
![]() |
getChildByName(p_sName:String, p_bRecurs:Boolean = false):Node
Returns the child node with the specified name.
| Node | |
![]() |
getChildFromId(p_nId:uint, p_bRecurs:Boolean = false):Node
Returns the child node with the specified id.
| Node | |
![]() |
getChildList():Array
Returns an array with all child nodes of this node.
| Node | |
![]() |
getPosition(p_sMode:String = "local"):Vector
Returns the position of this group or object.
| ATransformable | |
![]() |
hasParent():Boolean
Tests if this node has a parent.
| Node | |
![]() |
initFrame():void
Initiates the local coordinate system for this object.
| ATransformable | |
![]() |
Tests if the node passed in the argument is parent of this node.
| Node | |
![]() |
lookAt(p_nX:Number, p_nY:Number, p_nZ:Number):void
Makes this object "look at" the specified position in the parent frame.
| ATransformable | |
![]() |
moveForward(p_nD:Number):void
Translates this object along its forward vector ( local z ) in the parent frame.
| ATransformable | |
![]() |
moveHorizontally(p_nD:Number):void
Translates this object parallel to its parent zx plane and in its forward direction.
| ATransformable | |
![]() |
moveLateraly(p_nD:Number):void
Translates this object laterally in its parent frame.
| ATransformable | |
![]() |
moveSideways(p_nD:Number):void
Translates this object along its side vector ( local x ) in the parent frame.
| ATransformable | |
![]() |
moveUpwards(p_nD:Number):void
Translates this object along its up vector ( local y ) in the parent frame.
| ATransformable | |
![]() |
moveVertically(p_nD:Number):void
Translates this object vertically in ots parent frame.
| ATransformable | |
![]() |
remove():void
Removes this node from the node tree, saving its child nodes.
| Node | |
![]() |
removeChildById(p_nId:Number):Boolean
Removes the child node with the specified id.
| Node | |
![]() |
removeChildByName(p_sName:String):Boolean
Removes the child node with the specified name.
| Node | |
![]() |
removeEventListener(p_sEvt:String, p_oL:*):void
Removes a listener for the specified event.
| Node | |
![]() |
Renders this 3D object.
| Shape3D | |
![]() |
rotateAxis(p_nX:Number, p_nY:Number, p_nZ:Number, p_nAngle:Number):void
Rotate this object around the specified axis in the parent frame by the specified angle.
| ATransformable | |
![]() |
setPosition(p_nX:Number, p_nY:Number, p_nZ:Number):void
Sets the position of this object in coordinates of its parent frame.
| ATransformable | |
![]() |
swapCulling():void
Changes the backface culling side.
| Shape3D | |
![]() |
swapParent(p_oNewParent:Node):void
Moves this node to another parent node.
| Node | |
|
toString():String
| Sphere | ||
![]() |
translate(p_nX:Number, p_nY:Number, p_nZ:Number):void
Translate this object from it's current position with the specified offsets.
| ATransformable | |
![]() |
Updates this node or object.
| ATransformable | |
![]() |
updateBoundingVolumes():void
Updates the bounding volumes of this object.
| Shape3D | |
![]() |
updateTransform():void
Updates the transform matrix of the current object/node before it is rendered.
| ATransformable | |
| DEFAULT_RADIUS | property |
public static var DEFAULT_RADIUS:Number = 100Default radius
| DEFAULT_SCALE | property |
public static var DEFAULT_SCALE:Number = 1Default scale
| DEFAULT_SEGMENTSH | property |
public static var DEFAULT_SEGMENTSH:Number = 6Default value for number of segments vertically
| DEFAULT_SEGMENTSW | property |
public static var DEFAULT_SEGMENTSW:Number = 8Default value for number of segments horizontally
| MIN_SEGMENTSH | property |
public static var MIN_SEGMENTSH:Number = 2Minimum value for number of segments vertically
| MIN_SEGMENTSW | property |
public static var MIN_SEGMENTSW:Number = 3Minimum value for number of segments horizontally
| segmentsH | property |
public var segmentsH:NumberNumber of segments vertically. Defaults to 6.
| segmentsW | property |
public var segmentsW:NumberNumber of segments horizontally. Defaults to 8.
| Sphere | () | constructor |
public function Sphere(p_sName:String = null, p_nRadius:Number = 100, p_nSegmentsW:Number = 8, p_nSegmentsH:Number = 6)Creates a Sphere primitive.
The sphere is created centered at the origin of the world coordinate system, with its poles on the y axis
Parametersp_sName:String (default = null) — A String identifier of this object
|
|
p_nRadius:Number (default = 100) — [optional] - Desired radius.
|
|
p_nSegmentsW:Number (default = 8) — [optional] - Number of segments horizontally. Defaults to 8.
|
|
p_nSegmentsH:Number (default = 6) — [optional] - Number of segments vertically. Defaults to 6.
|
| generate | () | method |
public function generate(... arguments):Geometry3DGenerates the geometry for this Shape3D
Parameters... arguments |
Geometry3D |
See also
| toString | () | method |
public override function toString():String
Returns
String |