compute.cpp File Reference

This file contains the implementation of the classes that will be used to compute a mathematical expression. More...

#include <cmath>
#include <iostream>
#include <vector>
#include "popassert.h"
#include "CVector3f.h"
#include "compute.h"

Go to the source code of this file.

Functions

void BEFORE_PUSH (std::vector< char > &v, int &i)
void AFTER_POP (std::vector< char > &v, int &i)


Detailed Description

This file contains the implementation of the classes that will be used to compute a mathematical expression.

The base class is CValue, from which other classes are derived. First, the COperation class, from which the classes that represent different mathematical operations are derived. Next, the classes CVariable and CNumber are derived from the base class.

Each class contains the Compute() function that returns the value of the object. For operations, it returns the value of the operation (addition, for example), on its operands (represented by the two pointers. For numbers or variables, the returned value is simply the number itself or the value of x, y or z.

Definition in file compute.cpp.


Generated on Fri Dec 5 03:20:33 2008 for Mathematical Ray-tracer by  doxygen 1.5.4