TM2IN  0.5.1
Classes | Functions
Public API

Classes

class  TM2IN::algorithm::Polygonizer
 Converter TM2IN::RoomBoundary::TriangulatedSurfaceMesh to TM2IN::RoomBoundary::PolygonMesh. More...
 

Functions

bool TM2IN::algorithm::has_lower_angle_than (Vertex *origin, Vertex *v1, Vertex *v2, double angle)
 Compares angle between Vector(origin, v1) and Vector(origin, v2) and the specific angle. More...
 
bool TM2IN::algorithm::isCollinear (Vertex *start_p, Vertex *check_p, Vertex *end_p)
 Determines whether the line string (start_p, check_p, end_p) is collinear. More...
 
bool TM2IN::algorithm::greater (Vertex *a, Vertex *b)
 Compares two Vertices. More...
 
bool TM2IN::algorithm::compareArea (IndoorComponent *i, IndoorComponent *j)
 Compares two Indoor Component by calculating area. More...
 
CGAL::Bbox_3 TM2IN::algorithm::getMBB (std::vector< Wall::Surface * > &surfacesList)
 Gets CGAL::Bbox_3 for Surface list. More...
 
bool TM2IN::algorithm::mergeSurfaces (TM2IN::RoomBoundary::TriangulatedSurfaceMesh *tsm, double thres1, double thres2)
 Merges TM2IN::RoomBoundary::TriangulatedSurfaceMesh to larger one. More...
 
bool TM2IN::algorithm::mergeSurfaces (vector< Wall::TriangulatedSurface * > &surfaceList, double thres1, double thres2, vector< Wall::TriangulatedSurface * > &newSurfaceList)
 Merges the list of Surface. Result will be stored in 4th parameter. More...
 
bool TM2IN::algorithm::mergeTriangles (vector< Wall::Triangle * > &triangleList, double thres1, double thres2, vector< Wall::TriangulatedSurface * > &newSurfaceList)
 Merges the list of Triangle. Result will be stored in 4th parameter. More...
 
int TM2IN::algorithm::cleanMergedSurfaces (TM2IN::RoomBoundary::TriangulatedSurfaceMesh *tsm)
 Cleans TM2IN::RoomBoundary::TriangulatedSurfaceMesh after merging. More...
 
int TM2IN::algorithm::triangulate (TM2IN::Wall::Surface *pSurface, std::vector< TM2IN::Wall::Triangle * > &result)
 Triangulate one TM2IN::Surface to multiple TM2IN::Triangle objects. More...
 
Vector_3 TM2IN::cgal::triangle_normal (TM2IN::Vertex *va, TM2IN::Vertex *vb, TM2IN::Vertex *vc)
 Returns normal vector of triangle. More...
 
double TM2IN::cgal::triangle_area (Vertex *va, Vertex *vb, Vertex *vc)
 Returns the area of triangle. More...
 
double TM2IN::cgal::triangle_area (Point_3 &p1, Point_3 &p2, Point_3 &p3)
 Returns the area of triangle. More...
 
double TM2IN::cgal::getAngle (Vector_3 &v1, Vector_3 &v2)
 Returns the angle between v1 and v2. More...
 
bool TM2IN::cgal::has_lower_angle_than (Vector_3 &nv1, Vector_3 &nv2, double angle)
 Checks the angle between v1 and v2 is lower than the angle. More...
 
int TM2IN::cgal::findNormalType6 (Vector_3 &nv)
 Finds the closest simple normal from nvSimple normal : simple_normal_vector_list6. More...
 
std::vector< Room * > TM2IN::io::importDAE (const char *filePath)
 Imports COLLADA(dae) file and returns a vector of Room. More...
 
int TM2IN::io::exportRoomBoundaryJSON (string output_file, vector< Room * > &rooms, int boundary_mode=0)
 Export a vector of Room to Json format. More...
 
std::vector< Room * > TM2IN::io::import3DS (const char *filePath)
 Imports 3DS file and returns a vector of Room. More...
 
