![]() |
VR-Forces 4.3.1 Class Documentation
|
Go to the source code of this file.
Classes | |
| class | DtPoleFilterType |
| class | DtNonLinearOutputType |
| A nonlinearity of zero gives you a simple linear relation: output = gain * input. More... | |
Macros | |
| #define | DtSIGN(x) (((x) > (0.0)) ? (1.0) : (-1.0)) |
| Boost includes. | |
| #define | DtALMOST(x, y, e) (((x)<=((y)+(e))) && ((x)>=((y)-(e)))) |
| #define | DtGRAVITY_CONSTANT (9.81) |
| #define | DtPI_OVER_TWO (1.570796327) |
| #define | DtTWO_PI (6.283185307) |
| #define | DtMETERS_TO_FEET (3.2808) |
| #define | DtMETERS_PER_SEC_TO_MPH (2.23) |
| #define | DtLN2 (0.693147181) |
| #define | SIN(x) DtSin(x) |
| #define | COS(x) DtCos(x) |
| #define | TAN(x) DtTan(x) |
| #define | ASIN(x) DtAsin(x) |
| #define | ACOS(x) DtAcos(x) |
| #define | ATAN(x) DtAtan(x) |
| #define | ATAN2(y, x) DtAtan2((y), (x)) |
| #define | DtFRand() ((double) rand() / RAND_MAX) |
| #define | DtIRandom(from, to) DtIntRandom(from, to) |
Functions | |
| DT_DLL_vrfutil double | gRand () |
| Generates a Gaussian random number. | |
| DT_DLL_vrfutil double | centralLimitGaussian (int numDraws) |
| Generates a Gaussian random number (an approximation), from a series of n uniform random number draws. | |
| DT_DLL_vrfutil double | gaussianRandom () |
| Generates a Gaussian random number using the Marsaglia polar method. | |
| DT_DLL_vrfutil void | Dt3DKinematicsTick (const DtVector &Position, const DtVector &LinearVelocity, const DtVector &LinearAcceleration, DtConstDcm orientation, const DtVector &angVelocity, const DtVector &angAcceleration, double DeltaTime, DtVectorRef newPosition, DtVectorRef newVelocity, DtDcm &newOrientation, DtVectorRef newAngVelocity) |
| DT_DLL_vrfutil void | Dt3DDynamicsTick (const DtVector &LinearForce, double vehicleMass, DtVectorRef newLinearAcceleration, const DtVector &torque, DtConstDcm vehicleInertia, DtVectorRef newAngAcceleration) |
| DT_DLL_vrfutil void | DtGravityForce (double mass, DtVectorRef returnForce) |
| DT_DLL_vrfutil void | DtResolve (const DtVector &forcePos, const DtVector &force, DtVectorRef resultTorqueAboutOrigin) |
| DT_DLL_vrfutil void | DtParallelAxisTheorem (DtConstDcm inertiaInOriginalFrame, double mass, const DtVector &newToOriginal, DtDcm &inertiaInNewFrame) |
| DT_DLL_vrfutil void | DtRotateInertia (DtDcm inertiaInOriginalFrame, DtDcm originalToNew, DtDcm &inertiaInNewFrame) |
| I in frame B. | |
| DT_DLL_vrfutil double | DtPIDServo (double error, double errorIntegral, double velocity, double proportionalGain, double integralGain, double derivativeGain, double biasForce=0.0, double *control=0) |
| I in frame B. | |
| DT_DLL_vrfutil void | DtBlockInertia (const double xLen, const double yLen, const double zLen, const double mass, DtDcm &inertia) |
| DT_DLL_vrfutil bool | DtVectorIsZero (const DtVector &v, double tolerance=0.0) |
| DT_DLL_vrfutil void | DtDcmFromColumns (DtDcm &result, const DtVector &col1, const DtVector &col2, const DtVector &col3) |
| DT_DLL_vrfutil void | DtDcmFromRows (DtDcm &result, const DtVector &row1, const DtVector &row2, const DtVector &row3) |
| DT_DLL_vrfutil bool | DtPointInCone (const DtVector &coneEndPosition, const DtVector &coneAxis, const double coneAngle, const DtVector &testPoint, double *testAnglePtr=0) |
| Test if a point is in a cone. | |
| DT_DLL_vrfutil bool | DtPointInWedge (const DtVector &wedgeEndPosition, const DtVector &wedgeAxis, const double wedgeAngle, const DtVector &testPoint) |
| DT_DLL_vrfutil DtFloat64 | DtFastDist (const DtVector &pt1, const DtVector &pt2) |
| DT_DLL_vrfutil void | DtVecLimit (DtVectorRef vec, double limit) |
| If mag(vec)>limit, shortens vector to mag = limit. | |
| double | DtVecMag (const DtVector &vec) |
| double | DtVecMagSquared (const DtVector &vec) |
| DT_DLL_vrfutil void | DtRotX (double angle, DtDcm &rotMat) |
| DT_DLL_vrfutil void | DtRotY (double angle, DtDcm &rotMat) |
| DT_DLL_vrfutil void | DtRotZ (double angle, DtDcm &rotMat) |
| DT_DLL_vrfutil void | DtBodyToLocalRef_to_Euler (DtConstDcm body2ref, DtTaitBryan *e) |
| DT_DLL_vrfutil void | DtEuler_to_BodyToLocalRef (const DtTaitBryan &euler, DtDcm &body2ref) |
| DT_DLL_vrfutil const DtDcm & | enu2ned () |
| DT_DLL_vrfutil const DtDcm & | ned2enu () |
| DT_DLL_vrfutil void | DtRotX2 (double sinAng, double cosAng, DtDcm &rotMat) |
| DT_DLL_vrfutil void | DtRotY2 (double sinAng, double cosAng, DtDcm &rotMat) |
| DT_DLL_vrfutil void | DtRotZ2 (double sinAng, double cosAng, DtDcm &rotMat) |
| DT_DLL_vrfutil void | DtRotBodyX (double angle, DtDcm &rotMat) |
| Returns a matrix for converting from the new system to the old system where both systems are using body coordinates. | |
| DT_DLL_vrfutil void | DtRotBodyY (double angle, DtDcm &rotMat) |
| DT_DLL_vrfutil void | DtRotBodyZ (double angle, DtDcm &rotMat) |
| DT_DLL_vrfutil void | DtCircleVerts (double radius, int npts, double *xCoords, double *yCoords) |
| DT_DLL_vrfutil void | DtSpacesToDashes (char *str) |
| Inline versions of some functions in LibMatrix. | |
| DT_DLL_vrfutil char * | DtGetFilenameExtension (char *fileName, char *extension) |
| Extract the extension from the fileName, excluding the period(.). | |
| DT_DLL_vrfutil void | DtOrientationFromThreePoints (const DtVector &leftPoint, const DtVector &rightPoint, const DtVector &rearPoint, DtDcm &orientation, bool yIsForward=false) |
| Given the world position of the three big-wheel points, this returns the resulting orientation of big-wheel, assuming the following body axes: | |
| DT_DLL_vrfutil void | DtOrientationFromThreePointsAndHeading (const DtVector &leftPoint, const DtVector &rightPoint, const DtVector &otherPoint, double cosHeading, double sinHeading, DtDcm &orientation, bool upsideDown=false) |
| This form preserves heading; the previous one does not! | |
| DT_DLL_vrfutil void | DtOrientationFromThreePointsAndHeading (const DtVector &leftPoint, const DtVector &rightPoint, const DtVector &otherPoint, double heading, const DtDcm &topoToLocal, DtDcm &orientation) |
| This form preserves heading; the previous one does not! | |
| DT_DLL_vrfutil bool | DtCalculateNormal (const DtVector &pointA, const DtVector &pointB, const DtVector &pointC, DtVector &normal) |
| Calculates the normal formed by the plane containing points A, B, and C. | |
| DT_DLL_vrfutil void | DtCalculateOrientation (DtVector localNormal, double heading, const DtDcm &topoToLocal, DtDcm &localOrientation) |
| Calculates the orientation from the specified local normal and heading. | |
| DT_DLL_vrfutil double | DtFindZInPlane (const double posx, const double posy, const DtVector &pointInPlane, const DtVector &normal) |
| DT_DLL_vrfutil DtVector | DtIntersectLineWithPlane (const DtVector &point, const DtVector &direction, const DtVector &pointInPlane, const DtVector &planeNormal) |
| Returns the point of intersection between a line (defined by a point and a direction vector) and a plane (defined by a point in the plane and the plane normal). | |
| DT_DLL_vrfutil void | DtBodyToRefFromHeadingAndPosition (const Coordinate_System &coordSystem, double heading, const DtVector &position, DtDcm &bodyToRef) |
| Calculates a Dcm for rotating from a body coordinate system, defined by a given heading (no pitch or roll) and position, to a given reference frame. | |
| DT_DLL_vrfutil void | DtTopoEulerToBodyToLocal (const DtTaitBryan &topoEuler, const Coordinate_System &coordSystem, const DtVector &localPosition, DtDcm &bodyToLocalDcm) |
| Calculates the rotation matrix for going from a body to local (database) reference frame, given a set of topocentric Euler angles. | |
| DT_DLL_vrfutil DtDcm | DtRotZToBodyToLocal (const Coordinate_System &coordSystem, double angle, const DtVector &position) |
| DT_DLL_vrfutil DtDcm | DtRotYToBodyToLocal (const Coordinate_System &coordSystem, double angle, const DtVector &position) |
| DT_DLL_vrfutil DtDcm | DtRotXToBodyToLocal (const Coordinate_System &coordSystem, double angle, const DtVector &position) |
| DT_DLL_vrfutil double | DtHeadingFromGeocAToGeocB (const DtVector &geocA, const DtVector &geocB) |
| Expects geocentric coordinates. | |
| DT_DLL_vrfutil void | DtTrigInit () |
| Functions for trig table lookups. | |
| DT_DLL_vrfutil double | DtSin (double r) |
| double | DtCos (double r) |
| double | DtTan (double r) |
| DT_DLL_vrfutil double | DtAsin (double x) |
| double | DtAcos (double x) |
| DT_DLL_vrfutil double | DtAtan (double x) |
| DT_DLL_vrfutil double | DtAtan2 (double y, double x) |
| DT_DLL_vrfutil bool | DtSameSign (double x, double y) |
| DT_DLL_vrfutil bool | DtPointInSegment (const DtVector &testPoint, const DtVector &segStart, const DtVector &segEnd) |
| DT_DLL_vrfutil int | DtIntersect2D_Segments (DtVector P0, DtVector P1, DtVector Q0, DtVector Q1, DtVector *I0=0, DtVector *I1=0, double *isectParam1=0, double *isectParam2=0, bool *parallel=0, bool *collinear=0) |
| Description: | |
| DT_DLL_vrfutil bool | DtInSegment (DtVector P, DtVector P0, DtVector P1) |
| DtInSegment(): determine if a collinear Point P is inside a Segment P0 to P1. | |
| DT_DLL_vrfutil DtVector | localGravityAcceleration (const DtVector &localPosition, const Coordinate_System &coordinateSystem) |
Terrain related functions. | |
| DT_DLL_vrfutil double | headingAngleTo (const DtVector &observerPosition, const DtVector &targetPosition, const Coordinate_System &coordinateSystem) |
Local(database) functions for performing topocentric 2-D geometry operations on points and vertex lists (such as heading, elevation, and 2-D distance, point inside area, and so on). | |
| DT_DLL_vrfutil double | elevationAngleTo (const DtVector &observerPosition, const DtVector &targetPosition, const Coordinate_System &coordinateSystem) |
| Returns the elevation angle in radians from observer position to target position. | |
| DT_DLL_vrfutil double | bankAngleTo (const DtVector &observerPosition, const DtVector &targetPosition, const Coordinate_System &coordinateSystem) |
| Returns the bank angle in radians from observer position to target position. | |
| DT_DLL_vrfutil double | distSquaredTo2D (const DtVector &position1, const DtVector &position2, const Coordinate_System &coordinateSystem) |
| Returns the (2D) squared distance between given position. | |
| DT_DLL_vrfutil bool | inside (const DtVector &localPoint, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem) |
| Returns true if localPoint is inside localVertexList in 2D. | |
| DT_DLL_vrfutil bool | leftOf (const DtVector &localPoint, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem) |
| Returns true if localPoint is left of the localVertexList in 2D. | |
| DT_DLL_vrfutil double | headingAngleTo (const DtVector &localPoint, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem) |
| Returns the angle at which localPoint would proceed to arrive most quickly at localVertexList. | |
| DT_DLL_vrfutil double | elevationAngleTo (const DtVector &localPoint, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem) |
| Returns the elevation angle in 3D at which point would proceed to arrive most quickly at this. | |
| DT_DLL_vrfutil double | localDistSquaredTo (const DtVector &localPoint, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem) |
| Returns the distance from localPoint to the closest vertex in localVertexList. | |
| DT_DLL_vrfutil double | distSquaredTo2D (const DtVector &localPoint, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem) |
| Returns the squared distance to localVertexList, projected in topocentric coordinates. | |
| DT_DLL_vrfutil double | distToBoundingVolume (const DtVector &localBaseLocation, const Dt3dBoundingVolume *box, const DtTaitBryan &boxToLocalOrientation, const DtVector &testPoint) |
| Returns the distance of the testPoint to the bounding volume. | |
| DT_DLL_vrfutil bool | intersects (const DtVector &localPoint1, const DtVector &localPoint2, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem) |
| Returns true if the line segment localPoint1-localPoint2 intersects. | |
| DT_DLL_vrfutil DtListItem * | getClosestVertex2D (const DtVector &localPoint, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem) |
| Sets vertex to be the vertex closest in 2D to point in localVertexList. | |
| DT_DLL_vrfutil bool | getClosestLine2D (const DtVector &localPoint, DtVector &localLinePt1, DtVector &localLinePt2, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem) |
| Sets linePt1 and linePt2 to be the vertices of the line segment closest in 2D to point in localVertexList. | |
| DT_DLL_vrfutil double | distanceSquaredPointToLine2D (const DtVector &localPoint, const DtVector &localLinePt1, const DtVector &localLinePt2, const Coordinate_System &coordinateSystem) |
| Returns the distance^2 from point to linePt1-linePt2 in topocentric 2D. | |
| DT_DLL_vrfutil double | distanceSquaredPointToPoint2D (const DtVector &localLinePt1, const DtVector &localLinePt2, const Coordinate_System &coordinateSystem) |
| Returns the distance^2 from point1 to point2 in 2D. | |
| DT_DLL_vrfutil double | closestPointAlongChord2D (const DtPoint &chordStart, const DtPoint &chordEnd, const DtPoint &testPoint, DtPoint &closestPoint, const Coordinate_System &coordSys) |
| Finds the closest point along the chord defined by chordStart and chordEnd to testPoint. | |
| DT_DLL_vrfutil bool | setCurrentVertexToClosestInDirectionOfTraversal (const DtVector &point, const Coordinate_System &coordinateSystem, DtLocalVectorIterator &localVertexIterator) |
| Sets current vertex in localVertexIterator to that vertex closest to the given point, in the direction of travel. | |
| double | dotProd2D (const DtVector &v1, const DtVector &v2) |
2D functions on 3D topographic objects | |
| double | magnitudeSquared2D (const DtVector &v) |
| double | crossProduct2D (const DtVector &v1, const DtVector &v2) |
| DtVector | rotateRight2D (const DtVector &v) |
| void | normalize2D (DtVector &v) |
| double | vectorAngle2D (DtVector &v) |
| This is a heading if v is in topo coordinates. | |
| DT_DLL_vrfutil void | localVectorToGeocentricVector (const DtVector &geocentricPosition, const DtVector &localVector, const Coordinate_System &coordinateSystem, DtVector &geocentricVector) |
local(database)/geocentric conversion functions | |
| DT_DLL_vrfutil void | localOrientationToGeocentricOrientation (const DtVector geocentricPosition, const DtTaitBryan &localOrientation, const Coordinate_System &coordinateSystem, DtTaitBryan &geocentricOrientation) |
| Transforms an orientation matrix in for going from body to local coordinates (database coordinates) to geocentric coordinates. | |
| DT_DLL_vrfutil void | geocentricVectorToLocalVector (const DtVector &geocentricPosition, const DtVector &geocentricVector, const Coordinate_System &coordinateSystem, DtVector &localVector) |
| Transforms a vector in geocentric coordinates to local (database) coordinates. | |
| DT_DLL_vrfutil void | geocentricOrientationToLocalOrientation (const DtVector &geocentricPosition, const DtTaitBryan &geocentricOrientation, const Coordinate_System &coordinateSystem, DtTaitBryan &localOrientation) |
| Transforms an orientation matrix in for going from body to local coordinates (database coordinates) to geocentric coordinates. | |
| DT_DLL_vrfutil void | localVectorToGeocentricVector (const DtVector &geocPosition, const DtVector &local, DtVector &geoc) |
Deprecated API Functions defined for backwards compatibility | |
| DT_DLL_vrfutil void | localOrientationToGeocentricOrientation (const DtVector &geocPosition, const DtTaitBryan &local, DtTaitBryan &geoc) |
| DT_DLL_vrfutil void | localVelocityToGeocentricVelocity (DtTopoView &topoView, const DtVector &local) |
| DT_DLL_vrfutil void | localAccelerationToGeocentricAcceleration (DtTopoView &topoView, const DtVector &local) |
| DT_DLL_vrfutil void | localOrientationToGeocentricOrientation (DtTopoView &topoView, const DtTaitBryan &local) |
| DT_DLL_vrfutil void | geocentricVectorToLocalVector (const DtVector &geocPosition, const DtVector &geoc, DtVector &local) |
| DT_DLL_vrfutil void | geocentricOrientationToLocalOrientation (const DtVector &geocPosition, const DtTaitBryan &geoc, DtTaitBryan &local) |
| DT_DLL_vrfutil void | geocentricVelocityToLocalVelocity (DtTopoView &topoView, DtVector &local) |
| DT_DLL_vrfutil void | geocentricAccelerationToLocalAcceleration (DtTopoView &topoView, DtVector &local) |
| DT_DLL_vrfutil void | geocentricOrientationToLocalOrientation (DtTopoView &topoView, DtTaitBryan &local) |
| DT_DLL_vrfutil int | DtIntRandom (int iFrom, int iTo) |
| Returns a random number from the base to the max. | |
| DT_DLL_vrfutil bool | DtIsValidNumber (double x) |
| Returns true if the number is not infinite or not nan. | |
| DT_DLL_vrfutil double | DtHoursMinutesSeconds2Seconds (double hours, double minutes, double seconds) |
| DT_DLL_vrfutil void | DtSeconds2HoursMinutesSeconds (double totalSeconds, int &hoursOut, int &minutesOut, double &secondsOut) |
| Converts totalSeconds into hours, minutes, and seconds. | |
| DT_DLL_vrfutil double | calculateLengthOfLine (const std::vector< DtVector > &points) |
| Given the points return the length of the line. Assumes points are geocentric. | |
| DT_DLL_vrfutil double | calculateLengthOfLine (const Coordinate_System &coordinateSystem, const std::vector< DtVector > &points) |
| Given the points return the length of the line. | |
| DT_DLL_vrfutil void | calculateLengthAndWidthOfShape (const Coordinate_System &coordSytem, const std::vector< DtVector > &points, double &length, double &width) |
| Given points and the coordinate system those points are in find the length/width of the given polygon. | |
| DT_DLL_vrfutil void | calculateLengthAndWidthOfShape (const std::vector< DtVector > &points, double &length, double &width) |
| Assumes geocentric coordinates. | |
| DT_DLL_vrfutil DtVector | DtPoint2DtVector (const DtPoint &p) |
| DT_DLL_vrfutil DtVector | calculateWorldVelocityFromPosition (const DtVector ¤tWorldPos, const DtVector ¤tLocalPos, const DtVector &localVelocity, const Coordinate_System &coordinateSystem) |
| If the database is in a projected system, error is introduced in the velocity when converting it to geocentric. | |
| DT_DLL_vrfutil double | illuminationValueAtPosition (const DtGeodeticCoord &position, time_t time, double nighttimeMaximum=0.1, double illuminationMinimum=0.001, bool useDayNightIlluminationModel=true, int *sunstate=0) |
| Give a geodetic coordinate and a UTC time, return an illumination value (0 - 1) at that position based on sun/moon position. | |
| bool | checkForNAN (const DtVector &vector) |
| Checks for not a number (NAN) values. | |
| bool | checkForNAN (const DtTaitBryan &tb) |
| Checks for not a number (NAN) values. | |
| bool | checkForNAN (const DtDcm &dcm) |
| Checks for not a number (NAN) values. | |
| template<typename SequenceSequenceT , typename RangeT , typename PredicateT > | |
| SequenceSequenceT & | oldBoostSplit (SequenceSequenceT &Result, RangeT &Input, PredicateT Pred, boost::algorithm::token_compress_mode_type eCompress=boost::algorithm::token_compress_off) |
| Replace boost split with version that returns an empty set if the supplied string has no length. | |
| DT_DLL_vrfutil double | altitudeOfPosition (const DtVector &localPosition, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil double | altitudeOfPosition (const DtPoint &localPosition, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil void | setAltitudeOfPosition (DtVector &localPosition, double newAltitude, const Coordinate_System &coordinateSystem) |
| Alters localPosition to have the specified altitude (above 0 altitude). | |
| DT_DLL_vrfutil void | setAltitudeOfPosition (DtPoint &localPosition, double newAltitude, const Coordinate_System &coordinateSystem) |
| Alters localPosition to have the specified altitude (above 0 altitude). | |
| #define DtSIGN | ( | x | ) | (((x) > (0.0)) ? (1.0) : (-1.0)) |
Boost includes.
Referenced by DtNonLinearOutputType::DtOutput().
| #define DtALMOST | ( | x, | |
| y, | |||
| e | |||
| ) | (((x)<=((y)+(e))) && ((x)>=((y)-(e)))) |
| #define DtGRAVITY_CONSTANT (9.81) |
| #define DtTWO_PI (6.283185307) |
| #define DtMETERS_TO_FEET (3.2808) |
| #define DtMETERS_PER_SEC_TO_MPH (2.23) |
| #define DtLN2 (0.693147181) |
| #define SIN | ( | x | ) | DtSin(x) |
| #define COS | ( | x | ) | DtCos(x) |
| #define TAN | ( | x | ) | DtTan(x) |
| #define ASIN | ( | x | ) | DtAsin(x) |
| #define ACOS | ( | x | ) | DtAcos(x) |
| #define ATAN | ( | x | ) | DtAtan(x) |
| #define ATAN2 | ( | y, | |
| x | |||
| ) | DtAtan2((y), (x)) |
| #define DtFRand | ( | ) | ((double) rand() / RAND_MAX) |
| #define DtIRandom | ( | from, | |
| to | |||
| ) | DtIntRandom(from, to) |
| DT_DLL_vrfutil double gRand | ( | ) |
Generates a Gaussian random number.
Calls centralLimitGaussian() with the number of draws set to 6.
| DT_DLL_vrfutil double centralLimitGaussian | ( | int | numDraws | ) |
Generates a Gaussian random number (an approximation), from a series of n uniform random number draws.
Number returned lies between -1 and 1. Pass in the number of uniform random number draws. Called by gRand().
| DT_DLL_vrfutil double gaussianRandom | ( | ) |
Generates a Gaussian random number using the Marsaglia polar method.
See e.g. Wikipedia (http://en.wikipedia.org/wiki/Normal_distribution#Generating_values_from_normal_distribution) The computation requires two calls to rand(), one to log(), and one to sqrt() for every two numbers generated.
| DT_DLL_vrfutil void Dt3DKinematicsTick | ( | const DtVector & | Position, |
| const DtVector & | LinearVelocity, | ||
| const DtVector & | LinearAcceleration, | ||
| DtConstDcm | orientation, | ||
| const DtVector & | angVelocity, | ||
| const DtVector & | angAcceleration, | ||
| double | DeltaTime, | ||
| DtVectorRef | newPosition, | ||
| DtVectorRef | newVelocity, | ||
| DtDcm & | newOrientation, | ||
| DtVectorRef | newAngVelocity | ||
| ) |
| DT_DLL_vrfutil void Dt3DDynamicsTick | ( | const DtVector & | LinearForce, |
| double | vehicleMass, | ||
| DtVectorRef | newLinearAcceleration, | ||
| const DtVector & | torque, | ||
| DtConstDcm | vehicleInertia, | ||
| DtVectorRef | newAngAcceleration | ||
| ) |
| DT_DLL_vrfutil void DtGravityForce | ( | double | mass, |
| DtVectorRef | returnForce | ||
| ) |
| DT_DLL_vrfutil void DtResolve | ( | const DtVector & | forcePos, |
| const DtVector & | force, | ||
| DtVectorRef | resultTorqueAboutOrigin | ||
| ) |
| force | expressed in "Origin" frame |
| DT_DLL_vrfutil void DtParallelAxisTheorem | ( | DtConstDcm | inertiaInOriginalFrame, |
| double | mass, | ||
| const DtVector & | newToOriginal, | ||
| DtDcm & | inertiaInNewFrame | ||
| ) |
| mass | I in frame A |
| inertiaInNewFrame | vector from B to A |
| DT_DLL_vrfutil void DtRotateInertia | ( | DtDcm | inertiaInOriginalFrame, |
| DtDcm | originalToNew, | ||
| DtDcm & | inertiaInNewFrame | ||
| ) |
I in frame B.
| originalToNew | I in frame A |
| inertiaInNewFrame | A2B rotation matrix |
| DT_DLL_vrfutil double DtPIDServo | ( | double | error, |
| double | errorIntegral, | ||
| double | velocity, | ||
| double | proportionalGain, | ||
| double | integralGain, | ||
| double | derivativeGain, | ||
| double | biasForce = 0.0, |
||
| double * | control = 0 |
||
| ) |
I in frame B.
| DT_DLL_vrfutil void DtBlockInertia | ( | const double | xLen, |
| const double | yLen, | ||
| const double | zLen, | ||
| const double | mass, | ||
| DtDcm & | inertia | ||
| ) |
| DT_DLL_vrfutil bool DtVectorIsZero | ( | const DtVector & | v, |
| double | tolerance = 0.0 |
||
| ) |
| DT_DLL_vrfutil void DtDcmFromColumns | ( | DtDcm & | result, |
| const DtVector & | col1, | ||
| const DtVector & | col2, | ||
| const DtVector & | col3 | ||
| ) |
| DT_DLL_vrfutil void DtDcmFromRows | ( | DtDcm & | result, |
| const DtVector & | row1, | ||
| const DtVector & | row2, | ||
| const DtVector & | row3 | ||
| ) |
| DT_DLL_vrfutil bool DtPointInCone | ( | const DtVector & | coneEndPosition, |
| const DtVector & | coneAxis, | ||
| const double | coneAngle, | ||
| const DtVector & | testPoint, | ||
| double * | testAnglePtr = 0 |
||
| ) |
Test if a point is in a cone.
All quantities are assumed to be in the same coordinate system. The cone is specified by the position of its tip, the direction of its central axis and an angle. If we define P as the vector from coneEndPosition to testPoint and C as the coneAxis, then testAngle is the angle between P and C. If testAngle is less than coneAngle/2, then testPoint is in the cone and true is returned. Otherwise false is returned. In either case, testAngle is put into *testAnglePtr if a non-0 ptr was passed.
| DT_DLL_vrfutil bool DtPointInWedge | ( | const DtVector & | wedgeEndPosition, |
| const DtVector & | wedgeAxis, | ||
| const double | wedgeAngle, | ||
| const DtVector & | testPoint | ||
| ) |
| DT_DLL_vrfutil DtFloat64 DtFastDist | ( | const DtVector & | pt1, |
| const DtVector & | pt2 | ||
| ) |
| DT_DLL_vrfutil void DtVecLimit | ( | DtVectorRef | vec, |
| double | limit | ||
| ) |
If mag(vec)>limit, shortens vector to mag = limit.
|
inline |
|
inline |
| DT_DLL_vrfutil void DtRotX | ( | double | angle, |
| DtDcm & | rotMat | ||
| ) |
| DT_DLL_vrfutil void DtRotY | ( | double | angle, |
| DtDcm & | rotMat | ||
| ) |
| DT_DLL_vrfutil void DtRotZ | ( | double | angle, |
| DtDcm & | rotMat | ||
| ) |
| DT_DLL_vrfutil void DtBodyToLocalRef_to_Euler | ( | DtConstDcm | body2ref, |
| DtTaitBryan * | e | ||
| ) |
| DT_DLL_vrfutil void DtEuler_to_BodyToLocalRef | ( | const DtTaitBryan & | euler, |
| DtDcm & | body2ref | ||
| ) |
| DT_DLL_vrfutil const DtDcm& enu2ned | ( | ) |
| DT_DLL_vrfutil const DtDcm& ned2enu | ( | ) |
| DT_DLL_vrfutil void DtRotX2 | ( | double | sinAng, |
| double | cosAng, | ||
| DtDcm & | rotMat | ||
| ) |
| DT_DLL_vrfutil void DtRotY2 | ( | double | sinAng, |
| double | cosAng, | ||
| DtDcm & | rotMat | ||
| ) |
| DT_DLL_vrfutil void DtRotZ2 | ( | double | sinAng, |
| double | cosAng, | ||
| DtDcm & | rotMat | ||
| ) |
| DT_DLL_vrfutil void DtRotBodyX | ( | double | angle, |
| DtDcm & | rotMat | ||
| ) |
Returns a matrix for converting from the new system to the old system where both systems are using body coordinates.
| DT_DLL_vrfutil void DtRotBodyY | ( | double | angle, |
| DtDcm & | rotMat | ||
| ) |
| DT_DLL_vrfutil void DtRotBodyZ | ( | double | angle, |
| DtDcm & | rotMat | ||
| ) |
| DT_DLL_vrfutil void DtCircleVerts | ( | double | radius, |
| int | npts, | ||
| double * | xCoords, | ||
| double * | yCoords | ||
| ) |
| DT_DLL_vrfutil void DtSpacesToDashes | ( | char * | str | ) |
Inline versions of some functions in LibMatrix.
NOTE: that unlike the LibMatrix counterpart. Changes all spaces in str to dashes -
| DT_DLL_vrfutil char* DtGetFilenameExtension | ( | char * | fileName, |
| char * | extension | ||
| ) |
Extract the extension from the fileName, excluding the period(.).
Returns 0 if no period is found. Otherwise, returns a pointer to the period in fileName, then copies everything after the period into extension.
| DT_DLL_vrfutil void DtOrientationFromThreePoints | ( | const DtVector & | leftPoint, |
| const DtVector & | rightPoint, | ||
| const DtVector & | rearPoint, | ||
| DtDcm & | orientation, | ||
| bool | yIsForward = false |
||
| ) |
Given the world position of the three big-wheel points, this returns the resulting orientation of big-wheel, assuming the following body axes:
If yIsForward is false (default) then routine assumes: X is forward otherwise it assumes: x is to the right
| DT_DLL_vrfutil void DtOrientationFromThreePointsAndHeading | ( | const DtVector & | leftPoint, |
| const DtVector & | rightPoint, | ||
| const DtVector & | otherPoint, | ||
| double | cosHeading, | ||
| double | sinHeading, | ||
| DtDcm & | orientation, | ||
| bool | upsideDown = false |
||
| ) |
This form preserves heading; the previous one does not!
| DT_DLL_vrfutil void DtOrientationFromThreePointsAndHeading | ( | const DtVector & | leftPoint, |
| const DtVector & | rightPoint, | ||
| const DtVector & | otherPoint, | ||
| double | heading, | ||
| const DtDcm & | topoToLocal, | ||
| DtDcm & | orientation | ||
| ) |
This form preserves heading; the previous one does not!
| DT_DLL_vrfutil bool DtCalculateNormal | ( | const DtVector & | pointA, |
| const DtVector & | pointB, | ||
| const DtVector & | pointC, | ||
| DtVector & | normal | ||
| ) |
Calculates the normal formed by the plane containing points A, B, and C.
| DT_DLL_vrfutil void DtCalculateOrientation | ( | DtVector | localNormal, |
| double | heading, | ||
| const DtDcm & | topoToLocal, | ||
| DtDcm & | localOrientation | ||
| ) |
Calculates the orientation from the specified local normal and heading.
| DT_DLL_vrfutil double DtFindZInPlane | ( | const double | posx, |
| const double | posy, | ||
| const DtVector & | pointInPlane, | ||
| const DtVector & | normal | ||
| ) |
| DT_DLL_vrfutil DtVector DtIntersectLineWithPlane | ( | const DtVector & | point, |
| const DtVector & | direction, | ||
| const DtVector & | pointInPlane, | ||
| const DtVector & | planeNormal | ||
| ) |
Returns the point of intersection between a line (defined by a point and a direction vector) and a plane (defined by a point in the plane and the plane normal).
| DT_DLL_vrfutil void DtBodyToRefFromHeadingAndPosition | ( | const Coordinate_System & | coordSystem, |
| double | heading, | ||
| const DtVector & | position, | ||
| DtDcm & | bodyToRef | ||
| ) |
Calculates a Dcm for rotating from a body coordinate system, defined by a given heading (no pitch or roll) and position, to a given reference frame.
| DT_DLL_vrfutil void DtTopoEulerToBodyToLocal | ( | const DtTaitBryan & | topoEuler, |
| const Coordinate_System & | coordSystem, | ||
| const DtVector & | localPosition, | ||
| DtDcm & | bodyToLocalDcm | ||
| ) |
Calculates the rotation matrix for going from a body to local (database) reference frame, given a set of topocentric Euler angles.
topoEuler: topocentric Euler angles (heading, pitch, roll) localPosition: position of topocentric reference frame, in local coordinates bodyToLocalDcm: rotation matrix for rotating from body to local coordinates
| DT_DLL_vrfutil DtDcm DtRotZToBodyToLocal | ( | const Coordinate_System & | coordSystem, |
| double | angle, | ||
| const DtVector & | position | ||
| ) |
| DT_DLL_vrfutil DtDcm DtRotYToBodyToLocal | ( | const Coordinate_System & | coordSystem, |
| double | angle, | ||
| const DtVector & | position | ||
| ) |
| DT_DLL_vrfutil DtDcm DtRotXToBodyToLocal | ( | const Coordinate_System & | coordSystem, |
| double | angle, | ||
| const DtVector & | position | ||
| ) |
| DT_DLL_vrfutil double DtHeadingFromGeocAToGeocB | ( | const DtVector & | geocA, |
| const DtVector & | geocB | ||
| ) |
Expects geocentric coordinates.
Standing at point A, returns the heading along which you would need to be looking to be facing point B.
| DT_DLL_vrfutil void DtTrigInit | ( | ) |
Functions for trig table lookups.
| DT_DLL_vrfutil double DtSin | ( | double | r | ) |
|
inline |
References DtPI_OVER_TWO, and DtSin().
Referenced by DtTan().
| DT_DLL_vrfutil double DtAsin | ( | double | x | ) |
Referenced by DtAcos().
|
inline |
References DtAsin(), and DtPI_OVER_TWO.
| DT_DLL_vrfutil double DtAtan | ( | double | x | ) |
| DT_DLL_vrfutil double DtAtan2 | ( | double | y, |
| double | x | ||
| ) |
| DT_DLL_vrfutil bool DtSameSign | ( | double | x, |
| double | y | ||
| ) |
| DT_DLL_vrfutil bool DtPointInSegment | ( | const DtVector & | testPoint, |
| const DtVector & | segStart, | ||
| const DtVector & | segEnd | ||
| ) |
| DT_DLL_vrfutil int DtIntersect2D_Segments | ( | DtVector | P0, |
| DtVector | P1, | ||
| DtVector | Q0, | ||
| DtVector | Q1, | ||
| DtVector * | I0 = 0, |
||
| DtVector * | I1 = 0, |
||
| double * | isectParam1 = 0, |
||
| double * | isectParam2 = 0, |
||
| bool * | parallel = 0, |
||
| bool * | collinear = 0 |
||
| ) |
Description:
DtIntersect2D_Segments(): the intersection of 2 finite 2D segments; P0 to P1 and Q0 to Q1
returns: 0= disjoint (no intersect) 1= intersect in unique point I0 with parameter value (t) with respect to P0->P1 in isectParam1. If not collinear, isectParam2 will contain the parameter value for I0 with respect to line segment Q0->Q1 2= overlap in segment from I0 to I1 (collinear) with parameter value (t) (for I0, wrt P0->P1) in isectParam1
| DT_DLL_vrfutil bool DtInSegment | ( | DtVector | P, |
| DtVector | P0, | ||
| DtVector | P1 | ||
| ) |
DtInSegment(): determine if a collinear Point P is inside a Segment P0 to P1.
returns: true or false
Note that this is just a simpler version of DtPointInSegment, which can be used if you already know that the point is collinear
| DT_DLL_vrfutil DtVector localGravityAcceleration | ( | const DtVector & | localPosition, |
| const Coordinate_System & | coordinateSystem | ||
| ) |
| DT_DLL_vrfutil double altitudeOfPosition | ( | const DtVector & | localPosition, |
| const Coordinate_System & | coordinateSystem | ||
| ) |
| DT_DLL_vrfutil double altitudeOfPosition | ( | const DtPoint & | localPosition, |
| const Coordinate_System & | coordinateSystem | ||
| ) |
| DT_DLL_vrfutil void setAltitudeOfPosition | ( | DtVector & | localPosition, |
| double | newAltitude, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Alters localPosition to have the specified altitude (above 0 altitude).
localPosition must be in the coordinate system specified.
| DT_DLL_vrfutil void setAltitudeOfPosition | ( | DtPoint & | localPosition, |
| double | newAltitude, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Alters localPosition to have the specified altitude (above 0 altitude).
localPosition must be in the coordinate system specified.
| DT_DLL_vrfutil double headingAngleTo | ( | const DtVector & | observerPosition, |
| const DtVector & | targetPosition, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
| DT_DLL_vrfutil double elevationAngleTo | ( | const DtVector & | observerPosition, |
| const DtVector & | targetPosition, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns the elevation angle in radians from observer position to target position.
Positions must be in the given coordinate system.
| DT_DLL_vrfutil double bankAngleTo | ( | const DtVector & | observerPosition, |
| const DtVector & | targetPosition, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns the bank angle in radians from observer position to target position.
Positions must be in the given coordinate system.
| DT_DLL_vrfutil double distSquaredTo2D | ( | const DtVector & | position1, |
| const DtVector & | position2, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns the (2D) squared distance between given position.
Positions must be in the given coordinate system.
| DT_DLL_vrfutil bool inside | ( | const DtVector & | localPoint, |
| const DtLocalVertexList & | localVertexList, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns true if localPoint is inside localVertexList in 2D.
Always returns false if localVertexList is not a closed figure. Only supports convex polygons. Position and vertex list must be in the given coordinate system.
| DT_DLL_vrfutil bool leftOf | ( | const DtVector & | localPoint, |
| const DtLocalVertexList & | localVertexList, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns true if localPoint is left of the localVertexList in 2D.
Always returns false if this has only one vertex. If localVertexList has more than two vertices (ie. more than one line segment), acts on the closest (infinite) line. Position and vertex list must be in the given coordinate system.
| DT_DLL_vrfutil double headingAngleTo | ( | const DtVector & | localPoint, |
| const DtLocalVertexList & | localVertexList, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns the angle at which localPoint would proceed to arrive most quickly at localVertexList.
If the localVertexList has more than one vertex, then headingAngleTo() acts on the closest vertex (which is not always the closest point on this). All points are considered in 2D. Position and vertex list must be in the given coordinate system.
| DT_DLL_vrfutil double elevationAngleTo | ( | const DtVector & | localPoint, |
| const DtLocalVertexList & | localVertexList, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns the elevation angle in 3D at which point would proceed to arrive most quickly at this.
If the localVertexList has more than one vertex, then elevationAngleTo() acts on the closest vertex (which is not always the closest point on this). Position and vertex list must be in the given coordinate system.
| DT_DLL_vrfutil double localDistSquaredTo | ( | const DtVector & | localPoint, |
| const DtLocalVertexList & | localVertexList, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns the distance from localPoint to the closest vertex in localVertexList.
If localVertexList is projected, calls distSquaredTo2D to find the the nearest vertex on localVertexList. Otherwise, calls localVertexList.closestLocalPosition() to determine the nearest vertex on this (in 3-D). Position and vertex list must be in the given coordinate system.
| DT_DLL_vrfutil double distSquaredTo2D | ( | const DtVector & | localPoint, |
| const DtLocalVertexList & | localVertexList, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns the squared distance to localVertexList, projected in topocentric coordinates.
If localVertexList has more than two vertices (ie. more than one line segment), acts on the closest line segment. Position and vertex list must be in the given coordinate system.
| DT_DLL_vrfutil double distToBoundingVolume | ( | const DtVector & | localBaseLocation, |
| const Dt3dBoundingVolume * | box, | ||
| const DtTaitBryan & | boxToLocalOrientation, | ||
| const DtVector & | testPoint | ||
| ) |
Returns the distance of the testPoint to the bounding volume.
This is the perpendicular distance to the closes face, if the point is "within" that face, or the distance to the nearest box edge or vertex otherwise. The volume may have an offset from its base position; e.g. the baseLocation may be an entity location, and the lattice offset in the bounding volume class provides the offset. The base location and testPoint are in "local" coordinates, and the orientation vector gives the rotation from box to local; e.g. this could be an object's vrfState()->localOrientationWrtDatabase().
| DT_DLL_vrfutil bool intersects | ( | const DtVector & | localPoint1, |
| const DtVector & | localPoint2, | ||
| const DtLocalVertexList & | localVertexList, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns true if the line segment localPoint1-localPoint2 intersects.
any line segment in localVertexList, all in 2D. note: for purposes of this function, line segments don't intersect if they are collinear, even if they are partially coincident. Positions and vertex list must be in the given coordinate system.
| DT_DLL_vrfutil DtListItem* getClosestVertex2D | ( | const DtVector & | localPoint, |
| const DtLocalVertexList & | localVertexList, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Sets vertex to be the vertex closest in 2D to point in localVertexList.
Position and vertex list must be in the given coordinate system.
| DT_DLL_vrfutil bool getClosestLine2D | ( | const DtVector & | localPoint, |
| DtVector & | localLinePt1, | ||
| DtVector & | localLinePt2, | ||
| const DtLocalVertexList & | localVertexList, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Sets linePt1 and linePt2 to be the vertices of the line segment closest in 2D to point in localVertexList.
Positions and vertex list must be in the given coordinate system.
| DT_DLL_vrfutil double distanceSquaredPointToLine2D | ( | const DtVector & | localPoint, |
| const DtVector & | localLinePt1, | ||
| const DtVector & | localLinePt2, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns the distance^2 from point to linePt1-linePt2 in topocentric 2D.
All points must be in the given coordinate system.
| DT_DLL_vrfutil double distanceSquaredPointToPoint2D | ( | const DtVector & | localLinePt1, |
| const DtVector & | localLinePt2, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns the distance^2 from point1 to point2 in 2D.
All points must be in the coordinate system given by coordinateSystem. All points must be in the given coordinate system.
| DT_DLL_vrfutil double closestPointAlongChord2D | ( | const DtPoint & | chordStart, |
| const DtPoint & | chordEnd, | ||
| const DtPoint & | testPoint, | ||
| DtPoint & | closestPoint, | ||
| const Coordinate_System & | coordSys | ||
| ) |
Finds the closest point along the chord defined by chordStart and chordEnd to testPoint.
This point is returned as closestPoint, and the distance between testPoint and closestPoint is returned. All calculations are done in 2D, and all points must be in the coordinate system provided.
| DT_DLL_vrfutil bool setCurrentVertexToClosestInDirectionOfTraversal | ( | const DtVector & | point, |
| const Coordinate_System & | coordinateSystem, | ||
| DtLocalVectorIterator & | localVertexIterator | ||
| ) |
Sets current vertex in localVertexIterator to that vertex closest to the given point, in the direction of travel.
This may or may not be the overall closest vertex, depending on whether or not the closest vertex is 'behind' the given point. If there is no 'next' vertex along the direction of traversal, then sets that to be the current vertex. If there is a next vertex along the direction of traversal, then tests the heading angle formed between a vector from the point to the current vertex and the vector going from the current vertex to the next. If this angle is > 0 (opposite the direction of traversal), then sets the current vertex to be the next vertex (because moving to current vertex would require turning opposite to the sense of the traversal). Otherwise, sets the current vertex to be the overall closest vertex (closest vertex is already in the direction of the traversal).
These functions are useful when the 3D vectors are in topographic coordinates; e.g. when a series of computations (like the above) must be done, and the conversion to/from topographic is done once at the beginning and once at the end.
Referenced by magnitudeSquared2D().
|
inline |
References dotProd2D().
Referenced by normalize2D().
|
inline |
References magnitudeSquared2D().
|
inline |
This is a heading if v is in topo coordinates.
| DT_DLL_vrfutil void localVectorToGeocentricVector | ( | const DtVector & | geocentricPosition, |
| const DtVector & | localVector, | ||
| const Coordinate_System & | coordinateSystem, | ||
| DtVector & | geocentricVector | ||
| ) |
Transforms a vector in local coordinates (database coordinates) to geocentric coordinates.
geocentricPosition: geocentric origin of topocentric coordinate system used in transformation localVector: local (database) vector coordinateSystem: local (database) coordinate system
geocentricVector: transformed vector in geocentric coordinates
| DT_DLL_vrfutil void localOrientationToGeocentricOrientation | ( | const DtVector | geocentricPosition, |
| const DtTaitBryan & | localOrientation, | ||
| const Coordinate_System & | coordinateSystem, | ||
| DtTaitBryan & | geocentricOrientation | ||
| ) |
Transforms an orientation matrix in for going from body to local coordinates (database coordinates) to geocentric coordinates.
geocentricPosition: geocentric origin of topocentric coordinate system used in transformation localOrientation: body to local orientation euler angles. coordinateSystem: local (database) coordinate system
geocentricOrientation: body to geocentric orientation euler angles.
| DT_DLL_vrfutil void geocentricVectorToLocalVector | ( | const DtVector & | geocentricPosition, |
| const DtVector & | geocentricVector, | ||
| const Coordinate_System & | coordinateSystem, | ||
| DtVector & | localVector | ||
| ) |
Transforms a vector in geocentric coordinates to local (database) coordinates.
geocentricPosition: geocentric origin of topocentric coordinate system used in transformation geocentricVector: geocentric vector coordinateSystem: local (database) coordinate system
localVector: transformed vector in local coordinates
| DT_DLL_vrfutil void geocentricOrientationToLocalOrientation | ( | const DtVector & | geocentricPosition, |
| const DtTaitBryan & | geocentricOrientation, | ||
| const Coordinate_System & | coordinateSystem, | ||
| DtTaitBryan & | localOrientation | ||
| ) |
Transforms an orientation matrix in for going from body to local coordinates (database coordinates) to geocentric coordinates.
geocentricPosition: geocentric origin of topocentric coordinate system used in transformation geocentricOrientation: body to geocentric orientation euler angles coordinateSystem: local (database) coordinate system
localOrientation: body to local orientation euler angles
| DT_DLL_vrfutil void localVectorToGeocentricVector | ( | const DtVector & | geocPosition, |
| const DtVector & | local, | ||
| DtVector & | geoc | ||
| ) |
NOTE: These functions are deprecated. They are only applicable when the local coordinate system is UTM. To develop code that is independent of the 'local' coordinate system (the coordinate system used by a given terrain database), use the conversion functions provided in Coordinate_System class (in coordSystem.h), or one of the above functions that accept a Coordinate_System reference instead. The functions below assume a UTM coordinate system for 'local' coordinates.
This function has been deprecated in the API. It assumes the database is in UTM coordinates. Use a corresponding function in this file that takes a Coordinate_System reference as an argument, for a version that will work with any supported terrain database (UTM, geocentric).
| DT_DLL_vrfutil void localOrientationToGeocentricOrientation | ( | const DtVector & | geocPosition, |
| const DtTaitBryan & | local, | ||
| DtTaitBryan & | geoc | ||
| ) |
This function has been deprecated in the API. It assumes the database is in UTM coordinates. Use a corresponding function in this file that takes a Coordinate_System reference as an argument, for a version that will work with any supported terrain database (UTM, geocentric).
| DT_DLL_vrfutil void localVelocityToGeocentricVelocity | ( | DtTopoView & | topoView, |
| const DtVector & | local | ||
| ) |
This function has been deprecated in the API. It assumes the database is in UTM coordinates. Use a corresponding function in this file that takes a Coordinate_System reference as an argument, for a version that will work with any supported terrain database (UTM, geocentric).
| DT_DLL_vrfutil void localAccelerationToGeocentricAcceleration | ( | DtTopoView & | topoView, |
| const DtVector & | local | ||
| ) |
This function has been deprecated in the API. It assumes the database is in UTM coordinates. Use a corresponding function in this file that takes a Coordinate_System reference as an argument, for a version that will work with any supported terrain database (UTM, geocentric).
| DT_DLL_vrfutil void localOrientationToGeocentricOrientation | ( | DtTopoView & | topoView, |
| const DtTaitBryan & | local | ||
| ) |
This function has been deprecated in the API. It assumes the database is in UTM coordinates. Use a corresponding function in this file that takes a Coordinate_System reference as an argument, for a version that will work with any supported terrain database (UTM, geocentric).
| DT_DLL_vrfutil void geocentricVectorToLocalVector | ( | const DtVector & | geocPosition, |
| const DtVector & | geoc, | ||
| DtVector & | local | ||
| ) |
This function has been deprecated in the API. It assumes the database is in UTM coordinates. Use a corresponding function in this file that takes a Coordinate_System reference as an argument, for a version that will work with any supported terrain database (UTM, geocentric).
| DT_DLL_vrfutil void geocentricOrientationToLocalOrientation | ( | const DtVector & | geocPosition, |
| const DtTaitBryan & | geoc, | ||
| DtTaitBryan & | local | ||
| ) |
| DT_DLL_vrfutil void geocentricVelocityToLocalVelocity | ( | DtTopoView & | topoView, |
| DtVector & | local | ||
| ) |
This function has been deprecated in the API. It assumes the database is in UTM coordinates. Use a corresponding function in this file that takes a Coordinate_System reference as an argument, for a version that will work with any supported terrain database (UTM, geocentric).
| DT_DLL_vrfutil void geocentricAccelerationToLocalAcceleration | ( | DtTopoView & | topoView, |
| DtVector & | local | ||
| ) |
| DT_DLL_vrfutil void geocentricOrientationToLocalOrientation | ( | DtTopoView & | topoView, |
| DtTaitBryan & | local | ||
| ) |
| DT_DLL_vrfutil int DtIntRandom | ( | int | iFrom, |
| int | iTo | ||
| ) |
Returns a random number from the base to the max.
| DT_DLL_vrfutil bool DtIsValidNumber | ( | double | x | ) |
Returns true if the number is not infinite or not nan.
| DT_DLL_vrfutil double DtHoursMinutesSeconds2Seconds | ( | double | hours, |
| double | minutes, | ||
| double | seconds | ||
| ) |
| DT_DLL_vrfutil void DtSeconds2HoursMinutesSeconds | ( | double | totalSeconds, |
| int & | hoursOut, | ||
| int & | minutesOut, | ||
| double & | secondsOut | ||
| ) |
Converts totalSeconds into hours, minutes, and seconds.
| DT_DLL_vrfutil double calculateLengthOfLine | ( | const std::vector< DtVector > & | points | ) |
Given the points return the length of the line. Assumes points are geocentric.
| DT_DLL_vrfutil double calculateLengthOfLine | ( | const Coordinate_System & | coordinateSystem, |
| const std::vector< DtVector > & | points | ||
| ) |
Given the points return the length of the line.
Converts points to topographic before calculating. The length of the line does not include the Z coordinate. Only x and y
| DT_DLL_vrfutil void calculateLengthAndWidthOfShape | ( | const Coordinate_System & | coordSytem, |
| const std::vector< DtVector > & | points, | ||
| double & | length, | ||
| double & | width | ||
| ) |
Given points and the coordinate system those points are in find the length/width of the given polygon.
Note that the polygon does not need to be closed
| DT_DLL_vrfutil void calculateLengthAndWidthOfShape | ( | const std::vector< DtVector > & | points, |
| double & | length, | ||
| double & | width | ||
| ) |
Assumes geocentric coordinates.
| DT_DLL_vrfutil DtVector DtPoint2DtVector | ( | const DtPoint & | p | ) |
| DT_DLL_vrfutil DtVector calculateWorldVelocityFromPosition | ( | const DtVector & | currentWorldPos, |
| const DtVector & | currentLocalPos, | ||
| const DtVector & | localVelocity, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
If the database is in a projected system, error is introduced in the velocity when converting it to geocentric.
To avoid this problem, use the current geocentric position and then using local velocity create a projected point 1 sec in the future. Convert it to geocentric and subtract the 2 to get the geocentric velocity.
| DT_DLL_vrfutil double illuminationValueAtPosition | ( | const DtGeodeticCoord & | position, |
| time_t | time, | ||
| double | nighttimeMaximum = 0.1, |
||
| double | illuminationMinimum = 0.001, |
||
| bool | useDayNightIlluminationModel = true, |
||
| int * | sunstate = 0 |
||
| ) |
Give a geodetic coordinate and a UTC time, return an illumination value (0 - 1) at that position based on sun/moon position.
The nighttimeMaximum is the maximum illumination to the full moon. The minimum illumination is that of sunset and no moon (accounting for possible illumination due to stars).
If use useDayNightIlluminationModel boolean is false then the illumination value returned will always be 1.0
If sunstate is defined, returns the following value: 0 - Sun is not visible 1 - Sun is fully visible 2 - Dawn 3 - Dusk
|
inline |
Checks for not a number (NAN) values.
|
inline |
Checks for not a number (NAN) values.
|
inline |
Replace boost split with version that returns an empty set if the supplied string has no length.
Woraround for change from boost 1.45 to 1.46
Referenced by DtRwTranslatableStringObject::translate().