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);
216 pcl::PolygonMesh::Ptr m_mesh;
219 pcl::PointCloud<pcl::PointXYZ> m_cloud;
unsigned hitGeomIDs[16]
IDs of the geometries (bodies) hit.
Definition: EmbreeTargetShape.h:83
int numberOfVertices() const
Return the number of vertices in the target shape.
Definition: EmbreeTargetShape.cpp:576
File name manipulation and expansion.
Definition: FileName.h:116
RTCMultiHitRay()
Default constructor for RTCMultiHitRay.
Definition: EmbreeTargetShape.cpp:45
RTCOcclusionRay()
Default constructor for RTCOcclussionRay.
Definition: EmbreeTargetShape.cpp:129
int numberOfPolygons() const
Return the number of polygons in the target shape.
Definition: EmbreeTargetShape.cpp:562
int lastHit
Index of the last hit in the hit containers.
Definition: EmbreeTargetShape.h:121
double maximumSceneDistance() const
Return the maximum distance within the scene.
Definition: EmbreeTargetShape.cpp:617
Struct for capturing multiple intersections when using embree::rtcintersectscene. ...
Definition: EmbreeTargetShape.h:60
pcl::PolygonMesh::Ptr readPC(FileName file)
Read a PointCloudLibrary file into a PointCloudLibrary polygon mesh.
Definition: EmbreeTargetShape.cpp:437
unsigned hitPrimIDs[16]
IDs of the primitives (trinagles) hit.
Definition: EmbreeTargetShape.h:84
virtual ~EmbreeTargetShape()
Desctructor.
Definition: EmbreeTargetShape.cpp:550
float hitUs[16]
Barycentric u coordinate of the hits.
Definition: EmbreeTargetShape.h:85
void addIndices(int geomID)
Adds the polygon vertex indices from the internalized polygon mesh to the Embree scene.
Definition: EmbreeTargetShape.cpp:530
boost::numeric::ublas::vector< double > Vector
Definition for an Isis::LinearAlgebra::Vector of doubles.
Definition: LinearAlgebra.h:135
void initMesh(pcl::PolygonMesh::Ptr mesh)
Internalize a PointCloudLibrary polygon mesh in the target shape.
Definition: EmbreeTargetShape.cpp:466
unsigned ignorePrimID
IDs of the primitives (trinagles) which should be ignored.
Definition: EmbreeTargetShape.h:122
Embree Target Shape for planetary bodies.
Definition: EmbreeTargetShape.h:155
void addVertices(int geomID)
Adds the vertices from the internalized vertex point cloud to the Embree scene.
Definition: EmbreeTargetShape.cpp:505
void intersectRay(RTCMultiHitRay &ray)
Intersect a ray with the target shape.
Definition: EmbreeTargetShape.cpp:656
RTCBounds sceneBounds() const
Returns the bounds of the Embree scene.
Definition: EmbreeTargetShape.cpp:594
Container for cube-like labels.
Definition: Pvl.h:135
float hitVs[16]
Barycentric v coordinate of the hits.
Definition: EmbreeTargetShape.h:86
RayHitInformation getHitInformation(RTCMultiHitRay &ray, int hitIndex)
Extract the intersection point and unit surface normal from an RTCMultiHitRay that has been intersect...
Definition: EmbreeTargetShape.cpp:700
QString name() const
Return the name of the target shape.
Definition: EmbreeTargetShape.cpp:747
Struct for capturing occluded plates when using embree::rtcintersectscene.
Definition: EmbreeTargetShape.h:99
bool isValid() const
Return if a valid mesh is internalized and ready for use.
Definition: EmbreeTargetShape.cpp:757
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
EmbreeTargetShape()
Default empty constructor.
Definition: EmbreeTargetShape.cpp:242
int lastHit
Index of the last hit in the hit containers.
Definition: EmbreeTargetShape.h:87
bool isOccluded(RTCOcclusionRay &ray)
Check if a ray intersects the target body.
Definition: EmbreeTargetShape.cpp:670
static void occlusionFilter(void *userDataPtr, RTCOcclusionRay &ray)
Filter function for collecting multiple primitiveIDs This function is called by the Embree library du...
Definition: EmbreeTargetShape.cpp:796
static void multiHitFilter(void *userDataPtr, RTCMultiHitRay &ray)
Filter function for collecting multiple hits during ray intersection.
Definition: EmbreeTargetShape.cpp:771
pcl::PolygonMesh::Ptr readDSK(FileName file)
Read a NAIF type 2 DSK file into a PointCloudLibrary polygon mesh.
Definition: EmbreeTargetShape.cpp:327