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

xymath.h File Reference

#include <math.h>
#include "xybool.h"

Include dependency graph for xymath.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define MIN(a, b)   ((a) < (b) ? (a) : (b))
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
#define MIN3(a, b, c)   ((a) < (b) ? MIN(a, c) : MIN(b, c))
#define MAX3(a, b, c)   ((a) > (b) ? MAX(a, c) : MAX(b, c))

Functions

double mtTolerance (double v)
xybool mtEqual (double v1, double v2)
xybool mtEqual (double v1, double v2, double tol)
xybool mtLessEqual (double v1, double v2)
double mtDistance (double x0, double y0, double x1, double y1)
double mtDistance (int x0, int y0, int x1, int y1)
void mtRotate (double xi, double yi, double angle, double *xr, double *yr)
void mtRotate (int xi, int yi, double angle, int *xr, int *yr)
xybool mtIntercept (double xmin1, double ymin1, double xmax1, double ymax1, double xmin2, double ymin2, double xmax2, double ymax2)
xybool mtIntercept (int xmin1, int ymin1, int xmax1, int ymax1, int xmin2, int ymin2, int xmax2, int ymax2)
xybool mtInclude (double xmin1, double ymin1, double xmax1, double ymax1, double xmin2, double ymin2, double xmax2, double ymax2)
xybool mtInclude (int xmin1, int ymin1, int xmax1, int ymax1, int xmin2, int ymin2, int xmax2, int ymax2)
xybool mtPointInRect (int px, int py, int x1, int y1, int x2, int y2)
xybool mtPointInRect (double px, double py, double x1, double y1, double x2, double y2)
xybool mtPointInLine (double px, double py, double x1, double y1, double x2, double y2)
xybool mtPointInLineEx (double px, double py, double x1, double y1, double x2, double y2)
xybool mtPointInMark (int px, int py, int x1, int y1, int tol)
xybool mtPointInCircle (int px, int py, int x0, int y0, int x1, int y1)
xybool mtPointInsideCircle (int px, int py, int cx, int cy, int radius)
int mtDecade (double val)

Variables

const double XY_PI = 3.14159265359


Define Documentation

#define MAX a,
     ((a) > (b) ? (a) : (b))
 

Definition at line 17 of file xymath.h.

Referenced by XYCartesianSlice::boundingBox(), XYRadialGrid::boundingBox(), XYPolarMarkMask::boundingBox(), XYPolarLineMask::boundingBox(), XYCartesianMarker::boundingBox(), XYCartesianStepMask::boundingBox(), XYCartesianMarkMask::boundingBox(), XYCartesianLineMask::boundingBox(), XYCartesianBarMask::boundingBox(), XYCartesianAreaMask::boundingBox(), XYGrid::boundingBox(), XYPolarAxis::boundingBox(), XYLinearAxis::boundingBox(), XYLogAxis::boundingBox(), XYAngGrid::boundingBox(), XYCartesianSlice::draw(), XYCartesianMarker::draw(), and XYCartesianArea::getClip().

#define MAX3 a,
b,
     ((a) > (b) ? MAX(a, c) : MAX(b, c))
 

Definition at line 23 of file xymath.h.

Referenced by XYStringScaleDecorator::boundingBox(), XYNumericalScaleDecorator::boundingBox(), XYLogScaleDecorator::boundingBox(), XYDateScaleDecorator::boundingBox(), XYCartesianBarMask::boundingBox(), XYGrid::boundingBox(), XYPolarAxis::boundingBox(), XYLinearAxis::boundingBox(), and XYLogAxis::boundingBox().

#define MIN a,
     ((a) < (b) ? (a) : (b))
 

Definition at line 13 of file xymath.h.

Referenced by XYCartesianSlice::boundingBox(), XYRadialGrid::boundingBox(), XYPolarMarkMask::boundingBox(), XYPolarLineMask::boundingBox(), XYCartesianMarker::boundingBox(), XYCartesianStepMask::boundingBox(), XYCartesianMarkMask::boundingBox(), XYCartesianLineMask::boundingBox(), XYCartesianBarMask::boundingBox(), XYCartesianAreaMask::boundingBox(), XYGrid::boundingBox(), XYPolarAxis::boundingBox(), XYLinearAxis::boundingBox(), XYLogAxis::boundingBox(), XYAngGrid::boundingBox(), XYCartesianSlice::draw(), XYCartesianMarker::draw(), XYCartesianArea::getClip(), XYArea::XYArea(), and XYSlice::XYSlice().

#define MIN3 a,
b,
     ((a) < (b) ? MIN(a, c) : MIN(b, c))
 

Definition at line 21 of file xymath.h.

