CIvfSceneBase Class Reference

#include <ivf/IvfSceneBase.h>

Inheritance diagram for CIvfSceneBase:

CIvfShape CIvfObject CIvfBase CIvfRefCountBase CIvfRTTIBase CIvfScene CIvfWorkspace CIvfCulledScene List of all members.

Public Types

enum  TLightMode { LM_LOCAL, LM_WORLD }
enum  TStereoMode { SM_NONE, SM_ANAGLYPH, SM_QUAD_BUFFER }
enum  TAnaglyphColorPair { CP_RED_GREEN, CP_RED_BLUE, CP_RED_CYAN }

Public Member Functions

void doResize (int width, int height)
 CIvfSceneBase ()
virtual ~CIvfSceneBase ()
 IvfClassInfo ("CIvfSceneBase", CIvfShape)
virtual void setView (CIvfView *view)
CIvfViewgetView ()
void setCamera (CIvfCamera *camera)
void setLightMode (TLightMode mode)
TLightMode getLightMode ()
CIvfCompositegetPreComposite ()
CIvfCompositegetPostComposite ()
CIvfCompositegetComposite ()
void setUseCulling (bool flag)
bool getUseCulling ()
int pick (int x, int y)
void updateSelection ()
CIvfShapegetSelectedShape ()
void clear ()
void deleteAll ()
CIvfShaperemoveChild (CIvfShape *shape)
CIvfShaperemoveChild (int idx)
void addChild (CIvfShape *shape)
CIvfCameragetCamera ()
void setStereoMode (TStereoMode mode)
void setAnaglyphColorPair (TAnaglyphColorPair colorPair)
TAnaglyphColorPair getAnaglyphColorPair ()
CIvfSelectedShapesVector & getSelectedShapes ()
int getSelectionSize ()
CIvfShapegetSelectedShape (int idx)
CIvfShaperemoveShape (CIvfShape *shape)

Protected Member Functions

virtual void createGeometry ()

Detailed Description

Base class for managing a scene

This class manages a scene with lights, cameras, culling and selection. An example of use is shown below:

 CExampleWindow::onInit(int width, int height)
 {
          // Create scene 

          m_scene = new CIvfSceneBase();
          m_scene->getCamera()->setPosition(0.0, 0.0, 8.0);

          // Create a light

          CIvfOldLight* light = new CIvfOldLight();
          light->setPosition(1.0, 1.0, 1.0, 0.0);
          light->setAmbient(0.2f, 0.2f, 0.2f, 1.0f); 

          m_scene->getLightModel()->addLight(light);
 }
 
 CExampleWindow::onRender()
 {
    m_scene->render();
 }

Author:
Jonas Lindemann

Definition at line 68 of file IvfSceneBase.h.


Constructor & Destructor Documentation

CIvfSceneBase::CIvfSceneBase  ) 
 

CIvfSceneBase constructor

virtual CIvfSceneBase::~CIvfSceneBase  )  [virtual]
 

CIvfSceneBase destructor


Member Function Documentation

void CIvfSceneBase::addChild CIvfShape shape  ) 
 

Add child to scene,

See also:
CIvfComposite

Reimplemented in CIvfCulledScene.

void CIvfSceneBase::clear  ) 
 

Clear scene,

See also:
CIvfComposite

virtual void CIvfSceneBase::createGeometry  )  [protected, virtual]
 

Forces an object recalculation.

Reimplemented from CIvfShape.

Reimplemented in CIvfCulledScene, and CIvfWorkspace.

void CIvfSceneBase::deleteAll  ) 
 

Delete all in scene,

See also:
CIvfComposite

CIvfComposite* CIvfSceneBase::getComposite  ) 
 

Return scene composite

TLightMode CIvfSceneBase::getLightMode  ) 
 

Return light mode

CIvfShape* CIvfSceneBase::getSelectedShape  ) 
 

Return selected shape,

See also:
CIvfBufferSelection

bool CIvfSceneBase::getUseCulling  ) 
 

Return culling state

Reimplemented in CIvfCulledScene.

CIvfView* CIvfSceneBase::getView  ) 
 

Returns current view

int CIvfSceneBase::pick int  x,
int  y
 

Initiate selection,

See also:
CIvfBufferSelection

CIvfShape* CIvfSceneBase::removeChild int  idx  ) 
 

Remove child from scene,

See also:
CIvfComposite

CIvfShape* CIvfSceneBase::removeChild CIvfShape shape  ) 
 

Remove child from scene,

See also:
CIvfComposite

void CIvfSceneBase::setCamera CIvfCamera camera  ) 
 

Set camera (required)

void CIvfSceneBase::setLightMode TLightMode  mode  ) 
 

Set light mode

mode - LM_LOCAL = light attached to viewer, LM_WORLD = light positioned in world coordinate system.

void CIvfSceneBase::setUseCulling bool  flag  ) 
 

Set culling state

Reimplemented in CIvfCulledScene.

virtual void CIvfSceneBase::setView CIvfView view  )  [virtual]
 

Set scene view (required)

Reimplemented in CIvfWorkspace.

void CIvfSceneBase::updateSelection  ) 
 

Update selection list,

See also:
CIvfBufferSelection


The documentation for this class was generated from the following file:
Generated on Fri Sep 1 15:36:57 2006 for Interactive Visualisation Framework - Ivf++ by  doxygen 1.4.6-NO