int TM2IN::io::export3DS (const char *filePath, std::vector< Room * > rooms)
 Export a vector of Room to 3DS format. More...
 
vector< Room * > TM2IN::io::importTVR (const char *filePath)
 Imports TVR file and returns a vector of Room. More...
 

Detailed Description

Function Documentation

int TM2IN::algorithm::cleanMergedSurfaces ( TriangulatedSurfaceMesh tsm)
bool TM2IN::algorithm::compareArea ( IndoorComponent i,
IndoorComponent j 
)

Compares two Indoor Component by calculating area.

int TM2IN::io::export3DS ( const char *  filePath,
std::vector< Room * >  rooms 
)

Export a vector of Room to 3DS format.

int TM2IN::io::exportRoomBoundaryJSON ( string  output_file,
vector< Room * > &  rooms,
int  boundary_mode 
)

Export a vector of Room to Json format.

int TM2IN::cgal::findNormalType6 ( Vector_3 nv)

Finds the closest simple normal from nvSimple normal : simple_normal_vector_list6.

double TM2IN::cgal::getAngle ( Vector_3 nv1,
Vector_3 nv2 
)

Returns the angle between v1 and v2.

CGAL::Bbox_3 TM2IN::algorithm::getMBB ( std::vector< Wall::Surface * > &  surfacesList)

Gets CGAL::Bbox_3 for Surface list.

bool TM2IN::algorithm::greater ( Vertex a,
Vertex b 
)

Compares two Vertices.

bool TM2IN::algorithm::has_lower_angle_than ( Vertex origin,
Vertex v1,
Vertex v2,
double  degree 
)

Compares angle between Vector(origin, v1) and Vector(origin, v2) and the specific angle.

bool TM2IN::cgal::has_lower_angle_than ( Vector_3 nv1,
Vector_3 nv2,
double  degree 
)

Checks the angle between v1 and v2 is lower than the angle.

std::vector< Room * > TM2IN::io::import3DS ( const char *  filePath)

Imports 3DS file and returns a vector of Room.

std::vector< Room * > TM2IN::io::importDAE ( const char *  filePath)

Imports COLLADA(dae) file and returns a vector of Room.

std::vector< Room * > TM2IN::io::importTVR ( const char *  filePath)

Imports TVR file and returns a vector of Room.

bool TM2IN::algorithm::isCollinear ( Vertex start_p,
Vertex check_p,
Vertex end_p 
)

Determines whether the line string (start_p, check_p, end_p) is collinear.

bool TM2IN::algorithm::mergeSurfaces ( TriangulatedSurfaceMesh tsm,
double  thres1,
double  thres2 
)
bool TM2IN::algorithm::mergeSurfaces ( vector< Wall::TriangulatedSurface * > &  surfaceList,
double  thres1,
double  thres2,
vector< Wall::TriangulatedSurface * > &  newSurfaceList 
)

Merges the list of Surface. Result will be stored in 4th parameter.

bool TM2IN::algorithm::mergeTriangles ( vector< Wall::Triangle * > &  triangleList,
double  thres1,
double  thres2,
vector< Wall::TriangulatedSurface * > &  newSurfaceList 
)

Merges the list of Triangle. Result will be stored in 4th parameter.

double TM2IN::cgal::triangle_area ( Vertex va,
Vertex vb,
Vertex vc 
)

Returns the area of triangle.

double TM2IN::cgal::triangle_area ( Point_3 p1,
Point_3 p2,
Point_3 p3 
)

Returns the area of triangle.

Vector_3 TM2IN::cgal::triangle_normal ( TM2IN::Vertex va,
TM2IN::Vertex vb,
TM2IN::Vertex vc 
)

Returns normal vector of triangle.

int TM2IN::algorithm::triangulate ( TM2IN::Wall::Surface pSurface,
std::vector< TM2IN::Wall::Triangle * > &  result 
)

Triangulate one TM2IN::Surface to multiple TM2IN::Triangle objects.