Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenarc.h
Go to the documentation of this file.
00001 /* 00002 ** License Applicability. Except to the extent portions of this file are 00003 ** made subject to an alternative license as permitted in the SGI Free 00004 ** Software License B, Version 1.1 (the "License"), the contents of this 00005 ** file are subject only to the provisions of the License. You may not use 00006 ** this file except in compliance with the License. You may obtain a copy 00007 ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 00008 ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: 00009 ** 00010 ** http://oss.sgi.com/projects/FreeB 00011 ** 00012 ** Note that, as provided in the License, the Software is distributed on an 00013 ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS 00014 ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND 00015 ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A 00016 ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. 00017 ** 00018 ** Original Code. The Original Code is: OpenGL Sample Implementation, 00019 ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, 00020 ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. 00021 ** Copyright in any portions created by third parties is as indicated 00022 ** elsewhere herein. All Rights Reserved. 00023 ** 00024 ** Additional Notice Provisions: The application programming interfaces 00025 ** established by SGI in conjunction with the Original Code are The 00026 ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released 00027 ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version 00028 ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X 00029 ** Window System(R) (Version 1.3), released October 19, 1998. This software 00030 ** was created using the OpenGL(R) version 1.2.1 Sample Implementation 00031 ** published by SGI, but has not been independently verified as being 00032 ** compliant with the OpenGL(R) version 1.2.1 Specification. 00033 */ 00034 00035 /* 00036 * arc.h 00037 * 00038 * $Date: 2007-10-19 23:21:45 +0000 (Fri, 19 Oct 2007) $ $Revision: 1.1 $ 00039 * $Header: /cygdrive/c/RCVS/CVS/ReactOS/reactos/lib/glu32/libnurbs/internals/arc.h,v 1.1 2004/02/02 16:39:10 navaraf Exp $ 00040 */ 00041 00042 #ifndef __gluarc_h_ 00043 #define __gluarc_h_ 00044 00045 #include "myassert.h" 00046 #include "bufpool.h" 00047 #include "mystdio.h" 00048 #include "types.h" 00049 #include "pwlarc.h" 00050 #include "trimvertex.h" 00051 00052 class Bin; 00053 class Arc; 00054 struct BezierArc; 00055 00056 typedef class Arc *Arc_ptr; 00057 00058 enum arc_side { arc_none = 0, arc_right, arc_top, arc_left, arc_bottom }; 00059 00060 00061 class Arc: public PooledObj { /* an arc, in two list, the trim list and bin */ 00062 00063 public: 00064 static const int bezier_tag; 00065 static const int arc_tag; 00066 static const int tail_tag; 00067 Arc_ptr prev; /* trim list pointer */ 00068 Arc_ptr next; /* trim list pointer */ 00069 Arc_ptr link; /* bin pointers */ 00070 BezierArc * bezierArc; /* associated bezier arc */ 00071 PwlArc * pwlArc; /* associated pwl arc */ 00072 long type; /* curve type */ 00073 long nuid; 00074 00075 inline Arc( Arc *, PwlArc * ); 00076 inline Arc( arc_side, long ); 00077 00078 Arc_ptr append( Arc_ptr ); 00079 int check( void ); 00080 int isMonotone( void ); 00081 int isDisconnected( void ); 00082 int numpts( void ); 00083 void markverts( void ); 00084 void getextrema( Arc_ptr[4] ); 00085 void print( void ); 00086 void show( void ); 00087 void makeSide( PwlArc *, arc_side ); 00088 inline int isTessellated() { return pwlArc ? 1 : 0; } 00089 inline long isbezier() { return type & bezier_tag; } 00090 inline void setbezier() { type |= bezier_tag; } 00091 inline void clearbezier() { type &= ~bezier_tag; } 00092 inline long npts() { return pwlArc->npts; } 00093 inline TrimVertex * pts() { return pwlArc->pts; } 00094 inline REAL * tail() { return pwlArc->pts[0].param; } 00095 inline REAL * head() { return next->pwlArc->pts[0].param; } 00096 inline REAL * rhead() { return pwlArc->pts[pwlArc->npts-1].param; } 00097 inline long ismarked() { return type & arc_tag; } 00098 inline void setmark() { type |= arc_tag; } 00099 inline void clearmark() { type &= (~arc_tag); } 00100 inline void clearside() { type &= ~(0x7 << 8); } 00101 inline void setside( arc_side s ) { clearside(); type |= (((long)s)<<8); } 00102 inline arc_side getside() { return (arc_side) ((type>>8) & 0x7); } 00103 inline int getitail() { return type & tail_tag; } 00104 inline void setitail() { type |= tail_tag; } 00105 inline void clearitail() { type &= (~tail_tag); } 00106 }; 00107 00108 /*-------------------------------------------------------------------------- 00109 * Arc - initialize a new Arc with the same type and uid of 00110 * a given Arc and a given pwl arc 00111 *-------------------------------------------------------------------------- 00112 */ 00113 00114 inline 00115 Arc::Arc( Arc *j, PwlArc *p ) 00116 { 00117 bezierArc = NULL; 00118 pwlArc = p; 00119 type = j->type; 00120 nuid = j->nuid; 00121 } 00122 00123 /*-------------------------------------------------------------------------- 00124 * Arc - initialize a new Arc with the same type and uid of 00125 * a given Arc and a given pwl arc 00126 *-------------------------------------------------------------------------- 00127 */ 00128 00129 inline 00130 Arc::Arc( arc_side side, long _nuid ) 00131 { 00132 bezierArc = NULL; 00133 pwlArc = NULL; 00134 type = 0; 00135 setside( side ); 00136 nuid = _nuid; 00137 } 00138 00139 #endif /* __gluarc_h_ */ Generated on Thu May 24 2012 04:24:03 for ReactOS by
1.7.6.1
|