Hey guys, I've been working on a small project and have been wondering something. Okay, you know how 3D models are animated using nested matrices right? Well instead of hard-coding the structure of the matrices, is there some way data like this could be loaded from CD?
No rush or anything, the code still works fine with the way it is, but there's gotta be a better way than having something like...
in your source everytime, eh? I remember there being some sort of 'object' structure that pointed to 'limbs' (child matrices) of a model, but since I'm at work I don't have the docs right in front of me. (god forbid I'd actually be working, heh :lol: )
Once again, this is more of a curiosity than a crisis.
Like always, any info is appreciated 😉
No rush or anything, the code still works fine with the way it is, but there's gotta be a better way than having something like...
Code:
void handle_character_skeletal_structure()
{
switch(selected_character) //where 'selected_character' is a global.
{
case 0:
slPushMatrix();
{
e2_SPRITE3D_animate(0);
slPushMatrix();
{
e2_SPRITE3D_animate(1);
slPushMatrix();
{
e2_SPRITE3D_animate(2);
}
slPopMatrix();
}
slPopMatrix();
}
slPopMatrix();
break;
case 1:
...
break;
}
return;
}
Once again, this is more of a curiosity than a crisis.
Like always, any info is appreciated 😉