World Namespace Reference


Detailed Description

Scene abstraction.

Classes in this namespace hold scene data: Location of objects, colors, textures, cameras, lights`, etc.


Classes

class  Camera
 Camera data, algorithms and functions used for creating camera rays. More...
class  Color
 Color data and operations. More...
class  Light
 Light interface. More...
class  PointLight
 Scene point light. More...
class  AmbientLight
 Scene ambient light. More...
class  Material
 Material data and operations. More...
class  Object
 Basic object data and interface. More...
class  Plane
 Object abstracting infinite plane. More...
class  Scene
 Collision detection and scene management. More...
class  XMLError
 Exception internal to XML reader. More...
class  Sphere
 Mathematical sphere (ball rather). More...
class  Texture
 Texture interface. More...

Namespaces

namespace  ColLib
 Color library.
namespace  MatLib
 Material library.
namespace  TexLib
 Texture library.

Functions

std::ostream & operator<< (std::ostream &os, const Camera &C)
std::ostream & operator<< (std::ostream &os, const Color &C)
std::ostream & operator<< (std::ostream &os, const Light &L)
std::ostream & operator<< (std::ostream &os, const Material &M)
std::ostream & operator<< (std::ostream &os, const Object &O)
static const Double NearestCollision (0.001)
template<typename T>
static std::string ToStr (const T &var)
static Double ToDouble (const std::string &str)
static Bool IsDouble (const std::string &str)
static std::string GetProp (xmlNodePtr Node, const char *id)
static Double GetDoubleProp (xmlNodePtr Node, const char *str)
static Double GetDoubleProp (xmlNodePtr Node, const char *str, Double DefaultValue)
static void EnsureColorTag (xmlNodePtr Node, xmlNodePtr ErrorCtx=NULL)
static std::string GetID (xmlNodePtr Node)
static Bool IsToken (xmlNodePtr Node, const char *Token)
static void OmitComments (xmlNodePtr &Node)
std::ostream & operator<< (std::ostream &os, const Texture &T)


Function Documentation

static void World::EnsureColorTag ( xmlNodePtr  Node,
xmlNodePtr  ErrorCtx = NULL 
) [static]

Ensures given tag name is "Color"

Definition at line 119 of file SceneXML.cc.

Referenced by World::Scene::ParseLight(), and World::Scene::ParseTexture().

Here is the caller graph for this function:

static Double World::GetDoubleProp ( xmlNodePtr  Node,
const char *  str,
Double  DefaultValue 
) [static]

Read optional numerical property and convert to double if property is not given use the given default value

Definition at line 105 of file SceneXML.cc.

References GetProp(), and ToDouble().

Here is the call graph for this function:

static Double World::GetDoubleProp ( xmlNodePtr  Node,
const char *  str 
) [static]

Read compulsory numerical property and convert to double

Definition at line 90 of file SceneXML.cc.

References GetProp(), IsDouble(), and ToDouble().

Referenced by World::Scene::ParseCamera(), World::Scene::ParseIdx(), World::Scene::ParseMaterial(), World::Scene::ParsePlane(), and World::Scene::ParseSphere().

Here is the call graph for this function:

Here is the caller graph for this function:

static std::string World::GetID ( xmlNodePtr  Node  )  [static]

Read compulsory ID

Bug:
rarely used!

Definition at line 136 of file SceneXML.cc.

References GetProp().

Referenced by World::Scene::ParseTexture().

Here is the call graph for this function:

Here is the caller graph for this function:

static std::string World::GetProp ( xmlNodePtr  Node,
const char *  id 
) [static]

static Bool World::IsDouble ( const std::string &  str  )  [static]

Check numerical value syntax

Bug:
Very c-ish code

Definition at line 57 of file SceneXML.cc.

Referenced by GetDoubleProp(), and World::Scene::ParseIdx().

Here is the caller graph for this function:

static Bool World::IsToken ( xmlNodePtr  Node,
const char *  Token 
) [static]

Checks if the current node matches token

Definition at line 146 of file SceneXML.cc.

Referenced by OmitComments(), World::Scene::ParseCamera(), World::Scene::ParseFile(), World::Scene::ParseLight(), World::Scene::ParsePlane(), and World::Scene::ParseSphere().

Here is the caller graph for this function:

static const Double World::NearestCollision ( 0.  001  )  [static]

Nearest taken in account Ray collision

Referenced by World::Sphere::Collide(), and World::Plane::Collide().

Here is the caller graph for this function:

static void World::OmitComments ( xmlNodePtr &  Node  )  [static]

Increment token while omitting any commentaries

Definition at line 154 of file SceneXML.cc.

References IsToken().

Referenced by World::Scene::ParseCamera(), World::Scene::ParseFile(), World::Scene::ParseLight(), World::Scene::ParsePlane(), World::Scene::ParseSphere(), and World::Scene::ParseTexture().

Here is the call graph for this function:

Here is the caller graph for this function:

std::ostream& World::operator<< ( std::ostream &  os,
const Texture &  T 
)

Pretty-printer

Definition at line 33 of file Texture.cc.

References World::Texture::Dump().

Here is the call graph for this function:

std::ostream& World::operator<< ( std::ostream &  os,
const Object &  O 
)

Pretty-printer

Definition at line 38 of file Object.cc.

References World::Object::Dump().

Here is the call graph for this function:

std::ostream& World::operator<< ( std::ostream &  os,
const Material &  M 
)

std::ostream& World::operator<< ( std::ostream &  os,
const Light &  L 
)

Pretty-printer

Definition at line 22 of file Light.cc.

References World::Light::Dump().

Here is the call graph for this function:

std::ostream& World::operator<< ( std::ostream &  os,
const Color &  C 
)

Pretty-printer

Definition at line 20 of file Color.cc.

References Math::Tuple< T, DoCropping, Count >::Dump().

Here is the call graph for this function:

std::ostream& World::operator<< ( std::ostream &  os,
const Camera &  C 
)

Pretty-printer

Definition at line 91 of file Camera.cc.

References World::Camera::Dir, World::Camera::FOV, World::Camera::Pos, and World::Camera::Top.

static Double World::ToDouble ( const std::string &  str  )  [static]

Convert string to double without checking syntax

Bug:
Nah, should I use sscanf? stringstream is not much predictable

Definition at line 28 of file SceneXML.cc.

Referenced by GetDoubleProp(), World::Scene::ParseColor(), World::Scene::ParseTexture(), and World::Scene::ParseVector().

Here is the caller graph for this function:

template<typename T>
static std::string World::ToStr ( const T &  var  )  [inline, static]

Convert any type to string (debug function )

Definition at line 21 of file SceneXML.cc.

Referenced by World::Scene::ParseFile().

Here is the caller graph for this function:


Generated on Wed Mar 12 00:36:14 2008 for blaRAY by  doxygen 1.5.5