ContRap-Libraries
Public Member Functions | Data Fields

crp::GLVertex Class Reference

Double vector in three dimensions. More...

#include <glmath.h>

Public Member Functions

 GLVertex (double x=0.0, double y=0.0, double z=0.0)
 Creates a vertex from point coordinates.
void set (double x, double y, double z)
 Sets the values.
GLVertex operator+ (const GLVertex &vertex) const
 Adds a vertex to the given vertex.
GLVertex operator- () const
 Negates a vertex.
GLVertex operator- (const GLVertex &vertex) const
 Subtracts a vertex from the given vertex.
GLVertex operator* (const GLVertex &vertex) const
 Computes the cross product between two vertices.

Data Fields

double x
 Coordinates.
double y
double z

Detailed Description

Double vector in three dimensions.


Constructor & Destructor Documentation

crp::GLVertex::GLVertex ( double  x = 0.0,
double  y = 0.0,
double  z = 0.0 
) [inline]

Creates a vertex from point coordinates.

Parameters:
xX-coordinate of the point
yY-coordinate of the point
zZ-coordinate of the point

Member Function Documentation

GLVertex crp::GLVertex::operator* ( const GLVertex vertex) const [inline]

Computes the cross product between two vertices.

Parameters:
vertexOther vertex.
Returns:
Cross product.
GLVertex crp::GLVertex::operator+ ( const GLVertex vertex) const [inline]

Adds a vertex to the given vertex.

Parameters:
vertexOther vertex
Returns:
Sum of the vertices
GLVertex crp::GLVertex::operator- ( const GLVertex vertex) const [inline]

Subtracts a vertex from the given vertex.

Returns:
Resulting vertex
GLVertex crp::GLVertex::operator- ( ) const [inline]

Negates a vertex.

Returns:
Negated vertex
void crp::GLVertex::set ( double  x,
double  y,
double  z 
) [inline]

Sets the values.

Parameters:
xX-coordinate of the point
yY-coordinate of the point
zZ-coordinate of the point

Field Documentation

Coordinates.


The documentation for this class was generated from the following file: