fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / NodeCores / Drawables / Nurbs / Internal / OSGDCTPFace.h
blobacf2e611b70d6eb4e4fdeb157171b3dec77d2452
1 /*---------------------------------------------------------------------------*\
2 * OpenSG NURBS Library *
3 * *
4 * *
5 * Copyright (C) 2001-2006 by the University of Bonn, Computer Graphics Group*
6 * *
7 * http://cg.cs.uni-bonn.de/ *
8 * *
9 * contact: edhellon@cs.uni-bonn.de, guthe@cs.uni-bonn.de, rk@cs.uni-bonn.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
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. *
18 * *
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. *
23 * *
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. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
38 #ifndef _OSG_DCTPFACE_H_
39 #define _OSG_DCTPFACE_H_
40 #ifdef __sgi
41 #pragma once
42 #endif
44 #include "OSGDrawableDef.h"
45 #include "OSGConfig.h"
48 #include <iostream>
49 #include <fstream>
50 #include <iomanip>
52 #include "OSGBezierCurve2D.h"
53 #include "OSGdctptypes.h"
55 OSG_BEGIN_NAMESPACE
56 #define OSG_UNION_TRI_QUAD
58 //class DCTPVertex;
59 OSG_END_NAMESPACE
60 #include "OSGDCTPVertex.h"
62 OSG_BEGIN_NAMESPACE
63 class DCTPEdge;
65 class OSG_DRAWABLE_DLLMAPPING TrimSegment
67 public:
68 inline TrimSegment(void );
69 inline TrimSegment(const TrimSegment &ts);
70 inline ~TrimSegment(void );
72 bezier2dvector trimbeziers;
73 DCTPVertex *start;
74 DCTPVertex *end;
76 private:
78 void operator =(const TrimSegment &rhs);
81 class OSG_DRAWABLE_DLLMAPPING DCTPFace
83 public:
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];
92 #else
93 DCTPVertex* orig_triangle[3];
94 DCTPVertex* orig_quad[4];
95 #endif
96 double norm;
97 unsigned long id;
98 std::vector<TrimSegment> trimseg;
99 void *faceinfo;
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);
110 private:
112 DCTPFace(const DCTPFace &other);
113 void operator =(const DCTPFace &rhs);
116 typedef std::vector<DCTPFace*> dctpfacevector;
118 OSG_END_NAMESPACE
120 #include "OSGDCTPFace.inl"
122 #endif // DCTPFace.h