1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
|
public final native String gluErrorString ( int errorCode ) ;
public final native String gluGetString ( int name ) ;
public final native String getNativeVendor ( ) ;
public final native String getNativeVersion ( ) ;
public final String getClassVendor ( )
{ return "Jausoft - Sven Goethel Software Development"; }
public final String getClassVersion ( )
{ return "2.8.3.0"; }
/**
* The Callback registry function.
* To achieve the signature (internal argument signature)
* you can use the "javap -s <classname>" toolkit of the JDK !
*
* @param qobj the quadratic id, fetch with gluNewQuadric
* @param which the id for the callback type
* @param methodClassInstance the class instance,
* which implements the callback-method
* @param methodName the name of the callback-method
* @param signature the signature of the callback-method.
*
* @see GLUFunc#gluNewQuadric
*/
public final native void gluQuadricCallback(
long qobj, int which,
Object methodClassInstance,
String methodName,
String signature
);
/**
* The Callback registry function.
* To achieve the signature (internal argument signature)
* you can use the "javap -s <classname>" toolkit of the JDK !
*
* @param nobj the nurbs id, fetch with gluNewNurbsRenderer
* @param which the id for the callback type
* @param methodClassInstance the class instance,
* which implements the callback-method
* @param methodName the name of the callback-method
* @param signature the signature of the callback-method.
*
* @see GLUFunc#gluNewNurbsRenderer
*/
public final native void gluNurbsCallback(
long nobj, int which,
Object methodClassInstance,
String methodName,
String signature
);
/**
extern void gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
extern void gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
**/
/**
* The Callback registry function.
* To achieve the signature (internal argument signature)
* you can use the "javap -s <classname>" toolkit of the JDK !
*
* @param tobj the tesselation id, fetch with gluNewTess
* @param which the id for the callback type
* @param methodClassInstance the class instance,
* which implements the callback-method
* @param methodName the name of the callback-method
* @param signature the signature of the callback-method.
* @param voidArrayLen1 the optional length of the 1st array
* in the callback-methods argument-list
* @param voidArrayLen2 the optional length of the 2nd array
* in the callback-methods argument-list
* @param voidArrayLen3 the optional length of the 3rd array
* in the callback-methods argument-list
* @param voidArrayLen4 the optional length of the 4th array
* in the callback-methods argument-list
* @param voidArrayLen5 the optional length of the 5th array
* in the callback-methods argument-list
*
* @see GLUFunc#gluNewTess
*/
public final native void gluTessCallback(
long tobj, int which,
Object methodClassInstance,
String methodName,
String signature,
int voidArrayLen1,
int voidArrayLen2,
int voidArrayLen3,
int voidArrayLen4,
int voidArrayLen5
);
/**
* The Callback de-registry function.
*
* @param qobj the quadratic id, for which all callback-methods
* should be de-registered
*/
public final native void gluDeleteQuadric( long qobj );
/**
* The Callback de-registry function.
*
* @param nobj the nurbs id, for which all callback-methods
* should be de-registered
*/
public final native void gluDeleteNurbsRenderer( long nobj );
/**
* The Callback de-registry function.
*
* @param tobj the tesselation id, for which all callback-methods
* should be de-registered
*/
public final native void gluDeleteTess( long tobj );
public final native long gluNewQuadric( );
public final native long gluNewNurbsRenderer( );
public final native long gluNewTess( );
/**
* Wrapper for original gluProject,
* where the orig. last three arguments are wrapped
* mapped in one array: (winx[1], winy[1], winz[1]) <-> win[3]
*
* @param obj array of the three obj x,y,z input components
* @param win array of the three win x,y,z output components
* @see gl4java.GLUFunc#gluProject
*/
public final int gluProject(double obj[],
double[] modelMatrix,
double[] projMatrix,
int[] viewport,
double[] win)
{
return gluProject( obj[0], obj[1], obj[2],
modelMatrix, projMatrix, viewport, win);
}
/**
* Wrapper for original gluProject,
* where the orig. last three arguments are wrapped
* mapped in one array: (winx[1], winy[1], winz[1]) <-> win[3]
*
* @param win array of the three win x,y,z output components
* @see gl4java.GLUFunc#gluProject
*/
public final int gluProject(double objx,
double objy,
double objz,
double[] modelMatrix,
double[] projMatrix,
int[] viewport,
double[] win)
{
double x[] = { 0 };
double y[] = { 0 };
double z[] = { 0 };
int r = gluProject(objx, objy, objz, modelMatrix, projMatrix,
viewport, x, y, z);
if(win!=null && win.length>=3)
{
win[0]=x[0]; win[1]=y[0]; win[2]=z[0];
}
return r;
}
/**
* Wrapper for original gluUnProject,
* where the orig. last three arguments are wrapped
* mapped in one array: (objx[1], objy[1], objz[1]) <-> obj[3]
*
* @param win array of the three win x,y,z input components
* @param obj array of the three obj x,y,z output components
* @see gl4java.GLUFunc#gluUnProject
*/
public final int gluUnProject(double win[],
double[] modelMatrix,
double[] projMatrix,
int[] viewport,
double[] obj)
{
return gluUnProject(win[0], win[1], win[2],
modelMatrix, projMatrix, viewport, obj);
}
/**
* Wrapper for original gluUnProject,
* where the orig. last three arguments are wrapped
* mapped in one array: (objx[1], objy[1], objz[1]) <-> obj[3]
*
* @param obj array of the three obj x,y,z output components
* @see gl4java.GLUFunc#gluUnProject
*/
public final int gluUnProject(double winx,
double winy,
double winz,
double[] modelMatrix,
double[] projMatrix,
int[] viewport,
double[] obj)
{
double x[] = { 0 };
double y[] = { 0 };
double z[] = { 0 };
int r = gluUnProject(winx, winy, winz, modelMatrix, projMatrix,
viewport, x, y, z);
if(obj!=null && obj.length>=3)
{
obj[0]=x[0]; obj[1]=y[0]; obj[2]=z[0];
}
return r;
}
public final native void gluTessBeginContour (long tess);
public final native void gluTessBeginPolygon (long tess, boolean[] data);
public final native void gluTessBeginPolygon (long tess, short[] data);
public final native void gluTessBeginPolygon (long tess, byte[] data);
public final native void gluTessBeginPolygon (long tess, int[] data);
public final native void gluTessBeginPolygon (long tess, long[] data);
public final native void gluTessBeginPolygon (long tess, float[] data);
public final native void gluTessBeginPolygon (long tess, double[] data);
public final native void gluTessEndContour (long tess);
public final native void gluTessEndPolygon (long tess);
public final native void gluTessNormal (long tess, double valueX, double valueY, double valueZ);
public final native void gluTessProperty (long tess, int which, double data);
public final native void gluTessVertex ( long tess, double[] location, boolean[] data );
public final native void gluTessVertex ( long tess, double[] location, byte[] data );
public final native void gluTessVertex ( long tess, double[] location, short[] data );
public final native void gluTessVertex ( long tess, double[] location, int[] data );
public final native void gluTessVertex ( long tess, double[] location, long[] data );
public final native void gluTessVertex ( long tess, double[] location, float[] data );
public final native void gluTessVertex ( long tess, double[] location, double[] data );
|