PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/libs/cocos2d/CCCameraAction.h

http://github.com/kstenerud/ObjectAL-for-iPhone
C Header | 71 lines | 30 code | 9 blank | 32 comment | 0 complexity | 025c4ebd44e80e1c9de8a31e67ddb539 MD5 | raw file
 1/*
 2 * cocos2d for iPhone: http://www.cocos2d-iphone.org
 3 *
 4 * Copyright (c) 2008-2010 Ricardo Quesada
 5 *
 6 * Permission is hereby granted, free of charge, to any person obtaining a copy
 7 * of this software and associated documentation files (the "Software"), to deal
 8 * in the Software without restriction, including without limitation the rights
 9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 * 
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 * 
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 *
24 */
25
26#import "CCIntervalAction.h"
27
28@class CCCamera;
29
30/** Base class for CCCamera actions
31 */
32@interface CCCameraAction : CCIntervalAction <NSCopying> {
33	
34	float centerXOrig;
35	float centerYOrig;
36	float centerZOrig;
37	
38	float eyeXOrig;
39	float eyeYOrig;
40	float eyeZOrig;
41	
42	float upXOrig;
43	float upYOrig;
44	float upZOrig;
45}
46@end
47
48/** CCOrbitCamera action
49 Orbits the camera around the center of the screen using spherical coordinates
50 */
51@interface CCOrbitCamera : CCCameraAction <NSCopying> {
52	float radius;
53	float deltaRadius;
54	float angleZ;
55	float deltaAngleZ;
56	float angleX;
57	float deltaAngleX;
58	
59	float radZ;
60	float radDeltaZ;
61	float radX;
62	float radDeltaX;
63	
64}
65/** creates a CCOrbitCamera action with radius, delta-radius,  z, deltaZ, x, deltaX */
66+(id) actionWithDuration:(float) t radius:(float)r deltaRadius:(float) dr angleZ:(float)z deltaAngleZ:(float)dz angleX:(float)x deltaAngleX:(float)dx;
67/** initializes a CCOrbitCamera action with radius, delta-radius,  z, deltaZ, x, deltaX */
68-(id) initWithDuration:(float) t radius:(float)r deltaRadius:(float) dr angleZ:(float)z deltaAngleZ:(float)dz angleX:(float)x deltaAngleX:(float)dx;
69/** positions the camera according to spherical coordinates */
70-(void) sphericalRadius:(float*) r zenith:(float*) zenith azimuth:(float*) azimuth;
71@end