util.h File Reference

(r1659/r1652)

#include <iostream>
#include <list>
#include <vector>
#include <cassert>
#include <cmath>
#include <string>
#include <string.h>
#include "persistance-noop.h"

Include dependency graph for util.h:

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

Go to the source code of this file.

Namespaces

namespace  Tumble

Classes

class  Point2D
 A standard two dimensional Point/Vector class. More...
class  LinearData
 A vector class used to represent functional data on the mesh. More...
class  Vec3D
 A standard three dimentional vetor class. More...
class  Matrix
 A standard dense matrix class. More...
class  Matrix5
 A matrix class to hold matricies with a bandwidth of 5. More...
class  PQueueEntry< T >
 A container template for the a linked list priority queue. More...
class  PQueue< T >
 A standard linked-list based priority queue templaye. More...

Defines

#define bzero(b, len)   (memset((b), '\0', (len)), (void) 0)

Typedefs

typedef double Radians
typedef PersistantList< Point2D
>::iterator 
ControlPoint
 An iterator that points to a Point2D.
typedef PersistantList< LinearData
>::iterator 
DataPoint
 An iterator that points to a LinearData.

Functions

bool Tumble::is_zero (double a)
bool Tumble::are_equal (double a, double b)
std::ostream & operator<< (std::ostream &os, const ControlPoint &cp)
int add_filename_extension (char *filename, const char *ext, char *buf, int buf_len)
 A function to add an extension to a filename, if not already present.
bool poly_convex (Point2D poly[], int size)
 Determine if a polygon is convex.
bool point_in_poly_kernel (Point2D poly[], int size, const Point2D &point)
 Determin if a point is within the kernel of a polygon.

Variables

const double ALPHA [7]
const double BETA [7]
const double WEIGHT [7]
const double PI
const double TWOPI
const double HALFPI


Detailed Description

Author:
Mark J. Olah (mjo@andrew.cmu.edu)

Definition in file util.h.


Define Documentation

#define bzero ( b,
len   )     (memset((b), '\0', (len)), (void) 0)

Definition at line 19 of file util.h.

Referenced by add_filename_extension(), MeshBinaryInput::read(), MeshInput::read(), and MeshInput::read_bezier_edge_data().


Typedef Documentation

typedef PersistantList<Point2D>::iterator ControlPoint

An iterator that points to a Point2D.

This is how all Cells carry thier geometric data. The std::list of Point2D 's is held by the DataStore

Definition at line 323 of file util.h.

typedef PersistantList<LinearData>::iterator DataPoint

An iterator that points to a LinearData.

This is how all Cells carry thier functional data. The std::list of LinearData 's is held by the DataStore

Definition at line 332 of file util.h.

typedef double Radians

Definition at line 26 of file util.h.


Function Documentation

int add_filename_extension ( char *  filename,
const char *  ext,
char *  buf,
int  buf_len 
)

A function to add an extension to a filename, if not already present.

Definition at line 698 of file util.C.

References bzero.

Referenced by _wrap_add_filename_extension(), Visualization::write_jpeg(), Visualization::write_ppm(), and Visualization::write_tiff().

std::ostream & operator<< ( std::ostream &  os,
const ControlPoint cp 
)

bool point_in_poly_kernel ( Point2D  poly[],
int  size,
const Point2D point 
)

Determin if a point is within the kernel of a polygon.

The polygon must be specified with a counter-clockwise numbering.

A point is in the kerenal of a polygon if it can see every vertex of the polygon

This will return false if the point is internal to an edge segment (on the boundary).

Parameters:
poly The polygon to test in ccw order
size The number of vertexs in the polygon
Returns:
True if the point is in the kernel

Definition at line 739 of file util.C.

References Point2D::is_left_of().

Here is the call graph for this function:

bool poly_convex ( Point2D  poly[],
int  size 
)

Determine if a polygon is convex.

The polygon must be specified with a counter-clockwise numbering.

This will return false if any neighboring segments are colinear (180deg angles are not convex)

Parameters:
poly The points of the vertexes of the polygon in ccw order
size The number of vertexs in the polygon
Returns:
True if the polygon is convex

Definition at line 725 of file util.C.


Variable Documentation

const double ALPHA[7]

Definition at line 18 of file util.C.

const double BETA[7]

Definition at line 26 of file util.C.

const double HALFPI

Definition at line 44 of file util.C.

const double PI

Definition at line 42 of file util.C.

const double TWOPI

Definition at line 43 of file util.C.

const double WEIGHT[7]

Definition at line 34 of file util.C.


Generated on Mon May 24 09:53:32 2010 for TUMBLE by  doxygen 1.5.2