VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Namespaces | Functions
aimUtils.h File Reference

Go to the source code of this file.

Namespaces

 makVrf
 

Functions

DT_DLL_vrfmodel double headingToPointWrtBody (const DtVector &localTargetPoint, const DtVector &localPosition, const DtDcm &localOrientationMatrix)
 
DT_DLL_vrfmodel double headingToPointWrtBody (const DtVector &localTargetPoint, const DtSimObject *entity)
 
DT_DLL_vrfmodel double headingToPointWrtPart (const DtVector &localTargetPoint, const makVrf::DtArticulatedPartStateRepository *part, const DtVector &localOriginLocation)
 
DT_DLL_vrfmodel double elevationToPointWrtBody (const DtVector &localTargetPoint, const DtVector &localPosition, const DtDcm &localOrientationMatrix)
 
DT_DLL_vrfmodel double elevationToPointWrtBody (const DtVector &localTargetPoint, const DtSimObject *entity)
 
DT_DLL_vrfmodel double elevationToPointWrtPart (const DtVector &localTargetPoint, const makVrf::DtArticulatedPartStateRepository *part, const DtVector &localOriginLocation)
 
DT_DLL_vrfmodel DtVector targetLocationOnEntity (const DtVector &localShooterLoc, const DtSimObject *targetEntity, const Coordinate_System *coordSys, double heightFraciont=0.)
 
DT_DLL_vrfmodel bool checkLineOfSightTargetLaser (const DtSimObject &shooterObject, const DtVector &weaponGeocPosition, const makVrf::DtLaserDesignatorStateComponent &targetLaser, const DtSimulationServices *simulationServices)
 
DT_DLL_vrfmodel double partElevationWrtBody (const makVrf::DtArticulatedPartStateRepository *part)
 
DT_DLL_vrfmodel double partHeadingWrtBody (const makVrf::DtArticulatedPartStateRepository *part)
 

Function Documentation

DT_DLL_vrfmodel double partElevationWrtBody ( const makVrf::DtArticulatedPartStateRepository part)

These elevation and heading functions assume a constrained configuration of articulated parts on the entity. All turrets, i.e. parts that change heading, i.e. rotate on the z-axis, are assumed to be attached only to other turrets or the body. Thus the heading of a turret, or something attached to the turret, is a function only of the its own rotation and the rotation of turrets it is attached to.
Similarly, the guns, i.e. parts that elevate, i.e. rotate on the (z-rotated) y-axis, are only attached to other elevating parts, except their base which is a turret or the body. Thus the elevation of a gun is a function only of the its own rotation and the rotation of other guns it is attached to.
What is not covered is a turret that is attached to a gun (i.e., an elevating part); in this case the elevation angle of the something on the turret would depend not only on the elevation of the base gun, but on the angle of the turret.

Determines the part elevation angle With Respect To the body of the entity, including all articulated parts.

DT_DLL_vrfmodel double partHeadingWrtBody ( const makVrf::DtArticulatedPartStateRepository part)

Determines the part heading (yaw) angle With Respect To the body of the entity, including all articulated parts.

DT_DLL_vrfmodel double headingToPointWrtBody ( const DtVector localTargetPoint,
const DtVector localPosition,
const DtDcm &  localOrientationMatrix 
)

Determines the heading, with respect to the body coordinates of an entity at the given position with the given local orientation matrix.

DT_DLL_vrfmodel double headingToPointWrtBody ( const DtVector localTargetPoint,
const DtSimObject entity 
)

Determines the heading, With Respect To the body of the entity, to the given target point.

DT_DLL_vrfmodel double headingToPointWrtPart ( const DtVector localTargetPoint,
const makVrf::DtArticulatedPartStateRepository part,
const DtVector localOriginLocation 
)

Determines the heading direction to a point (local coordinates), With Respect To a coordinate system that is located at the given origin (local coordinates), and rotated to the heading of the given part. For example, the heading to a point directly to the right of a turret is pi/2. If a secondary gun were mounted on the turret at a location that is forward from the turret origin, its heading to the point would be slightly greater than pi/2.

DT_DLL_vrfmodel double elevationToPointWrtBody ( const DtVector localTargetPoint,
const DtVector localPosition,
const DtDcm &  localOrientationMatrix 
)

Determines the elevation, with respect to the body coordinates of an entity at the given position with the given local orientation matrix.

DT_DLL_vrfmodel double elevationToPointWrtBody ( const DtVector localTargetPoint,
const DtSimObject entity 
)

Determines the elevation, with respect to the body of the entity, to the given target point.

DT_DLL_vrfmodel double elevationToPointWrtPart ( const DtVector localTargetPoint,
const makVrf::DtArticulatedPartStateRepository part,
const DtVector localOriginLocation 
)

Similar to headingToPointWrtPart, but for elevation.

DT_DLL_vrfmodel DtVector targetLocationOnEntity ( const DtVector localShooterLoc,
const DtSimObject targetEntity,
const Coordinate_System coordSys,
double  heightFraciont = 0. 
)

Determines the point to target on an opposing entity.

DT_DLL_vrfmodel bool checkLineOfSightTargetLaser ( const DtSimObject shooterObject,
const DtVector weaponGeocPosition,
const makVrf::DtLaserDesignatorStateComponent targetLaser,
const DtSimulationServices simulationServices 
)

Determines if target laser spot is visible from the position of the shooter's weapon. The shooterObject could be the entity with the missile launcher or could be the laser guided missile itself. The weaponGeocPosition is the world position of the weapon launcher (on the shooter) or the world position of the missile. The target could be one of the following:

  • An entity - i.e. object with a bounding volume (e.g tank). Determine on which side of the target bounding volume , the laser spot is located. Check the LOS between the weapon position and the laser spot. I.e. if the shooter and the laser spot are on the same side of the of the target.
  • Not an entity - i.e. object without a bounding volume (e.g waypoint). Check the LOS between the weapon position and the target object.
  • A location - i.e. position on the ground or on the side of a building. Check the LOS between the weapon position and the laser spot.

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)