34const float FM_PI = 3.1415926535897932384626433832795028841971693993751f;
 
   61void fm_inverseRT(
const float matrix[16], 
const float pos[3], 
float t[3]);     
 
   62void fm_inverseRT(
const double matrix[16], 
const double pos[3], 
double t[3]);  
 
   64void fm_transform(
const float matrix[16], 
const float pos[3], 
float t[3]);     
 
   65void fm_transform(
const double matrix[16], 
const double pos[3], 
double t[3]);  
 
   70void fm_getSubMatrix(int32_t ki, int32_t kj, 
float pDst[16], 
const float matrix[16]);
 
   71void fm_getSubMatrix(int32_t ki, int32_t kj, 
double pDst[16], 
const float matrix[16]);
 
   73void fm_rotate(
const float matrix[16], 
const float pos[3], 
float t[3]);  
 
   75void fm_rotate(
const double matri[16], 
const double pos[3], 
double t[3]);  
 
   83void fm_getAABB(uint32_t vcount, 
const float* points, uint32_t pstride, 
float bmin[3], 
float bmax[3]);
 
   84void fm_getAABB(uint32_t vcount, 
const double* points, uint32_t pstride, 
double bmin[3], 
double bmax[3]);
 
   89void fm_transformAABB(
const float bmin[3], 
const float bmax[3], 
const float matrix[16], 
float tbmin[3], 
float tbmax[3]);
 
   92                      const double matrix[16],
 
  106void fm_scale(
float x, 
float y, 
float z, 
float matrix[16]);      
 
  107void fm_scale(
double x, 
double y, 
double z, 
double matrix[16]);  
 
  159float fm_computePlane(
const float p1[3], 
const float p2[3], 
const float p3[3], 
float* n);       
 
  160double fm_computePlane(
const double p1[3], 
const double p2[3], 
const double p3[3], 
double* n);  
 
  164                      const double pos[3]);  
 
  166float fm_dot(
const float p1[3], 
const float p2[3]);
 
  167double fm_dot(
const double p1[3], 
const double p2[3]);
 
  169void fm_cross(
float cross[3], 
const float a[3], 
const float b[3]);
 
  170void fm_cross(
double cross[3], 
const double a[3], 
const double b[3]);
 
  193double fm_computeArea(
const double p1[3], 
const double p2[3], 
const double p3[3]);
 
  195void fm_lerp(
const float p1[3], 
const float p2[3], 
float dest[3], 
float lerpValue);
 
  196void fm_lerp(
const double p1[3], 
const double p2[3], 
double dest[3], 
double lerpValue);
 
  199bool fm_insideTriangleXZ(
const double test[3], 
const double p1[3], 
const double p2[3], 
const double p3[3]);
 
  201bool fm_insideAABB(
const float pos[3], 
const float bmin[3], 
const float bmax[3]);
 
  202bool fm_insideAABB(
const double pos[3], 
const double bmin[3], 
const double bmax[3]);
 
  205                   const float obmax[3],
 
  206                   const float tbmin[3],
 
  207                   const float tbmax[3]);  
 
  209                   const double obmax[3],
 
  210                   const double tbmin[3],
 
  211                   const double tbmax[3]);  
 
  227                         const double bmax[3],
 
  236                       const double bmin[3],
 
  237                       const double bmax[3],
 
  240bool fm_lineTestAABB(
const float p1[3], 
const float p2[3], 
const float bmin[3], 
const float bmax[3], 
float& 
time);
 
  241bool fm_lineTestAABB(
const double p1[3], 
const double p2[3], 
const double bmin[3], 
const double bmax[3], 
double& 
time);
 
  249void fm_minmax(
const float p[3], 
float bmin[3], 
float bmax[3]);     
 
  250void fm_minmax(
const double p[3], 
double bmin[3], 
double bmax[3]);  
 
  275                            const float* weights,  
 
  281                            const double* points,   
 
  283                            const double* weights,  
 
  294                        const double* points,  
 
  301                        uint32_t triangleCount,
 
  302                        const uint32_t* indices,
 
  308                        const double* points,  
 
  309                        uint32_t triangleCount,
 
  310                        const uint32_t* indices,
 
  319                             const double* points,
 
  350                               const float rayEnd[3],
 
  356                               const double rayEnd[3],
 
  401bool fm_intersectAABB(
const float bmin1[3], 
const float bmax1[3], 
const float bmin2[3], 
const float bmax2[3]);
 
  402bool fm_intersectAABB(
const double bmin1[3], 
const double bmax1[3], 
const double bmin2[3], 
const double bmax2[3]);
 
  409                                  const float LineStart[3],
 
  410                                  const float LineEnd[3],
 
  411                                  float intersection[3],
 
  415                                   const double LineStart[3],
 
  416                                   const double LineEnd[3],
 
  417                                   double intersection[3],
 
  421bool fm_colinear(
const double p1[3], 
const double p2[3], 
const double p3[3], 
double epsilon = 0.999);  
 
  425bool fm_colinear(
const float p1[3], 
const float p2[3], 
const float p3[3], 
float epsilon = 0.999f);
 
  431                 float epsilon = 0.999f);  
 
  436                 double epsilon = 0.999);  
 
  450                                           float intersectionPoint[3]);
 
  455                                           double intersectionPoint[3]);
 
  481                                       const float* triangle,  
 
  490                                       const double* triangle,  
 
  509                          bool bruteForce = 
