Debian Codegraph @

lib/database/src/so/details/SoFaceDetail.c++

raw symbols SCIP
1 /*
2 *
3 * Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * Further, this software is distributed without any warranty that it is
16 * free of the rightful claim of any third person regarding infringement
17 * or the like. Any license provided herein, whether implied or
18 * otherwise, applies only to this software file. Patent licenses, if
19 * any, provided herein do not apply to combinations of this program with
20 * other software, or any other product whatsoever.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
27 * Mountain View, CA 94043, or:
28 *
29 * http://www.sgi.com
30 *
31 * For further information regarding this notice, see:
32 *
33 * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
34 *
35 */
36
37 /*
38 * Copyright (C) 1990,91 Silicon Graphics, Inc.
39 *
40 _______________________________________________________________________
41 ______________ S I L I C O N G R A P H I C S I N C . ____________
42 |
43 | $Revision: 1.1.1.1 $
44 |
45 | Classes:
46 | SoFaceDetail
47 |
48 | Author(s) : Paul S. Strauss
49 |
50 ______________ S I L I C O N G R A P H I C S I N C . ____________
51 _______________________________________________________________________
52 */
53
54 #include <Inventor/details/SoFaceDetail.h>cxx . . $ `<file>/lib/database/include/Inventor/details/SoFaceDetail.h`/
55
56 SO_DETAIL_SOURCEcxx . . $ `lib/database/include/Inventor/details/SoSubDetail.h:123:9`!(SoFaceDetail)
57
58 ////////////////////////////////////////////////////////////////////////
59 //
60 // Description:
61 // Constructor.
62 //
63 // Use: public
64 //
65
66 SoFaceDetailcxx . . $ SoFaceDetail#::SoFaceDetailcxx . . $ SoFaceDetail#SoFaceDetail(49f6e7a06ebc5aa8).()
67 //
68 ////////////////////////////////////////////////////////////////////////
69 {
70 pointcxx . . $ SoFaceDetail#point. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
71 numPointscxx . . $ SoFaceDetail#numPoints. = 0;
72 }
73
74 ////////////////////////////////////////////////////////////////////////
75 //
76 // Description:
77 // Destructor.
78 //
79 // Use: public
80 //
81
82 SoFaceDetailcxx . . $ SoFaceDetail#::~cxx . . $ SoFaceDetail#`~SoFaceDetail`(49f6e7a06ebc5aa8).SoFaceDetailcxx . . $ SoFaceDetail#()
83 //
84 ////////////////////////////////////////////////////////////////////////
85 {
86 if (pointcxx . . $ SoFaceDetail#point. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!)
87 delete [] pointcxx . . $ SoFaceDetail#point.;
88 }
89
90 ////////////////////////////////////////////////////////////////////////
91 //
92 // Description:
93 // Returns an instance that is a copy of this instance. The caller
94 // is responsible for deleting the copy when done.
95 //
96 // Use: public, virtual
97 //
98
99 SoDetailcxx . . $ SoDetail# *
100 SoFaceDetailcxx . . $ SoFaceDetail#::copycxx . . $ SoFaceDetail#copy(80c8f62bb24ac92d).() const
101 //
102 ////////////////////////////////////////////////////////////////////////
103 {
104 SoFaceDetailcxx . . $ SoFaceDetail# *newDetail = new SoFaceDetailcxx . . $ SoFaceDetail#;
105
106 newDetail->faceIndexcxx . . $ SoFaceDetail#faceIndex. = faceIndexcxx . . $ SoFaceDetail#faceIndex.;
107 newDetail->partIndexcxx . . $ SoFaceDetail#partIndex. = partIndexcxx . . $ SoFaceDetail#partIndex.;
108
109 newDetail->setNumPointscxx . . $ SoFaceDetail#setNumPoints(d4f767463ce0a6b3).(numPointscxx . . $ SoFaceDetail#numPoints.);
110 for (int i = 0; i < numPointscxx . . $ SoFaceDetail#numPoints.; i++)
111 newDetail->setPointcxx . . $ SoFaceDetail#setPoint(ad708d2eb1d16b81).(i, &pointcxx . . $ SoFaceDetail#point.[i]);
112
113 return newDetail;
114 }
115
116 ////////////////////////////////////////////////////////////////////////
117 //
118 // Description:
119 // Sets the number of points in the face and allocates room for the
120 // points.
121 //
122 // Use: extender
123 //
124
125 void
126 SoFaceDetailcxx . . $ SoFaceDetail#::setNumPointscxx . . $ SoFaceDetail#setNumPoints(d4f767463ce0a6b3).(int32_tcxx . . $ int32_t# num)
127 //
128 ////////////////////////////////////////////////////////////////////////
129 {
130 // Free up old ones if necessary
131 if (pointcxx . . $ SoFaceDetail#point. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! && numPointscxx . . $ SoFaceDetail#numPoints. < num) {
132 delete [] pointcxx . . $ SoFaceDetail#point.;
133 pointcxx . . $ SoFaceDetail#point. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; // So they get allocated below
134 }
135
136 // Allocate space if necessary
137 if (pointcxx . . $ SoFaceDetail#point. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! && num > 0)
138 pointcxx . . $ SoFaceDetail#point. = new SoPointDetailcxx . . $ SoPointDetail#[num];
139
140 numPointscxx . . $ SoFaceDetail#numPoints. = num;
141 }
142
143 ////////////////////////////////////////////////////////////////////////
144 //
145 // Description:
146 // Copies a point detail from the given detail.
147 //
148 // Use: extender
149 //
150
151 void
152 SoFaceDetailcxx . . $ SoFaceDetail#::setPointcxx . . $ SoFaceDetail#setPoint(ad708d2eb1d16b81).(int32_tcxx . . $ int32_t# index, const SoPointDetailcxx . . $ SoPointDetail# *pd)
153 //
154 ////////////////////////////////////////////////////////////////////////
155 {
156 pointcxx . . $ SoFaceDetail#point.[index] =cxx . . $ SoPointDetail#`operator=`(9b9ab6183ff92e25). *pd;
157 }