CRenderObj Class Reference
[Rendering classes]

This class holds all the necessary data to render the mathematical surface. More...

#include <CRenderObj.h>

List of all members.

Public Member Functions

 CRenderObj ()
 This is the default constructor.
 CRenderObj (const CRenderObj &obj)
 This is the copy constructor.
const CRenderObjoperator= (const CRenderObj &obj)
 This is the assignment operator.
const CVectBasegetVectorBase () const
 This function returns the vector base of the space used.
void UpdateVectorBase ()
 This function updates the vector base of the space used.
const CVector3f getCenterPos () const
 This function returns the vector representing the position of the center of the rendering volume.
std::string Validate () const
 This function makes sure all the parameters are valid.
CColor GetPixelColor (int x, int y) const
 This function returns the color of a pixel in a given direction.
void Update (void)
 This function recalculates what depends on other parameters.

Public Attributes

std::string m_FormulaString
float m_SignIncrement
float m_NoSignIncrement
float m_NoSignPrecision
float m_Zoom
CVector3f m_MinVector
CVector3f m_MaxVector
CVector3f m_ViewerPos
CVector3f m_LightDirection
CColor m_SurfaceAmbientColor
CColor m_SurfaceDiffuseColor
CColor m_SurfaceSpecularColor
float m_SurfaceSpecularExponent
CColor m_BoxAmbientColor
CColor m_BoxDiffuseColor
CColor m_BoxSpecularColor
float m_BoxSpecularExponent
CColor m_BackgroundColor
unsigned char m_Options
int m_Width
int m_Height

Private Member Functions

CVector3f GetDirection (int x, int y) const
 This function returns the direction of the ray corresponding to a pixel.
CVector3f GetStartingPoint (int x, int y) const
 This function returns the starting point of the ray corresponding to a pixel.
bool InBoundingBox (const CVector3f &Pos, const CVector3f &Dir) const
 This function returns true if the ray is still going towards the bounding box or if it is in it.
void GetCloseToBoundingBox (CVector3f &StartingPoint, const CVector3f &Direction) const
 This function gets the starting point as close as possible to the bounding box.
void Copy (const CRenderObj &obj)
 This function copies a CRenderObj.

Private Attributes

CVector3f m_CenterPos
CVectBase m_VectorBase
CMathExpressionm_pFormula
CMathExpressionm_pFormulaDx
CMathExpressionm_pFormulaDy
CMathExpressionm_pFormulaDz


Detailed Description

This class holds all the necessary data to render the mathematical surface.

It provides functions to get the color of a specific pixel, according to what was previously set.

Definition at line 50 of file CRenderObj.h.


Constructor & Destructor Documentation

CRenderObj::CRenderObj ( const CRenderObj obj  )  [inline]

This is the copy constructor.

Definition at line 93 of file CRenderObj.h.

References Copy(), m_pFormula, m_pFormulaDx, m_pFormulaDy, and m_pFormulaDz.


Member Function Documentation

const CRenderObj& CRenderObj::operator= ( const CRenderObj obj  )  [inline]

This is the assignment operator.

Definition at line 105 of file CRenderObj.h.

References Copy().

const CVectBase& CRenderObj::getVectorBase (  )  const [inline]

This function returns the vector base of the space used.

Definition at line 115 of file CRenderObj.h.

References m_VectorBase.

void CRenderObj::UpdateVectorBase (  )  [inline]

This function updates the vector base of the space used.

Definition at line 120 of file CRenderObj.h.

References m_VectorBase, and CVectBase::Update().

const CVector3f CRenderObj::getCenterPos (  )  const [inline]

This function returns the vector representing the position of the center of the rendering volume.

Definition at line 126 of file CRenderObj.h.

References m_CenterPos.

bool CRenderObj::InBoundingBox ( const CVector3f Pos,
const CVector3f Dir 
) const [inline, private]

This function returns true if the ray is still going towards the bounding box or if it is in it.

Definition at line 172 of file CRenderObj.h.

References m_MaxVector, m_MinVector, CVector3f::x, CVector3f::y, and CVector3f::z.

Referenced by GetPixelColor().


Member Data Documentation

std::string CRenderObj::m_FormulaString

Definition at line 53 of file CRenderObj.h.

Referenced by Copy(), CCommandExecutor::Execute(), Update(), and Validate().

float CRenderObj::m_SignIncrement

Expression to be plotted. Increment using the sign mode.

Definition at line 55 of file CRenderObj.h.

Referenced by Copy(), CRenderObj(), CCommandExecutor::Execute(), GetCloseToBoundingBox(), GetPixelColor(), and Validate().

float CRenderObj::m_NoSignIncrement

Increment using the no sign mode.

Definition at line 56 of file CRenderObj.h.

Referenced by Copy(), CRenderObj(), CCommandExecutor::Execute(), GetCloseToBoundingBox(), GetPixelColor(), and Validate().

float CRenderObj::m_NoSignPrecision

Maximal difference between two reel numbers to consider them equal.

Definition at line 57 of file CRenderObj.h.

Referenced by Copy(), CRenderObj(), CCommandExecutor::Execute(), GetPixelColor(), and Validate().

float CRenderObj::m_Zoom

Distance from the scene of the camera.

Definition at line 59 of file CRenderObj.h.

Referenced by Copy(), CRenderObj(), CCommandExecutor::Execute(), and GetStartingPoint().

