Example usage for javax.media.j3d QuadArray setCoordinates

List of usage examples for javax.media.j3d QuadArray setCoordinates

Introduction

In this page you can find the example usage for javax.media.j3d QuadArray setCoordinates.

Prototype

public void setCoordinates(int index, float coordinates[]) 

Source Link

Document

Sets the coordinates associated with the vertices starting at the specified index for this object.

Usage

From source file:FourByFour.java

public BigCube(Appearance appearance, float size) {

    QuadArray quadArray = new QuadArray(24, QuadArray.COORDINATES | QuadArray.NORMALS);

    for (int i = 0; i < 72; i++)
        verts[i] *= size;/*from  w  w w.j  a  v a2 s  . co  m*/

    quadArray.setCoordinates(0, verts);
    quadArray.setNormals(0, normals);

    shape3D = new Shape3D(quadArray, appearance);
    shape3D.setCapability(Shape3D.ALLOW_GEOMETRY_READ);
    shape3D.setCapability(Shape3D.ALLOW_GEOMETRY_WRITE);
    shape3D.setCapability(Shape3D.ALLOW_APPEARANCE_READ);
    shape3D.setCapability(Shape3D.ALLOW_APPEARANCE_WRITE);
}