< Zurück | Inhalt | Weiter >

From CuboidTest\Cuboid.java

/*

* Based on Sun's Box.java 1.13 98/11/23 10:23:02

* Work around for the Box bug when rendered in Wireframe mode.

* override this method

*/

public Cuboid( float xdim, float ydim, float zdim, int primflags, Appearance ap)

{

int i; double sign; xDim = xdim; yDim = ydim; zDim = zdim;

flags = primflags;


//Depends on whether normal inward bit is set. if ((flags GENERATE_NORMALS_INWARD) != 0)

sign = −1.0;


else

sign = 1.0;

TransformGroup objTrans = new TransformGroup(); objTrans.setCapability(ALLOW_CHILDREN_READ); this.addChild(objTrans);


Shape3D shape[] = new Shape3D[6];

for (i = FRONT; i <= BOTTOM; i++)

{