[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz gfx/libtexture/geometric.texture gfx/demo/o...
From: |
Asko Soukka |
Subject: |
[Gzz-commits] gzz gfx/libtexture/geometric.texture gfx/demo/o... |
Date: |
Thu, 17 Oct 2002 09:03:54 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Asko Soukka <address@hidden> 02/10/17 09:03:29
Modified files:
gfx/libtexture : geometric.texture
Added files:
gfx/demo : ovalvobtest.py
gzz/vob : OvalBgVob.java
Log message:
OvalBgVob
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/ovalvobtest.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/OvalBgVob.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libtexture/geometric.texture.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
Patches:
Index: gzz/gfx/libtexture/geometric.texture
diff -c gzz/gfx/libtexture/geometric.texture:1.5
gzz/gfx/libtexture/geometric.texture:1.6
*** gzz/gfx/libtexture/geometric.texture:1.5 Wed Oct 16 06:06:52 2002
--- gzz/gfx/libtexture/geometric.texture Thu Oct 17 09:03:29 2002
***************
*** 2,8 ****
#include <math.h>
#define FPARAM(name, default) float name = params->getFloat(#name, default);
!
float pyramid(float x, float y) {
x -= floor(x);
--- 2,8 ----
#include <math.h>
#define FPARAM(name, default) float name = params->getFloat(#name, default);
! #define SQR(A) ((A) * (A))
float pyramid(float x, float y) {
x -= floor(x);
***************
*** 51,56 ****
--- 51,60 ----
return (x < .4999999);
}
+ float circle(float x, float y) {
+ return ((SQR(x - 0.5) + SQR(y - 0.5)) <= SQR(0.5));
+ }
+
void GENERATE(TextureParam *params, int width, int height, int depth, int
components, float *data) {
FPARAM(type, 0);
FPARAM(scale, 1);
***************
*** 112,126 ****
if (components >= 2) data[ind++] = stripe(y);
if (components >= 3) data[ind++] = stripe(1 - xstep - x);
if (components >= 4) data[ind++] = stripe(1 - ystep - y);
- break;
case 7:
if (components >= 1) data[ind++] = rand() / (RAND_MAX + 1.0);
if (components >= 2) data[ind++] = rand() / (RAND_MAX + 1.0);
if (components >= 3) data[ind++] = rand() / (RAND_MAX + 1.0);
if (components >= 4) data[ind++] = rand() / (RAND_MAX + 1.0);
break;
!
! }
}
}
--- 116,134 ----
if (components >= 2) data[ind++] = stripe(y);
if (components >= 3) data[ind++] = stripe(1 - xstep - x);
if (components >= 4) data[ind++] = stripe(1 - ystep - y);
case 7:
if (components >= 1) data[ind++] = rand() / (RAND_MAX + 1.0);
if (components >= 2) data[ind++] = rand() / (RAND_MAX + 1.0);
if (components >= 3) data[ind++] = rand() / (RAND_MAX + 1.0);
if (components >= 4) data[ind++] = rand() / (RAND_MAX + 1.0);
break;
! case 8:
! if (components >= 1) data[ind++] = circle(x + 0.5/width, y +
0.5/height);
! if (components >= 2) data[ind++] = circle(x + 0.5/width, y +
0.5/height);
! if (components >= 3) data[ind++] = circle(x + 0.5/width, y +
0.5/height);
! if (components >= 4) data[ind++] = circle(x + 0.5/width, y +
0.5/height);
! break;
! }
}
}
***************
*** 129,131 ****
--- 137,142 ----
}
}
+
+
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz gfx/libtexture/geometric.texture gfx/demo/o...,
Asko Soukka <=