COperation Class Reference
[Mathematical computations]

This class is the base class for mathematical operations. More...

#include <compute.h>

Inheritance diagram for COperation:

CValue CAddition CCos CDivision CExp CLn COpposite CPow CProduct CSin CSqrt CSubstraction CTan

List of all members.

Public Member Functions

 COperation (CValue *pLeftOperand, CValue *pRightOperand)
virtual CValueGetCopy () const =0
virtual float Compute (const CVector3f &Point) const =0
virtual CValueDerive (TYPE_VARIABLE Type) const =0
virtual void Print (std::ostream &) const =0
virtual void Compile (std::vector< char > &v, int &i) const =0
virtual ~COperation ()

Protected Attributes

CValuem_pLeftOperand
CValuem_pRightOperand


Detailed Description

This class is the base class for mathematical operations.

Definition at line 129 of file compute.h.


Constructor & Destructor Documentation

COperation::COperation ( CValue pLeftOperand,
CValue pRightOperand 
) [inline]

COperation simple constructor.

Definition at line 135 of file compute.h.

References m_pLeftOperand, and m_pRightOperand.

virtual COperation::~COperation (  )  [inline, virtual]

The desctructor of the COperation objects.

Definition at line 172 of file compute.h.

References m_pLeftOperand, and m_pRightOperand.


Member Function Documentation

virtual CValue* COperation::GetCopy (  )  const [pure virtual]

This pure virtual function returns a copy of the tree represented by this object.

Implements CValue.

Implemented in CAddition, CSubstraction, CProduct, CDivision, COpposite, CSqrt, CSin, CCos, CTan, CExp, CLn, and CPow.

virtual float COperation::Compute ( const CVector3f Point  )  const [pure virtual]

This pure virtual function returns the numerical value of the CValue object.

Implements CValue.

Implemented in CAddition, CSubstraction, CProduct, CDivision, COpposite, CSqrt, CSin, CCos, CTan, CExp, CLn, and CPow.

virtual CValue* COperation::Derive ( TYPE_VARIABLE  Type  )  const [pure virtual]

This pure virtual function returns a newly allocated pointer to the CValue object representing the derivative of the object.

Implements CValue.

Implemented in CAddition, CSubstraction, CProduct, CDivision, COpposite, CSqrt, CSin, CCos, CTan, CExp, CLn, and CPow.

virtual void COperation::Print ( std::ostream &   )  const [pure virtual]

This function fills the stream with the expression of the CValue object.

Implements CValue.

Implemented in CAddition, CSubstraction, CProduct, CDivision, COpposite, CSqrt, CSin, CCos, CTan, CExp, CLn, and CPow.

virtual void COperation::Compile ( std::vector< char > &  v,
int &  i 
) const [pure virtual]

This pure virtual function fills the vector with code to compute the formula.

Implements CValue.

Implemented in CAddition, CSubstraction, CProduct, CDivision, COpposite, CSqrt, CSin, CCos, CTan, CExp, CLn, and CPow.


Member Data Documentation

CValue* COperation::m_pLeftOperand [protected]

Pointer to the left operand.

Definition at line 181 of file compute.h.

Referenced by CPow::Compile(), CLn::Compile(), CExp::Compile(), CTan::Compile(), CCos::Compile(), CSin::Compile(), CSqrt::Compile(), COpposite::Compile(), CDivision::Compile(), CProduct::Compile(), CSubstraction::Compile(), CAddition::Compile(), CPow::Compute(), CLn::Compute(), CExp::Compute(), CTan::Compute(), CCos::Compute(), CSin::Compute(), CSqrt::Compute(), COpposite::Compute(), CDivision::Compute(), CProduct::Compute(), CSubstraction::Compute(), CAddition::Compute(), COperation(), CLn::Derive(), CPow::Derive(), CExp::Derive(), CTan::Derive(), CCos::Derive(), CSin::Derive(), CSqrt::Derive(), COpposite::Derive(), CDivision::Derive(), CProduct::Derive(), CSubstraction::Derive(), CAddition::Derive(), CPow::GetCopy(), CLn::GetCopy(), CExp::GetCopy(), CTan::GetCopy(), CCos::GetCopy(), CSin::GetCopy(), CSqrt::GetCopy(), COpposite::GetCopy(), CDivision::GetCopy(), CProduct::GetCopy(), CSubstraction::GetCopy(), CAddition::GetCopy(), CPow::Print(), CLn::Print(), CExp::Print(), CTan::Print(), CCos::Print(), CSin::Print(), CSqrt::Print(), COpposite::Print(), CDivision::Print(), CProduct::Print(), CSubstraction::Print(), CAddition::Print(), and ~COperation().

CValue* COperation::m_pRightOperand [protected]

Pointer to the right operand.

Definition at line 182 of file compute.h.

Referenced by CPow::Compile(), CDivision::Compile(), CProduct::Compile(), CSubstraction::Compile(), CAddition::Compile(), CPow::Compute(), CDivision::Compute(), CProduct::Compute(), CSubstraction::Compute(), CAddition::Compute(), COperation(), CPow::Derive(), CDivision::Derive(), CProduct::Derive(), CSubstraction::Derive(), CAddition::Derive(), CPow::GetCopy(), CDivision::GetCopy(), CProduct::GetCopy(), CSubstraction::GetCopy(), CAddition::GetCopy(), CPow::Print(), CDivision::Print(), CProduct::Print(), CSubstraction::Print(), CAddition::Print(), and ~COperation().


The documentation for this class was generated from the following file:
Generated on Fri Dec 5 03:20:33 2008 for Mathematical Ray-tracer by  doxygen 1.5.4