Frz::Object3d::Vertex Struct Reference

A 3D vertex. More...

#include <frz_obj3d.hpp>

List of all members.

Public Member Functions

 Vertex (float _x=0.f, float _y=0.f, float _z=0.f)
 Constructor.
Vertex operator- (const Vertex &a) const
 Subtracts another Vertex.
Vertex operator* (const Vertex &b) const
 Performs a cross product with vertex b.
Vertex operator* (const float a) const
 Multiplies all coefficients with scalar a.
bool operator== (const Vertex &a) const
 Equality comparison with 10-5 precision.
void write (std::ostream &out)
 Writes the Vertex contents into an output stream.
void read (std::istream &in)
 Reads the Vertex contents from an input stream.

Public Attributes

float x
 x coordinate
float y
 y coordinate
float z
 z coordinate

Friends

std::ostream & operator<< (std::ostream &out, const Vertex &v)
 Displays a Vertex in human-readable fashion.
std::istream & operator>> (std::istream &in, Vertex &v)
 Inputs a Vertex written in human-readable fashion.

Detailed Description

A 3D vertex.


Constructor & Destructor Documentation

Frz::Object3d::Vertex::Vertex ( float  _x = 0.f,
float  _y = 0.f,
float  _z = 0.f 
) [inline]

Constructor.

Parameters:
_x x coordinate
_y y coordinate
_z z coordinate

Member Function Documentation

Vertex Frz::Object3d::Vertex::operator* ( const float  a  )  const [inline]

Multiplies all coefficients with scalar a.

Parameters:
a the scalar multiplier
Returns:
the result of the operation
Vertex Frz::Object3d::Vertex::operator* ( const Vertex b  )  const [inline]

Performs a cross product with vertex b.

Parameters:
b a reference to the right hand argument of the cross product
Returns:
the result of the cross product
Vertex Frz::Object3d::Vertex::operator- ( const Vertex a  )  const [inline]

Subtracts another Vertex.

Parameters:
a a reference to the right hand argument of the subtraction
Returns:
the result of the subtraction
bool Frz::Object3d::Vertex::operator== ( const Vertex a  )  const [inline]

Equality comparison with 10-5 precision.

Parameters:
a the vertex to be compared
Returns:
true if all pairs of coefficients differ by less than 10-5, and false otherwise
void Frz::Object3d::Vertex::read ( std::istream &  in  )  [inline]

Reads the Vertex contents from an input stream.

Parameters:
in a reference to the output stream
void Frz::Object3d::Vertex::write ( std::ostream &  out  )  [inline]

Writes the Vertex contents into an output stream.

Parameters:
out a reference to the output stream

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const Vertex v 
) [friend]

Displays a Vertex in human-readable fashion.

Parameters:
out a reference to the output stream
v a reference to the Vertex to be written
Returns:
a reference to the output stream
std::istream& operator>> ( std::istream &  in,
Vertex v 
) [friend]

Inputs a Vertex written in human-readable fashion.

Parameters:
in a reference to the input stream
v a reference to the Vertex to be read into
Returns:
a reference to the input stream

The documentation for this struct was generated from the following file:
 All Classes Functions Variables Friends
Generated on Thu Jun 10 17:37:47 2010 for freezer-0.1.0 by  doxygen 1.6.3