MeshKit  1.0
basic_math.hpp File Reference
#include <stdlib.h>
#include <math.h>
#include <assert.h>
#include <iostream>
#include <vector>
#include "FastArea.hpp"
Include dependency graph for basic_math.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Array< DataType, n >

Namespaces

namespace  Math

Defines

#define ANGLE_IN_DEGREES   0
#define ANGLE_IN_RADIANS   1

Typedefs

typedef Array< double, 2 > Point2D
typedef Array< double, 3 > Point3D
typedef Array< double, 3 > Array3D
typedef Array< double, 4 > Array4D
typedef Array< double, 3 > Vec3D
typedef Array< float, 2 > Point2F
typedef Array< float, 3 > Point3F
typedef Array< float, 3 > Array3F
typedef Array< float, 4 > Array4F
typedef Array< float, 3 > Vec3F

Functions

template<class T >
random_value (T minval, T maxval)
template<>
int random_value (int minval, int maxval)
template<>
size_t random_value (size_t minval, size_t maxval)
template<>
double random_value (double minval, double maxval)
template<>
float random_value (float minval, float maxval)
void create_vector (const Point3D &head, const Point3D &tail, Vec3D &xyz)
double length (const Point3D &A, const Point3D &B)
double length2 (const Point3D &A, const Point3D &B)
double magnitude (const Vec3D &A)
double dot_product (const Vec3D &A, const Vec3D &B)
void cross_product (const Vec3D &A, const Vec3D &B, Vec3D &C)
double poly_area (const vector< Point2D > &p)
void poly_centroid (const vector< Point2D > &p, Point2D &c)
void normal (const Point3D &p0, const Point3D &p1, const Point3D &p2, Vec3D &normal)
Vec3D unit_vector (const Point3D &head, const Point3D &tail)
double getVectorAngle (const Vec3D &A, const Vec3D &B, int measure)
template<class T >
max_value (const T &a, const T &b, const T &c)
template<class T >
min_value (const T &a, const T &b, const T &c)
template<class T , size_t n>
double getAngle (const Array< T, n > &VecA, const Array< T, n > &VecB, int unit_measure)
template<class T , size_t n>
getAngle (const Array< T, n > &pa, const Array< T, n > &pb, const Array< T, n > &pc, int unit_measure=0)
double getTriAngle (const Point3D &pa, const Point3D &pb, const Point3D &pc)
void getTriAngles (const Point3D &pa, const Point3D &pb, const Point3D &pc, Point3D &angles)

Define Documentation

#define ANGLE_IN_DEGREES   0

Definition at line 11 of file basic_math.hpp.

#define ANGLE_IN_RADIANS   1

Definition at line 12 of file basic_math.hpp.


Typedef Documentation

typedef Array<double,3> Array3D

Definition at line 28 of file basic_math.hpp.

typedef Array<float,3> Array3F

Definition at line 34 of file basic_math.hpp.

typedef Array<double,4> Array4D

Definition at line 29 of file basic_math.hpp.

typedef Array<float,4> Array4F

Definition at line 35 of file basic_math.hpp.

typedef Array<double,2> Point2D

Definition at line 26 of file basic_math.hpp.

typedef Array<float,2> Point2F

Definition at line 32 of file basic_math.hpp.

typedef Array<double,3> Point3D

Definition at line 27 of file basic_math.hpp.

typedef Array<float,3> Point3F

Definition at line 33 of file basic_math.hpp.

typedef Array<double,3> Vec3D

Definition at line 30 of file basic_math.hpp.

typedef Array<float,3> Vec3F

Definition at line 36 of file basic_math.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines