My Project
|
#include "helperfunctions.h"
#include "basicComponents.h"
#include "complexComponents.h"
#include "math.h"
#include <vector>
#include <algorithm>
#include <set>
Macros | |
#define | PI 3.14159265 |
#define | INF 1000000 |
#define | epsilon 0.1 |
Functions | |
Vertice | transform (Vertice v_in, double Xrot, double Yrot, double Zrot, double Xoff, double Yoff, double Zoff) |
Transforms a vertice (rotation and offset) using matrix multiplication and returns a new Vertice object. More... | |
pair< int, Vertice > | get_intersection (Edge a, Edge b) |
Finds intersection of two edges (line segments) and also returns error if intersection does not exist. More... | |
bool | is_inside (Vertice v, set< Edge > edgeSet) |
Checks whether a vertice is inside (in 2d) of a face formed by an edge loop. More... | |
bool | isSubset (vector< int > &a, vector< int > &b) |
int | verticePresent (vector< Vertice > &a, Vertice b) |
Checks if a vertice is present in a vector of vertices. More... | |
WireFrame | modifyWireframe (WireFrame wf, Vertice v) |
Takes a wireframe and subtracts coordinates of v from all its edge vertices. More... | |
#define epsilon 0.1 |
#define INF 1000000 |
#define PI 3.14159265 |
Finds intersection of two edges (line segments) and also returns error if intersection does not exist.
returns (1,point of intersection) if intersecting, (0,_) if overlapping and (-1,_) if parallel Both edges are 2D edges
Checks whether a vertice is inside (in 2d) of a face formed by an edge loop.
Checks if vertex is inside the polygon defined by the edge set
bool isSubset | ( | vector< int > & | a, |
vector< int > & | b | ||
) |
A simple helper function to check if a is a subset of b
Takes a wireframe and subtracts coordinates of v from all its edge vertices.
Vertice transform | ( | Vertice | v_in, |
double | Xrot, | ||
double | Yrot, | ||
double | Zrot, | ||
double | Xoff, | ||
double | Yoff, | ||
double | Zoff | ||
) |
Transforms a vertice (rotation and offset) using matrix multiplication and returns a new Vertice object.
get transformed 3D object