Triangle.h File Reference

Structure Triangle and its component structures. More...

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

Go to the source code of this file.

Classes

struct  Vertex
 3D vertex (3 axes - x, y, z) More...
struct  Color
 Color representation - 3 float (r, g, b) in range <0.0, 1.0>. More...
struct  Triangle
 Low-level triangle representation - plain structure. This structure contains 3 Vertexes and 3 Colors (needed for radiosity rendering). More...

Functions

std::ostream & operator<< (std::ostream &out, const Vertex &vertex)
 Represent Vertex object in human readable format.
Coloroperator+= (Color &dest, const Color &src)
 Addition of another color. Behaves as usual vector arithmetic.
Coloroperator *= (Color &dest, const Color &src)
 Multiplication by another color. Component after component.
Coloroperator *= (Color &c, float ratio)
 Multiplication by constant. Behaves as usual vector arithmetic.
Color operator * (Color c, float ratio)
 Multiplication by constant. Behaves as usual vector arithmetic.
bool operator== (const Color &a, const Color &b)
 Compare two color structures. Component after component.
std::ostream & operator<< (std::ostream &out, const Color &color)
 Represent Color object in human readable format.
std::ostream & operator<< (std::ostream &out, const Triangle &t)
 Represent Triangle object in human readable format.


Detailed Description

Structure Triangle and its component structures.

Author:
xdudka00, xfilak01, xbarin02
Date:
2007-11-17

Definition in file Triangle.h.


Function Documentation

Color operator * ( Color  c,
float  ratio 
) [inline]

Multiplication by constant. Behaves as usual vector arithmetic.

Parameters:
c Color to multiplicate.
ratio Constant to multiplicate by.
Returns:
Return result of multiplication.

Definition at line 156 of file Triangle.h.

Color& operator *= ( Color c,
float  ratio 
) [inline]

Multiplication by constant. Behaves as usual vector arithmetic.

Parameters:
c Destination color structure.
ratio Constant to multiplicate by.
Returns:
Return destination color given as parameter.

Definition at line 142 of file Triangle.h.

References Color::b, Color::g, and Color::r.

Color& operator *= ( Color dest,
const Color src 
) [inline]

Multiplication by another color. Component after component.

Parameters:
dest Destination color structure.
src Color to multiplicate by.
Returns:
Return destination color given as parameter.

Definition at line 128 of file Triangle.h.

References Color::b, Color::g, and Color::r.

Color& operator+= ( Color dest,
const Color src 
) [inline]

Addition of another color. Behaves as usual vector arithmetic.

Parameters:
dest Destination color structure.
src Color to add.
Returns:
Return destination color given as parameter.

Definition at line 114 of file Triangle.h.

References Color::b, Color::g, and Color::r.

std::ostream& operator<< ( std::ostream &  out,
const Triangle t 
) [inline]

Represent Triangle object in human readable format.

Note:
This function will not be built if NDEBUG macro is defined.
Parameters:
out Output stream to write to.
t Reference to Triangle object to write.
Returns:
Return output stream given as parameter.

Definition at line 225 of file Triangle.h.

References Triangle::emission, Triangle::radiosity, Triangle::reflectivity, and Triangle::vertex.

std::ostream& operator<< ( std::ostream &  out,
const Color color 
) [inline]

Represent Color object in human readable format.

Note:
This function will not be built if NDEBUG macro is defined.
Parameters:
out Output stream to write to.
color Reference to Color object to write.
Returns:
Return output stream given as parameter.

Definition at line 183 of file Triangle.h.

References Color::b, Color::g, and Color::r.

std::ostream& operator<< ( std::ostream &  out,
const Vertex vertex 
) [inline]

Represent Vertex object in human readable format.

Note:
This function will not be built if NDEBUG macro is defined.
Parameters:
out Output stream to write to.
vertex Reference to Vertex object to write.
Returns:
Return output stream given as parameter.

Definition at line 59 of file Triangle.h.

References Vertex::x, Vertex::y, and Vertex::z.

bool operator== ( const Color a,
const Color b 
) [inline]

Compare two color structures. Component after component.

Parameters:
a Color to compare.
b Color to compare.
Returns:
Return true if colors are equal.

Definition at line 168 of file Triangle.h.

References Color::b, Color::g, and Color::r.


Generated on Thu Dec 6 19:33:11 2007 for Radiosity Renderer and Visualizer by  doxygen 1.5.2