1 /*---------------------------------------------------------------------------*\
2 * OpenSG NURBS Library *
5 * Copyright (C) 2001-2006 by the University of Bonn, Computer Graphics Group*
7 * http://cg.cs.uni-bonn.de/ *
9 * contact: edhellon@cs.uni-bonn.de, guthe@cs.uni-bonn.de, rk@cs.uni-bonn.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
38 #ifndef _OSG_DCTPFACE_H_
39 #define _OSG_DCTPFACE_H_
44 #include "OSGDrawableDef.h"
45 #include "OSGConfig.h"
52 #include "OSGBezierCurve2D.h"
53 #include "OSGdctptypes.h"
56 #define OSG_UNION_TRI_QUAD
60 #include "OSGDCTPVertex.h"
65 class OSG_DRAWABLE_DLLMAPPING TrimSegment
68 inline TrimSegment(void );
69 inline TrimSegment(const TrimSegment
&ts
);
70 inline ~TrimSegment(void );
72 bezier2dvector trimbeziers
;
78 void operator =(const TrimSegment
&rhs
);
81 class OSG_DRAWABLE_DLLMAPPING DCTPFace
84 inline DCTPFace(void);
85 inline ~DCTPFace(void);
87 std::vector
<DCTPVertex
*> vertices
;
88 std::vector
<DCTPEdge
*> edges
;
90 #ifdef OSG_UNION_TRI_QUAD
91 DCTPVertex
* orig_face
[4];
93 DCTPVertex
* orig_triangle
[3];
94 DCTPVertex
* orig_quad
[4];
98 std::vector
<TrimSegment
> trimseg
;
101 inline void AddVertex (DCTPVertex
*v
);
102 inline void RemoveVertex (DCTPVertex
*v
);
103 inline void ReplaceVertex(DCTPVertex
*oldv
, DCTPVertex
*newv
);
105 inline void AddEdge (DCTPEdge
*e
);
106 inline void RemoveEdge(DCTPEdge
*e
);
108 inline void dump_triangle(void);
112 DCTPFace(const DCTPFace
&other
);
113 void operator =(const DCTPFace
&rhs
);
116 typedef std::vector
<DCTPFace
*> dctpfacevector
;
120 #include "OSGDCTPFace.inl"