Hi all,
I'm playing with mass-spring stuff and need to know which verts are adjacent to any given vert.
At the moment I've no problem getting the indices of adjacent tris but cannot figure out how to get the point indices from the triangle indices (since I can't assume that the vert buffer is tri-list, tri-soup, or tri-fan).
I've had a look at
[code]pMesh->ConvertAdjacencyToPointReps(&adjacencyBuffer, &pointAdjacency)[/code]but I don't understand what the returned pointAdjacency represents (and how to use it to lookup the coords of any vert's neighbouring verts):
For a cube I get the following:
TriAdjacency[36] = (6,9,1,2,10,0,1,9,3,4,10,2,3,8,5,7,11,
4,0,11,7,5,8,6,7,4,9,2,0,8,1,3,11,5,6,10)
PointAdj[36] = (0,1,2,3,3,2,6,7,7,6,10,11,1,0,11,10,1,10,
6,2,0,3,7,11,0,0,0,0,0,0,0,0,0,0,0,0);
But this doesn't make sense: How can the first point 0 have adjacent points 0,1,2?
Or, taken another way, how can tri 6 have points 0,1,2?
TriAdjacency has 36 elements. This is because there are 2 tris for each of the 6 faces and each tri has 3 neighbours (2 * 6 * 3 = 36).
I'm looking for the meaning of the "point representatives" (quote from the SDK) labelled as PointAdj above.
The first 24 numbers are the useful data. 24 makes sense because there are 8 corners (verts) on a cube and each has 3 adjacent verts (forming 3 edges that converge at that point). 8 points * 3 neighbours for each point = 24 indices.
But if you try to interpret the sequence in the same way as the triAdj sequence by taking it in sets of 3, there are many sets which appear invalid. No number should be repeated in any set of 3.. but there is 3,3,2 and 6,7,7. Note also that the following numbers do not appear at all: 4,5,8,9,12,13,14,15,16,17,18,19,20,21,22,23. (the cube is made up of 24 points).
Can anyone shed some light on how to interpret the pointAdj sequence in order to get my adjacent points?
Thanks in adv. Greg
Hey gamer 500, I'm 13. I've been in the same position as you, i hope ik able to help you. in order to make games, you need to learn to program... This can be a daunting task... It Is until you have your (what I call) eureaka moment... Generally youl be in the shower... Maybe having a bath or just relaxing and Boom , everything will make sense. You will understand classes functions EVERYTHING. I still get these but on more complicated problems (like collision detection).
At the moment I'm making my first game in flash. I managed to get the student discount on flash builder which is very easy (I got it with my buss pass). But in terms of what you want to do, I would suggest learning something called unity3D (if you have the money). As I believe unity is basically a multi-platform game engine for 3d games (if you want to make 2d games checkout futile). The only problem would be that unity costs money to release on those platforms you specified.
Another problem I have to present to you is that xBox and PS3 games are not compatible. (As far as I know). PS3/WII/most other consoles use a thing called openGL to render graphics (you don't really need to worry about this). On the other hand xboxes do NOT accept openGL, they use a thing called directX (which is basically microsofts openGL).
I really do recomend flash for getting started though. DO NOT go into python/pygame if you ever want to release your game. The easiest way to start games would be to download flash develop or flash builder trial. Then use an engine to get started (eg. Flixel or flashpunk).
I really hope this helped... If I'm not being specific enough email me: harrison@theshoebridges.com (also HIGH FIVE FOR BEING UNDERAGE AUSSIE INDIES!!!)