Logo Search packages:      
Sourcecode: 3depict version File versions  Download package

unsigned int Scene::addCam ( Camera c  ) 

Add a camera.

Pointer must be set to a valid (allocated) object. !Scene will delete upon call to clearAll, clearCameras or !upon destruction

Definition at line 414 of file scene.cpp.

References cameras, camIDs, UniqueIDHandler::genId(), setDefaultCam(), and UniqueIDHandler::size().

Referenced by VisController::addCam(), VisController::loadState(), and VisController::setScene().

{
      ASSERT(c);
      ASSERT(cameras.size() == camIDs.size());
      cameras.push_back(c);
      unsigned int id = camIDs.genId(cameras.size()-1);

      if(cameras.size() == 1)
            setDefaultCam();
      return id;
}


Generated by  Doxygen 1.6.0   Back to index