Debian Codegraph @

lib/database/src/so/nodes/nurbs/SoCurveMaps.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 $
44 |
45 | Classes:
46 | _SoNurbsCurveV3Map
47 | _SoNurbsCurveV4Map
48 |
49 | Author(s) : Dave Immel
50 |
51 ______________ S I L I C O N G R A P H I C S I N C . ____________
52 _______________________________________________________________________
53 */
54
55
56 /* Polynomial Evaluator Interface */
57
58 #include <cstring>
59 #include "SoCurveMaps.h"cxx . . $ `<file>/lib/database/src/so/nodes/nurbs/SoCurveMaps.h`/
60
61 _SoNurbsCurveV3Mapcxx . . $ _SoNurbsCurveV3Map#::~cxx . . $ _SoNurbsCurveV3Map#`~_SoNurbsCurveV3Map`(49f6e7a06ebc5aa8)._SoNurbsCurveV3Mapcxx . . $ _SoNurbsCurveV3Map#()
62 {
63 }
64
65 _SoNurbsCurveV4Mapcxx . . $ _SoNurbsCurveV4Map#::~cxx . . $ _SoNurbsCurveV4Map#`~_SoNurbsCurveV4Map`(49f6e7a06ebc5aa8)._SoNurbsCurveV4Mapcxx . . $ _SoNurbsCurveV4Map#()
66 {
67 }
68
69
70 void
71 _SoNurbsCurveV3Mapcxx . . $ _SoNurbsCurveV3Map#::initializecxx . . $ _SoNurbsCurveV3Map#initialize(ff31126e6ead7bed).( int32_t *nv, int32_t *nav, SbVec2fcxx . . $ SbVec2f# **v )
72 {
73 numVerticescxx . . $ _SoNurbsCurveV3Map#numVertices. = nv;
74 numAllocVerticescxx . . $ _SoNurbsCurveV3Map#numAllocVertices. = nav;
75 verticescxx . . $ _SoNurbsCurveV3Map#vertices. = v;
76 }
77
78 void
79 _SoNurbsCurveV4Mapcxx . . $ _SoNurbsCurveV4Map#::initializecxx . . $ _SoNurbsCurveV4Map#initialize(ff31126e6ead7bed).( int32_t *nv, int32_t *nav, SbVec2fcxx . . $ SbVec2f# **v )
80 {
81 numVerticescxx . . $ _SoNurbsCurveV4Map#numVertices. = nv;
82 numAllocVerticescxx . . $ _SoNurbsCurveV4Map#numAllocVertices. = nav;
83 verticescxx . . $ _SoNurbsCurveV4Map#vertices. = v;
84 }
85
86 void
87 _SoNurbsCurveV3Mapcxx . . $ _SoNurbsCurveV3Map#::pointcxx . . $ _SoNurbsCurveV3Map#point(e6881f009d13a851).( float *v )
88 {
89 //
90 // Add the vertex to the list of vertices. The 3rd component of the
91 // vertex is 0.0 and is ignored. Allocate more vertices if there is
92 // not enough space.
93 //
94 if (*numVerticescxx . . $ _SoNurbsCurveV3Map#numVertices. == *numAllocVerticescxx . . $ _SoNurbsCurveV3Map#numAllocVertices.)
95 {
96 *numAllocVerticescxx . . $ _SoNurbsCurveV3Map#numAllocVertices. += CRV_ALLOC_BLOCKcxx . . $ `lib/database/src/so/nodes/nurbs/SoCurveMaps.h:66:9`!;
97 SbVec2fcxx . . $ SbVec2f# *tmpBlock = new SbVec2fcxx . . $ SbVec2f#SbVec2f(49f6e7a06ebc5aa8).[*numAllocVerticescxx . . $ _SoNurbsCurveV3Map#numAllocVertices.];
98 memcpy ((void *)tmpBlock, (void *)*verticescxx . . $ _SoNurbsCurveV3Map#vertices.,
99 (int) *numVerticescxx . . $ _SoNurbsCurveV3Map#numVertices.*sizeof(SbVec2fcxx . . $ SbVec2f#));
100 delete[] *verticescxx . . $ _SoNurbsCurveV3Map#vertices.;
101 *verticescxx . . $ _SoNurbsCurveV3Map#vertices. = tmpBlock;
102 }
103
104 (*verticescxx . . $ _SoNurbsCurveV3Map#vertices.)[*numVerticescxx . . $ _SoNurbsCurveV3Map#numVertices.][cxx . . $ SbVec2f#`operator[]`(5dbdaf238659ae67).0] = v[0];
105 (*verticescxx . . $ _SoNurbsCurveV3Map#vertices.)[(*numVerticescxx . . $ _SoNurbsCurveV3Map#numVertices.)++][cxx . . $ SbVec2f#`operator[]`(5dbdaf238659ae67).1] = v[1];
106 }
107
108
109 void
110 _SoNurbsCurveV4Mapcxx . . $ _SoNurbsCurveV4Map#::pointcxx . . $ _SoNurbsCurveV4Map#point(e6881f009d13a851).( float *v )
111 {
112 //
113 // Add the vertex to the list of vertices. The 3rd component of the
114 // vertex is 0.0 and is ignored. Allocate more vertices if there is
115 // not enough space.
116 //
117 if (*numVerticescxx . . $ _SoNurbsCurveV4Map#numVertices. == *numAllocVerticescxx . . $ _SoNurbsCurveV4Map#numAllocVertices.)
118 {
119 *numAllocVerticescxx . . $ _SoNurbsCurveV4Map#numAllocVertices. += CRV_ALLOC_BLOCKcxx . . $ `lib/database/src/so/nodes/nurbs/SoCurveMaps.h:66:9`!;
120 SbVec2fcxx . . $ SbVec2f# *tmpBlock = new SbVec2fcxx . . $ SbVec2f#SbVec2f(49f6e7a06ebc5aa8).[*numAllocVerticescxx . . $ _SoNurbsCurveV4Map#numAllocVertices.];
121 memcpy ((void *)tmpBlock, (void *)*verticescxx . . $ _SoNurbsCurveV4Map#vertices.,
122 (int) *numVerticescxx . . $ _SoNurbsCurveV4Map#numVertices.*sizeof(SbVec2fcxx . . $ SbVec2f#));
123 delete[] *verticescxx . . $ _SoNurbsCurveV4Map#vertices.;
124 *verticescxx . . $ _SoNurbsCurveV4Map#vertices. = tmpBlock;
125 }
126
127 (*verticescxx . . $ _SoNurbsCurveV4Map#vertices.)[*numVerticescxx . . $ _SoNurbsCurveV4Map#numVertices.][cxx . . $ SbVec2f#`operator[]`(5dbdaf238659ae67).0] = v[0]/v[3];
128 (*verticescxx . . $ _SoNurbsCurveV4Map#vertices.)[*numVerticescxx . . $ _SoNurbsCurveV4Map#numVertices.++][cxx . . $ SbVec2f#`operator[]`(5dbdaf238659ae67).1] = v[1]/v[3];
129 }
130
131
132