Skip to main content
GameDev.net gamedev.net
🔒 Locked

Why..!! And how??

Started by HellRiZZer Nov 15, 2001 at 7:05 PM 1 replies 350+ views
Original Post
HellRiZZer
HellRiZZer
What I''ve been trying to do is to use vertex structure in glMap2f and glEvalMesh, but they all seems to accpet only data structure as ctrlpoints[4][4][3] .. And I need to know how can I convert from my vertex structure, e.g struct float x; float y; float z; } VERTEX, *PVERTEX; to what I can do as VERTEX ctrlpoints[4][4];.... How do I go from simple data type as they use, to structs or even classes? Please help..
v71
v71
if i have grasped right you have ctrplt[4][4][3]
that''s to say a 4x4 matrix each of 3 more array entryes right ?
and you want to convert it into ctrlpts[4][4].x , y , z , am i right ?
try this

int n=4 ;
for ( j=0; jfor ( i=0; i{
dest[j].x=src[i][j][0];
dest[i][j].y=src[i][j][1];
dest[i][j].z=src[i][j][2];
}


v71
v71
Oh shit the post messed up my code, i hope you undedtand
that i have done two cycles

for ( j = 0 ; j< n ; j ++ )

and

for ( i = 0 ; i< n ; i ++ )

i hope this will be posted correctly
sorry again.



Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.