Class Question, and stuff
I have my Octree code working(kinda), But it doesnt sort by faces, it sorts by points. And I have a face class that has:
float Index[3];
Each Index, is which Vertex is in the Face/Triangle.
Now, I have it structered like this:
class Map
{
COctree Octree;
CFace *Face;
}
I want to have a display function in the COctree class to check if it is a leaf, then it should display it. How would I let my Octree access Face. Should I make them friend class''s? How should I do that???
Thank You VERY much.
well don''t make them friends... personal I think its a bad practice and shouldn''t have been implemented at all in C++(what the point? you make something private/protected so only that class can change/see that member)... instead use functions(public) in Face that will get/set the data for you.... then eather pass a pointer to Map Or Face to your display function...
Great Milenko
Great Milenko
Words Of Wisdom:
"Never Stick A Pretzel In Your Butt It Might Break Off In There."
http://www.crosswinds.net/~milenko
http://www.crosswinds.net/~pirotech
The Great Milenko"Don't stick a pretzel up your ass, it might get stuck in there.""Computer Programming is findding the right wrench to hammer in the correct screw."
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement