00001 #include "TerminalObject.h"
00002
00003 TerminalObject::TerminalObject (RawObject * raw_obj): GraphicalObject (raw_obj)
00004 {
00005
00006 }
00007
00008 TerminalObject::~TerminalObject ()
00009 {
00010
00011 }
00012
00013 void TerminalObject::Draw (int time, Camera * camera, Camera * monitor, bool show_bounding_volume, int culling_mode, bool level_of_detail)
00014 {
00015 Position pos;
00016 bool rotation;
00017 int culling_result;
00018
00019
00020 if (!(position->IsDefined (time))) return;
00021
00022
00023 pos = position->GetPosition (time);
00024
00025
00026 rotation = position->HasStaticRotation ();
00027
00028
00029
00030 ApplyTransformation (pos, rotation);
00031
00032
00033 culling_result = CullObject (camera, monitor, culling_mode, show_bounding_volume);
00034
00035
00036 if (culling_result != C_OUTSIDE)
00037 {raw_object->Draw ();}
00038
00039
00040 UndoTransformation (pos, rotation);
00041 }
00042
00043 void TerminalObject::ComputeBoundingRadius ()
00044 {
00045 bounding_radius = raw_object->GetBoundingRadius ();
00046 }
00047
00048 void TerminalObject::ComputeBoundingBox ()
00049 {
00050 bounding_box = raw_object->GetBoundingBox ();
00051 }
00052
00053 void TerminalObject::PrintToConsole ()
00054 {
00055 Position pos = position->GetPosition (0);
00056 printf ("TerminalObject: {%g, %g, %g, %g, %g, %g}\n", pos.x, pos.y, pos.z, pos.roll, pos.pitch, pos.yaw);
00057 }