Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

M3DScene Class Reference

#include <3dsmodel.h>

Collaboration diagram for M3DScene:

Collaboration graph
List of all members.

Public Member Functions

void addMaterial (M3DMaterial *)
void addModel (M3DModel *)
M3DColor getBackgroundColor () const
M3DMaterialgetMaterial (uint32) const
uint32 getMaterialCount () const
M3DModelgetModel (uint32) const
uint32 getModelCount () const
 M3DScene ()
void setBackgroundColor (M3DColor)
 ~M3DScene ()

Private Attributes

M3DColor backgroundColor
std::vector< M3DMaterial * > materials
std::vector< M3DModel * > models

Constructor & Destructor Documentation

M3DScene::M3DScene  ) 
 

Definition at line 244 of file 3dsmodel.cpp.

00245 {
00246 }

M3DScene::~M3DScene  ) 
 

Definition at line 248 of file 3dsmodel.cpp.

References materials, and models.

00249 {
00250     unsigned int i;
00251     for (i = 0; i < models.size(); i++)
00252         if (models[i] != NULL)
00253             delete models[i];
00254     for (i = 0; i < materials.size(); i++)
00255         if (materials[i] != NULL)
00256             delete materials[i];
00257 }


Member Function Documentation

void M3DScene::addMaterial M3DMaterial  ) 
 

Definition at line 290 of file 3dsmodel.cpp.

References materials.

Referenced by processSceneChunk().

00291 {
00292     materials.insert(materials.end(), material);
00293 }

void M3DScene::addModel M3DModel  ) 
 

Definition at line 272 of file 3dsmodel.cpp.

References models.

Referenced by processSceneChunk().

00273 {
00274     models.insert(models.end(), model);
00275 }

M3DColor M3DScene::getBackgroundColor  )  const
 

Definition at line 295 of file 3dsmodel.cpp.

References backgroundColor.

00296 {
00297     return backgroundColor;
00298 }

M3DMaterial * M3DScene::getMaterial uint32   )  const
 

Definition at line 277 of file 3dsmodel.cpp.

References materials.

00278 {
00279     if (n < materials.size())
00280         return materials[n];
00281     else
00282         return NULL;
00283 }

uint32 M3DScene::getMaterialCount  )  const
 

Definition at line 285 of file 3dsmodel.cpp.

References materials.

00286 {
00287     return materials.size();
00288 }

M3DModel * M3DScene::getModel uint32   )  const
 

Definition at line 259 of file 3dsmodel.cpp.

References models.

00260 {
00261     if (n < models.size())
00262         return models[n];
00263     else
00264         return NULL;
00265 }

uint32 M3DScene::getModelCount  )  const
 

Definition at line 267 of file 3dsmodel.cpp.

References models.

00268 {
00269     return models.size();
00270 }

void M3DScene::setBackgroundColor M3DColor   ) 
 

Definition at line 300 of file 3dsmodel.cpp.

References backgroundColor.

Referenced by processSceneChunk().

00301 {
00302     backgroundColor = color;
00303 }


Member Data Documentation

M3DColor M3DScene::backgroundColor [private]
 

Definition at line 136 of file 3dsmodel.h.

Referenced by getBackgroundColor(), and setBackgroundColor().

std::vector<M3DMaterial*> M3DScene::materials [private]
 

Definition at line 135 of file 3dsmodel.h.

Referenced by addMaterial(), getMaterial(), getMaterialCount(), and ~M3DScene().

std::vector<M3DModel*> M3DScene::models [private]
 

Definition at line 134 of file 3dsmodel.h.

Referenced by addModel(), getModel(), getModelCount(), and ~M3DScene().


The documentation for this class was generated from the following files:
Generated on Sat Jan 14 22:33:27 2006 for Celestia by  doxygen 1.4.1