true);
 
  511                          const double* points,
 
  515                          bool bruteForce = 
true);
 
  523                          bool bruteForce = 
true);
 
  525                          const double* points,
 
  530                          bool bruteForce = 
true);
 
  533void fm_computeBestFitABB(uint32_t vcount, 
const double* points, uint32_t pstride, 
double* sides, 
double pos[3]);
 
  542                              bool bruteForce = 
true);
 
  544                              const double* points,
 
  549                              bool bruteForce = 
true);
 
  581#define FM_DEFAULT_GRANULARITY 0.001f   
  587  virtual uint32_t 
getIndex(
const float pos[3], 
bool& newPos) = 0;   
 
  588  virtual uint32_t 
getIndex(
const double pos[3], 
bool& newPos) = 0;  
 
  595  virtual bool saveAsObj(
const char* fname, uint32_t tcount, uint32_t* indices) = 0;
 
  609                                      const double* points,
 
  626const float* 
fm_getPoint(
const float* points, uint32_t pstride, uint32_t index);
 
  627const double* 
fm_getPoint(
const double* points, uint32_t pstride, uint32_t index);
 
  629bool fm_insideTriangle(
float Ax, 
float Ay, 
float Bx, 
float By, 
float Cx, 
float Cy, 
float Px, 
float Py);
 
  630bool fm_insideTriangle(
double Ax, 
double Ay, 
double Bx, 
double By, 
double Cx, 
double Cy, 
double Px, 
double Py);
 
  639                             uint32_t yindex = 1);
 
  641                             const double* points,
 
  645                             uint32_t yindex = 1);
 
  651                               float epsilon = 0.999999f);  
 
  653                               const double* points,
 
  656                               double epsilon = 0.999999);  
 
  659                          const double* vertices,
 
  661                          const uint32_t* indices,
 
  664                          const float* vertices,
 
  666                          const uint32_t* indices,
 
  685void fm_add(
const float* A, 
const float* B, 
float* sum);
 
  686void fm_add(
const double* A, 
const double* B, 
double* sum);
 
  697                               const float* input_vertices,
 
  698                               float* output_vertices,
 
  700                               const uint32_t* input_indices,
 
  701                               uint32_t* output_indices);
 
  703                               const double* input_vertices,
 
  704                               double* output_vertices,
 
  706                               const uint32_t* input_indices,
 
  707                               uint32_t* output_indices);
 
  710                       const uint32_t* indices,
 
  711                       const float* vertices,
 
  714                       const uint32_t* indices,
 
  715                       const double* vertices,
 
  720                  float normalEpsilon = 0.01f,
 
  721                  float dEpsilon = 0.001f,
 
  722                  bool doubleSided = 
