Archived

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

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

This topic is 5707 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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