#include <SimViewport.h>
Inheritance diagram for vrj::SimViewport:


Public Methods | |
| SimViewport () | |
| SimViewport (const SimViewport &sv) | |
| virtual | ~SimViewport () |
| virtual void | config (jccl::ConfigElementPtr element) |
| Configure the simulator. More... | |
| virtual void | updateProjections (const float positionScale) |
| Update the projections. More... | |
| DrawSimInterface * | getDrawSimInterface () |
| void | setDrawSimInterface (DrawSimInterface *draw_sim_i) |
Protected Attributes | |
| DrawSimInterface * | mSimulator |
| The simulator that we are using here. More... | |
|
|
Definition at line 51 of file SimViewport.h.
00051 : Viewport() 00052 {;} |
|
|
Definition at line 54 of file SimViewport.h.
00054 : Viewport(sv), mSimulator(sv.mSimulator) 00055 { 00056 ; 00057 } |
|
|
Definition at line 59 of file SimViewport.h.
00060 {
00061 ;
00062 }
|
|
|
Configure the simulator.
Reimplemented from vrj::Viewport. Definition at line 50 of file SimViewport.cpp. References mSimulator, and vrj::Viewport::SIM.
00051 {
00052 vprASSERT(element.get() != NULL);
00053 vprASSERT(element->getID() == "simulator_viewport");
00054
00055 Viewport::config(element);
00056
00057 mType = SIM;
00058
00059 const float vert_fov = element->getProperty<float>("vertical_fov");
00060
00061 mLeftProj = new CameraProjection;
00062 ((CameraProjection*) mLeftProj)->setVerticalFOV(vert_fov);
00063 mLeftProj->config(element);
00064 mLeftProj->setEye(Projection::LEFT);
00065 mLeftProj->setViewport(this);
00066
00067 mRightProj = new CameraProjection;
00068 ((CameraProjection*) mRightProj)->setVerticalFOV(vert_fov);
00069 mRightProj->config(element);
00070 mRightProj->setEye(Projection::RIGHT);
00071 mRightProj->setViewport(this);
00072
00073 //bool has_simulator(false);
00074 //has_simulator = element->getProperty<bool>("has_simulator_plugin");
00075 mSimulator = NULL;
00076
00077 // Create the simulator stuff
00078 /*if(has_simulator)
00079 {
00080 jccl::ConfigElementPtr sim_element =
00081 element->getProperty<jccl::ConfigElementPtr>("simulator_plugin");
00082
00083 vprDEBUG(vrjDBG_DISP_MGR, vprDBG_CONFIG_LVL)
00084 << "SimViewport::config() creating simulator of type '"
00085 << sim_element->getID() << "'\n" << vprDEBUG_FLUSH;
00086 mSimulator = DrawSimInterfaceFactory::instance()->createObject(sim_element->getID());
00087
00088 // XXX: Change this to an error once the new simulator loading code is
00089 // more robust. -PH (4/13/2003)
00090 vprASSERT(NULL != mSimulator && "Failed to create draw simulator");
00091 mSimulator->initialize(this);
00092 mSimulator->config(sim_element);
00093 }
00094 */
00095 }
|
|
|
Update the projections.
Implements vrj::Viewport. Definition at line 97 of file SimViewport.cpp. References mSimulator.
00098 {
00099 if(mSimulator != NULL)
00100 {
00101 mSimulator->updateProjectionData(positionScale, mLeftProj, mRightProj);
00102 }
00103 }
|
|
|
Definition at line 73 of file SimViewport.h.
00074 { return mSimulator; }
|
|
|
Definition at line 76 of file SimViewport.h.
00077 {
00078 mSimulator = draw_sim_i;
00079 }
|
|
|
The simulator that we are using here.
Definition at line 82 of file SimViewport.h. Referenced by config, and updateProjections. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002