ReactOS  0.4.12-dev-90-g2e2e63e
dataTransform.h File Reference
#include "reader.h"
#include "directedLine.h"
#include "bin.h"
Include dependency graph for dataTransform.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

directedLinebin_to_DLineLoops (Bin &bin)
 
directedLineo_pwlcurve_to_DLines (directedLine *original, O_pwlcurve *pwl)
 
directedLineo_curve_to_DLineLoop (O_curve *curve)
 
directedLineo_trim_to_DLineLoops (O_trim *trim)
 

Function Documentation

◆ bin_to_DLineLoops()

directedLine* bin_to_DLineLoops ( Bin bin)

Definition at line 144 of file dataTransform.cc.

Referenced by Subdivider::drawSurfaces().

145 {
148  bin.markall();
149  for(Arc_ptr jarc=bin.firstarc(); jarc; jarc=bin.nextarc()){
150  if(jarc->ismarked()) {
151  assert(jarc->check() != 0);
152  Arc_ptr jarchead = jarc;
153  do {
154  jarc->clearmark();
155  jarc = jarc->next;
156  } while(jarc != jarchead);
157  temp = arcLoopToDLineLoop(jarc);
158  ret = temp->insertPolygon(ret);
159  }
160  }
161  return ret;
162 }
directedLine * arcLoopToDLineLoop(Arc_ptr loop)
Definition: slicer.cc:948
#define assert(x)
Definition: debug.h:53
void markall(void)
Definition: bin.cc:139
Arc_ptr nextarc(void)
Definition: bin.h:97
directedLine * insertPolygon(directedLine *newpolygon)
smooth NULL
Definition: ftsmooth.c:416
int ret
static stack_node_t temp
Definition: rpn.c:18
class Arc * Arc_ptr
Definition: arc.h:50
struct define * next
Definition: wpp.c:35
Arc_ptr firstarc(void)
Definition: bin.h:115

◆ o_curve_to_DLineLoop()

directedLine* o_curve_to_DLineLoop ( O_curve curve)

Definition at line 181 of file dataTransform.cc.

Referenced by o_trim_to_DLineLoops().

182 {
183  directedLine *ret;
184  if(cur == NULL)
185  return NULL;
186  assert(cur->curvetype == ct_pwlcurve);
187  ret = o_pwlcurve_to_DLines(NULL, cur->curve.o_pwlcurve);
188  for(O_curve* temp = cur->next; temp != NULL; temp = temp->next)
189  {
190  assert(temp->curvetype == ct_pwlcurve);
191  ret = o_pwlcurve_to_DLines(ret, temp->curve.o_pwlcurve);
192  }
193  return ret;
194 }
directedLine * o_pwlcurve_to_DLines(directedLine *original, O_pwlcurve *pwl)
#define assert(x)
Definition: debug.h:53
Definition: reader.h:55
smooth NULL
Definition: ftsmooth.c:416
int ret
static stack_node_t temp
Definition: rpn.c:18
void * next
Definition: rpn.c:5

◆ o_pwlcurve_to_DLines()

directedLine* o_pwlcurve_to_DLines ( directedLine original,
O_pwlcurve pwl 
)

Definition at line 164 of file dataTransform.cc.

Referenced by o_curve_to_DLineLoop().

165 {
166  directedLine* ret = original;
167  for(Int i=0; i<pwl->npts-1; i++)
168  {
169  sampledLine* sline = new sampledLine(2);
170  sline->setPoint(0, pwl->pts[i].param);
171  sline->setPoint(1, pwl->pts[i+1].param);
172  directedLine* dline = new directedLine(INCREASING, sline);
173  if(ret == NULL)
174  ret = dline;
175  else
176  ret->insert(dline);
177  }
178  return ret;
179 }
GLenum GLclampf GLint i
Definition: glfuncs.h:14
int npts
Definition: reader.h:86
smooth NULL
Definition: ftsmooth.c:416
TrimVertex * pts
Definition: reader.h:85
int ret
void setPoint(Int i, Real p[2])
Definition: sampledLine.cc:45
REAL param[2]
Definition: trimvertex.h:45
void insert(directedLine *nl)
int Int
Definition: definitions.h:37

◆ o_trim_to_DLineLoops()

directedLine* o_trim_to_DLineLoops ( O_trim trim)

Definition at line 196 of file dataTransform.cc.

197 {
198  O_trim* temp;
199  directedLine *ret;
200  if(trim == NULL)
201  return NULL;
202  ret = o_curve_to_DLineLoop(trim->o_curve);
203 
204  for(temp=trim->next; temp != NULL; temp = temp->next)
205  {
206  ret = ret->insertPolygon(o_curve_to_DLineLoop(temp->o_curve));
207  }
208  return ret;
209 }
directedLine * o_curve_to_DLineLoop(O_curve *cur)
directedLine * insertPolygon(directedLine *newpolygon)
smooth NULL
Definition: ftsmooth.c:416
O_curve * o_curve
Definition: reader.h:95
Definition: reader.h:94
int ret
static stack_node_t temp
Definition: rpn.c:18
O_trim * next
Definition: reader.h:96