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

defines.h File Reference

#include <stdexcept>
#include <cstdlib>
#include <iostream>
#include <sstream>
#include <string>
#include <limits>
#include <cmath>
#include "matrix.h"
#include "color.h"
#include "diffuse.h"

Include dependency graph for defines.h:

This graph shows which files directly or indirectly include this file:


Namespaces

namespace  asr

Defines

#define ROUND(x)   (std::floor((x)+0.5))
 Round value to nearest integer.

Functions

static float asr::uniform ()
 Returns a uniform random number in the range [0,1).
static std::string asr::int2str (int i)
 Helper function for converting an int to a string.
static void asr::swap (float &a, float &b)
 Swaps two floats.
template<class T>
asr::max (T a, T b)
 Returns the maximum of the two elements.
template<class T>
asr::min (T a, T b)
 Returns the minimum of the two elements.

Variables

static float asr::INF = std::numeric_limits<float>::infinity()
 Define positive infinity for floats.
static const float asr::epsilon = 1e-6
 Small value.
static Diffuse asr::DEFAULT_MATERIAL = Diffuse(Color(0.7f,0.7f,0.7f))
 Default material is a gray diffuse material.

Generated on Sun Mar 26 19:13:26 2006 for ASR by  doxygen 1.4.4