This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,899 Users
  • 2,269,649 Discussions
  • 7,916,821 Comments

Discussions

YoyoApp.java example In the J3D package...

843799
843799 Member Posts: 49,999
edited Jan 5, 2002 7:26AM in Java 3D
YoyoApp.java example In the J3D package...

private Geometry yoyoGeometry() {

TriangleFanArray tfa;
int N = 17; //This mean 17 vertexs right?
int totalN = 4*(N+1); //What is this mean?
Point3f coords[] = new Point3f[totalN];
int stripCounts[] = {N+1, N+1, N+1, N+1};//
And what is this?Thank you.
float r = 0.6f;
float w = 0.4f;
int n;
double a;
float x, y;

Comments

  • 843799
    843799 Member Posts: 49,999
    If i remember correctly:
    N = total vertices in a single fan (not including central point)

    totalN = total vertices for the whole yoyo (4 fans so 4*(n+1) total ).

    int stripCounts[] = {N+1, N+1, N+1, N+1}
    Specifies 4 fans (since array of length 4) each with N+1 vertices.

    Basically there is one TriangleFanArray, but this allows multiple triangle fans within it. The coords are stored in one long array and the stripCounts specifies how many individual fans and how long they all are.
This discussion has been closed.