PxComputeBasisVectors

Defined in include/foundation/PxMathUtils.h

inline void PxComputeBasisVectors(const PxVec3 &p0, const PxVec3 &p1, PxVec3 &dir, PxVec3 &right, PxVec3 &up)

Compute three normalized vectors (dir, right and up) that are parallel to (dir) and perpendicular to (right, up) the normalized direction vector (p1 - p0)/||p1 - p0||.

Parameters
  • p0[in] is used to compute the normalized vector dir = (p1 - p0)/||p1 - p0||.

  • p1[in] is used to compute the normalized vector dir = (p1 - p0)/||p1 - p0||.

  • dir[out] is the normalized vector (p1 - p0)/||p1 - p0||.

  • right[out] is the first of the two normalized vectors perpendicular to dir

  • up[out] is the second of the two normalized vectors perpendicular to dir