Changeset 360
- Timestamp:
- 04/07/07 23:30:21 (1 year ago)
- Files:
-
- trunk/LaserLine_2.0/LaserLine_2.0.xcodeproj/project.pbxproj (modified) (9 diffs)
- trunk/LaserLine_2.0/Src/FileImports/FlashImport.m (modified) (1 diff)
- trunk/LaserLine_2.0/Src/FileImports/ILDAImport.m (modified) (1 diff)
- trunk/LaserLine_2.0/Src/MainController.h (modified) (2 diffs)
- trunk/LaserLine_2.0/Src/MainController.m (modified) (6 diffs)
- trunk/LaserLine_2.0/Src/OutputController/CompositeSource.m (modified) (1 diff)
- trunk/LaserLine_2.0/Src/OutputController/RawTypes.c (modified) (1 diff)
- trunk/LaserLine_2.0/Src/Sequencing/Generators/LZ3DTorus.m (modified) (1 diff)
- trunk/LaserLine_2.0/Src/Sequencing/LZFrame.h (modified) (2 diffs)
- trunk/LaserLine_2.0/Src/Sequencing/LZFrame.m (modified) (3 diffs)
- trunk/LaserLine_2.0/Src/Sequencing/LZLayer.h (modified) (1 diff)
- trunk/LaserLine_2.0/Src/Sequencing/LZPolyline.h (modified) (1 diff)
- trunk/LaserLine_2.0/Src/Sequencing/LZSequenceableElement.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/LaserLine_2.0/LaserLine_2.0.xcodeproj/project.pbxproj
r359 r360 14 14 A80467100BA3B12100CADE97 /* LZAudioOutputDevice.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A804670E0BA3B12100CADE97 /* LZAudioOutputDevice.h */; }; 15 15 A80467110BA3B12100CADE97 /* LZAudioOutputDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = A804670F0BA3B12100CADE97 /* LZAudioOutputDevice.m */; }; 16 A83D1CF20BAA1EA800E8271A /* LZFrameObject.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A83D1CF00BAA1EA800E8271A /* LZFrameObject.h */; }; 17 A83D1CF30BAA1EA800E8271A /* LZFrameObject.m in Sources */ = {isa = PBXBuildFile; fileRef = A83D1CF10BAA1EA800E8271A /* LZFrameObject.m */; }; 16 18 A87BE21F0BA469B1002DEDDF /* LZSpirograph.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A87BE21D0BA469B1002DEDDF /* LZSpirograph.h */; }; 17 19 A87BE2200BA469B1002DEDDF /* LZSpirograph.m in Sources */ = {isa = PBXBuildFile; fileRef = A87BE21E0BA469B1002DEDDF /* LZSpirograph.m */; }; … … 168 170 D42887110BAE259300F4F72D /* LZ3DTorus.h in CopyFiles */, 169 171 D461AECA0BB4C74900EEF5FB /* LZBeamEffect.h in CopyFiles */, 172 A83D1CF20BAA1EA800E8271A /* LZFrameObject.h in CopyFiles */, 170 173 ); 171 174 runOnlyForDeploymentPostprocessing = 0; … … 186 189 A804670E0BA3B12100CADE97 /* LZAudioOutputDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LZAudioOutputDevice.h; sourceTree = "<group>"; }; 187 190 A804670F0BA3B12100CADE97 /* LZAudioOutputDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LZAudioOutputDevice.m; sourceTree = "<group>"; }; 191 A83D1CF00BAA1EA800E8271A /* LZFrameObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LZFrameObject.h; sourceTree = "<group>"; }; 192 A83D1CF10BAA1EA800E8271A /* LZFrameObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LZFrameObject.m; sourceTree = "<group>"; }; 188 193 A87BE21D0BA469B1002DEDDF /* LZSpirograph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LZSpirograph.h; sourceTree = "<group>"; }; 189 194 A87BE21E0BA469B1002DEDDF /* LZSpirograph.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LZSpirograph.m; sourceTree = "<group>"; }; … … 214 219 D2F8CDAF0BA18F6F00C463D4 /* LaserTools.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LaserTools.framework; path = ../Build/Debug/LaserTools.framework; sourceTree = SOURCE_ROOT; }; 215 220 D2F8CDB00BA18F6F00C463D4 /* Timeline.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Timeline.framework; path = ../Build/Debug/Timeline.framework; sourceTree = SOURCE_ROOT; }; 216 D2F8CE6B0BA1936500C463D4 /* Build.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; path =Build.xcconfig; sourceTree = "<group>"; };221 D2F8CE6B0BA1936500C463D4 /* Build.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; name = Build.xcconfig; path = Src/Build.xcconfig; sourceTree = "<group>"; }; 217 222 D428870F0BAE259300F4F72D /* LZ3DTorus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LZ3DTorus.h; sourceTree = "<group>"; }; 218 223 D42887100BAE259300F4F72D /* LZ3DTorus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LZ3DTorus.m; sourceTree = "<group>"; }; … … 305 310 isa = PBXGroup; 306 311 children = ( 307 D2F8CE6B0BA1936500C463D4 /* Build.xcconfig */, 312 F8A6D5790B784D9400652C81 /* MainController.h */, 313 F8A6D57A0B784D9400652C81 /* MainController.m */, 308 314 A82FC5990B97ED0F00AA5CFD /* Interface */, 309 315 A82FC4FD0B97DB9B00AA5CFD /* FileImports */, … … 311 317 A8A2C5AE0B82B94100AE1703 /* OutputController */, 312 318 F8A6D5840B78592900652C81 /* ILDAlib */, 313 F8A6D5790B784D9400652C81 /* MainController.h */,314 F8A6D57A0B784D9400652C81 /* MainController.m */,315 319 A8A2C5AF0B82B96200AE1703 /* ThirdParty */, 316 320 ); … … 383 387 A8F4873D0B9A12AF00A1380A /* LaserLineDoc.icns */, 384 388 A8F4873E0B9A12AF00A1380A /* LaserLineApp.icns */, 389 D2F8CE6B0BA1936500C463D4 /* Build.xcconfig */, 385 390 8D1107310486CEB800E47090 /* Info.plist */, 386 391 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, … … 455 460 F8835F1F0B9A3CFE00BDC3C1 /* LZPolyline.m */, 456 461 F8835F160B9A3CFE00BDC3C1 /* LZFilter.h */, 462 A83D1CF00BAA1EA800E8271A /* LZFrameObject.h */, 463 A83D1CF10BAA1EA800E8271A /* LZFrameObject.m */, 457 464 F8835F170B9A3CFE00BDC3C1 /* LZFilter.m */, 458 465 F8835F260B9A3CFE00BDC3C1 /* LZTimeRange.h */, … … 732 739 D42887120BAE259300F4F72D /* LZ3DTorus.m in Sources */, 733 740 D461AECB0BB4C74900EEF5FB /* LZBeamEffect.m in Sources */, 741 A83D1CF30BAA1EA800E8271A /* LZFrameObject.m in Sources */, 734 742 ); 735 743 runOnlyForDeploymentPostprocessing = 0; trunk/LaserLine_2.0/Src/FileImports/FlashImport.m
r353 r360 69 69 } 70 70 71 [frame add Polyline:polyline];71 [frame addFrameObject:polyline]; 72 72 [frames addObject:frame]; 73 73 trunk/LaserLine_2.0/Src/FileImports/ILDAImport.m
r343 r360 57 57 } 58 58 59 [frame setPolyline:polyline];59 [frame addFrameObject:polyline]; 60 60 [frames addObject:frame]; 61 61 trunk/LaserLine_2.0/Src/MainController.h
r295 r360 2 2 3 3 @class OutputController, TLView, LZTimeline, LZSplitView, LZControlView; 4 @class LZRenderedFrameView ;4 @class LZRenderedFrameView, LZSequenceableElement, LZLayer; 5 5 6 6 @interface MainController : NSObject { … … 9 9 IBOutlet LZSplitView *splitViewTop; 10 10 IBOutlet LZControlView *controlView; 11 11 12 IBOutlet LZRenderedFrameView *renderView; 12 13 13 14 LZTimeline *timeline; 15 LZLayer *layer; 14 16 OutputController *output; 15 17 } 18 19 20 - (void)addGenerator:(Class)generatorClass; 21 - (IBAction)addAntiClock:(id)sender; 22 - (IBAction)add3DTorus:(id)sender; 23 - (IBAction)addBeamEffect:(id)sender; 24 25 - (void)addSequence:(LZSequenceableElement *)sequenceElement withLength:(NSTimeInterval)time; 16 26 17 27 //Temporary debug code trunk/LaserLine_2.0/Src/MainController.m
r346 r360 1 1 #import "MainController.h" 2 2 3 #import <Timeline/TLTrack.h> 3 4 #import <Timeline/TLClip.h> 4 5 #import "ILDAImport.h" 6 #import "FlashImport.h" 5 7 #import "LZTrack.h" 6 8 #import "LZTimeline.h" … … 23 25 if(self) { 24 26 timeline = [[LZTimeline alloc] init]; 27 layer = [[LZLayer alloc] initWithDuration:60]; 28 25 29 [timeline addTrack:[LZTrack track]]; 30 [[[timeline tracks] objectAtIndex:0] addLayer:layer]; 31 26 32 output = [[OutputController alloc] init]; 33 [output setupDeviceWithTrack:layer frequency:1/24.]; 27 34 } 28 35 return self; … … 39 46 40 47 //[self addAntiClock:self]; 41 [self add3DTorus:self];48 //[self add3DTorus:self]; 42 49 //[self addBeamEffect:self]; 43 50 [[output frameNotificationCenter] addObserver:[[[LZDisplayDevice alloc] initWithView:renderView] autorelease]]; 44 51 } 45 52 … … 61 68 return; 62 69 63 TLTrack *track = [timelineView addTrackWithDelegate:self withName:@"Track 1"]; 64 assert(track != nil); 65 66 LZLayer *newLayer = [[LZLayer alloc] initWithDuration:[[animation elements] count]/24.]; 67 [newLayer insertElement:animation inTimeRange:LZMakeTimeRange(0,[[animation elements] count]/24.)]; 68 [[[timeline tracks] objectAtIndex:0] addLayer:newLayer]; 69 70 71 TLTime newTime; 72 newTime.length = 50; 73 newTime.position = 0; 74 newTime.start = 0; 75 newTime.end = 50; 76 77 [track addClipWithTime:newTime image:[NSImage imageNamed:@"movie"] title:@"ILDA Import" identifier:nil]; 78 [timelineView setNeedsDisplay:YES];//Is this necessary? I think timelineView sets this internally on clip add 79 [output setupDeviceWithTrack:newLayer frequency:1/24.]; 80 [[output frameNotificationCenter] addObserver:[[[LZDisplayDevice alloc] initWithView:renderView] autorelease]]; 70 [self addSequence:animation withLength:[[animation elements] count]/24.]; 81 71 } 82 72 83 73 - (IBAction)importFlash:(id)sender { 84 85 74 NSOpenPanel *openPanel = [NSOpenPanel openPanel]; 86 75 int result = [openPanel runModalForDirectory:NSHomeDirectory() file:nil types:[NSArray arrayWithObject:@"swf"]]; … … 91 80 if(animation == nil) 92 81 return; 93 TLTrack *track = [timelineView addTrackWithDelegate:self withName:@"Track 1"];94 assert(track != nil);95 82 96 LZLayer *newLayer = [[LZLayer alloc] initWithDuration:[[animation elements] count]/24.]; 97 [newLayer insertElement:animation inTimeRange:LZMakeTimeRange(0,[[animation elements] count]/24.)]; 98 [[[timeline tracks] objectAtIndex:0] addLayer:newLayer]; 99 100 TLTime newTime; 101 newTime.length = 50; 102 newTime.position = 0; 103 newTime.start = 0; 104 newTime.end = 50; 105 106 [track addClipWithTime:newTime image:[NSImage imageNamed:@"movie"] title:@"Flash_Import" identifier:nil]; 107 [timelineView setNeedsDisplay:YES];//Is this necessary? I think timelineView sets this internally on clip add 108 [output setupDeviceWithTrack:newLayer frequency:1/24.]; 109 [[output frameNotificationCenter] addObserver:[[[LZDisplayDevice alloc] initWithView:renderView] autorelease]]; 83 [self addSequence:animation withLength:[[animation elements] count]/24.]; 110 84 } 111 85 112 86 113 87 - (IBAction)addAntiClock:(id)sender { 114 LZLayer *newLayer = [[LZLayer alloc] initWithDuration:60]; 115 [newLayer insertElement:[[[LZAnticlock alloc] init] autorelease] inTimeRange:LZMakeTimeRange(0,60)]; 116 [[[timeline tracks] objectAtIndex:0] addLayer:newLayer]; 117 118 [output setupDeviceWithTrack:newLayer frequency:1/24.]; 119 [[output frameNotificationCenter] addObserver:[[[LZDisplayDevice alloc] initWithView:renderView] autorelease]]; 88 [self addGenerator:[LZAnticlock class]]; 120 89 } 121 90 122 91 - (IBAction)add3DTorus:(id)sender { 123 LZLayer *newLayer = [[LZLayer alloc] initWithDuration:60]; 124 [newLayer insertElement:[[[LZ3DTorus alloc] init] autorelease] inTimeRange:LZMakeTimeRange(0,60)]; 125 [[[timeline tracks] objectAtIndex:0] addLayer:newLayer]; 126 127 [output setupDeviceWithTrack:newLayer frequency:1/24.]; 128 [[output frameNotificationCenter] addObserver:[[[LZDisplayDevice alloc] initWithView:renderView] autorelease]]; 92 [self addGenerator:[LZ3DTorus class]]; 129 93 } 130 94 131 95 - (IBAction)addBeamEffect:(id)sender { 132 LZLayer *newLayer = [[LZLayer alloc] initWithDuration:60]; 133 [newLayer insertElement:[[[LZBeamEffect alloc] init] autorelease] inTimeRange:LZMakeTimeRange(0,60)]; 134 [[[timeline tracks] objectAtIndex:0] addLayer:newLayer]; 135 136 [output setupDeviceWithTrack:newLayer frequency:1/24.]; 137 [[output frameNotificationCenter] addObserver:[[[LZDisplayDevice alloc] initWithView:renderView] autorelease]]; 96 [self addGenerator:[LZBeamEffect class]]; 138 97 } 139 98 99 - (void)addGenerator:(Class)generatorClass 100 { 101 [self addSequence:[[[generatorClass alloc] init] autorelease] withLength:60]; 102 } 140 103 141 - (IBAction)playButtonPressed:(id)sender 142 { 143 if([sender state] == NSOnState) // Will Play 144 { 145 146 } 147 else if([sender state] == NSOffState) // Will Stop 148 { 149 150 } 151 } 104 105 - (void)addSequence:(LZSequenceableElement *)sequenceElement withLength:(NSTimeInterval)time 106 { 107 [layer insertElement:sequenceElement inTimeRange:LZMakeTimeRange([layer duration], time)]; 108 } 109 110 152 111 153 112 - (IBAction)stop:(id)sender { … … 155 114 } 156 115 157 - (void)userMovedPositionToClip:(TLClip *)aClip inTrack:(TLTrack *)aTrack atTimeInClip:(float)timeInClip atTimeInTrack:(float)timeInTrack158 {159 //NSLog(@"User moved to Clip %@ in Track %@ at %f in the clip and we're at %f in the track", aClip, aTrack, [timeInClip floatValue], [timeInTrack floatValue]);160 }161 162 - (void)userAddedClip:(TLClip *)aClip inTrack:(TLTrack *)aTrack atTimeInTrack:(float)timeInTrack163 {164 165 }166 167 - (void)userMovedClip:(TLClip *)aClip inTrack:(TLTrack *)aTrack atTimeInTrack:(float)timeInTrack168 {169 170 }171 172 - (void)userResizedClip:(TLClip *)aClip inTrack:(TLTrack *)aTrack173 {174 175 }176 177 - (BOOL)shouldClipMove:(TLClip *)aClip inTrack:(TLTrack *)aTrack by:(float)length178 {179 return YES;180 }181 182 - (BOOL)shouldClipResizeFromBeg:(TLClip *)aClip inTrack:(TLTrack *)aTrack by:(float)length183 {184 return YES;185 }186 187 - (BOOL)shouldClipResizeFromEnd:(TLClip *)aClip inTrack:(TLTrack *)aTrack by:(float)length188 {189 return YES;190 }191 192 - (void)didAddTrack:(TLTrack *)aTrack193 {194 195 }196 197 - (IBAction)pointSliderDidChange:(id)sender198 {199 200 }201 202 116 @end trunk/LaserLine_2.0/Src/OutputController/CompositeSource.m
r320 r360 24 24 25 25 - (NSData *)frameAtTime:(NSTimeInterval)aTime { 26 RawFrame frame = [[sources objectAtIndex:0] renderAtTime:aTime]; 27 NSMutableData *appendedData = [[NSMutableData alloc] initWithBytes:frame.points length:frame.pointCount*sizeof(RawPoint)]; 28 free(frame.points); 29 26 RawFrame frame; 27 NSMutableData *appendedData = [[NSMutableData alloc] initWithCapacity:500*sizeof(RawPoint)]; //we'll plan on getting ~500 points 28 30 29 NSEnumerator *enumerator = [sources objectEnumerator]; 31 30 LZLayer *anObject; 32 [enumerator nextObject]; 33 while (anObject = (LZLayer *)[enumerator nextObject]) { 31 while (anObject = [enumerator nextObject]) { 34 32 frame = [anObject renderAtTime:aTime]; 35 33 [appendedData appendBytes:frame.points length:frame.pointCount*sizeof(RawPoint)]; trunk/LaserLine_2.0/Src/OutputController/RawTypes.c
r337 r360 2 2 3 3 const RawPoint NullRawPoint = {0, 0, 0, 0, 0, 0}; 4 const RawFrame NullRawFrame = { &NullRawPoint, 0};4 const RawFrame NullRawFrame = {0x0, 0}; trunk/LaserLine_2.0/Src/Sequencing/Generators/LZ3DTorus.m
r352 r360 72 72 points[p].r = points[p].g = points[p].b = points[p].i = 0xFF; 73 73 } 74 75 74 76 75 return frame; 77 78 76 } 79 77 @end trunk/LaserLine_2.0/Src/Sequencing/LZFrame.h
r353 r360 4 4 #import "LZPoint.h" 5 5 #import "LZSequenceableElement.h" 6 #import "LZFrameObject.h" 6 7 7 8 @interface LZFrame : LZSequenceableElement … … 15 16 16 17 - (LZPolyline *)polyline; 17 - (void)add Polyline:(LZPolyline *)polyline;18 - (void)addFrameObject:(LZFrameObject *)aFrameObject; 18 19 19 20 - (RawFrame)renderAtPosition:(float)position; trunk/LaserLine_2.0/Src/Sequencing/LZFrame.m
r353 r360 36 36 } 37 37 38 - (void)add Polyline:(LZPolyline *)aPolyline38 - (void)addFrameObject:(LZFrameObject *)aFrameObject 39 39 { 40 [objects addObject:a Polyline];40 [objects addObject:aFrameObject]; 41 41 } 42 42 … … 46 46 47 47 frame.pointCount = 0; 48 LZ Polyline* object;48 LZFrameObject* object; 49 49 NSEnumerator *enumerator = [objects objectEnumerator]; 50 while(object = [enumerator nextOb ect])50 while(object = [enumerator nextObject]) 51 51 { 52 52 frame.pointCount += [object count]; … … 56 56 unsigned i = 0; 57 57 enumerator = [objects objectEnumerator]; 58 while(object = [enumerator nextOb ect])58 while(object = [enumerator nextObject]) 59 59 { 60 60 LZPoint *point; trunk/LaserLine_2.0/Src/Sequencing/LZLayer.h
r320 r360 24 24 - (NSTimeInterval)duration; 25 25 26 27 26 - (BOOL)timeRangeIsFree:(LZTimeRange)timeRange; 28 27 - (NSArray *)elementsInTimeRange:(LZTimeRange)timeRange; trunk/LaserLine_2.0/Src/Sequencing/LZPolyline.h
r353 r360 8 8 9 9 #import <Cocoa/Cocoa.h> 10 #import "LZ Point.h"10 #import "LZFrameObject.h" 11 11 12 12 13 @interface LZPolyline : NSObject13 @interface LZPolyline : LZFrameObject 14 14 { 15 15 NSMutableArray *pointArray; trunk/LaserLine_2.0/Src/Sequencing/LZSequenceableElement.m
r320 r360 47 47 for(i; i < [myFilters count]; i++) 48 48 { 49 [[myFilters objectAtIndex:i] filter:rawFrame atProgression:progression];49 // [[myFilters objectAtIndex:i] filter:rawFrame atProgression:progression]; 50 50 } 51 51 }
