Advertisement

Hierarchical Animation

Started by June 11, 2000 08:01 AM
2 comments, last by Raptor 24 years, 6 months ago
I would like to know how to build a hierarchical animation structure. pls let me know how to build a tree list in c++ so that i can hold the parent and child''s locations,rotation and other things can i output the Link Hierarchy to the X File format for the D3DIM Framework and use it in the framework? can i find any tutorials on the subject? The only way around it is Through it!!
Helppppppp!!


The only way around it is Through it!!
Advertisement
How do you store your mesh data and their matrices?
I dunno about animations... but typical object should look like this-

class obj{
D3DMATRIX mat; //in relation to world origin, or parent object
obj * parent;
obj * child;
VERTEX data[40];
int num_points;
void Render();
}

// typical object rendering
void obj::Render(){
obj * pobj = &this
d3ddevice.SetTransform(WORLDMATRIX, IdentityMatrix);
while(pobj){
d3ddevice.MultiplyTransform(WORLDMATRIX, pobj->mat);
d3ddevice.drawPrimitive(pobj->data);
pobj = pobj->child;
}
}

I don't think you can save this into X Files, but the individual objects you can.

Edited by - iwasbiggs on June 12, 2000 1:26:39 AM
___________________________Freeware development:ruinedsoft.com

This topic is closed to new replies.

Advertisement