cugl::Line Class Reference

#include <cugl.h>

Collaboration diagram for cugl::Line:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Line (Point &p, Point &q)
 Line (Point &p, Vector &v)
void draw () const

Private Attributes

Point s
Point f

Friends

class Plane
Point meet (Line &k, Plane &p)
bool operator== (const Line &x, const Line &y)
bool operator!= (const Line &x, const Line &y)
std::ostream & operator<< (std::ostream &os, Line &k)

Detailed Description

An instance is a line defined by two Points. Lines are occasionally useful. For example, it is simple to display surface normals using this class. A Line is represented by the two Points which are its end-points.

Definition at line 357 of file cugl.h.


Constructor & Destructor Documentation

cugl::Line::Line ( Point p,
Point q 
) [inline]

Construct the Line from Point p to Point q.

Definition at line 2506 of file cugl.h.

cugl::Line::Line ( Point p,
Vector v 
) [inline]

Construct the Line from Point p to Point p+v.

Definition at line 2510 of file cugl.h.


Member Function Documentation

void cugl::Line::draw (  )  const

Draw the line using glBegin(GL_LINE) ....


Friends And Related Function Documentation

Point meet ( Line k,
Plane p 
) [friend]

Find the point where this line meets the plane p.

bool operator== ( const Line x,
const Line y 
) [friend]

Compare two lines. This function returns true only if corresponding components are exactly equal. Values that are theoretically equal but computed in different ways are likely to be unequal according to this function.

Definition at line 2517 of file cugl.h.

bool operator!= ( const Line x,
const Line y 
) [friend]

Compare two lines. This function returns false only if corresponding components are exactly equal. Values that are theoretically equal but computed in different ways are likely to be unequal according to this function.

Definition at line 2522 of file cugl.h.

std::ostream& operator<< ( std::ostream &  os,
Line k 
) [friend]

Write a representation of the line to the output stream. The format is pt->pt where "\a pt" is the format used for points. If setw is used to set the width, it is passed to the inserter for Point.


Member Data Documentation

Point cugl::Line::s [private]

Start point of line.

Definition at line 409 of file cugl.h.

Referenced by cugl::operator==().

Point cugl::Line::f [private]

Finish point of line.

Definition at line 412 of file cugl.h.

Referenced by cugl::operator==().


The documentation for this class was generated from the following file:
Generated on Wed Sep 12 14:31:42 2007 for CUGL by  doxygen 1.5.2