mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-02 08:49:20 -05:00
Added target-switch method based on object visibility, will need refinement.
This commit is contained in:
@@ -53,7 +53,6 @@ public:
|
||||
|
||||
void loadTexture();
|
||||
void allocateData();
|
||||
double computeTargetLocalTime(PowerScaledScalar d);
|
||||
psc orthogonalProjection(glm::dvec3 camvec);
|
||||
|
||||
void printFovArray();
|
||||
@@ -63,28 +62,25 @@ public:
|
||||
|
||||
psc checkForIntercept(glm::dvec3 ray);
|
||||
|
||||
glm::dvec3 segmentBisection(glm::dvec3 p1, glm::dvec3 p2, double tolerance);
|
||||
glm::dvec3 bisection(glm::dvec3 p1, glm::dvec3 p2, double tolerance);
|
||||
glm::dvec3 _previousHalf;
|
||||
|
||||
void insertPoint(psc& p, glm::vec4& c);
|
||||
|
||||
void insertPoint(std::vector<float>& arr, psc& p, glm::vec4& c);
|
||||
void fovProjection(bool H[], std::vector<glm::dvec3> bounds);
|
||||
|
||||
int findIndx(unsigned int p1, unsigned int p2) const;
|
||||
|
||||
void getIntervalEndpoints(psc& p1, psc& p2, int index);
|
||||
|
||||
psc pscInterpolate(psc p0, psc p1, float t);
|
||||
glm::dvec3 interpolate(glm::dvec3 p0, glm::dvec3 p1, float t);
|
||||
|
||||
int _nrInserted = 0;
|
||||
|
||||
bool _rebuild = false;
|
||||
|
||||
int _isteps;
|
||||
psc _projectionBounds[4];
|
||||
|
||||
// spice
|
||||
std::string _target;
|
||||
std::string _spacecraft;
|
||||
std::string _observer;
|
||||
std::string _frame;
|
||||
std::string _fovTarget;
|
||||
|
||||
// color
|
||||
glm::vec3 _c;
|
||||
double _r, _g, _b;
|
||||
|
||||
@@ -341,6 +341,40 @@ public:
|
||||
glm::dvec3& surfaceIntercept,
|
||||
glm::dvec3& surfaceVector) const;
|
||||
|
||||
/**
|
||||
* Determine if a specified ephemeris object is within the
|
||||
* field-of-view (FOV) of a specified instrument at a given time.
|
||||
* \param Name or ID code string of the instrument.
|
||||
* \param Name or ID code string of the target.
|
||||
* \param Type of shape model used for the target.
|
||||
* \param Body-fixed, body-centered frame for target body.
|
||||
* \param Aberration correction method.
|
||||
* \param Name or ID code string of the observer.
|
||||
* \param Time of the observation (seconds past J2000).
|
||||
* \param Visibility flag (SPICETRUE/SPICEFALSE).
|
||||
* For further detail, refer to
|
||||
* http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/fovtrg_c.html
|
||||
*/
|
||||
bool targetWithinFieldOfView(const std::string& instrument,
|
||||
const std::string& target,
|
||||
const std::string& observer,
|
||||
const std::string& method,
|
||||
const std::string& referenceFrame,
|
||||
const std::string& aberrationCorrection,
|
||||
double& targetEpoch) const;
|
||||
/**
|
||||
* This method performs the same computation as the function its overloading
|
||||
* with the exception that in doing so it assumes the inertial bodyfixed frame
|
||||
* is that of 'IAU' type, allowing the client to omitt the
|
||||
* <code>referenceFrame</code> for planetary objects.
|
||||
*/
|
||||
bool targetWithinFieldOfView(const std::string& instrument,
|
||||
const std::string& target,
|
||||
const std::string& observer,
|
||||
const std::string& method,
|
||||
const std::string& aberrationCorrection,
|
||||
double& targetEpoch) const;
|
||||
|
||||
/**
|
||||
* Returns the state vector (<code>position</code> and <code>velocity</code>) of a
|
||||
* <code>target</code> body relative to an <code>observer</code> in a specific
|
||||
|
||||
Reference in New Issue
Block a user