Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

osg::Line Class Reference

Line. More...

#include <OSGLine.h>

Collaboration diagram for osg::Line:

Collaboration graph
[legend]
List of all members.

Public Methods

bool intersect (const SphereVolume &sphere) const
 Intersect the Line with a Sphere.

bool intersect (const SphereVolume &sphere, Real32 &enter, Real32 &exit) const
 Intersect the line with a sphere, returns points of intersection.

bool intersect (const CylinderVolume &cyl) const
 Intersect the line with a cylinder.

bool intersect (const CylinderVolume &cyl, Real32 &enter, Real32 &exit) const
 Intersect the line with a cylinder, returns points of intersection based on GGems IV.

bool intersect (const FrustumVolume &frustum) const
 Intersect the line with a frustum.

bool intersect (const FrustumVolume &frustum, Real32 &enter, Real32 &exit) const
bool intersect (const BoxVolume &box, Real32 &enter, Real32 &exit) const
 Intersect the line with a box, returns points of intersection.

bool intersect (Real32 angle, const BoxVolume &box) const
 Intersect the line with a box.

bool intersect (Real32 angle, const Vec3f &point) const
 Intersect the line with a point.

bool intersect (Real32 angle, const Vec3f &v0, const Vec3f &v1, Vec3f &pt) const
 Intersect the line with a line.

bool intersect (const Pnt3f &v0, const Pnt3f &v1, const Pnt3f &v2, Real32 &t, Vec3f *normal=NULL) const
 Intersect the line with a triangle.

Constructors
 Line (void)
 Line (const Line &obj)
 Line (const Pnt3f &p0, const Pnt3f &p1)
 Line (const Pnt3f &pos, const Vec3f &dir)
Set
void setValue (const Pnt3f &p0, const Pnt3f &p1)
 Set that value!

void setValue (const Pnt3f &pos, const Vec3f &dir)
 Set that value!

Class Specific
bool getClosestPoints (const Line &line2, Pnt3f &ptOnThis, Pnt3f &ptOnLine2) const
 Find closest points between the two lines.

Pnt3f getClosestPoint (const Pnt3f &point) const
 Returns the closest point on the line to the given point.

Real32 distance (const Pnt3f &point) const
 Returns the distance of the given point to the line.

Get
const Pnt3fgetPosition (void) const
const Vec3fgetDirection (void) const

Private Attributes

Pnt3f _pos
Vec3f _dir

Detailed Description

Line.

A line starting at a point p and extending infinitely far into the direction d. This will probably split up into multiple classes for dual-inifinite and non- infinite lines


Constructor & Destructor Documentation

Line::Line void   
 

Line::Line const Line &    obj
 

Line::Line const Pnt3f   p0,
const Pnt3f   p1
 

Line::Line const Pnt3f   pos,
const Vec3f   dir
 


Member Function Documentation

void Line::setValue const Pnt3f   p0,
const Pnt3f   p1
 

Set that value!

void Line::setValue const Pnt3f   pos,
const Vec3f   dir
 

Set that value!

bool Line::getClosestPoints const Line &    line2,
Pnt3f   ptOnThis,
Pnt3f   ptOnLine2
const
 

Find closest points between the two lines.

Return false if they are parallel, otherwise return true.

Pnt3f Line::getClosestPoint const Pnt3f   point const
 

Returns the closest point on the line to the given point.

Real32 Line::distance const Pnt3f   point const
 

Returns the distance of the given point to the line.

OSG_BASE_DLLMAPPING const Pnt3f & osg::Line::getPosition void    const [inline]
 

Accessors for position

OSG_BASE_DLLMAPPING const Vec3f & osg::Line::getDirection void    const [inline]
 

Accessors for direction

bool Line::intersect const SphereVolume   sphere const
 

Intersect the Line with a Sphere.

bool Line::intersect const SphereVolume   sphere,
Real32   enter,
Real32   exit
const
 

Intersect the line with a sphere, returns points of intersection.

bool Line::intersect const CylinderVolume   cyl const
 

Intersect the line with a cylinder.

bool Line::intersect const CylinderVolume   cyl,
Real32   enter,
Real32   exit
const
 

Intersect the line with a cylinder, returns points of intersection based on GGems IV.

bool Line::intersect const FrustumVolume   frustum const
 

Intersect the line with a frustum.

bool Line::intersect const FrustumVolume   frustum,
Real32   enter,
Real32   exit
const
 

bool Line::intersect const BoxVolume   box,
Real32   enter,
Real32   exit
const
 

Intersect the line with a box, returns points of intersection.

bool Line::intersect Real32    angle,
const BoxVolume   box
const
 

Intersect the line with a box.

bool Line::intersect Real32    angle,
const Vec3f   point
const
 

Intersect the line with a point.

bool Line::intersect Real32    angle,
const Vec3f   v0,
const Vec3f   v1,
Vec3f   pt
const
 

Intersect the line with a line.

bool Line::intersect const Pnt3f   v0,
const Pnt3f   v1,
const Pnt3f   v2,
Real32   t,
Vec3f   norm = NULL
const
 

Intersect the line with a triangle.


Member Data Documentation

Pnt3f osg::Line::_pos [private]
 

Vec3f osg::Line::_dir [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Jul 3 16:23:37 2002 for OpenSG by doxygen1.2.16