Class sandy.primitive.CylSurface

Implemented Interfaces

Primitive3D

Description

CylSurface A cylindrically curved surface

Field Index

testCanvas

Inherited from Object3D

Inherited from Node

Method Index

new CylSurface()
drawCell(), generate(), getPrimitiveName(), getSize(), toString()

Inherited from Object3D

Inherited from Leaf

Inherited from Node

Constructor Detail

CylSurface

public function CylSurface(radius:Number, height:Number, angle:Number, quality:Number, mode:String, gridAngle:Number)

This is the constructor to call when you need to create a CylSurface primitive.

This method will create a complete object with vertex, normales, texture coords and the faces. So it allows to have a custom 3D object easily

radius represents the radius of the cylinder, height represent its height and quality its quality, so the number of faces

Parameters

radiusNumber
heightNumber
angleNumber, the generating angle in degrees starting from 0
qualityNumber
modeString represent the two available modes to generates the faces. "tri" is necessary to have faces with 3 points, and "quad" for 4 points.

Field Detail

testCanvas

testCanvas:MovieClip

Method Detail

generate

public function generate(Void):Void

Description copied from Primitive3D

generate

generate all is needed to construct the Object3D :

  • Vertex
  • UVCoords
  • TriFace3D
  • NFace3D not implemented yet

It can construct dynamically the object, taking care of your preferences given in arguments.
Note in Sandy 0.1 all faces have only three points. This will change in the future version, and give to you the possibility to choose n points per faces

Specified By

generate() in sandy.primitive.Primitive3D

getSize

public function getSize(Void):Vector

getSize() returns the radius, height, and angle as a Vector (useful for storing an object's attributes). Returns vector where x is the radius, y is the height, and z is the angle

Specified By

getSize() in sandy.primitive.Primitive3D

getPrimitiveName

public function getPrimitiveName(Void):String

toString

public function toString(Void):String

Description copied from Object3D

Represents the Object3D into a String.

Specified By

toString() in sandy.primitive.Primitive3D

Overrides

toString() in sandy.core.Object3D

drawCell

function drawCell(p1:Vertex, p2:Vertex, p3:Vertex, p4:Vertex)