Sign in to follow this  

is this a bad design??

This topic is 4837 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

I am making a basic program to rotate a 3d cube. Now i have ended with a basic design where lots of things are public. I had to do so coz i wanted the classes to be usable for any mesh. Basically i have created classes where we can access vertex from the mesh class itself by using : mesh.polygon[n].vertex[n] does this sound like a poor design?? thanx guys

Share this post


Link to post
Share on other sites
Hi!

The idea of classes is to encapsulate the data and hide the implentation from the client programmer. If you need to only read the polygons/vertices and not change them, you can overload the []-operator.

Cheers,
Drag0n

Share this post


Link to post
Share on other sites

This topic is 4837 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this