#include "misc.h"
#include <cmath>
#include <fstream>
#include <iostream>
#include "face.h"
#include "vertex.h"
Include dependency graph for misc.cc:
Functions | |
int | distinguishable (double a, double b, double epsilon) |
int | distinguishable (double a, double b) |
void | cross (double *const a, double *const b, double *const cr) |
double | dot (vec_d const &a, vec_d const &b) |
double | dot (double const *const a, double const *const b) |
double | dot (vector3 const &a, vector3 const &b) |
double | dot (vector3 const *a, vector3 const *b) |
bool | checkIntSize (void) |
std::string | processDir (std::string pathname) |
bool | parseCommandLine (int argc, char **argv, std::string const &message) |
int | getLargestProjection (vector3 const *normal) |
result | checkLineFaceInt (Face const *const f, vector3 const &origin, vector3 const &end, bool ignore_line) |
bool checkIntSize | ( | void | ) |
Determine if integers are 32 bit.
result checkLineFaceInt | ( | Face const *const | f, | |
vector3 const & | origin, | |||
vector3 const & | end, | |||
bool | ignore_line | |||
) |
Detect and report intersection of line segment and face.
[in] | f | Face of interest. |
[in] | origin | Vector position of one end of line segment. |
[in] | end | Vector position of other end of line segment. |
[in] | ignore_line | If true then compute intersection of full line and face; otherwise use line segment for intersection. |
void cross | ( | double *const | a, | |
double *const | b, | |||
double *const | cr | |||
) |
Calculate cross product of two input vectors.
[in] | a | First vector. |
[in] | b | Second vector. |
[out] | cr | Vector cross product of a x b. |
int distinguishable | ( | double | a, | |
double | b | |||
) |
Determine if two floating-point precision numbers are equivalent in value within DOUBLE_EPSILON.
[in] | a | First number. |
[in] | b | Second number. |
int distinguishable | ( | double | a, | |
double | b, | |||
double | epsilon | |||
) |
Determine if two floating-point precision numbers are equivalent in value within epsilon.
[in] | a | First number. |
[in] | b | Second number. |
[in] | epsilon | The difference between the two input values must be greater than the fraction of the largest input value defined by epsilon. |
double dot | ( | double const *const | a, | |
double const *const | b | |||
) |
Calculate dot product of two input vectors.
[in] | a | First vector. |
[in] | b | Second vector. |
int getLargestProjection | ( | vector3 const * | normal | ) |
Determine which of three principal surfaces has greatest exposure to face of interest.
[in] | normal | Face normal vector of arbitrary length. |
bool parseCommandLine | ( | int | argc, | |
char ** | argv, | |||
std::string const & | message | |||
) |
Parse meshmorph command line.
[in] | argc | Argc. |
[in] | argv | Argv. |
[in] | message | General error/help message explaining meshmorph. |
std::string processDir | ( | std::string | pathname | ) |
Ensure pathname ends with exactly one '/'.
[in] | pathname | Arbitrary pathname. |