Logo ROOT   6.12/07
Reference Guide
Macros | Typedefs | Functions
TASPolyUtils.c File Reference
#include "TPoint.h"
Include dependency graph for TASPolyUtils.c:
This graph shows which files directly or indirectly include this file:

Macros

#define BRESINCRPGON(d, minval, m, m1, incr1, incr2)
 
#define BRESINCRPGONSTRUCT(bres)   BRESINCRPGON(bres.d, bres.minor_axis, bres.m, bres.m1, bres.incr1, bres.incr2)
 
#define BRESINITPGON(dy, x1, x2, xStart, d, m, m1, incr1, incr2)
 
#define BRESINITPGONSTRUCT(dmaj, min1, min2, bres)
 
#define CLOCKWISE   1
 
#define COUNTERCLOCKWISE   -1
 
#define EVALUATEEDGEEVENODD(pAET, pPrevAET, y)
 
#define EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET)
 
#define LARGE_COORDINATE   1000000
 
#define SLLSPERBLOCK   25
 
#define SMALL_COORDINATE   -LARGE_COORDINATE
 

Typedefs

typedef struct _EdgeTableEntry EdgeTableEntry
 
typedef struct _ScanLineList ScanLineList
 
typedef struct _ScanLineListBlock ScanLineListBlock
 

Functions

static void CreateETandAET (int count, TPoint *pts, EdgeTable *ET, EdgeTableEntry *AET, EdgeTableEntry *pETEs, ScanLineListBlock *pSLLBlock)
 
static void FreeStorage (ScanLineListBlock *pSLLBlock)
 
static void InsertEdgeInET (EdgeTable *ET, EdgeTableEntry *ETE, int scanline, ScanLineListBlock **SLLBlock, int *iSLLBlock)
 
static int InsertionSort (EdgeTableEntry *AET)
 
static void loadAET (EdgeTableEntry *AET, EdgeTableEntry *ETEs)
 

Macro Definition Documentation

◆ BRESINCRPGON

#define BRESINCRPGON (   d,
  minval,
  m,
  m1,
  incr1,
  incr2 
)
Value:
{ \
if (m1 > 0) { \
if (d > 0) { \
minval += m1; \
d += incr1; \
} \
else { \
minval += m; \
d += incr2; \
} \
} else {\
if (d >= 0) { \
minval += m1; \
d += incr1; \
} \
else { \
minval += m; \
d += incr2; \
} \
} \
}
auto * m
Definition: textangle.C:8

Definition at line 115 of file TASPolyUtils.c.

◆ BRESINCRPGONSTRUCT

#define BRESINCRPGONSTRUCT (   bres)    BRESINCRPGON(bres.d, bres.minor_axis, bres.m, bres.m1, bres.incr1, bres.incr2)

Definition at line 157 of file TASPolyUtils.c.

◆ BRESINITPGON

#define BRESINITPGON (   dy,
  x1,
  x2,
  xStart,
  d,
  m,
  m1,
  incr1,
  incr2 
)
Value:
{ \
int dx;\
\
if ((dy) != 0) { \
xStart = (x1); \
dx = (x2) - xStart; \
if (dx < 0) { \
m = dx / (dy); \
m1 = m - 1; \
incr1 = -2 * dx + 2 * (dy) * m1; \
incr2 = -2 * dx + 2 * (dy) * m; \
d = 2 * m * (dy) - 2 * dx - 2 * (dy); \
} else { \
m = dx / (dy); \
m1 = m + 1; \
incr1 = 2 * dx - 2 * (dy) * m1; \
incr2 = 2 * dx - 2 * (dy) * m; \
d = -2 * m * (dy) + 2 * dx; \
} \
} \
}
auto * m
Definition: textangle.C:8
static const double x2[5]
static const double x1[5]

Definition at line 93 of file TASPolyUtils.c.

◆ BRESINITPGONSTRUCT

#define BRESINITPGONSTRUCT (   dmaj,
  min1,
  min2,
  bres 
)
Value:
BRESINITPGON(dmaj, min1, min2, bres.minor_axis, bres.d, \
bres.m, bres.m1, bres.incr1, bres.incr2)
#define BRESINITPGON(dy, x1, x2, xStart, d, m, m1, incr1, incr2)
Definition: TASPolyUtils.c:93

Definition at line 153 of file TASPolyUtils.c.

◆ CLOCKWISE

#define CLOCKWISE   1

Definition at line 210 of file TASPolyUtils.c.

◆ COUNTERCLOCKWISE

#define COUNTERCLOCKWISE   -1

Definition at line 211 of file TASPolyUtils.c.

◆ EVALUATEEDGEEVENODD

#define EVALUATEEDGEEVENODD (   pAET,
  pPrevAET,
  y 
)
Value:
{ \
if (pAET->ymax == y) { /* leaving this edge */ \
pPrevAET->next = pAET->next; \
pAET = pPrevAET->next; \
if (pAET) \
pAET->back = pPrevAET; \
} \
else { \
BRESINCRPGONSTRUCT(pAET->bres); \
pPrevAET = pAET; \
pAET = pAET->next; \
} \
}
Double_t y[n]
Definition: legend1.C:17

Definition at line 287 of file TASPolyUtils.c.

◆ EVALUATEEDGEWINDING

#define EVALUATEEDGEWINDING (   pAET,
  pPrevAET,
  y,
  fixWAET 
)
Value:
{ \
if (pAET->ymax == y) { /* leaving this edge */ \
pPrevAET->next = pAET->next; \
pAET = pPrevAET->next; \
fixWAET = 1; \
if (pAET) \
pAET->back = pPrevAET; \
} \
else { \
BRESINCRPGONSTRUCT(pAET->bres); \
pPrevAET = pAET; \
pAET = pAET->next; \
} \
}
Double_t y[n]
Definition: legend1.C:17

Definition at line 264 of file TASPolyUtils.c.

◆ LARGE_COORDINATE

#define LARGE_COORDINATE   1000000

Definition at line 301 of file TASPolyUtils.c.

◆ SLLSPERBLOCK

#define SLLSPERBLOCK   25

Definition at line 242 of file TASPolyUtils.c.

◆ SMALL_COORDINATE

#define SMALL_COORDINATE   -LARGE_COORDINATE

Definition at line 302 of file TASPolyUtils.c.

Typedef Documentation

◆ EdgeTableEntry

typedef struct _EdgeTableEntry EdgeTableEntry

◆ ScanLineList

typedef struct _ScanLineList ScanLineList

◆ ScanLineListBlock

typedef struct _ScanLineListBlock ScanLineListBlock

Function Documentation

◆ CreateETandAET()

static void CreateETandAET ( int  count,
TPoint pts,
EdgeTable *  ET,
EdgeTableEntry AET,
EdgeTableEntry pETEs,
ScanLineListBlock pSLLBlock 
)
static

Definition at line 365 of file TASPolyUtils.c.

◆ FreeStorage()

static void FreeStorage ( ScanLineListBlock pSLLBlock)
static

Definition at line 524 of file TASPolyUtils.c.

◆ InsertEdgeInET()

static void InsertEdgeInET ( EdgeTable *  ET,
EdgeTableEntry ETE,
int  scanline,
ScanLineListBlock **  SLLBlock,
int *  iSLLBlock 
)
static

Definition at line 305 of file TASPolyUtils.c.

◆ InsertionSort()

static int InsertionSort ( EdgeTableEntry AET)
static

Definition at line 485 of file TASPolyUtils.c.

◆ loadAET()

static void loadAET ( EdgeTableEntry AET,
EdgeTableEntry ETEs 
)
static

Definition at line 455 of file TASPolyUtils.c.