5
// Created by DoG on 19.02.07.
6
// Copyright 2007 Doemoetoer Gulyas. All rights reserved.
9
#import <Foundation/Foundation.h>
14
typedef struct JigGrid {
19
SimplexNoise* noisegen;
22
typedef struct JigSegment {
30
JigSegment GetJigSegmentFromFile(NSString* path);
31
void SplineSegmentToPiecewiseBezier(JigSegment* seg);
33
typedef struct JigCell {
34
JigSegment segments[4];
37
CGPoint attachmentPoints[4];
41
typedef struct JigPieces {
46
void FreeJigPieces(JigPieces pieces);
48
@interface JigsawGenerator : NSObject
58
int roundEdgeCornerCoordsToInt;
62
NSMutableDictionary* enabledEdges;
63
NSMutableDictionary* smoothedEdges;
66
- (JigPieces) generateJigsaw;
68
- (CGSize) puzzleSize;
70
@property(assign) float width, height, frequency, distortion;
71
@property(assign) int hcells, vcells, seed, octaves, noiseType, roundEdgeCornerCoordsToInt;
72
@property(retain) NSArray* edgeFiles;
73
@property(retain) NSMutableDictionary* enabledEdges;
74
@property(retain) NSMutableDictionary* smoothedEdges;