Main Page | Class Hierarchy | Class List | Class Members

OrientedLineSegment Class Reference

List of all members.

Public Member Functions

int read (FILE *fp)
float getWeight (const int &x, const int &y) const
float length (void) const
float distance (const int &x, const int &y) const
void getPerpendicular (float &x, float &y) const

Static Public Member Functions

static void Blend (const OrientedLineSegment &segment1, const OrientedLineSegment &segment2, const float &blendWeight, OrientedLineSegment &outSegment)
static void GetSourcePosition (const OrientedLineSegment &source, const OrientedLineSegment &destination, const int &destinationX, const int &destinationY, float &sourceX, float &sourceY)

Public Attributes

int x1
int y1
int x2
int y2

Static Public Attributes

static const float A = 1
static const float B = 1
static const float P = 1

Detailed Description

This class represents an oriented line segment.


Member Function Documentation

void OrientedLineSegment::Blend const OrientedLineSegment segment1,
const OrientedLineSegment segment2,
const float &  blendWeight,
OrientedLineSegment outSegment
[static]
 

This static method blends between two sets line segments, using the value of blendWeight to specify the the ratio of the blend, and writes out the blended line segment into outSegment.

float OrientedLineSegment::distance const int &  x,
const int &  y
const
 

This method returns the (signed) distance of a point from the line segment/

void OrientedLineSegment::getPerpendicular float &  x,
float &  y
const
 

This method sets the values (x,y) to the coordinates of the unit-vector perpendicular to the direction of the line segment.

void OrientedLineSegment::GetSourcePosition const OrientedLineSegment source,
const OrientedLineSegment destination,
const int &  destinationX,
const int &  destinationY,
float &  sourceX,
float &  sourceY
[static]
 

This static method sets the value of the source pixel position (sourceX,sourceY), given the destination pixel position and a pair of corresponding source and destination line segments/

float OrientedLineSegment::getWeight const int &  x,
const int &  y
const
 

Given a point at position (x,y), this method returns the weight of the line segment's contribution to the point.

float OrientedLineSegment::length void   )  const
 

This method returns the length of the line segment.

int OrientedLineSegment::read FILE *  fp  ) 
 

This method reads in a line segment from a file.


Member Data Documentation

const float OrientedLineSegment::A = 1 [static]
 

The constants that define the weight of the contribution of a line segment to a particular point.

const float OrientedLineSegment::B = 1 [static]
 

The constants that define the weight of the contribution of a line segment to a particular point.

const float OrientedLineSegment::P = 1 [static]
 

The constants that define the weight of the contribution of a line segment to a particular point.

int OrientedLineSegment::x1
 

The coordinates of the end-points of the line segment.

int OrientedLineSegment::x2
 

The coordinates of the end-points of the line segment.

int OrientedLineSegment::y1
 

The coordinates of the end-points of the line segment.

int OrientedLineSegment::y2
 

The coordinates of the end-points of the line segment.


Generated on Wed Feb 22 15:44:23 2006 for Assignment 2 by  doxygen 1.4.1