1 #ifndef EmbreeTargetShape_h 2 #define EmbreeTargetShape_h 29 #include <embree2/rtcore.h> 30 #include <embree2/rtcore_ray.h> 33 #include <pcl/io/auto_io.h> 34 #include <pcl/point_types.h> 35 #include <pcl/PolygonMesh.h> 63 const std::vector<double> &direction);
102 const std::vector<double> &direction);
163 QString
name()
const;
182 void initMesh(pcl::PolygonMesh::Ptr mesh);
unsigned hitGeomIDs[16]
IDs of the geometries (bodies) hit.
int numberOfVertices() const
Return the number of vertices in the target shape.
File name manipulation and expansion.
RTCMultiHitRay()
Default constructor for RTCMultiHitRay.
RTCOcclusionRay()
Default constructor for RTCOcclussionRay.
int numberOfPolygons() const
Return the number of polygons in the target shape.
int lastHit
Index of the last hit in the hit containers.
double maximumSceneDistance() const
Return the maximum distance within the scene.
Struct for capturing multiple intersections when using embree::rtcintersectscene. ...
pcl::PolygonMesh::Ptr readPC(FileName file)
Read a PointCloudLibrary file into a PointCloudLibrary polygon mesh.
unsigned hitPrimIDs[16]
IDs of the primitives (trinagles) hit.
virtual ~EmbreeTargetShape()
Desctructor.
float hitUs[16]
Barycentric u coordinate of the hits.
void addIndices(int geomID)
Adds the polygon vertex indices from the internalized polygon mesh to the Embree scene.
Container for a tin, or triangular polygon.
int v1
The index of the second vertex in the tin.
boost::numeric::ublas::vector< double > Vector
Definition for an Isis::LinearAlgebra::Vector of doubles.
void initMesh(pcl::PolygonMesh::Ptr mesh)
Internalize a PointCloudLibrary polygon mesh in the target shape.
float y
Vertex y position.
RTCScene m_scene
!< The Embree device for rendering the scene.
unsigned ignorePrimID
IDs of the primitives (trinagles) which should be ignored.
int v0
The index of the first vertex in the tin.
Embree Target Shape for planetary bodies.
float x
Vertex x position.
void addVertices(int geomID)
Adds the vertices from the internalized vertex point cloud to the Embree scene.
void intersectRay(RTCMultiHitRay &ray)
Intersect a ray with the target shape.
pcl::PolygonMesh::Ptr m_mesh
!< The name of the target.
RTCBounds sceneBounds() const
Returns the bounds of the Embree scene.
Container for cube-like labels.
float hitVs[16]
Barycentric v coordinate of the hits.
RayHitInformation getHitInformation(RTCMultiHitRay &ray, int hitIndex)
Extract the intersection point and unit surface normal from an RTCMultiHitRay that has been intersect...
QString name() const
Return the name of the target shape.
Struct for capturing occluded plates when using embree::rtcintersectscene.
bool isValid() const
Return if a valid mesh is internalized and ready for use.
Namespace for ISIS/Bullet specific routines.
EmbreeTargetShape()
Default empty constructor.
float a
Extra float for aligning memory.
int lastHit
Index of the last hit in the hit containers.
bool isOccluded(RTCOcclusionRay &ray)
Check if a ray intersects the target body.
RTCDevice m_device
!< The point cloud representation of the target.
pcl::PointCloud< pcl::PointXYZ > m_cloud
!< A boost shared pointer to the polygon mesh representation of the target.
static void occlusionFilter(void *userDataPtr, RTCOcclusionRay &ray)
Filter function for collecting multiple primitiveIDs This function is called by the Embree library du...
int v2
The index of the third vertex in the tin.
float z
Vertex z position.
static void multiHitFilter(void *userDataPtr, RTCMultiHitRay &ray)
Filter function for collecting multiple hits during ray intersection.
pcl::PolygonMesh::Ptr readDSK(FileName file)
Read a NAIF type 2 DSK file into a PointCloudLibrary polygon mesh.