forked from menssen/panoramagl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PLConstants.h
executable file
·178 lines (126 loc) · 4.52 KB
/
PLConstants.h
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
/*
* PanoramaGL library
* Version 0.1
* Copyright (c) 2010 Javier Baez <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma mark -
#pragma mark utility consts
#define kPI 3.14159265358979323846f
#define kFloatMinValue -1000000.0f
#define kFloatMaxValue FLT_MAX
#pragma mark -
#pragma mark object consts
#define kObjectDefaultAlpha 1.0f
#pragma mark -
#pragma mark buffer consts
#define kUseDepthBuffer 0
#pragma mark -
#pragma mark texture consts
#define kTextureMaxWidth 1024
#define kTextureMaxHeight 1024
#pragma mark -
#pragma mark cube consts
#define kCubeFrontFaceIndex 0
#define kCubeBackFaceIndex 1
#define kCubeLeftFaceIndex 2
#define kCubeRightFaceIndex 3
#define kCubeTopFaceIndex 4
#define kCubeBottomFaceIndex 5
#pragma mark -
#pragma mark sphere consts
#define kDefaultSphereDivs 30
#pragma mark -
#pragma mark hemisphere consts
#define kDefaultHemisphereDivs 20
#define kDefaultHemispherePreviewDivs 30
#pragma mark -
#pragma mark cylinder consts
#define kDefaultCylinderDivs 60
#define kDefaultCylinderHeight 3.0f
#define kDefaultCylinderHeightCalculated NO
#pragma mark -
#pragma mark rotation consts
#define kDefaultRotateSensitivity 110.0f
#define kDefaultAnimationTimerInterval 1.0f/30.0f
#define kDefaultAnimationTimerIntervalByFrame 1.0f/30.f
#define kDefaultAnimationFrameInterval 1
#define kDefaultRotateMinRange -180.0f
#define kDefaultRotateMaxRange 180.0f
#define kDefaultYawMinRange -180.f
#define kDefaultYawMaxRange 180.f
#define kDefaultPitchMinRange -90.0f
#define kDefaultPitchMaxRange 90.0f
#pragma mark -
#pragma mark fov (field of view) consts
#define kDefaultFov -0.2f
#define kDefaultFovSensitivity -1.0f
#define kFovMinValue -1.0f
#define kFovMaxValue 1.0f
#define kDefaultFovMinValue -0.2f
#define kDefaultFovMaxValue kFovMaxValue
#define kDefaultFovFactorMinValue 0.8f
#define kDefaultFovFactorMaxValue 1.20f
#define kFovFactorOffsetValue 1.0f
#define kFovFactorNegativeOffsetValue (kFovFactorOffsetValue - kDefaultFovFactorMinValue)
#define kFovFactorPositiveOffsetValue (kDefaultFovFactorMaxValue - kFovFactorOffsetValue)
#define kDefaultFOVFactorCorrectedMinValue 0.774f
#define kDefaultFOVFactorCorrectedMaxValue 1.108f
#define kFOVFactorCorrectedNegativeOffsetValue (kFovFactorOffsetValue - kDefaultFOVFactorCorrectedMinValue)
#define kFOVFactorCorrectedPositiveOffsetValue (kDefaultFOVFactorCorrectedMaxValue - kFovFactorOffsetValue)
#define kDefaultMinDistanceToEnableFov 8
#define kDefaultFovControlIncreaseDistance 1600.0f
#define kDefaultFovMinCounter 5
#pragma mark -
#pragma mark reset consts
#define kDefaultNumberOfTouchesForReset 4
#pragma mark -
#pragma mark inertia consts
#define kDefaultInertiaInterval 3
#pragma mark -
#pragma mark accelerometer consts
#define kDefaultAccelerometerSensitivity 7.0f
#define kDefaultAccelerometerInterval 1.0f/60.0f
#define kAccelerometerSensitivityMinValue 1.0f
#define kAccelerometerSensitivityMaxValue 10.0f
#define kAccelerometerMultiplyFactor 100.0f
#pragma mark -
#pragma mark scrolling consts
#define kDefaultMinDistanceToEnableScrolling 50
#pragma mark -
#pragma mark perspective consts
#define kPerspectiveValue 290.0f
#define kPerspectiveZNear 0.01f
#define kPerspectiveZFar 100.0f
#pragma mark -
#pragma mark scene-elements consts
#define kRatio 1.0f
#pragma mark -
#pragma mark shake consts
#define kShakeThreshold 100.0f
#define kShakeDiffTime 100
#pragma mark -
#pragma mark control consts
#define kZoomControlMinWidth 64
#define kZoomControlMinHeight 40
#define kZoomControlWidthPercentage 0.21f
#define kZoomControlHeightPercentage 0.08f
#pragma mark -
#pragma mark transition consts
#define kDefaultStepFade 0.05f
#pragma mark -
#pragma mark hotspot consts
#define kDefaultHotspotSize 0.05f
#define kDefaultHotspotAlpha 0.8f
#define kDefaultHotspotOverAlpha 1.0f