head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2002.09.07.01.50.41; author curt; state Exp; branches; next 1.3; 1.3 date 2002.08.31.19.01.59; author curt; state Exp; branches; next 1.2; 1.2 date 2002.08.31.18.54.05; author curt; state Exp; branches; next 1.1; 1.1 date 2002.02.15.17.22.02; author curt; state Exp; branches; next ; desc @@ 1.4 log @Updated doxygen docs. @ text @
Main Page Class Hierarchy Compound List File List Compound Members File Members

# vector.hxx File Reference

Additional vector routines. More...

`#include <simgear/compiler.h>`
`#include <plib/sg.h>`

Go to the source code of this file.

## Functions
void | sgmap_vec_onto_cur_surface_plane (sgVec3 normal, sgVec3 v0, sgVec3 vec, sgVec3 result)
| Map a vector onto a plane.
void | sgCopyNegateVec4 (sgVec4 dst, sgVec4 src)
| Copy and negate a vector.
void | sgClosestPointToLine (sgVec3 p1, const sgVec3 p, const sgVec3 p0, const sgVec3 d)
| Given a point p, and a line through p0 with direction vector d, find the closest point (p1) on the line (float version).
void | sgdClosestPointToLine (sgdVec3 p1, const sgdVec3 p, const sgdVec3 p0, const sgdVec3 d)
| Given a point p, and a line through p0 with direction vector d, find the closest point (p1) on the line (double version).
double | sgClosestPointToLineDistSquared (const sgVec3 p, const sgVec3 p0, const sgVec3 d)
| Given a point p, and a line through p0 with direction vector d, find the shortest distance (squared) from the point to the line (float version.).
double | sgdClosestPointToLineDistSquared (const sgdVec3 p, const sgdVec3 p0, const sgdVec3 d)
| Given a point p, and a line through p0 with direction vector d, find the shortest distance (squared) from the point to the line (double version.).
void | sgPostMultMat4ByTransMat4 (sgMat4 src, const sgVec3 trans)
| This is same as:.

## Detailed Description

Additional vector routines.

Definition in file vector.hxx.

## Function Documentation

void sgClosestPointToLine | ( | sgVec3 | p1,
|  | const sgVec3 | p,
|  | const sgVec3 | p0,
|  | const sgVec3 | d
| ) |

  | Given a point p, and a line through p0 with direction vector d, find the closest point (p1) on the line (float version). Parameters:
  p1 | (out) closest point to p on the line
  p | (in) original point
  p0 | (in) point on the line
  d | (in) vector defining line direction
Definition at line 35 of file vector.cxx.

double sgClosestPointToLineDistSquared | ( | const sgVec3 | p,
|  | const sgVec3 | p0,
|  | const sgVec3 | d
| ) |

  | Given a point p, and a line through p0 with direction vector d, find the shortest distance (squared) from the point to the line (float version.). Parameters:
  p | (in) original point
  p0 | (in) point on the line
  d | (in) vector defining line direction
Returns: shortest distance (squared) from p to line Definition at line 79 of file vector.cxx.

void sgCopyNegateVec4 | ( | sgVec4 | dst,
|  | sgVec4 | src
| ) | `[inline]`

  | Copy and negate a vector. Parameters:
  dst | (out) result vector
  src | (in) input vector
Definition at line 98 of file vector.hxx.

void sgdClosestPointToLine | ( | sgdVec3 | p1,
|  | const sgdVec3 | p,
|  | const sgdVec3 | p0,
|  | const sgdVec3 | d
| ) |

  | Given a point p, and a line through p0 with direction vector d, find the closest point (p1) on the line (double version). Parameters:
  p1 | (out) closest point to p on the line
  p | (in) original point
  p0 | (in) point on the line
  d | (in) vector defining line direction
Definition at line 55 of file vector.cxx.

double sgdClosestPointToLineDistSquared | ( | const sgdVec3 | p,
|  | const sgdVec3 | p0,
|  | const sgdVec3 | d
| ) |

  | Given a point p, and a line through p0 with direction vector d, find the shortest distance (squared) from the point to the line (double version.). Parameters:
  p | (in) original point
  p0 | (in) point on the line
  d | (in) vector defining line direction
Returns: shortest distance (squared) from p to line Definition at line 101 of file vector.cxx.

void sgmap_vec_onto_cur_surface_plane | ( | sgVec3 | normal,
|  | sgVec3 | v0,
|  | sgVec3 | vec,
|  | sgVec3 | result
| ) | `[inline]`

  | Map a vector onto a plane. Parameters:
  normal | (in) normal vector for the plane
  v0 | (in) a point on the plane
  vec | (in) the vector to map onto the plane
  result | (out) the result vector
Definition at line 48 of file vector.hxx.

void sgPostMultMat4ByTransMat4 | ( | sgMat4 | src,
|  | const sgVec3 | trans
| ) |

-   | This is same as:. sgMakeMatTrans4( sgMat4 sgTrans, sgVec3 trans ) sgPostMultMat4( sgMat4 src, sgTRANS ); Parameters:
    src | starting sgMat4 matrix
    trans | translation vector
Definition at line 128 of file vector.cxx.

@ 1.3 log @Oops, try again. @ text @d459 1 a459 1