TuttleOFX  1
dpx::Block Struct Reference

Rectangle block definition defined by two points. More...

#include <DPX.h>

Public Member Functions

 Block ()
 Constructor.
 Block (const int x1, const int y1, const int x2, const int y2)
 Constructor.
void Set (const int x1, const int y1, const int x2, const int y2)
 Set the block coordinates.
bool Inside (const int x, const int y) const
 Check to see if a point is within the block.
void Check ()
 Rearrange coordinates if necessary so the first coordinate is upper left and the second is lower right.

Data Fields

int x1
int y1
int x2
int y2

Detailed Description

Rectangle block definition defined by two points.

Definition at line 80 of file DPX.h.


Constructor & Destructor Documentation

dpx::Block::Block ( ) [inline]

Constructor.

Definition at line 467 of file DPX.h.

dpx::Block::Block ( const int  x1,
const int  y1,
const int  x2,
const int  y2 
) [inline]

Constructor.

Parameters:
x1upper left x coordinate
y1upper left y coordinate
x2lower right x coordinate
y2lower right y coordinate

Definition at line 472 of file DPX.h.

References Check().

Here is the call graph for this function:


Member Function Documentation

void dpx::Block::Check ( ) [inline]

Rearrange coordinates if necessary so the first coordinate is upper left and the second is lower right.

Definition at line 488 of file DPX.h.

Referenced by Block(), and dpx::Reader::ReadBlock().

bool dpx::Block::Inside ( const int  x,
const int  y 
) const [inline]

Check to see if a point is within the block.

Parameters:
xx coordinate
yy coordinate
Returns:
true/false if coordinates within block

Definition at line 505 of file DPX.h.

void dpx::Block::Set ( const int  x1,
const int  y1,
const int  x2,
const int  y2 
) [inline]

Set the block coordinates.

Parameters:
x1upper left x coordinate
y1upper left y coordinate
x2lower right x coordinate
y2lower right y coordinate

Definition at line 478 of file DPX.h.


Field Documentation


The documentation for this struct was generated from the following file: