9 #define M_PI (3.1415926536F)
37 return 1-(rho-rho_min)/(rho_max-rho_min);
42 return 1-(theta-theta_min)/(theta_max-theta_min);
57 string::size_type
i = input.find(
"|" );
59 if (i != string::npos) {
60 ret = input.substr( 0, i );
61 input = input.substr( i+1 );
72 const std::string &technique,
87 int numspheres = (stacks+slices)/8;
102 oldmesh = this->
orig;
108 vector< MeshDrawContext > *odq = NULL;
109 for (
int l = 0; l < numspheres; l++) {
111 if (subclass || rho_max !=
M_PI || rho_min != 0.0 || theta_min != 0.0 || theta_max != 2*
M_PI)
125 int i,
j, imin, imax;
126 float nsign = Insideout ? -1.0 : 1.0;
127 float normalscale = reverse_normals ? -1.0 : 1.0;
131 drho = (rho_max-rho_min)/(
float) stacks;
132 dtheta = (theta_max-theta_min)/(
float) slices;
138 int numQuadstrips = stacks;
140 int *QSOffsets =
new int[numQuadstrips];
142 int numvertex = stacks*(slices+1)*2;
148 #define g_rho( i ) (rhol[(i)&1])
149 #define g_theta( i ) (thetal[(i)&1])
150 g_rho( 0 ) = rho_min;
151 for (i = imin; i < imax; i++) {
152 GFXVertex *vertexlist = vl+(i*(slices+1)*2);
153 g_rho( i+1 ) = (i+1)*drho+rho_min;
156 for (j = 0; j <= slices; j++) {
161 vertexlist[j*2+fir].
i = x*normalscale;
162 vertexlist[j*2+fir].
k = -y*normalscale;
163 vertexlist[j*2+fir].
j = z*normalscale;
164 vertexlist[j*2+fir].
s =
GetS(
g_theta( j ), theta_min, theta_max );
165 vertexlist[j*2+fir].
t =
GetT(
g_rho( i ), rho_min, rho_max );
166 vertexlist[j*2+fir].
x = x*radius;
167 vertexlist[j*2+fir].
z = -y*radius;
168 vertexlist[j*2+fir].
y = z*radius;
172 vertexlist[j*2+sec].
i = x*normalscale;
173 vertexlist[j*2+sec].
k = -y*normalscale;
174 vertexlist[j*2+sec].
j = z*normalscale;
175 vertexlist[j*2+sec].
s =
GetS(
g_theta( j ), theta_min, theta_max );
176 vertexlist[j*2+sec].
t =
GetT(
g_rho( i+1 ), rho_min, rho_max );
177 vertexlist[j*2+sec].
x = x*radius;
178 vertexlist[j*2+sec].
z = -y*radius;
179 vertexlist[j*2+sec].
y = z*radius;
183 QSOffsets[i] = (slices+1)*2;
197 unsigned int count = 0;
199 Decal.push_back( NULL );
200 while ( inputtex.length() ) {
202 while (
Decal.size() <= count)
203 Decal.push_back( NULL );
204 if (thistex.find(
".ani" ) != string::npos) {
260 float CityLights::wrapx = 1;
261 float CityLights::wrapy = 1;
301 zzwrapx != 1 || zzwrapy != 1 );