DFNgen
2.0
DFN Model Generator
|
#include <fstream>
#include <string>
#include <iostream>
#include <cmath>
#include "input.h"
#include "structures.h"
Go to the source code of this file.
Functions | |
double * | projection (const double *v1, const double *v2) |
double | euclideanDistance (double *A, double *B) |
double | euclideanDistance (Point &A, Point &B) |
double | angleBeteenVectors (const double *vector1, const double *vector2) |
template<typename T > | |
T * | crossProduct (const T *v1, const T *v2) |
template<typename T > | |
void | normalize (T *vec) |
template<typename T > | |
T | dotProduct (const T *A, const T *B) |
template<typename T > | |
void | printVertices (T *vert, int numVertices) |
template<typename T > | |
T | magnitude (T x, T y, T z) |
template<typename T > | |
T | sqrMagnitude (T x, T y, T z) |
bool | parallel (double *v1, double *v2) |
double angleBeteenVectors | ( | const double * | vector1, |
const double * | vector2 | ||
) |
|
inline |
Calculates crossproduct of v1 and v2 Arg 1: Pointer to array of three elements Arg 2: Pointer to array of three elements Return: Pointer to cross product, array of three elements NOTE: must use delete[] on returned pointer after use.
Definition at line 24 of file vectorFunctions.h.
|
inline |
Calculates the dot product of vector A with B Arg 1: Pointer to array of three elements Arg 2: Pointer to array of three elements Return: Pointer to dot product, array of three elements NOTE: Must use delete[] on returned pointer after use
Definition at line 58 of file vectorFunctions.h.
double euclideanDistance | ( | double * | A, |
double * | B | ||
) |
Definition at line 57 of file vectorFunctions.cpp.
|
inline |
Calculates magnitude of a vector Arg 1: x Arg 2: y Arg 3: z Return: Magnitude of {x,y,z}
Definition at line 86 of file vectorFunctions.h.
|
inline |
Normalizes vector passed into fucntion. Arg 1: Vector (3 element array) to be normalized.
Definition at line 36 of file vectorFunctions.h.
|
inline |
Check if two vectors are parallel Arg 1: Pointer to vector 1, array of three doubles Arg 2: Pointer to vector 2, array of three doubles Output: True if vectors are parallel False otherwise
Definition at line 109 of file vectorFunctions.h.
void printVertices | ( | T * | vert, |
int | numVertices | ||
) |
Prints vertices with {x, y, z} format. Arg 1: Pointer to vertice array. Expects array length to be a multple of three Arg 2: Number of vertices in array
Definition at line 70 of file vectorFunctions.h.
double* projection | ( | const double * | v1, |
const double * | v2 | ||
) |
|
inline |
Calculates the square magnitude of a vector Arg 1: x Arg 2: y Arg 3: z Return: Square magnitude of {x,y,z}
Definition at line 98 of file vectorFunctions.h.