false);  
 
  726                  double normalEpsilon = 0.01,
 
  727                  double dEpsilon = 0.001,
 
  728                  bool doubleSided = 
false);
 
  730void fm_OBBtoAABB(
const float obmin[3], 
const float obmax[3], 
const float matrix[16], 
float abmin[3], 
float abmax[3]);
 
  739                                    const uint32_t* indices,
 
  742                                    uint32_t& outcount) = 0;
 
  749                           const float* vertices,     
 
  754                           const uint32_t* indices);  
 
  757                           const double* vertices,    
 
  762                           const uint32_t* indices);  
 
  765bool fm_isValidTriangle(
const double* p1, 
const double* p2, 
const double* p3, 
double epsilon = 0.00001);
 
Definition: FloatMath.h:734
 
virtual const uint32_t * tesselate(fm_VertexIndex *vindex, uint32_t tcount, const uint32_t *indices, float longEdge, uint32_t maxDepth, uint32_t &outcount)=0
 
virtual ~fm_Tesselate()=default
 
Definition: FloatMath.h:605
 
virtual const float * triangulate3d(uint32_t pcount, const float *points, uint32_t vstride, uint32_t &tcount, bool consolidate, float epsilon)=0
 
virtual const double * triangulate3d(uint32_t pcount, const double *points, uint32_t vstride, uint32_t &tcount, bool consolidate, double epsilon)=0
 
virtual ~fm_Triangulate()=default
 
Definition: FloatMath.h:584
 
virtual bool saveAsObj(const char *fname, uint32_t tcount, uint32_t *indices)=0
 
virtual const double * getVertexDouble(uint32_t index) const =0
 
virtual uint32_t getIndex(const float pos[3], bool &newPos)=0
 
virtual const float * getVerticesFloat(void) const =0
 
virtual uint32_t getVcount(void) const =0
 
virtual bool isDouble(void) const =0
 
virtual ~fm_VertexIndex()=default
 
virtual const float * getVertexFloat(uint32_t index) const =0
 
virtual uint32_t getIndex(const double pos[3], bool &newPos)=0
 
virtual const double * getVerticesDouble(void) const =0
 
Definition: FloatMath.inl:1849
 
Definition: FloatMath.inl:1833
 
results distance
Definition: collision_core_unit.cpp:139
 
results normal
Definition: collision_core_unit.cpp:154
 
double scale
Definition: collision_margin_data_unit.cpp:133
 
float fm_sphereVolume(float radius)
 
uint32_t fm_clipTestPoint(const float bmin[3], const float bmax[3], const float pos[3])
 
void fm_subtract(const float *A, const float *B, float *diff)
 
fm_Tesselate * fm_createTesselate(void)
Definition: FloatMath.inl:4102
 
void fm_releaseTesselate(fm_Tesselate *t)
Definition: FloatMath.inl:4108
 
bool fm_computeWindingOrder(const float p1[3], const float p2[3], const float p3[3])
 
void fm_quatToMatrix(const float quat[4], float matrix[16])
 
void fm_multiply(float *A, float scaler)
 
float fm_distanceSquaredXZ(const float p1[3], const float p2[3])
 
fm_Triangulate * fm_createTriangulate(void)
Definition: FloatMath.inl:5004
 
IntersectResult
Definition: FloatMath.h:439
 
@ IR_DO_INTERSECT
Definition: FloatMath.h:441
 
@ IR_PARALLEL
Definition: FloatMath.h:443
 
@ IR_DONT_INTERSECT
Definition: FloatMath.h:440
 
@ IR_COINCIDENT
Definition: FloatMath.h:442
 
bool fm_raySphereIntersect(const float center[3], float radius, const float pos[3], const float dir[3], float distance, float intersect[3])
 
float fm_computeMeshVolume(const float *vertices, uint32_t tcount, const uint32_t *indices)
 
bool fm_isValidTriangle(const float *p1, const float *p2, const float *p3, float epsilon=0.00001f)
 
void fm_decomposeTransform(const float local_transform[16], float trans[3], float rot[4], float scale[3])
 
void fm_setTranslation(const float *translation, float matrix[16])
 
