GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Namespaces | Variables
glc_geomtools.h File Reference

declaration of geometry tools functions More...

#include <QVector>
#include <QList>
#include <QPointF>
#include "glc_vector3d.h"
#include "glc_line3d.h"
#include "glc_plane.h"
#include "../geometry/glc_mesh.h"
#include "../glc_config.h"

Go to the source code of this file.

Namespaces

namespace  glc
 Definition of usefull constants.
 

Functions

Tools Functions
GLC_LIB_EXPORT bool glc::polygon2DIsConvex (const QList< GLC_Point2d > &vertices)
 test if the given 2D polygon is convex
 
GLC_LIB_EXPORT bool glc::polygonIsConvex (QList< GLuint > *pIndexList, const QList< float > &bulkList)
 Test if the given 3d polygon is convex.
 
GLC_LIB_EXPORT QVector
< GLC_Point2d
glc::findIntersection (const GLC_Point2d &, const GLC_Point2d &, const GLC_Point2d &, const GLC_Point2d &)
 find intersection between two 2D segments
 
GLC_LIB_EXPORT bool glc::isIntersected (const GLC_Point2d &, const GLC_Point2d &, const GLC_Point2d &, const GLC_Point2d &)
 Return true if there is an intersection between 2 segments.
 
GLC_LIB_EXPORT bool glc::isIntersectedRaySegment (const GLC_Point2d &, const GLC_Vector2d &, const GLC_Point2d &, const GLC_Point2d &)
 return true if there is an intersection between a ray and a segment
 
GLC_LIB_EXPORT QVector< double > glc::findIntersection (const double &, const double &, const double &, const double &)
 Find intersection of two intervals [u0, u1] and [v0, v1].
 
GLC_LIB_EXPORT bool glc::segmentInCone (const GLC_Point2d &, const GLC_Point2d &, const GLC_Point2d &, const GLC_Point2d &)
 Return true if the segment is in polygon cone.
 
GLC_LIB_EXPORT bool glc::isDiagonal (const QList< GLC_Point2d > &, const int, const int)
 Return true if the segment is a polygon diagonal.
 
GLC_LIB_EXPORT void glc::triangulate (QList< GLC_Point2d > &, QList< int > &, QList< int > &)
 Triangulate a polygon.
 
GLC_LIB_EXPORT bool glc::isCounterclockwiseOrdered (const QList< GLC_Point2d > &)
 Return true if the polygon is couterclockwise ordered.
 
GLC_LIB_EXPORT void glc::triangulatePolygon (QList< GLuint > *, const QList< float > &)
 Triangulate a polygon return true if the polygon is convex.
 
GLC_LIB_EXPORT bool glc::lineIntersectPlane (const GLC_Line3d &line, const GLC_Plane &plane, GLC_Point3d *pPoint)
 Return true if the given 3d line is intersected with the given plane.
 
GLC_LIB_EXPORT GLC_Point3d glc::project (const GLC_Point3d &point, const GLC_Line3d &line)
 Return the projected point on the given line form the given point.
 
GLC_Point3d glc::midPoint (const GLC_Point3d &point1, const GLC_Point3d point2)
 Return the midpoint of the two given points.
 
GLC_Vector2d glc::perpVector (const GLC_Vector2d &vect)
 Return the perpendicular 2D vector of the given 2D vector.
 
GLC_LIB_EXPORT double glc::pointLineDistance (const GLC_Point3d &point, const GLC_Line3d &line)
 Return the distance between the given point and line.
 
GLC_LIB_EXPORT bool glc::pointsAreCollinear (const GLC_Point3d &p1, const GLC_Point3d &p2, const GLC_Point3d &p3)
 Return true if the given 3 points are collinear.
 
GLC_LIB_EXPORT bool glc::compare (double p1, double p2)
 
GLC_LIB_EXPORT bool glc::compare (double p1, double p2, double accuracy)
 
GLC_LIB_EXPORT bool glc::compareAngle (double p1, double p2)
 
GLC_LIB_EXPORT bool glc::compare (const GLC_Vector3d &v1, const GLC_Vector3d &v2)
 
GLC_LIB_EXPORT bool glc::compare (const GLC_Vector3d &v1, const GLC_Vector3d &v2, double accuracy)
 
GLC_LIB_EXPORT bool glc::compare (const GLC_Vector2d &v1, const GLC_Vector2d &v2)
 
GLC_LIB_EXPORT bool glc::compare (const GLC_Vector2d &v1, const GLC_Vector2d &v2, double accuracy)
 
GLC_LIB_EXPORT bool glc::compare (const QPointF &v1, const QPointF &v2)
 
GLC_LIB_EXPORT bool glc::compare (const QPointF &v1, const QPointF &v2, double accuracy)
 
GLC_LIB_EXPORT double glc::round (double value)
 
GLC_LIB_EXPORT double glc::round (double value, double accuracy)
 
GLC_LIB_EXPORT QPointF glc::round (const QPointF &point)
 
GLC_LIB_EXPORT QPointF glc::round (const QPointF &point, double accuracy)
 
GLC_LIB_EXPORT GLC_Vector2d glc::round (const GLC_Vector2d &vector)
 
GLC_LIB_EXPORT GLC_Vector2d glc::round (const GLC_Vector2d &vector, double accuracy)
 
GLC_LIB_EXPORT GLC_Vector3d glc::round (const GLC_Vector3d &vector)
 
GLC_LIB_EXPORT GLC_Vector3d glc::round (const GLC_Vector3d &vector, double accuracy)
 
GLC_LIB_EXPORT bool glc::pointInPolygon (const GLC_Point2d &point, const QList< GLC_Point2d > &polygon)
 Return true if the given 2d point is inside the given polygon.
 
GLC_LIB_EXPORT double glc::zeroTo2PIAngle (double angle)
 Return the angle from 0 to 2PI from an given angle from -PI to PI.
 
GLC_LIB_EXPORT QList< GLC_Point2dglc::polygonIn2d (QList< GLC_Point3d > polygon3d)
 Return the 2D polygon from the given plane 3D polygon.
 
GLC_LIB_EXPORT QList< GLC_Point2dglc::normalyzePolygon (const QList< GLC_Point2d > &polygon)
 Return 2D polygon with normalyze coordinate.
 

Variables

const double glc::defaultPrecision = 0.01
 
GLC_LIB_EXPORT double glc::comparedPrecision = glc::defaultPrecision
 

Detailed Description

declaration of geometry tools functions

Definition in file glc_geomtools.h.

©2005-2013 Laurent Ribon