Contents User Forum Source Index APIs by Task APIs by Level Data


G3D::LineSegment Class Reference

An finite segment of an infinite 3D line. More...

#include <LineSegment.h>

List of all members.

Public Member Functions

Vector3 closestPoint (const Vector3 &point) const
void deserialize (class BinaryInput &b)
double distance (const Vector3 &p) const
double distanceSquared (const Vector3 &p) const
bool intersectsSolidSphere (const class Sphere &s) const
float length () const
 LineSegment (class BinaryInput &b)
 LineSegment ()
Vector3 point (int i) const
Vector3 randomPoint () const
void serialize (class BinaryOutput &b) const
virtual ~LineSegment ()

Static Public Member Functions

static LineSegment fromTwoPoints (const Vector3 &point1, const Vector3 &point2)

Protected Member Functions

 LineSegment (const Vector3 &__point, const Vector3 &_direction)

Protected Attributes

Vector3 _point
Vector3 direction


Detailed Description

An finite segment of an infinite 3D line.


Constructor & Destructor Documentation

G3D::LineSegment::LineSegment ( const Vector3 __point,
const Vector3 _direction 
) [inline, protected]

G3D::LineSegment::LineSegment (  )  [inline]

G3D::LineSegment::LineSegment ( class BinaryInput b  ) 

virtual G3D::LineSegment::~LineSegment (  )  [inline, virtual]


Member Function Documentation

Vector3 G3D::LineSegment::closestPoint ( const Vector3 point  )  const

Returns the closest point on the line segment to point.

void G3D::LineSegment::deserialize ( class BinaryInput b  ) 

double G3D::LineSegment::distance ( const Vector3 p  )  const [inline]

Returns the distance between point and the line.

double G3D::LineSegment::distanceSquared ( const Vector3 p  )  const [inline]

static LineSegment G3D::LineSegment::fromTwoPoints ( const Vector3 point1,
const Vector3 point2 
) [inline, static]

Constructs a line from two (not equal) points.

bool G3D::LineSegment::intersectsSolidSphere ( const class Sphere s  )  const

Returns true if some part of this segment is inside the sphere.

float G3D::LineSegment::length (  )  const [inline]

Vector3 G3D::LineSegment::point ( int  i  )  const

Call with 0 or 1.

Vector3 G3D::LineSegment::randomPoint (  )  const

void G3D::LineSegment::serialize ( class BinaryOutput b  )  const


Member Data Documentation

Not normalized.


The documentation for this class was generated from the following file:
Generated on Thu Aug 2 11:40:46 2007 for G3D by doxygen 1.5.2
Hosted by SourceForge.net Logo