Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Txq2dSeg Class Reference

Txq2dSeg is a finite piece of a curve or straight line which has two end points. More...

#include <Txq2dSeg.h>

Inheritance diagram for Txq2dSeg::

Txq2dDrawable TxqDrawable Txq2dLineSeg Txq2dSegmented Txq2dLine Txq2dVector Txq2dOutlined Txq2dPolygon Txq2dPolygonArray List of all members.

Public Methods

 Txq2dSeg ()
 The constructor is default. More...

virtual ~Txq2dSeg ()
 The destructor is default. More...

void paint (QPainter *p)
 The paint method does nothing but must be implemented. More...

void setStartPoint (TxqDoublePoint p)
 Set the starting point of the segment in the Txq2dCanvas' coordinate system. More...

TxqDoublePoint getStartPoint ()
 Returns the starting point of the segment in the canvas coordinate system. More...

void setEndPoint (TxqDoublePoint p)
 Set the ending point of the segment in the canvas coordinate system. More...

TxqDoublePoint getEndPoint ()
 Returns the ending point of the segment in the canvas coordinate system. More...

void setLocation (int x, int y)
 Overrided to make sure start and end points are translated with moves to new locations. More...


Protected Attributes

TxqDoublePoint startPoint
 The start point. More...

TxqDoublePoint endPoint
 The end point. More...


Detailed Description

Txq2dSeg is a finite piece of a curve or straight line which has two end points.

The coordinates of these two points are with respect to the container's coordinate system. The container is assumed to be a Txq2dCanvas. A Txq2dSeg also has the property that it can find the closest intersection point with a given directional line (i.e. an infinite ray starting at a specified point and having a specified slope).

Warning: A Txq2dSeg cannot be painted.

Copyright 2000 by Tech-X Corporation

Author:
Kelly G. Luetkemeyer

Version:
Id:
Txq2dSeg.h,v 1.5 2001/10/12 18:58:11 kgl Exp

Definition at line 42 of file Txq2dSeg.h.


Constructor & Destructor Documentation

Txq2dSeg::Txq2dSeg ( )
 

The constructor is default.

Txq2dSeg::~Txq2dSeg ( ) [inline, virtual]
 

The destructor is default.

Definition at line 54 of file Txq2dSeg.h.


Member Function Documentation

TxqDoublePoint Txq2dSeg::getEndPoint ( )
 

Returns the ending point of the segment in the canvas coordinate system.

TxqDoublePoint Txq2dSeg::getStartPoint ( )
 

Returns the starting point of the segment in the canvas coordinate system.

void Txq2dSeg::paint ( QPainter * g ) [inline, virtual]
 

The paint method does nothing but must be implemented.

Reimplemented from Txq2dDrawable.

Reimplemented in Txq2dLine, Txq2dLineSeg, Txq2dPolygon, Txq2dPolygonArray, Txq2dSegmented, and Txq2dVector.

Definition at line 59 of file Txq2dSeg.h.

void Txq2dSeg::setEndPoint ( TxqDoublePoint ep )
 

Set the ending point of the segment in the canvas coordinate system.

Parameters:
p   the TxqDoublePoint to set

Reimplemented in Txq2dLineSeg.

void Txq2dSeg::setLocation ( int x,
int y ) [virtual]
 

Overrided to make sure start and end points are translated with moves to new locations.

Reimplemented from TxqDrawable.

void Txq2dSeg::setStartPoint ( TxqDoublePoint sp )
 

Set the starting point of the segment in the Txq2dCanvas' coordinate system.

Parameters:
p   the TxqDoublePoint to set as a starting point.

Reimplemented in Txq2dLineSeg.


Member Data Documentation

TxqDoublePoint Txq2dSeg::endPoint [protected]
 

The end point.

Definition at line 104 of file Txq2dSeg.h.

TxqDoublePoint Txq2dSeg::startPoint [protected]
 

The start point.

Definition at line 99 of file Txq2dSeg.h.


The documentation for this class was generated from the following file: Copyright Tech-X Corporation, all rights reserved.