| Package | sandy.primitive |
| Class | public class Cone |
| Inheritance | Cone Cylinder Shape3D ATransformable Node |
| Implements | Primitive3D |
This class is a special case of the Cylinder class, with an top radius of 0.
All credits go to Tim Knipt from suite75.net who created the AS2 implementation. Original sources available at : http://www.suite75.net/svn/papervision3d/tim/as2/org/papervision3d/objects/Cone.as
var myCone:Cone = new Cone( "theCone", 150, 300 );
| Method | Defined by | ||
|---|---|---|---|
|
Cone(p_sName:String = null, p_nRadius:Number = 100, p_nHeight:Number = 100, p_nSegmentsW:Number = 8, p_nSegmentsH:Number = 6)
Creates a Cone primitive.
| Cone | ||
![]() |
Adds a new child to this node.
| Node | |
![]() |
addEventListener(p_sEvt:String, p_oL:*):void
Adds a listener for the specified event.
| Node | |
![]() |
CALCUL_RADIUS_FROM_SIDE(p_nSideNumber:uint, p_nSideWidth:uint):Number
[static]
Calculates the radius depending on the number of sides you want and their width.
| Cylinder | |
![]() |
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 the cylinder.
| Cylinder | |
![]() |
Returns a PrimitiveFace object ( an array of polygons ) defining the bottom face.
| Cylinder | |
![]() |
getChildByName(p_sName:String, p_bRecurs:Boolean = false):Node
Returns the child node with the specified name.
| Node | |
![]() |
getFace(p_nFace:uint):PrimitiveFace
Returns a PrimitiveFace object ( an array of polygons ) defining the specified face.
| Cylinder | |
![]() |
getPosition(p_sMode:String = "local"):Vector
Returns the position of this group or object.
| ATransformable | |
![]() |
Returns a PrimitiveFace object ( an array of polygons ) defining the top face.
| Cylinder | |
![]() |
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 | |
![]() |
perform(p_iOperation:INodeOperation):void
Performs an operation on this node and all of its children.
| Node | |
![]() |
remove():void
Removes this node from the node tree, saving its child nodes.
| 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
Returns a string representation of this object
| Shape3D | |
![]() |
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 | |
| Cone | () | constructor |
public function Cone(p_sName:String = null, p_nRadius:Number = 100, p_nHeight:Number = 100, p_nSegmentsW:Number = 8, p_nSegmentsH:Number = 6)Creates a Cone primitive.
The cone is created at the origin of the world coordinate system with its vertical axis along the y axis (pointing upwards).
Parametersp_sName:String (default = null) — A string identifier for this object.
|
|
p_nRadius:Number (default = 100) — Radius of the cone.
|
|
p_nHeight:Number (default = 100) — Height of the cone.
|
|
p_nSegmentsW:Number (default = 8) — Number of horizontal segments.
|
|
p_nSegmentsH:Number (default = 6) — Number of vertical segments.
|