Question ABout Models And Polygons

Started by
0 comments, last by Gammastrahler 22 years, 3 months ago
hi folks, my engine is organized like this: a class CPolygon for abstracts like triangles, etc. and a class CModel that holds an array of CPoylgons to build solid and complex objects. now my question: should i allow each polygon to have its own relative origin in 3d space and orientation? or should this only used for a CModel object ? in other words, for each drawn polygon call glPush and glPopMatrix to use a glTranslatef and glRotatef? or should this only be used in CModel? thanks+greets chris Edited by - gammastrahler on January 9, 2002 8:12:45 AM
Advertisement
I would say to only do that in CModel. The polygons don''t NEED to have a center point that they are relative to, although you could implement it that way.

If you needed polygons that could rotate or move independent of the model object, then you would be better off using a center point and orientation in each polygon as well. Usually that can be done by moving the vertices in some other way, though, so I never worry too much about those cases.

This topic is closed to new replies.

Advertisement