Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

TxPoint Class Reference

#include <TxPoint.h>

List of all members.

Public Member Functions

bool operator< (const TxPoint &t)
 TxPoint (GLfloat x, GLfloat y, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
void computeBounds ()
bool hit (GLfloat x, GLfloat y)
void onMouseOver ()
void onMouseOut ()
void moveTo (GLfloat x, GLfloat y)
void render ()
bool equals (TxPoint *p)

Public Attributes

GLfloat rgba [4]
GLfloat position [2]
bool mouseOver


Detailed Description

This class defines the Points of the transfer function wich determine the opacity and the color of a density in the histogram. The user defines these points by mouse click on the histogram.

Version:
1.3

Definition at line 16 of file TxPoint.h.


Constructor & Destructor Documentation

TxPoint::TxPoint GLfloat  x,
GLfloat  y,
GLfloat  red,
GLfloat  green,
GLfloat  blue,
GLfloat  alpha
 

The constructor of the class create a

Definition at line 10 of file TxPoint.cpp.

References computeBounds(), mouseOver, position, and rgba.


Member Function Documentation

void TxPoint::computeBounds  ) 
 

Get the bounds of this point

Definition at line 22 of file TxPoint.cpp.

Referenced by moveTo(), and TxPoint().

bool TxPoint::equals TxPoint p  ) 
 

Returns true if all members of this point and the given point match

Definition at line 61 of file TxPoint.cpp.

bool TxPoint::hit GLfloat  x,
GLfloat  y
 

Test if the point catch a slap by x and y coords

Parameters:
x coodinate wich is tested against the bounds (i.e mouse.x)
y coordinate wich is tested against the bounds (i.e. mouse.y)
Returns:
true if the x and y is in the bounds

false if the x and y is outside the bounds

Definition at line 30 of file TxPoint.cpp.

void TxPoint::moveTo GLfloat  x,
GLfloat  y
 

Move the controlpoint to the given x and y coodinates.

Parameters:
x coodinate to move to
y coordinate to move to

Definition at line 54 of file TxPoint.cpp.

References computeBounds(), and position.

Referenced by TxFunction::moveControlPoint().

void TxPoint::onMouseOut  ) 
 

Call when the user moves the mouse cursor out of the point.

Definition at line 49 of file TxPoint.cpp.

References mouseOver.

void TxPoint::onMouseOver  ) 
 

Call when the user moves the mouse cursor over the point.

Definition at line 44 of file TxPoint.cpp.

References mouseOver.

bool TxPoint::operator< const TxPoint t  )  [inline]
 

The operator for comparing two controlpoints. The order of controlpoints is given with respect to their x coordinates -- wich is here position[0].

Definition at line 37 of file TxPoint.h.

References position.

void TxPoint::render  ) 
 

Render the shape of the controlpoint.

Definition at line 71 of file TxPoint.cpp.

References position.

Referenced by TxFunction::render().


Member Data Documentation

bool TxPoint::mouseOver
 

The mouse over state determines, wether the mouse cursor is over the point. In this case, the bounding box should be drawn.

Definition at line 32 of file TxPoint.h.

Referenced by onMouseOut(), onMouseOver(), and TxPoint().

GLfloat TxPoint::position[2]
 

The position wich is assumed to be the center of a point. The position responds to the density.

Definition at line 28 of file TxPoint.h.

Referenced by TxFunction::getLinearInterpolatedColor(), moveTo(), operator<(), render(), and TxPoint().

GLfloat TxPoint::rgba[4]
 

The color of the point including it alpha value.

Definition at line 24 of file TxPoint.h.

Referenced by TxFunction::getLinearInterpolatedColor(), ColorCubePanel::onMouseDown(), Histogram::onMouseDrag(), and TxPoint().


The documentation for this class was generated from the following files:
Generated on Mon Dec 12 15:20:26 2005 for CCube by  doxygen 1.4.1