#include <DLODObject.h>
Inheritance diagram for DLODObject:
Public Member Functions | |
DLODObject (RawObject *best_level) | |
~DLODObject () | |
void | Draw (int time, Camera *camera, Camera *monitor, bool show_bounding_volume, int culling_mode, bool level_of_detail) |
void | PrintToConsole () |
void | AddLevel (RawObject *next_level, float distance) |
DLODObject * | GetClone () |
Protected Member Functions | |
void | ComputeBoundingRadius () |
void | ComputeBoundingBox () |
Private Member Functions | |
DLODObject () | |
Private Attributes | |
int | num_levels |
RawObject * | raw_obj [MAX_LEVEL] |
float | distances [MAX_LEVEL+1] |
Static Private Attributes | |
static const int | MAX_LEVEL = 8 |
This class implements a discrete level of detail object. Several objects that represent different levels of detail may be added to this object along with a distance threshold. Whenever the object is drawn, the appropriate level of detail is chosen by evaluating the distance of the object from the camera.
Definition at line 21 of file DLODObject.h.
|
Constructor: Brings this object into a consistent state.
Definition at line 3 of file DLODObject.cpp. |
|
Destructor. Definition at line 9 of file DLODObject.cpp. |
|
Hide the default constructor. |
|
Adds a new level of detail to this object. The newly added object will be displayed as soon as its distance from the camera is bigger than a certain threshold.
Definition at line 82 of file DLODObject.cpp. |
|
Implementation of the bounding box computation. The bounding box is defined as the bounding box of the object which has been used with the constructor. Reimplemented from GraphicalObject. Definition at line 108 of file DLODObject.cpp. |
|
Implementation of the bounding sphere computation. The bounding radius is defined as the bounding radius of the object which has been used with the constructor. Reimplemented from GraphicalObject. Definition at line 103 of file DLODObject.cpp. |
|
Implementation of the draw routine. Chooses the appropriate object to draw depending on the distance between the camera and the origin of this object.
Reimplemented from GraphicalObject. Definition at line 14 of file DLODObject.cpp. |
|
Returns a new discrete level of detail object that consists of the exact same objects and distance thresholds.
Definition at line 93 of file DLODObject.cpp. |
|
Prints information about the object to the console. Reimplemented from GraphicalObject. Definition at line 113 of file DLODObject.cpp. |
|
Array containing all the distances used to determine the level at which the object shall be drawn. Definition at line 102 of file DLODObject.h. |
|
Maximum number of levels. Definition at line 93 of file DLODObject.h. |
|
The number of different levels that this object has. Definition at line 96 of file DLODObject.h. |
|
Array containing all the objects of the different levels. Definition at line 99 of file DLODObject.h. |