Can't summarize this one! :(
Ok, Here''s my problem....
I have a really nifty world that I''m rendering and I''ve put all the objects or groups of objects in bounding squares (2d world so I don''t need the y). These boxes are represented by a corner (the top left) and size (width and height).
My problem is that I want to not draw anything in a specific box if it''s too far away from the camera to be seen. I''ve tryed several approches to do this but none of them has worked properly.
I''m totally clueless right now, if anyone could help me out here I''d appreciate it.
To summarize in code form...
VECTOR CameraLocation;
VECTOR BoundingLocation;
double BoundingWidth;
double BoundingHeight;
bool IsVisable(){
<< Need Code Here >>
}
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]
1st person shooter type...
Actually a RPG walkaround enviroment. The bounding areas contain any local terrain features (a hill mountain ect...) and any other objects that may be there (table, chair, house, city, etc....) It''s actually a hirarcial setup.
Say you have a place where theres a house on a hill. You put the hill terrain object and the house in a bounding area. if your close enough to see it you render it (this is the part I need help with) if not you don''t. If your close enough to see it then you can check to see if you close enought to the house. and then the stuff inside! I''m also adding other stuff too like the house may end up being a bsp tree of it''s own or whatever other effective technique I use.
Actually a RPG walkaround enviroment. The bounding areas contain any local terrain features (a hill mountain ect...) and any other objects that may be there (table, chair, house, city, etc....) It''s actually a hirarcial setup.
Say you have a place where theres a house on a hill. You put the hill terrain object and the house in a bounding area. if your close enough to see it you render it (this is the part I need help with) if not you don''t. If your close enough to see it then you can check to see if you close enought to the house. and then the stuff inside! I''m also adding other stuff too like the house may end up being a bsp tree of it''s own or whatever other effective technique I use.
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement