ReactOS 0.4.16-dev-122-g325d74c
dataTransform.cc File Reference
#include "dataTransform.h"
Include dependency graph for dataTransform.cc:

Go to the source code of this file.

Functions

directedLinearcLoopToDLineLoop (Arc_ptr loop)
 
directedLinebin_to_DLineLoops (Bin &bin)
 
directedLineo_pwlcurve_to_DLines (directedLine *original, O_pwlcurve *pwl)
 
directedLineo_curve_to_DLineLoop (O_curve *cur)
 
directedLineo_trim_to_DLineLoops (O_trim *trim)
 

Function Documentation

◆ arcLoopToDLineLoop()

directedLine * arcLoopToDLineLoop ( Arc_ptr  loop)

Definition at line 948 of file slicer.cc.

949{
951
952 if(loop == NULL)
953 return NULL;
954 ret = arcToMultDLines(NULL, loop);
955//ret->printSingle();
956 for(Arc_ptr temp = loop->next; temp != loop; temp = temp->next){
958//ret->printSingle();
959 }
960
961 return ret;
962}
#define NULL
Definition: types.h:112
class Arc * Arc_ptr
Definition: arc.h:50
static calc_node_t temp
Definition: rpn_ieee.c:38
directedLine * arcToMultDLines(directedLine *original, Arc_ptr arc)
Definition: slicer.cc:907
int ret

Referenced by bin_to_DLineLoops(), and Slicer::slice_new().

◆ bin_to_DLineLoops()

directedLine * bin_to_DLineLoops ( Bin bin)

Definition at line 144 of file dataTransform.cc.

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
static struct _PeImage bin

Referenced by Subdivider::drawSurfaces().

◆ o_curve_to_DLineLoop()

directedLine * o_curve_to_DLineLoop ( O_curve cur)

Definition at line 181 of file dataTransform.cc.

182{
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)
@ ct_pwlcurve
Definition: reader.h:42
FxCollectionEntry * cur
Definition: reader.h:55

Referenced by o_trim_to_DLineLoops().

◆ o_pwlcurve_to_DLines()

directedLine * o_pwlcurve_to_DLines ( directedLine original,
O_pwlcurve pwl 
)

Definition at line 164 of file dataTransform.cc.

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}
int npts
Definition: reader.h:86
TrimVertex * pts
Definition: reader.h:85
REAL param[2]
Definition: trimvertex.h:45
void setPoint(Int i, Real p[2])
Definition: sampledLine.cc:45
int Int
Definition: definitions.h:37
@ INCREASING
Definition: directedLine.h:39
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248

Referenced by o_curve_to_DLineLoop().

◆ 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;
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)
char * trim(char *str, char **last_chr, BOOL strip_quotes)
Definition: inf.c:258
Definition: reader.h:94