Cylinder

Kind of class:public class
Package:org.papervision3d.objects.primitives
Inherits from:TriangleMesh3D < Vertices3D < DisplayObject3D < DisplayObjectContainer3D < EventDispatcher
Known subclasses:
Classpath:org.papervision3d.objects.primitives.Cylinder
File last modified:Sunday, 02 March 2008, 15:23:46
The Cylinder class lets you create and display Cylinders.

The Cylinder is divided in vertical and horizontal segment, the smallest combination is two vertical and three horizontal segments.

Summary


Constructor
  • Cylinder (material:MaterialObject3D = null, radius:Number = 100, height:Number = 100, segmentsW:int = 8, segmentsH:int = 6, topRadius:Number = -1, initObject:Object = null)
    • Create a new Cylinder object.
Class properties

Constructor

Cylinder

public function Cylinder (
material:MaterialObject3D = null, radius:Number = 100, height:Number = 100, segmentsW:int = 8, segmentsH:int = 6, topRadius:Number = -1, initObject:Object = null)

Create a new Cylinder object.
Parameters:
material :
A MaterialObject3D object that contains the material properties of the object.
radius :
[optional] - Desired radius.
segmentsW :
[optional] - Number of segments horizontally. Defaults to 8.
segmentsH :
[optional] - Number of segments vertically. Defaults to 6.
topRadius :
[optional] - An optional parameter for con- or diverging cylinders
initObject:
[optional] - An object that contains user defined properties with which to populate the newly created GeometryObject3D.

It includes x, y, z, rotationX, rotationY, rotationZ, scaleX, scaleY scaleZ and a user defined extra object.

If extra is not an object, it is ignored. All properties of the extra field are copied into the new instance. The properties specified with extra are publicly available.

Class properties

DEFAULT_HEIGHT

public static DEFAULT_HEIGHT:Number = 100
(read,write)

Default height if not defined.

DEFAULT_RADIUS

public static DEFAULT_RADIUS:Number = 100
(read,write)

Default radius of Cylinder if not defined.

DEFAULT_SCALE

public static DEFAULT_SCALE:Number = 1
(read,write)

Default scale of Cylinder texture if not defined.

DEFAULT_SEGMENTSH

public static DEFAULT_SEGMENTSH:Number = 6
(read,write)

Default value of gridY if not defined.

DEFAULT_SEGMENTSW

public static DEFAULT_SEGMENTSW:Number = 8
(read,write)

Default value of gridX if not defined.

MIN_SEGMENTSH

public static MIN_SEGMENTSH:Number = 2
(read,write)

Minimum value of gridY.

MIN_SEGMENTSW

public static MIN_SEGMENTSW:Number = 3
(read,write)

Minimum value of gridX.

Instance properties

segmentsH

public segmentsH:Number
(read,write)

Number of segments vertically. Defaults to 6.

segmentsW

public segmentsW:Number
(read,write)

Number of segments horizontally. Defaults to 8.