|
Isis Developer Reference
|
Go to the documentation of this file. 1 #ifndef EmbreeTargetShape_h
2 #define EmbreeTargetShape_h
13 #include <embree2/rtcore.h>
14 #include <embree2/rtcore_ray.h>
17 #include <pcl/io/auto_io.h>
18 #include <pcl/point_types.h>
19 #include <pcl/PolygonMesh.h>
47 const std::vector<double> &direction);
86 const std::vector<double> &direction);
147 QString
name()
const;
166 void initMesh(pcl::PolygonMesh::Ptr mesh);
200 pcl::PolygonMesh::Ptr m_mesh;
203 pcl::PointCloud<pcl::PointXYZ> m_cloud;
static void multiHitFilter(void *userDataPtr, RTCMultiHitRay &ray)
Filter function for collecting multiple hits during ray intersection.
Definition: EmbreeTargetShape.cpp:754
@ Io
A type of error that occurred when performing an actual I/O operation.
Definition: IException.h:155
int lastHit
Index of the last hit in the hit containers.
Definition: EmbreeTargetShape.h:71
int numberOfVertices() const
Return the number of vertices in the target shape.
Definition: EmbreeTargetShape.cpp:559
File name manipulation and expansion.
Definition: FileName.h:100
RTCOcclusionRay()
Default constructor for RTCOcclussionRay.
Definition: EmbreeTargetShape.cpp:112
bool fileExists() const
Returns true if the file exists; false otherwise.
Definition: FileName.cpp:449
Container for cube-like labels.
Definition: Pvl.h:119
double maximumSceneDistance() const
Return the maximum distance within the scene.
Definition: EmbreeTargetShape.cpp:600
static double magnitude(const Vector &vector)
Computes the magnitude (i.e., the length) of the given vector using the Euclidean norm (L2 norm).
Definition: LinearAlgebra.cpp:504
virtual ~EmbreeTargetShape()
Desctructor.
Definition: EmbreeTargetShape.cpp:533
int numberOfPolygons() const
Return the number of polygons in the target shape.
Definition: EmbreeTargetShape.cpp:545
unsigned hitGeomIDs[16]
IDs of the geometries (bodies) hit.
Definition: EmbreeTargetShape.h:67
static Vector vector(double v0, double v1, double v2)
Constructs a 3 dimensional vector with the given component values.
Definition: LinearAlgebra.cpp:1714
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
Definition: NaifStatus.cpp:28
int lastHit
Index of the last hit in the hit containers.
Definition: EmbreeTargetShape.h:105
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
unsigned hitPrimIDs[16]
IDs of the primitives (trinagles) hit.
Definition: EmbreeTargetShape.h:68
QString baseName() const
Returns the name of the file without the path and without extensions.
Definition: FileName.cpp:145
Struct for capturing occluded plates when using embree::rtcintersectscene.
Definition: EmbreeTargetShape.h:83
float hitUs[16]
Barycentric u coordinate of the hits.
Definition: EmbreeTargetShape.h:69
void addIndices(int geomID)
Adds the polygon vertex indices from the internalized polygon mesh to the Embree scene.
Definition: EmbreeTargetShape.cpp:513
pcl::PolygonMesh::Ptr readPC(FileName file)
Read a PointCloudLibrary file into a PointCloudLibrary polygon mesh.
Definition: EmbreeTargetShape.cpp:420
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:196
boost::numeric::ublas::vector< double > Vector
Definition for an Isis::LinearAlgebra::Vector of doubles.
Definition: LinearAlgebra.h:120
void initMesh(pcl::PolygonMesh::Ptr mesh)
Internalize a PointCloudLibrary polygon mesh in the target shape.
Definition: EmbreeTargetShape.cpp:449
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Struct for capturing multiple intersections when using embree::rtcintersectscene.
Definition: EmbreeTargetShape.h:44
RTCBounds sceneBounds() const
Returns the bounds of the Embree scene.
Definition: EmbreeTargetShape.cpp:577
static Vector normalize(const Vector &vector)
Returns a unit vector that is codirectional with the given vector by dividing each component of the v...
Definition: LinearAlgebra.cpp:477
Isis exception class.
Definition: IException.h:91
void addVertices(int geomID)
Adds the vertices from the internalized vertex point cloud to the Embree scene.
Definition: EmbreeTargetShape.cpp:488
Embree Target Shape for planetary bodies.
Definition: EmbreeTargetShape.h:139
RayHitInformation getHitInformation(RTCMultiHitRay &ray, int hitIndex)
Extract the intersection point and unit surface normal from an RTCMultiHitRay that has been intersect...
Definition: EmbreeTargetShape.cpp:683
unsigned ignorePrimID
IDs of the primitives (trinagles) which should be ignored.
Definition: EmbreeTargetShape.h:106
QString extension() const
Returns the last extension of the file name.
Definition: FileName.cpp:178
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
bool isOccluded(RTCOcclusionRay &ray)
Check if a ray intersects the target body.
Definition: EmbreeTargetShape.cpp:653
void intersectRay(RTCMultiHitRay &ray)
Intersect a ray with the target shape.
Definition: EmbreeTargetShape.cpp:639
EmbreeTargetShape()
Default empty constructor.
Definition: EmbreeTargetShape.cpp:225
RTCMultiHitRay()
Default constructor for RTCMultiHitRay.
Definition: EmbreeTargetShape.cpp:28
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:779
float hitVs[16]
Barycentric v coordinate of the hits.
Definition: EmbreeTargetShape.h:70
QString name() const
Return the name of the target shape.
Definition: EmbreeTargetShape.cpp:730
bool isValid() const
Return if a valid mesh is internalized and ready for use.
Definition: EmbreeTargetShape.cpp:740
pcl::PolygonMesh::Ptr readDSK(FileName file)
Read a NAIF type 2 DSK file into a PointCloudLibrary polygon mesh.
Definition: EmbreeTargetShape.cpp:310
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Definition: IException.h:126