Game Development Reference
In-Depth Information
( P L ,P T ,P R ,P B ,P C ) are calculated as follows:
P L = P 1 ×
1
2 T L + P 4 ×
2 T L ,
1
1
P T = P 1 ×
1
2 T T + P 2 ×
2 T T ,
1
1
P R = P 2 ×
1
2 T R + P 3 ×
2 T R ,
1
1
P B = P 4 ×
1
2 T B + P 3 ×
2 T B ,
1
1
P C = P 1 ×
1
2 T C + P 3 ×
2 T C .
1
1
Given a viewable region span θ at point P and applied offset λ , written as θ ( P, λ ),
we are able to calculate a morphing factor T ( P, λ ), by using the following formula:
1
2
0 ,
θ ( P, λ )
θ max ,
1
2
T ( P, λ )=
( θ ( P, λ ) max )
×
2
1 ,
θ max ( P, λ ) max ,
θ max .
We calculate each of the general morphing factors ( T L ,T T ,T R ,T B ,T C )foraview-
able region R with a center position R C and applied offset R λ as follows:
1 ,
θ ( P, λ )
T L = T ( β L ,R λ ) ,
T T = T ( β T ,R λ ) ,
T R = T ( β R ,R λ ) ,
T B = T ( β B ,R λ ) ,
T C = T ( R C ,R λ ) ,
β L =( R Cx
R λ ,R Cy ) ,
β T =( R Cx ,R Cy + R λ ) ,
β R =( R Cx + R λ ,R Cy ) ,
β B =( R Cx ,R Cy
R λ ) .
These general morphing factors will be applied when rendering a viewable region,
and assumes that the neighboring viewable regions have the same applied offset
R λ . Figure 1.6 provides a diagram of the various positions used when calculating
the general morphing factors.
There are two special boundary cases we need to handle when calculating the
morphing factors. These special cases arise when one viewable region is adjacent
to another viewable region of a larger or smaller applied offset λ .Thecasesare
defined as follows:
 
Search Nedrilad ::




Custom Search