Referenced by XYStringScaleDecorator::boundingBox(), XYNumericalScaleDecorator::boundingBox(), XYLogScaleDecorator::boundingBox(), XYDateScaleDecorator::boundingBox(), XYCartesianBarMask::boundingBox(), XYGrid::boundingBox(), XYPolarAxis::boundingBox(), XYLinearAxis::boundingBox(), and XYLogAxis::boundingBox().


Function Documentation

int mtDecade double    val
 

Definition at line 13 of file xymath.cpp.

Referenced by XYLogScaleDecorator::draw(), XYGridLog::draw(), and XYLogAxis::draw().

double mtDistance int    x0,
int    y0,
int    x1,
int    y1
 

Definition at line 57 of file xymath.cpp.

Referenced by XYAxis::adjustSize(), XYAxis::boxArrow(), XYAxis::drawArrow(), mtPointInCircle(), mtPointInLineEx(), mtPointInsideCircle(), XYAngGrid::pointInGrid(), and XYGrid::worldSize2PixelSize().

double mtDistance double    x0,
double    y0,
double    x1,
double    y1
 

Definition at line 51 of file xymath.cpp.

xybool mtEqual double    v1,
double    v2,
double    tol
 

Definition at line 33 of file xymath.cpp.

References xybool.

Referenced by XYCartesianLineMask::boundingBox(), XYCartesianAreaMask::boundingBox(), XYPolarAxis::boundingBox(), XYLinearAxis::boundingBox(), XYLogAxis::boundingBox(), XYLinearAxis::defineMaxPoint(), XYLinearAxis::defineMinPoint(), XYGridLog::draw(), XYGrid::draw(), XYPolarAxis::draw(), XYLinearAxis::draw(), XYLogAxis::draw(), XYGraph::drawMaskArea(), XYPolarAxis::firstTick(), XYAxis::firstTick(), mtLessEqual(), mtPointInCircle(), mtPointInLine(), mtPointInLineEx(), XYGrid::pick(), XYAngGrid::pointInGrid(), and XYLinearAxis::valueInPoint().

xybool mtEqual double    v1,
double    v2
 

Definition at line 27 of file xymath.cpp.

References Tol, and xybool.

xybool mtInclude int    xmin1,
int    ymin1,
int    xmax1,
int    ymax1,
int    xmin2,
int    ymin2,
int    xmax2,
int    ymax2
 

Definition at line 110 of file xymath.cpp.

References xybool, xyfalse, and xytrue.

Referenced by XYText::fence(), XYCartesianSlice::fence(), XYPolarMarkMask::fence(), XYPolarLineMask::fence(), XYCartesianMarker::fence(), XYCartesianStepMask::fence(), XYCartesianMarkMask::fence(), XYCartesianLineMask::fence(), XYCartesianBarMask::fence(), XYCartesianAreaMask::fence(), XYLegend::fence(), XYAxis::fence(), and XYCartesianArea::fence().

xybool mtInclude double    xmin1,
double    ymin1,
double    xmax1,
double    ymax1,
double    xmin2,
double    ymin2,
double    xmax2,
double    ymax2
 

Definition at line 99 of file xymath.cpp.

References xybool, xyfalse, and xytrue.

xybool mtIntercept int    xmin1,
int    ymin1,
int    xmax1,
int    ymax1,
int    xmin2,
int    ymin2,
int    xmax2,
int    ymax2
 

Definition at line 88 of file xymath.cpp.

References xybool.

Referenced by XYStringScaleDecorator::boundingBox(), XYNumericalScaleDecorator::boundingBox(), XYLogScaleDecorator::boundingBox(), XYDateScaleDecorator::boundingBox(), XYStringScaleDecorator::draw(), XYNumericalScaleDecorator::draw(), XYLogScaleDecorator::draw(), and XYDateScaleDecorator::draw().

xybool mtIntercept double    xmin1,
double    ymin1,
double    xmax1,
double    ymax1,
double    xmin2,
double    ymin2,
double    xmax2,
double    ymax2
 

Definition at line 77 of file xymath.cpp.

References xybool.

xybool mtLessEqual double    v1,
double    v2
 

Definition at line 45 of file xymath.cpp.

References mtEqual(), and xybool.

Referenced by XYNumericalScaleDecorator::draw(), XYDateScaleDecorator::draw(), XYGrid::draw(), and XYAxis::first().

xybool mtPointInCircle int    px,
int    py,
int    x0,
int    y0,
int    x1,
int    y1
 

Definition at line 232 of file xymath.cpp.

References mtDistance(), mtEqual(), xybool, xyfalse, and xytrue.

Referenced by XYRadialGrid::pick().

xybool mtPointInLine double    px,
double    py,
double    x1,
double    y1,
double    x2,
double    y2
 

