[pythian] Re: CODE - Cal3D

  • From: Darryl Long <pythianproject@xxxxxxx>
  • To: pythian@xxxxxxxxxxxxx
  • Date: Sat, 15 Jun 2002 00:43:20 -0700

Alright, I've looked at it, and I think you were on the right track, 
Mike.  It makes sense to pass in a TModelInstance for rendering. 
 However, it only makes sense to pass in a TAnimatedModel for animating.

Your DrawMeshes requires the use of a CalModel.  What's a CalModel? 
 What's the CalCoreModel?  Is it an instance of a model or the generic 
bone structure of a model?  Could we re-use the same CalModel for 
multiple characters that all look the same, but may have different state 
information (i.e. animation, bones positions)?

Currently, TAnimatedModel is designed so each TAnimatedModel contains 
state information and refers to a TAnimatedModel (the bones and stuff) 
that gets set to the right pose/animation/frame then rendered.  In this 
way, there is only one copy of the model data for each "type" of model. 
 For instance, only one copy of Tree7 is loaded into memory and ogl, but 
may be rendered in several different locations (one for each instance).

By the looks of it, your TModelInstance contains a CalModel instance and 
just tells the TSkeletalModel to draw it.  This requires a copy of the 
CalModel for each instance.  Is this right?  I suspect CalModel is 
equivalent to TAnimatedModel and CalCoreModel is equivalent to 
TAnimatedModel, but I just want to make sure first.

Let me know if this is the way it is supposed to work and I'll adjust 
the design accordingly.

Thanks,

Darryl




Other related posts: