Example usage for javax.media.j3d GeometryArray getCoordinate

List of usage examples for javax.media.j3d GeometryArray getCoordinate

Introduction

In this page you can find the example usage for javax.media.j3d GeometryArray getCoordinate.

Prototype

public void getCoordinate(int index, Point3d coordinate) 

Source Link

Document

Gets the coordinate associated with the vertex at the specified index for this object.

Usage

From source file:MyJava3D.java

public void drawPoint(Graphics graphics, GeometryUpdater updater, GeometryArray geometryArray, int index) {
    updater.update(graphics, this, geometryArray, index, frameNumber);
    geometryArray.getCoordinate(index, pointArray[0]);
    projectPoint(pointArray[0], projectedPointArray[0]);
    drawPoint(graphics, projectedPointArray);
}

From source file:MyJava3D.java

public void drawLine(Graphics graphics, GeometryUpdater updater, GeometryArray geometryArray, int index) {
    for (int n = 0; n < 2; n++) {
        updater.update(graphics, this, geometryArray, index + n, frameNumber);
        geometryArray.getCoordinate(index + n, pointArray[n]);
    }//from   w ww. jav a 2 s.  c  o m

    for (int n = 0; n < 2; n++)
        projectPoint(pointArray[n], projectedPointArray[n]);

    drawLine(graphics, geometryArray, index, projectedPointArray);
}

From source file:MyJava3D.java

public void drawTriangle(Graphics graphics, GeometryUpdater updater, GeometryArray geometryArray, int index) {
    for (int n = 0; n < 3; n++) {
        updater.update(graphics, this, geometryArray, (index + n), frameNumber);
        geometryArray.getCoordinate((index + n), pointArray[n]);
    }/*w  ww  . j a v  a2s  . c o  m*/

    for (int n = 0; n < 3; n++)
        projectPoint(pointArray[n], projectedPointArray[n]);

    drawTriangle(graphics, geometryArray, index, projectedPointArray);
}