Exemplo n.º 1
0
std::string MemoryManager::statsString()
{
    std::stringstream str;
    str << "Memory Statistics:" << std::endl;
    str << "\tActive Objects     " << objectCount() << std::endl;
    str << "\tObjectstore size   " << objectTable.size() << std::endl;
    str << "\tFree objects       " << objectFreeListInv.size() << std::endl;

    return str.str();
}
Exemplo n.º 2
0
void Scene::write( std::ostream &out ) const {
  out << "Input scene file: " << _inputSceneFile << std::endl;
  out << *_camera << std::endl;
  out << _viewPlane << std::endl;
  out << "Number of Lights: " << lightCount( ) << std::endl;
  out << "Lights:" << std::endl;
  for(unsigned int i = 0; i < lightCount( ); i++ ){
    out << _lights[i];
  }
  out << "Background Color: ";
  _backgroundColor.write_row(out) << std::endl;
  out << "Number of Materials: " << materialCount( ) << std::endl;
  out << "Materials:" << std::endl;
  for(unsigned int i = 0; i < materialCount( ); i++){
    out << _materials[i];
  }
  out << "Group:" << std::endl;
  for(unsigned int i = 0; i < objectCount( ); i++){
    _objects[i]->write(out);
  }
}
Exemplo n.º 3
0
GeometricObject* Scene::objectAtIndex(size_t i){
  if( i >= objectCount( ) ){
    throw std::range_error("Object index out of range");
  }
  return _objects[i];
}