Archived

This topic is now archived and is closed to further replies.

Panda

Trouble with the hierarchy

Recommended Posts

Hi. I''m currently skimming trough PR header files (2.6), looking at functions and structures in order to migrate from my current (d3d retained mode) engine. I have troubles figuring out this: 1) In my opinion in PR objects are very static, they are not meant to be changed at runtime (i mean adding/removing segments) is that true? 2) In d3drm every object was a collection of "frames", organizated in hierarchy, every frame had one or more "visuals" which were the renderable objects (segments in PR). In PR i think there is not this distinction: how about if i want to add a children segment (example: a cap on a head)... i have to modify the object, so i cannot use the entity interface....?!? 3) i do not understand why entities and segments are not totally recursive structures. I mean: in the entity struct there is a ORIENTATION information... i also get this information for every SEGMENT... so, shouldn''t entity be only a wrapper around a father segment? 4) Is it safe, now and for future versions, to ignore PR''s Entity and Segment functions and roll our own object managing functions and logic using only the structures? This can be a problem if the structures change noticeably among versions... Chris! Please answer ------------------------------ Stefano ''Panda'' Baraldi Lead Programmer @ Tremens www.tremensgames.com ------------------------------

Share this post


Link to post
Share on other sites
1) Yes, Power Render was designed to take in objects from another source, like 3D Studio or Lightwave. It was assumed that complex objects needed for games would not be generated by code, so the structures were allocated when loading an object.

2) If you know which objects you want to attach beforehand, you could design them all in the modeling program in the hierarchy, then change the segment flags at runtime to enable or disable certain objects.

3) This was just a design decision. I don''t use linked lists anywhere in Power Render.

4) You could make a higher level set of functions that group
entities together, and adjust the matrices for the
entities to make your own hierarchy. This wouldn''t be
affected by changes within PR''s structures.

Chris

Share this post


Link to post
Share on other sites