21 Dec 2008

Mesh Reorganization Continue

The mesh functions and data structures have been integrated into EntityMesh class. One function GenerateSkinnedMesh gave me particular trouble, because I wasn't sure where to put that function. Originally I thought to put it in EntityMesh, but CAllocateHierarchy is also using it. So I attempted to use static or singleton etc, but realize those don't seem to work. Eventually I realize that only updateSkinningMethod in EntityMesh is using it, and this function I might not need it anyway. So I just comment it out and put GenearteSkinnedMesh in CAllocateHierarchy class.

Now I look at it once again, I realize I should be able to put updateSkinningMethod in CAllocateHiearchy class, but...maybe I shouldn't do that. Nevertheless I think I will promote CAllocateHierarchy object from local function object to class object to enable the updateSkinningMethod for the future. It makes sense to do it that way I think.

Later I will clean stuff up and try to have 2 entities.

No comments: