Changeset 338
- Timestamp:
- 03/18/07 23:37:38 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/LaserLine_2.0/Src/Sequencing/Generators/LZ3DTorus.h
r334 r338 8 8 9 9 #import <Cocoa/Cocoa.h> 10 #import <sys/time.h> 10 11 #import <RawTypes.h> 11 12 #import "LZSequenceableElement.h" … … 17 18 { 18 19 19 int frameIndex;20 21 20 } 22 21 trunk/LaserLine_2.0/Src/Sequencing/Generators/LZ3DTorus.m
r335 r338 24 24 if(self) 25 25 { 26 frameIndex = 0;26 ; 27 27 } 28 28 return self; … … 31 31 - (RawFrame)renderAtPosition:(float)position 32 32 { 33 struct timeval time; 34 gettimeofday(&time,NULL); 33 35 34 36 unsigned pointCount = 500; … … 38 40 const float Ra = 2; 39 41 const float Rb = .5; 40 const short FRAMES = 4000;41 42 42 if(frameIndex >= FRAMES){ 43 frameIndex = 0; 44 }else{ 45 frameIndex = frameIndex + 10; 46 } 47 48 float xrot = frameIndex * 8 * PI/FRAMES; 49 float yrot = frameIndex * 4.6 * PI/FRAMES; 50 float zrot = frameIndex * 3.25 * PI/FRAMES; 43 float xrot = (time.tv_sec + time.tv_usec/1000000)/500000000*position * 8 * PI; 44 float yrot = (time.tv_sec + time.tv_usec/1000000)/500000000*position * 4.6 * PI; 45 float zrot = (time.tv_sec + time.tv_usec/1000000)/500000000*position * 3.25 * PI; 51 46 52 47 for (int p = 0 ; p <= pointCount ; p++) {
