Class sandy.primitive.Plane3D

Implemented Interfaces

Primitive3D

Description

VPlane

Field Index

Inherited from Object3D

Inherited from Node

Method Index

new Plane3D()
generate(), getPrimitiveName(), getSize(), toString()

Inherited from Object3D

Inherited from Leaf

Inherited from Node

Constructor Detail

Plane3D

public function Plane3D(h:Number, lg:Number, q:Number, mode:String)

This is the constructor to call when you nedd to create an Vertical Plane 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

h represents the height of the Plane, lg represent its length and q the quality, so the number of parts the surface will be sliced on. The plane will be located at z coordinate set to 0

Parameters

hNumber
lgNumber
qNumber Between 1 and 10
modeString represent the two available modes to generates the faces. "tri" is necessary to have faces with 3 points, and "quad" for 4 points.

Method Detail

generate

public function generate(Void):Void

generate all is needed to construct the object. Vertex, UVCoords, Faces

Generate the points, normales and faces of this primitive depending of tha parameters given

It can construct dynamically the object, taking care of your preferences givent in parameters. Note that for now all the faces have only three points. This point will certainly change in the future, and give to you the possibility to choose 3 or 4 points per faces

Specified By

generate() in sandy.primitive.Primitive3D

getSize

public function getSize(Void):Vector

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

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