CVector3f CRenderObj::m_MinVector

Vector representing the minimal corner of the bounding box.

Definition at line 61 of file CRenderObj.h.

Referenced by Copy(), CCommandExecutor::Execute(), GetCloseToBoundingBox(), GetPixelColor(), InBoundingBox(), Update(), and Validate().

CVector3f CRenderObj::m_MaxVector

Vector representing the maximal corner of the bounding box.

Definition at line 63 of file CRenderObj.h.

Referenced by Copy(), CCommandExecutor::Execute(), GetCloseToBoundingBox(), GetPixelColor(), InBoundingBox(), Update(), and Validate().

CVector3f CRenderObj::m_ViewerPos

Position of the viewer.

Definition at line 65 of file CRenderObj.h.

Referenced by Copy(), CCommandExecutor::Execute(), GetStartingPoint(), and Update().

CVector3f CRenderObj::m_LightDirection

Direction of the light.

Definition at line 67 of file CRenderObj.h.

Referenced by Copy(), CCommandExecutor::Execute(), and GetPixelColor().

CColor CRenderObj::m_SurfaceAmbientColor

Ambient color of the surface.

Definition at line 69 of file CRenderObj.h.

Referenced by Copy(), CCommandExecutor::Execute(), GetPixelColor(), and Validate().

CColor CRenderObj::m_SurfaceDiffuseColor

Diffuse color of the surface.

Definition at line 70 of file CRenderObj.h.

Referenced by Copy(), CCommandExecutor::Execute(), GetPixelColor(), and Validate().

CColor CRenderObj::m_SurfaceSpecularColor

Specular color of the surface.

Definition at line 71 of file CRenderObj.h.

Referenced by Copy(), CCommandExecutor::Execute(), GetPixelColor(), and Validate().

float CRenderObj::m_SurfaceSpecularExponent

Specular exponent of the surface.

Definition at line 72 of file CRenderObj.h.

Referenced by Copy(), CRenderObj(), CCommandExecutor::Execute(), GetPixelColor(), and Validate().

CColor CRenderObj::m_BoxAmbientColor

Ambient color of the bounding box.

Definition at line 74 of file CRenderObj.h.

Referenced by Copy(), CCommandExecutor::Execute(), GetPixelColor(), and Validate().

CColor CRenderObj::m_BoxDiffuseColor

Diffuse color of the bounding box.

Definition at line 75 of file CRenderObj.h.

Referenced by Copy(), CCommandExecutor::Execute(), GetPixelColor(), and Validate().

CColor CRenderObj::m_BoxSpecularColor

Specular color of the bounding box.

Definition at line 76 of file CRenderObj.h.

Referenced by Copy(), CCommandExecutor::Execute(), GetPixelColor(), and Validate().

float CRenderObj::m_BoxSpecularExponent

Specular exponent of the bouding box.

Definition at line 77 of file CRenderObj.h.

Referenced by Copy(), CRenderObj(), CCommandExecutor::Execute(), GetPixelColor(), and Validate().

CColor CRenderObj::m_BackgroundColor

Background color of the image.

Definition at line 79 of file CRenderObj.h.

Referenced by Copy(), CCommandExecutor::Execute(), GetPixelColor(), and Validate().

unsigned char CRenderObj::m_Options

8 bits representing the options.

Definition at line 81 of file CRenderObj.h.

Referenced by Copy(), CRenderObj(), CCommandExecutor::Execute(), GetCloseToBoundingBox(), GetDirection(), GetPixelColor(), and GetStartingPoint().

int CRenderObj::m_Width

Width of the rendered picture.

Definition at line 82 of file CRenderObj.h.

Referenced by Copy(), CRenderObj(), CCommandExecutor::Execute(), GetDirection(), GetStartingPoint(), and Validate().

int CRenderObj::m_Height

Height of the rendered picture.

Definition at line 83 of file CRenderObj.h.

Referenced by Copy(), CRenderObj(), CCommandExecutor::Execute(), GetDirection(), GetStartingPoint(), and Validate().

CVector3f CRenderObj::m_CenterPos [private]

Position of the center of the bounding box.

Definition at line 145 of file CRenderObj.h.

Referenced by Copy(), getCenterPos(), GetCloseToBoundingBox(), and Update().

CVectBase CRenderObj::m_VectorBase [private]

Vector base used for the rendering.

Definition at line 146 of file CRenderObj.h.

Referenced by GetDirection(), GetStartingPoint(), getVectorBase(), Update(), and UpdateVectorBase().

CMathExpression* CRenderObj::m_pFormula [private]

Formula to be plotted.

Definition at line 148 of file CRenderObj.h.

Referenced by CRenderObj(), GetPixelColor(), and Update().

CMathExpression* CRenderObj::m_pFormulaDx [private]

Formula of the partial derivative with respect to x.

Definition at line 149 of file CRenderObj.h.

Referenced by CRenderObj(), GetPixelColor(), and Update().

CMathExpression* CRenderObj::m_pFormulaDy [private]

Formula of the partial derivative with respect to y.

Definition at line 151 of file CRenderObj.h.

Referenced by CRenderObj(), GetPixelColor(), and Update().

CMathExpression* CRenderObj::m_pFormulaDz [private]

Formula of the partial derivative with respect to z.

Definition at line 153 of file CRenderObj.h.

Referenced by CRenderObj(), GetPixelColor(), and Update().


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