Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: "Benjamen Siroshton" Newsgroups: scea.yaroze.programming.3d_graphics Subject: Multiple 3D Objects with 1 Model Date: 26 Oct 1997 03:26:15 GMT Organization: SCEA News Server Lines: 86 Message-ID: <01bce1bf$6e7fbe80$99b664ce@jack-shit> NNTP-Posting-Host: pdx-tc2-24.triax.com X-Newsreader: Microsoft Internet News 4.70.1155 How can I have multiple objects with the same model. Heres some code. Please tell me what I am doing wrong.. Thanks in Advance. Some of this code I pulled from a demo or somewhere, so if it looks familiar .. thanks for the code. =) This code only will show me ONE object.. ??? Benjamen Siroshton /* SOME INFO ON VARIABLES */ typedef struct{ GsDOBJ2 object; // Object Handler int x, y ,z; // Translation int rx, ry, rz; // Rotation long sx, sy, sz;// Scale int RotSpeed; // Rotation Speed int Visible; // Is Visible? } Object; #define NumOfPlanes 10 Object Plane[NumOfPlanes]; /* INITIALIZE THE MODEL(s) */ u_long *dop; GsDOBJ2 *objp; dop = (u_long *) _1P2TRI_ADDRESS; /* the top address of modeling data */ dop++; /* header skip */ GsMapModelingData(dop); /* map the modeling data to real address */ dop++; Objnum = *dop; /* get the number of objects */ dop++; /* inc the address to link to the handler */ for(lp=0;lpcoord = transformMatrix; // set transformation on object Plane[lp].object.coord2->flg = 0; // flag object as moved GsSortObject4(&Plane[lp].object, &ot[activeBuf], 14 - OTLENGTH, getScratchAddr(0)); } // end of if (IsVisible) } // end of FOR loop