Definition at line 134 of file xymath.cpp.

References mtEqual(), xybool, and xyfalse.

Referenced by XYCartesianStepMarkMask::pick(), and XYCartesianStepMask::pick().

xybool mtPointInLineEx double    px,
double    py,
double    x1,
double    y1,
double    x2,
double    y2
 

Definition at line 176 of file xymath.cpp.

References mtDistance(), mtEqual(), xybool, xyfalse, and xytrue.

Referenced by XYPolarLineMask::pick(), XYCartesianLineMarkMask::pick(), and XYCartesianLineMask::pick().

xybool mtPointInMark int    px,
int    py,
int    x1,
int    y1,
int    tol
 

Definition at line 205 of file xymath.cpp.

References xybool, xyfalse, and xytrue.

Referenced by XYCartesianMarkMask::pick(), and XYCartesianLineMarkMask::pick().

xybool mtPointInRect double    px,
double    py,
double    x1,
double    y1,
double    x2,
double    y2
 

Definition at line 127 of file xymath.cpp.

References xybool.

Referenced by XYPolarAxis::draw(), XYLinearAxis::draw(), XYText::pick(), XYCartesianSlice::pick(), XYCartesianMarker::pick(), XYCartesianBarMask::pick(), XYLegend::pick(), XYAxis::pick(), XYCartesianArea::pick(), and XYLegend::pickItem().

xybool mtPointInRect int    px,
int    py,
int    x1,
int    y1,
int    x2,
int    y2
 

Definition at line 121 of file xymath.cpp.

References xybool.

xybool mtPointInsideCircle int    px,
int    py,
int    cx,
int    cy,
int    radius
 

Definition at line 221 of file xymath.cpp.

References mtDistance(), xybool, xyfalse, and xytrue.

Referenced by mtPointInLineEx().

void mtRotate int    xi,
int    yi,
double    angle,
int *    xr,
int *    yr
 

Definition at line 70 of file xymath.cpp.

Referenced by XYAxis::adjustSize(), XYStringScaleDecorator::boundingBox(), XYNumericalScaleDecorator::boundingBox(), XYLogScaleDecorator::boundingBox(), XYDateScaleDecorator::boundingBox(), XYGrid::boundingBox(), XYStringScaleDecorator::draw(), XYNumericalScaleDecorator::draw(), XYLogScaleDecorator::draw(), XYDateScaleDecorator::draw(), XYGridLog::draw(), XYGrid::draw(), XYPolarAxis::draw(), XYLinearAxis::draw(), XYLogAxis::draw(), XYPolarAxis::firstTick(), XYAxis::firstTick(), XYGrid::pick(), and XYGrid::worldSize2PixelSize().

void mtRotate double    xi,
double    yi,
double    angle,
double *    xr,
double *    yr
 

Definition at line 63 of file xymath.cpp.

double mtTolerance double    v
 

Definition at line 19 of file xymath.cpp.

References Tol.

Referenced by XYPolarMarkMask::pick(), XYPolarLineMask::pick(), XYCartesianStepMarkMask::pick(), XYCartesianStepMask::pick(), XYCartesianLineMarkMask::pick(), XYCartesianLineMask::pick(), and XYCartesianAreaMask::pick().


Variable Documentation

const double XY_PI = 3.14159265359
 

Definition at line 25 of file xymath.h.

Referenced by XYAxis::adjustSize(), XYStringScaleDecorator::boundingBox(), XYNumericalScaleDecorator::boundingBox(), XYLogScaleDecorator::boundingBox(), XYDateScaleDecorator::boundingBox(), XYCartesianMarker::boundingBox(), XYGrid::boundingBox(), XYPolarAxis::boundingBox(), XYLinearAxis::boundingBox(), XYLogAxis::boundingBox(), XYLinearAxis::defineMaxPoint(), XYLogAxis::defineMaxPoint(), XYLinearAxis::defineMinPoint(), XYLogAxis::defineMinPoint(), XYStringScaleDecorator::draw(), XYNumericalScaleDecorator::draw(), XYLogScaleDecorator::draw(), XYDateScaleDecorator::draw(), XYCartesianMarker::draw(), XYGridLog::draw(), XYGrid::draw(), XYPolarAxis::draw(), XYLinearAxis::draw(), XYLogAxis::draw(), XYGraph::drawMaskArea(), XYPolarAxis::firstTick(), XYAxis::firstTick(), XYGrid::pick(), XYLinearAxis::pointInValue(), XYLogAxis::pointInValue(), XYLinearAxis::valueInPoint(), XYLogAxis::valueInPoint(), and XYGrid::worldSize2PixelSize().


XY
Tecgraf / PUC-Rio - Computer Graphics Technology Group