Classes | Defines | Typedefs | Enumerations | Functions | Variables

point.h File Reference

(Point/Vector Class). More...

#include <stdlib.h>
#include <float.h>
#include <math.h>
#include <OpenGL/GL.h>

Go to the source code of this file.

Classes

class  Point
 point with normal More...

Defines

#define R_PI   ((creal)3.1415926535897932384626433832795)
#define R_EPSILON   ((real)FLT_EPSILON)

Typedefs

typedef float real
typedef const real creal
typedef signed char schar
typedef unsigned char uchar
typedef unsigned int uint
typedef const int cint
typedef const uint cuint

Enumerations

enum  Axis { X = 0, Y = 1, Z = 2 }
 

Axis Definition.


Functions

bool is_inv (real x)
const Point operator+ (const Point &p, const Point &p_)
 +
const Point operator- (const Point &p, const Point &p_)
 

const Point operator* (const Point &p, const real l)
 * scalar
const Point operator* (const real l, const Point &p)
 * scalar
const Point operator/ (const Point &p, const real l)
 / scalar
real operator* (const Point &p, const Point &p_)
 scalar (dot) product
real length (const Point &p)
real norm (const Point &p)
real dist (const Point &p, const Point &p_)
real sqdist (const Point &p, const Point &p_)
const Point normal (const Point &v0, const Point &v1, const Point &v2)
 Computes the normal of a triangle.
real area (const Point &v0, const Point &v1, const Point &v2)
 Computes the area of a triangle.
const real cotan (const Point &v, const Point &v1, const Point &v2)
 Computes the cotangent of ange v v1,v v2.
const Point middle (const Point &v0, const Point &v1)
 Computes the middle of an edge.
void pmin (Point &p, const Point &p_)
void pmax (Point &p, const Point &p_)

Variables

real R_INV
Point P_INV

Detailed Description

(Point/Vector Class).

Author:
Thomas Lewiner <tomlew@puc-rio.br>
Matmidia Lab, Math Dept, PUC-Rio
Date:
10/01/2010

Typedef Documentation

typedef float real

------------------------------------------------------------------------------------ real number type

typedef signed char schar

integer number aliases


Function Documentation

real area ( const Point v0,
const Point v1,
const Point v2 
) [inline]

Computes the area of a triangle.

Parameters:
const Point &v0
const Point &v1
const Point &v2
const real cotan ( const Point v,
const Point v1,
const Point v2 
) [inline]

Computes the cotangent of ange v v1,v v2.

Parameters:
const Point &v
const Point &v1
const Point &v2
real length ( const Point p  )  [inline]

------------------------------------------------------------------------------------

const Point middle ( const Point v0,
const Point v1 
) [inline]

Computes the middle of an edge.

Parameters:
const Point &v0
const Point &v1
const Point normal ( const Point v0,
const Point v1,
const Point v2 
) [inline]

Computes the normal of a triangle.

Parameters:
const Point &v0
const Point &v1
const Point &v2
const Point operator+ ( const Point p,
const Point p_ 
) [inline]

+

------------------------------------------------------------------------------------

 All Classes Files Functions Variables Typedefs Enumerations Defines