sciGraphics::CameraBridgeFactory Class Reference

#include </home/scilab/compilation_chain/sci_checkOut/scilab/modules/renderer/src/cpp/subwinDrawing/CameraBridgeFactory.h>

Collaboration diagram for sciGraphics::CameraBridgeFactory:

Collaboration graph
[legend]

Public Member Functions

 CameraBridgeFactory (void)
virtual ~CameraBridgeFactory (void)
CameraBridgecreate (void)
void update (void)
void setStrategies (CameraJoGL *cameraImp)
void setCorrespondingCamera (Camera *camera)

Protected Attributes

Cameram_pCamera

Detailed Description

Definition at line 24 of file CameraBridgeFactory.h.


Constructor & Destructor Documentation

sciGraphics::CameraBridgeFactory::CameraBridgeFactory ( void   )  [inline]

Definition at line 29 of file CameraBridgeFactory.h.

References m_pCamera, and NULL.

00029 { m_pCamera = NULL; }

virtual sciGraphics::CameraBridgeFactory::~CameraBridgeFactory ( void   )  [inline, virtual]

Definition at line 31 of file CameraBridgeFactory.h.

References m_pCamera, and NULL.

00031 { m_pCamera = NULL;}


Member Function Documentation

CameraBridge * sciGraphics::CameraBridgeFactory::create ( void   ) 

Create a new cameraBridge with the right driver

Definition at line 29 of file CameraBridgeFactory.cpp.

References m_pCamera, and setStrategies().

Referenced by sciGraphics::CameraFactory::create().

00030 {
00031   CameraJoGL * newBridge = new CameraJoGL(m_pCamera) ;
00032 
00033   setStrategies(newBridge);
00034   
00035   return newBridge;
00036 }

Here is the call graph for this function:

Here is the caller graph for this function:

void sciGraphics::CameraBridgeFactory::update ( void   ) 

Update the camera bridge

Definition at line 38 of file CameraBridgeFactory.cpp.

References sciGraphics::DrawableObject::getDrawableImp(), sciGraphics::DrawableObject::getDrawedObject(), sciGraphics::getSubwinDrawer(), m_pCamera, and setStrategies().

Referenced by sciGraphics::CameraFactory::update().

00039 {
00040   DrawableObjectBridge * curCameraBridge = getSubwinDrawer(m_pCamera->getDrawedObject())->getCamera()->getDrawableImp();
00041 
00042   setStrategies(dynamic_cast<CameraJoGL *>(curCameraBridge));
00043 }

Here is the call graph for this function:

Here is the caller graph for this function:

void sciGraphics::CameraBridgeFactory::setStrategies ( CameraJoGL cameraImp  ) 

Set the right java mapper

Definition at line 45 of file CameraBridgeFactory.cpp.

References sciGraphics::DrawableObject::getDrawedObject(), sciGraphics::DrawableObjectJoGL::getDrawer(), NULL, sciGetIsIsoView(), and sciGraphics::DrawableObjectJoGL::setJavaMapper().

Referenced by create(), and update().

00046 {
00047   sciPointObj * pSubwin = cameraImp->getDrawer()->getDrawedObject();
00048   CameraJavaMapper * javaMapper = NULL;
00049 
00050   if (sciGetIsIsoView(pSubwin))
00051   {
00052     javaMapper = new IsoViewCameraJavaMapper() ;
00053   }
00054   else
00055   {
00056     javaMapper = new IsometricCameraJavaMapper() ;
00057   }
00058 
00059   cameraImp->setJavaMapper(javaMapper);
00060 
00061 }

Here is the call graph for this function:

Here is the caller graph for this function:

void sciGraphics::CameraBridgeFactory::setCorrespondingCamera ( Camera camera  )  [inline]

Set the parent subwin, needed by CameraImpFactory.

Definition at line 52 of file CameraBridgeFactory.h.

References m_pCamera.

Referenced by sciGraphics::CameraFactory::create(), and sciGraphics::CameraFactory::update().

00052 { m_pCamera = camera; }

Here is the caller graph for this function:


Field Documentation


The documentation for this class was generated from the following files:

Generated on Tue Sep 9 18:35:28 2008 for Scilab [trunk] by  doxygen 1.5.5