Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
vhacdRaycastMesh.h
Go to the documentation of this file.
1#pragma once
2
3#include <stdint.h>
4
6{
7namespace VHACD
8{
9// Very simple brute force raycast against a triangle mesh. Tests every triangle; no hierachy.
10// Does a deep copy, always does calculations with full double float precision
12{
13public:
14 static RaycastMesh* createRaycastMesh(uint32_t vcount, // The number of vertices in the source triangle mesh
15 const double* vertices, // The array of vertex positions in the format
16 // x1,y1,z1..x2,y2,z2.. etc.
17 uint32_t tcount, // The number of triangles in the source triangle mesh
18 const uint32_t* indices); // The triangle indices in the format of i1,i2,i3 ...
19 // i4,i5,i6, ...
20
21 static RaycastMesh* createRaycastMesh(uint32_t vcount, // The number of vertices in the source triangle mesh
22 const float* vertices, // The array of vertex positions in the format
23 // x1,y1,z1..x2,y2,z2.. etc.
24 uint32_t tcount, // The number of triangles in the source triangle mesh
25 const uint32_t* indices); // The triangle indices in the format of i1,i2,i3 ...
26 // i4,i5,i6, ...
27
28 virtual bool raycast(const double* from, // The starting point of the raycast
29 const double* to, // The ending point of the raycast
30 const double* closestToPoint, // The point to match the nearest hit location (can just be the
31 // 'from' location of no specific point)
32 double* hitLocation, // The point where the ray hit nearest to the 'closestToPoint' location
33 double* hitDistance) = 0; // The distance the ray traveled to the hit location
34
35 virtual void release(void) = 0;
36
37protected:
38 virtual ~RaycastMesh(void) = default;
39};
40
41} // namespace VHACD
42} // namespace tesseract_collision
Definition: vhacdRaycastMesh.h:12
static RaycastMesh * createRaycastMesh(uint32_t vcount, const double *vertices, uint32_t tcount, const uint32_t *indices)
Definition: vhacdRaycastMesh.cpp:176
virtual bool raycast(const double *from, const double *to, const double *closestToPoint, double *hitLocation, double *hitDistance)=0
Definition: bullet_cast_bvh_manager.h:49