#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 |
Definition in file util.h.
| #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 PersistantList<Point2D>::iterator ControlPoint |
| 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
| 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 | |||
| ) |
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).
| poly | The polygon to test in ccw order | |
| size | The number of vertexs in the polygon |
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)
| poly | The points of the vertexes of the polygon in ccw order | |
| size | The number of vertexs in the polygon |
1.5.2