This repository has been archived by the owner on Dec 5, 2019. It is now read-only.
forked from GTCMTold/Vertices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SoundObjectNodeToDraw.m
90 lines (70 loc) · 1.5 KB
/
SoundObjectNodeToDraw.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
//
// SoundObjectNodeToDraw.m
// Vertices
//
// Created by Scott on 11/14/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import "SoundObjectNodeToDraw.h"
@implementation SoundObjectNodeToDraw
- (SoundObjectNodeToDraw *) init
{
self = [super init];
if (self != nil)
{
for(int i = 0; i<MAX_TOUCHES; i+=1)
nodeToDraw.userNodeIDtoPlayingID[i] = -1;
nodeToDraw.numTouches = 0;
for (int i = 0; i < MAX_TOUCHES; i++)
{
nodeToDraw.pointIDs[i] = -1;
nodeToDraw.points[i].x = 0.0;
nodeToDraw.points[i].y = 0.0;
nodeToDraw.currentEditing[i] = 0;
}
}
return self;
}
- (int)getNumTouches
{
return nodeToDraw.numTouches;
}
- (void)setNumTouches:(int)numberOfTouches
{
nodeToDraw.numTouches = numberOfTouches;
}
- (int)getPointIDAtIndex:(int)index
{
if (index < MAX_TOUCHES)
return nodeToDraw.pointIDs[index];
}
- (int)getEditStatusAtIndex:(int)index
{
if (index < MAX_TOUCHES)
return nodeToDraw.currentEditing[index];
}
- (void)setEditStatusValue:(int)value atIndex:(int)index
{
if (index < MAX_TOUCHES)
nodeToDraw.currentEditing[index] = value;
}
- (void)setPointIDValue:(int)value atIndex:(int)index
{
if (index < MAX_TOUCHES)
nodeToDraw.pointIDs[index] = value;
}
- (CGPoint)getPointAtIndex:(int)index
{
if (index < MAX_TOUCHES)
return nodeToDraw.points[index];
}
- (void)setPointValues:(CGPoint)value atIndex:(int)index
{
if (index < MAX_TOUCHES)
nodeToDraw.points[index] = value;
}
- (void) dealloc
{
[super dealloc];
}
@end