void fm_inflateMinMax(float bmin[3], float bmax[3], float ratio)
 
void fm_doubleToFloat3(const double p[3], float t[3])
Definition: FloatMath.h:560
 
void fm_getAABB(uint32_t vcount, const float *points, uint32_t pstride, float bmin[3], float bmax[3])
 
void fm_getAABBCenter(const float bmin[3], const float bmax[3], float center[3])
 
bool fm_lineTestAABB(const float p1[3], const float p2[3], const float bmin[3], const float bmax[3], float &time)
 
void fm_inverseTransform(const float matrix[16], float inverse_matrix[16])
 
void fm_quatRotate(const float quat[4], const float v[3], float r[3])
 
void fm_matrixToQuat(const float matrix[16], float quat[4])
 
const float FM_PI
Definition: FloatMath.h:34
 
void fm_planeToMatrix(const float plane[4], float matrix[16])
 
float fm_capsuleVolume(float radius, float h)
 
float fm_solveZ(const float plane[4], float x, float y)
 
void fm_matrixMultiply(const float A[16], const float B[16], float dest[16])
 
const float FM_DEG_TO_RAD
Definition: FloatMath.h:35
 
void fm_multiplyTransform(const float *pA, const float *pB, float *pM)
 
float fm_computeNormalVector(float n[3], const float p1[3], const float p2[3])
 
void fm_add(const float *A, const float *B, float *sum)
 
void fm_composeTransform(const float position[3], const float quat[4], const float scale[3], float matrix[16])
 
void fm_eulerToQuatDX(float x, float y, float z, float quat[4])
 
uint32_t fm_clipTestAABB(const float bmin[3], const float bmax[3], const float p1[3], const float p2[3], const float p3[3], uint32_t &andCode)
 
float fm_dot(const float p1[3], const float p2[3])
 
FM_ClipState
Definition: FloatMath.h:11
 
@ FMCS_XMIN
Definition: FloatMath.h:12
 
@ FMCS_XMAX
Definition: FloatMath.h:13
 
@ FMCS_YMIN
Definition: FloatMath.h:14
 
@ FMCS_YMAX
Definition: FloatMath.h:15
 
@ FMCS_ZMAX
Definition: FloatMath.h:17
 
@ FMCS_ZMIN
Definition: FloatMath.h:16
 
FM_Axis
Definition: FloatMath.h:21
 
@ FM_YAXIS
Definition: FloatMath.h:23
 
@ FM_ZAXIS
Definition: FloatMath.h:24
 
@ FM_XAXIS
Definition: FloatMath.h:22
 
fm_VertexIndex * fm_createVertexIndex(double granularity, bool snapToGrid)
Definition: FloatMath.inl:3168
 
float fm_normalize(float n[3])
 
float fm_areaTriangle(const float *p1, const float *p2, const float *p3)
 
void fm_quatToEuler(const float quat[4], float &ax, float &ay, float &az)
 
void fm_eulerToMatrix(float ax, float ay, float az, float matrix[16])
 
void fm_rotate(const float matrix[16], const float pos[3], float t[3])
 
bool fm_isMeshCoplanar(uint32_t tcount, const uint32_t *indices, const float *vertices, bool doubleSided)
 
void fm_cross(float cross[3], const float a[3], const float b[3])
 
float fm_computeBestFitSphere(uint32_t vcount, const float *points, uint32_t pstride, float center[3])
 
uint32_t fm_clipTestPointXZ(const float bmin[3], const float bmax[3], const float pos[3])
 
bool fm_insideAABB(const float pos[3], const float bmin[3], const float bmax[3])
 
float fm_solveY(const float plane[4], float x, float z)
 
float fm_normalizeQuat(float n[4])
 
void fm_releaseVertexIndex(fm_VertexIndex *vindex)
Definition: FloatMath.inl:3180
 
bool fm_rayIntersectsTriangle(const float origin[3], const float dir[3], const float v0[3], const float v1[3], const float v2[3], float &t)
 
void fm_inverseRT(const float matrix[16], const float pos[3], float t[3])
 
