Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File 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

Private Attributes

int bounds [2]


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


Constructor & Destructor Documentation

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

The constructor of the class create a


Member Function Documentation

void TxPoint::computeBounds  ) 
 

Get the bounds of this point

bool TxPoint::equals TxPoint p  ) 
 

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

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

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

void TxPoint::onMouseOut  ) 
 

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

void TxPoint::onMouseOver  ) 
 

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

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].

void TxPoint::render  ) 
 

Render the shape of the controlpoint.


Member Data Documentation

int TxPoint::bounds[2] [private]
 

The left and right bounding of a point. The Size of this bounding is determinened by the defined constant TX_POINT_RADIUS

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.

GLfloat TxPoint::position[2]
 

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

GLfloat TxPoint::rgba[4]
 

The color of the point including it alpha value.


The documentation for this class was generated from the following files:
Generated on Tue Jan 24 00:36:47 2006 for ZVis by  doxygen 1.4.1