summary refs log tree commit diff stats
path: root/libs/cocos2d/CCActionCamera.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/cocos2d/CCActionCamera.h')
-rwxr-xr-xlibs/cocos2d/CCActionCamera.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/libs/cocos2d/CCActionCamera.h b/libs/cocos2d/CCActionCamera.h new file mode 100755 index 0000000..1ea83a7 --- /dev/null +++ b/libs/cocos2d/CCActionCamera.h
@@ -0,0 +1,73 @@
1/*
2 * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 *
4 * Copyright (c) 2008-2010 Ricardo Quesada
5 * Copyright (c) 2011 Zynga Inc.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 * THE SOFTWARE.
24 *
25 */
26
27#import "CCActionInterval.h"
28
29@class CCCamera;
30
31/** Base class for CCCamera actions
32 */
33@interface CCActionCamera : CCActionInterval <NSCopying>
34{
35 float centerXOrig_;
36 float centerYOrig_;
37 float centerZOrig_;
38
39 float eyeXOrig_;
40 float eyeYOrig_;
41 float eyeZOrig_;
42
43 float upXOrig_;
44 float upYOrig_;
45 float upZOrig_;
46}
47@end
48
49/** CCOrbitCamera action
50 Orbits the camera around the center of the screen using spherical coordinates
51 */
52@interface CCOrbitCamera : CCActionCamera <NSCopying>
53{
54 float radius_;
55 float deltaRadius_;
56 float angleZ_;
57 float deltaAngleZ_;
58 float angleX_;
59 float deltaAngleX_;
60
61 float radZ_;
62 float radDeltaZ_;
63 float radX_;
64 float radDeltaX_;
65
66}
67/** creates a CCOrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX */
68+(id) actionWithDuration:(float) t radius:(float)r deltaRadius:(float) dr angleZ:(float)z deltaAngleZ:(float)dz angleX:(float)x deltaAngleX:(float)dx;
69/** initializes a CCOrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX */
70-(id) initWithDuration:(float) t radius:(float)r deltaRadius:(float) dr angleZ:(float)z deltaAngleZ:(float)dz angleX:(float)x deltaAngleX:(float)dx;
71/** positions the camera according to spherical coordinates */
72-(void) sphericalRadius:(float*) r zenith:(float*) zenith azimuth:(float*) azimuth;
73@end