float fm_cylinderVolume(float radius, float h)
 
void fm_nearestPointInTriangle(const float *pos, const float *p1, const float *p2, const float *p3, float *nearest)
 
float fm_distToPlane(const float plane[4], const float pos[3])
 
PlaneTriResult fm_planeTriIntersection(const float plane[4], const float *triangle, uint32_t tstride, float epsilon, float *front, uint32_t &fcount, float *back, uint32_t &bcount)
 
void fm_lerp(const float p1[3], const float p2[3], float dest[3], float lerpValue)
 
uint32_t fm_consolidatePolygon(uint32_t pcount, const float *points, uint32_t pstride, float *dest, float epsilon=0.999999f)
 
void fm_releaseTriangulate(fm_Triangulate *t)
Definition: FloatMath.inl:5010
 
void fm_getSubMatrix(int32_t ki, int32_t kj, float pDst[16], const float matrix[16])
 
void fm_copy3(const float *source, float *dest)
 
bool fm_intersectAABB(const float bmin1[3], const float bmax1[3], const float bmin2[3], const float bmax2[3])
 
PlaneTriResult
Definition: FloatMath.h:473
 
@ PTR_FRONT
Definition: FloatMath.h:475
 
@ PTR_ON_PLANE
Definition: FloatMath.h:474
 
@ PTR_BACK
Definition: FloatMath.h:476
 
@ PTR_SPLIT
Definition: FloatMath.h:477
 
bool fm_intersectRayAABB(const float bmin[3], const float bmax[3], const float pos[3], const float dir[3], float intersect[3])
Definition: FloatMath.inl:4144
 
bool fm_computeSplitPlane(uint32_t vcount, const double *vertices, uint32_t tcount, const uint32_t *indices, double *plane)
 
void fm_minmax(const float p[3], float bmin[3], float bmax[3])
 
void fm_eulerMatrix(float ax, float ay, float az, float matrix[16])
 
PlaneTriResult fm_getSidePlane(const float p[3], const float plane[4], float epsilon)
 
float fm_computeArea(const float p1[3], const float p2[3], const float p3[3])
 
IntersectResult fm_intersectLineSegments2d(const float a1[3], const float a2[3], const float b1[3], const float b2[3], float intersectionPoint[3])
 
void fm_OBBtoAABB(const float obmin[3], const float obmax[3], const float matrix[16], float abmin[3], float abmax[3])
Definition: FloatMath.inl:4231
 
void fm_catmullRom(float out_vector[3], const float p1[3], const float p2[3], const float p3[3], const float *p4, const float s)
 
bool fm_lineSphereIntersect(const float center[3], float radius, const float p1[3], const float p2[3], float intersect[3])
 
bool fm_pointInsidePolygon2d(uint32_t pcount, const float *points, uint32_t pstride, const float *point, uint32_t xindex=0, uint32_t yindex=1)
 
void fm_getTranslation(const float matrix[16], float t[3])
 
void fm_scale(float x, float y, float z, float matrix[16])
 
float fm_distancePointLineSegment(const float Point[3], const float LineStart[3], const float LineEnd[3], float intersection[3], LineSegmentType &type, float epsilon)
 
void fm_multiplyQuat(const float *qa, const float *qb, float *quat)
 
void fm_floatToDouble3(const float p[3], double t[3])
Definition: FloatMath.h:566
 
void fm_initMinMax(const float p[3], float bmin[3], float bmax[3])
 
float fm_solveX(const float plane[4], float y, float z)
 
void fm_rotationArc(const float v0[3], const float v1[3], float quat[4])
 
void fm_identity(float matrix[16])
 
float fm_computePlane(const float p1[3], const float p2[3], const float p3[3], float *n)
 
float fm_areaPolygon2d(uint32_t pcount, const float *points, uint32_t pstride)
 
bool fm_insideTriangle(float Ax, float Ay, float Bx, float By, float Cx, float Cy, float Px, float Py)
 
void fm_eulerToQuat(float x, float y, float z, float quat[4])
 
bool fm_intersectLineSegmentAABB(const float bmin[3], const float bmax[3], const float p1[3], const float p2[3], float intersect[3])
Definition: FloatMath.inl:4203
 
