Game Development Reference
In-Depth Information
y
β T
R C
β L
β R
x
β B
Figure 1.6. Diagram of the various positions used with each viewable region when
calculating the general morphing factors.
Boundary Case 1. Theviewableregion R with applied offset R λ is adjacent to a
smaller viewable region with applied offset of 2 R λ .
We will conditionally set the following morphing factors as follows:
T L =1,if θ ( β NL ,R λ )
θ max ;
T T =1,if θ ( β NT ,R λ )
θ max ;
T R =1,if θ ( β NR ,R λ )
θ max ;
T B =1,if θ ( β NB ,R λ )
θ max ;
β NL =( R Cx (2 × R λ ) ,R Cy );
β NT =( R Cx ,R Cy +(2
×
R λ ));
β NR =( R Cx +(2
×
R λ ) ,R Cy );
β NB =( R Cx ,R Cy
(2
×
R λ )).
The above set of conditionals test for the cases where an adjacent viewable
region has been split into smaller viewable regions. We therefore need to
lock the affected morphing factors to 1. This is to ensure that all of the
overlapping quadrilateral vertices exactly match with those of the smaller
adjacent viewable region. Figure 1.7 provides a diagram of the various
positions used when calculating the morphing factors for Boundary Case 1.
Boundary Case 2. The viewable region with applied offset R λ is adjacent to a
larger viewable region with applied offset of (2
R λ ).
In order to be able to test for this case, we need to ensure we have some ad-
ditional information regarding the current viewable region we are rendering.
In Stage 2 of our algorithm (explained in Section 1.2.3 ) , we needed to store
×
 
 
Search Nedrilad ::




Custom Search