#include <GeometryHelper.hpp>
Static Public Member Functions | |
static void | rotationGetSinCos (double angle, double *cosa, double *sina) |
static void | rotationMatrixIdentityInPlace (int ndim, VectorDouble &rot) |
static void | rotation2DMatrixInPlace (double angle, VectorDouble &rot) |
static void | rotation3DMatrixInPlace (double alpha, double beta, double gamma, VectorDouble &rot) |
static void | rotationMatrixInPlace (int ndim, const VectorDouble &angles, VectorDouble &rot) |
static VectorDouble | rotationMatrix (int ndim, const VectorDouble &angles) |
static void | rotationGetAnglesInPlace (int ndim, const double *rot, double *angles) |
static void | rotationGetAnglesInPlace (const VectorDouble &rot, VectorDouble &angles) |
static void | rotationCopy (int ndim, const double *rotin, double *rotout) |
static bool | rotationIsIdentity (int ndim, const double *rot, double eps=EPSILON10) |
static MatrixSquareGeneral | EulerToRotation (const VectorDouble &angles, const ERotation &convrot=ERotation::fromKey("SXYZ")) |
static void | rotationGetRandomDirection (double ct, double st, const double *a, double *codir) |
static void | rotationGetDirection2D (const VectorDouble &angles, VectorDouble &codir) |
static void | rotationGetDirectionDefault (int ndim, VectorDouble &codir) |
static void | rotationGetAnglesFromCodirInPlace (const VectorDouble &codir, VectorDouble &angles) |
static VectorDouble | rotationGetAngles (const VectorDouble &codir, bool flagResize=false) |
static VectorDouble | rotationToEuler (const MatrixSquareGeneral &mat, const ERotation &convrot=ERotation::fromKey("SXYZ"), double eps=EPSILON10) |
static double | distancePointToSegment (double x0, double y0, double x1, double y1, double x2, double y2, double *xd, double *yd, int *nint) |
static bool | segmentIntersect (double xd1, double yd1, double xe1, double ye1, double xd2, double yd2, double xe2, double ye2, double *xint, double *yint) |
static double | geodeticAngularDistance (double long1, double lat1, double long2, double lat2, double radius=1.) |
static void | geodeticAngles (double long1, double lat1, double long2, double lat2, double long3, double lat3, double *a, double *b, double *c, double *A, double *B, double *C) |
static double | geodeticTrianglePerimeter (double long1, double lat1, double long2, double lat2, double long3, double lat3) |
static double | geodeticTriangleSurface (double long1, double lat1, double long2, double lat2, double long3, double lat3) |
static bool | isInSphericalTriangle (double *coor, double surface, double *pts1, double *pts2, double *pts3, double *wgts, double eps=EPSILON6) |
static bool | isInSphericalTriangleOptimized (const double *coor, double *ptsa, double *ptsb, double *ptsc, double *wgts, double eps=EPSILON6) |
static VectorVectorDouble | convertLongLat (const VectorDouble &longitude, const VectorDouble &latitude, double dilate=1., double radius_arg=1.) |
static void | convertCart2Sph (double x, double y, double z, double *rlong, double *rlat, double radius_arg=1.) |
static void | convertSph2Cart (double rlong, double rlat, double *x, double *y, double *z, double radius_arg=1.) |
static MatrixSquareGeneral | gradXYToRotmat (double dzoverdx, double dzoverdy) |
static MatrixRectangular * | getDirectionsInR3 (const MatrixRectangular *U) |
static MatrixRectangular * | getDirectionsInRn (const MatrixRectangular *U) |
static double | formatAngle (double anglein, double basis=360.) |
static VectorDouble | formatAngles (const VectorDouble &anglesin, double basis=360.) |
static VectorDouble | rayTriangleIntersect (const VectorDouble &dir, const VectorDouble &v0, const VectorDouble &v1, const VectorDouble &v2) |
static VectorVectorDouble | sphBarCoord (const VectorVectorDouble &sphPts, const MatrixRectangular &apices, const MatrixInt &meshes) |
static double | getCosineAngularTolerance (double tolang) |
static VectorVectorDouble | getEllipse (const VectorDouble ¢er, double rx, double ry, double theta, int count=360) |
|
static |
Convert the cartesian coordinates into spherical coordinates
[in] | x | First cartesian coordinate |
[in] | y | Second cartesian coordinate |
[in] | z | Third cartesian coordinate |
[in] | radius_arg | Radius of the sphere (Earth if TEST) |
[out] | rlong | Longitude (in degrees) |
[out] | rlat | Latitude (in degrees) |
|
static |
|
static |
Convert the spherical coordinates into cartesian coordinates
[in] | rlong | Longitude (in degrees) |
[in] | rlat | Latitude (in degrees) |
[in] | radius_arg | radius of the sphere (Earth if TEST) |
[out] | x | First cartesian coordinate |
[out] | y | Second cartesian coordinate |
[out] | z | Third cartesian coordinate |
|
static |
Find the shortest distance between the point (x0,y0) and the segment with the two end points (x1,y1) and (x2,y2)
[in] | x0,y0 | Coordinates of the target point |
[in] | x1,y1 | Coordinate of the first end-point of the segment |
[in] | x2,y2 | Coordinate of the second end-point of the segment |
[out] | xd,yd | Coordinates of the closest point |
[out] | nint | =1 if the projection belongs to the segment =0 if it is set to one of the segment vertices |
|
static |
Returns the Rotation matrix, starting from the Euler angles
angles | Ordered list of Euler angles |
convrot | Rotation convention |
|
static |
Format an Angle to be lying in [0, basis]
anglein | Input angle value |
basis | Basis (should be 360 by default; could be 180 for variogram or covariance) |
|
static |
|
static |
Calculate all geodetic angles from a spherical triangle
[in] | long1 | Longitude of the first point (in degrees) |
[in] | lat1 | Latitude of the first point (in degrees) |
[in] | long2 | Longitude of the second point (in degrees) |
[in] | lat2 | Latitude of the second point (in degrees) |
[in] | long3 | Longitude of the third point (in degrees) |
[in] | lat3 | Latitude of the third point (in degrees) |
[out] | a | Angle (P2,O,P3) |
[out] | b | Angle (P3,O,P1) |
[out] | c | Angle (P1,O,P2) |
[out] | A | Angle (P2,P1,P3) |
[out] | B | Angle (P3,P2,P1) |
[out] | C | Angle (P1,P3,P2) |
|
static |
Calculate the geodetic angular distance between two points on the sphere
[in] | long1 | Longitude of the first point (in degrees) |
[in] | lat1 | Latitude of the first point (in degrees) |
[in] | long2 | Longitude of the second point (in degrees) |
[in] | lat2 | Latitude of the second point (in degrees) |
[in] | radius | Radius of the sphere |
|
static |
Calculate the perimeter of the spherical triangle
[in] | long1 | Longitude of the first point (in degrees) |
[in] | lat1 | Latitude of the first point (in degrees) |
[in] | long2 | Longitude of the second point (in degrees) |
[in] | lat2 | Latitude of the second point (in degrees) |
[in] | long3 | Longitude of the third point (in degrees) |
[in] | lat3 | Latitude of the third point (in degrees) |
|
static |
Calculate the surface of the spherical triangle
[in] | long1 | Longitude of the first point (in degrees) |
[in] | lat1 | Latitude of the first point (in degrees) |
[in] | long2 | Longitude of the second point (in degrees) |
[in] | lat2 | Latitude of the second point (in degrees) |
[in] | long3 | Longitude of the third point (in degrees) |
[in] | lat3 | Latitude of the third point (in degrees) |
|
static |
Returns the cosine of the angular tolerance
[in] | tolang | Angular tolerance |
|
static |
|
static |
Function to compute directions in Rd
U | a matrix [n, d] of uniform values between [0,1]. 'n' is the number of direction and 'd' is the dimension of the space |
|
static |
|
static |
Calculate the rotation matrix starting from the partial derivatives along X and Y of a tilted plane
dzoverdx | Partial derivative along X |
dzoverdy | Partial derivative along Y |
|
static |
Is a point inside a spherical triangle
[in] | coor | Coordinates of the target point (long,lat) |
[in] | surface | Surface of the spherical triangle |
[in] | pts1 | Coordinates of the first point of the triangle |
[in] | pts2 | Coordinates of the second point of the triangle |
[in] | pts3 | Coordinates of the third point of the triangle |
[in] | eps | Tolerance |
[out] | wgts | Array of weights |
|
static |
Is a point inside a spherical triangle
[in] | coor | Coordinates of the target point (long,lat) |
[in] | ptsa | Coordinates of the first point of the triangle |
[in] | ptsb | Coordinates of the second point of the triangle |
[in] | ptsc | Coordinates of the third point of the triangle |
[in] | eps | Tolerance |
[out] | wgts | Array of weights |
|
static |
|
static |
|
static |
Calculates the 3-D rotation matrix
[in] | alpha | angle (in degrees) / oz |
[in] | beta | angle (in degrees) / oy' |
[in] | gamma | angle (in degrees) / ox'' |
[out] | rot | direct rotation matrix (Dimension = 9) |
|
static |
Copy a rotation matrix
[in] | ndim | Space dimension |
[in] | rotin | Input rotation matrix |
[out] | rotout | Output rotation matrix (already allocated) |
|
static |
From the vector of direction coefficients (codir) returns the vector of angles
codir | Input vector giving the direction coefficients |
flagResize | When TRUE (and if in 2-D) the returned vector is resized to 1 |
|
static |
Calculates the rotation angle from the direction coefficient
[in] | codir | Direction vector (Dimension = ndim) |
[out] | angles | Rotation angles (Dimension = ndim) |
|
static |
|
static |
|
static |
Convert angles to a set of Directions
[in] | angles | Vector giving the angles characteristics (in degrees) As this provides rotation in 2D, 'angles' is dimensioned to 'ndir' (one angle requires a single value) |
[out] | codir | Vector of the direction (Dim: ndir * ndim) |
|
static |
Create a Direction (used as default)
[in] | ndim | Number of space dimensions |
[out] | codir | Vector of the direction (Dim: ndim) |
|
static |
Rotation of a Direction in 3-D
[in] | ct,st | Cosine and Sine of the rotation angle |
[in] | a | Random direction |
[in,out] | codir | Direction to be rotated |
|
static |
Calculates the trigonometric features
[in] | angle | input angle (in degrees) |
[out] | cosa | cosine function |
[out] | sina | sine function |
|
static |
Starting from a rotation matrix, check it is different from the Identity
[in] | ndim | Space dimension |
[in] | rot | Rotation matrix |
[in] | eps | Tolerance |
|
static |
Calculates the rotation matrix. Returns the rotation matrix as a VectorDouble
[in] | ndim | Space dimension |
[in] | angles | Array of angles |
|
static |
Initialize a rotation matrix
[in] | ndim | Space dimension |
[out] | rot | Rotation matrix |
|
static |
Calculates the rotation matrix
[in] | ndim | Space dimension |
[in] | angles | Array of angles |
[out] | rot | direct rotation matrix (dimensionned to ndim*ndim) |
|
static |
Returns the Euler angles, starting from a rotation matrix
M | Input matrix |
convrot | Rotation convention |
eps | Tolerance |
|
static |
Check if two 2-D segments intersect
[in] | xd1,yd1 | Starting point for the first segment |
[in] | xe1,ye1 | Ending point for the first segment |
[in] | xd2,yd2 | Starting point for the second segment |
[in] | xe2,ye2 | Ending point for the second segment |
[out] | xint,yint | Coordinates of the intersection |
|
static |
Calculate the Barycenter coordinates of points with in the Spherical Meshing
sphPts | Coordinates of target samples (dim = np * 3) |
apices | Coordinates of the apices of the Meshing |
meshes | Mesh information of the Meshing |