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


How to implement control points on 3d objects in OOP?

Recommended Posts

LordShade    251
How would you implement the control points on 3D objects in C++? What I mean by control points is when the user clicks on them it may move the entire face, just a vertice, or a whole selection of vertices. Currently I have a UIState derived class that handles events from the keyboard, mouse, etc. I just snapin new states whenever I want to say, add different kinds of objects to the ''map.'' So for an example let''s take my CAddCubeUIState. When the user goes into this state and creates a basic cube, it goes into a sub-state that says we''re editing the cube. Note the cube hasn''t actually been added to the map yet. The code for drawing and hit testing the "control points" on the cube are housed in this state class. I have generalized several of the funtions for hit testing and drawing but I''m trying to think of a better method through OOP to represent and use these control points. But the control points can do many different things depending on the item selected. So any thoughts on this?

Share this post

Link to post
Share on other sites