void fm_transform(const float matrix[16], const float pos[3], float t[3])
 
bool fm_lineTestAABBXZ(const float p1[3], const float p2[3], const float bmin[3], const float bmax[3], float &time)
 
void fm_planeToQuat(const float plane[4], float quat[4], float pos[3])
 
bool fm_colinear(const double p1[3], const double p2[3], const double p3[3], double epsilon=0.999)
 
void fm_computeBestFitOBB(uint32_t vcount, const float *points, uint32_t pstride, float *sides, float matrix[16], bool bruteForce=true)
 
bool fm_lineIntersectsTriangle(const float rayStart[3], const float rayEnd[3], const float p1[3], const float p2[3], const float p3[3], float sect[3])
 
IntersectResult fm_intersectLineSegments2dTime(const float a1[3], const float a2[3], const float b1[3], const float b2[3], float &t1, float &t2)
 
void fm_computeBestFitCapsule(uint32_t vcount, const float *points, uint32_t pstride, float &radius, float &height, float matrix[16], bool bruteForce=true)
 
FM_Axis fm_getDominantAxis(const float normal[3])
 
float fm_distanceSquared(const float p1[3], const float p2[3])
 
void fm_eulerToMatrixDX(float x, float y, float z, float matrix[16])
 
const float FM_RAD_TO_DEG
Definition: FloatMath.h:36
 
void fm_computeMeanNormals(uint32_t vcount, const float *vertices, uint32_t vstride, float *normals, uint32_t nstride, uint32_t tcount, const uint32_t *indices)
 
bool fm_computeBestFitPlane(uint32_t vcount, const float *points, uint32_t vstride, const float *weights, uint32_t wstride, float plane[4], float center[3])
 
bool fm_samePlane(const float p1[4], const float p2[4], float normalEpsilon=0.01f, float dEpsilon=0.001f, bool doubleSided=false)
 
float fm_getDeterminant(const float matrix[16])
 
void fm_computeBestFitABB(uint32_t vcount, const float *points, uint32_t pstride, float *sides, float pos[3])
 
void fm_transformAABB(const float bmin[3], const float bmax[3], const float matrix[16], float tbmin[3], float tbmax[3])
 
LineSegmentType
Definition: FloatMath.h:28
 
@ LS_MIDDLE
Definition: FloatMath.h:30
 
@ LS_START
Definition: FloatMath.h:29
 
@ LS_END
Definition: FloatMath.h:31
 
float fm_distance(const float p1[3], const float p2[3])
 
bool fm_computeCentroid(uint32_t vcount, const float *points, float *center)
 
uint32_t fm_copyUniqueVertices(uint32_t vcount, const float *input_vertices, float *output_vertices, uint32_t tcount, const uint32_t *input_indices, uint32_t *output_indices)
 
bool fm_insideTriangleXZ(const float test[3], const float p1[3], const float p2[3], const float p3[3])
 
bool intersect(const REAL *si, const REAL *ei, const REAL *bmin, const REAL *bmax, REAL *time)
Definition: FloatMath.inl:908
 
bool fm_intersectPointPlane(const float p1[3], const float p2[3], float *split, const float plane[4])
 
const float * fm_getPoint(const float *points, uint32_t pstride, uint32_t index)
 
float fm_computeBestFitAABB(uint32_t vcount, const float *points, uint32_t pstride, float bmin[3], float bmax[3])
 
Definition: bullet_cast_bvh_manager.h:49
 
std::set< std::string > s
Definition: plugin_loader_unit.cpp:45
 
joint_state time
Definition: tesseract_common_serialization_unit.cpp:80
 
joint_state position
Definition: tesseract_common_serialization_unit.cpp:76
 
std::vector< std::string > v2
Definition: tesseract_common_unit.cpp:418
 
v1["1"]
Definition: tesseract_common_unit.cpp:434
 
v
Definition: tesseract_common_unit.cpp:369
 
mCollisionCheckConfig contact_request type
Definition: tesseract_environment_collision.cpp:103