/ *   
 
   *   P R O J E C T :   N y A R T o o l k i t ( E x t e n s i o n ) 
 
   *   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
   *   T h e   N y A R T o o l k i t   i s   J a v a   e d i t i o n   A R T o o l K i t   c l a s s   l i b r a r y . 
 
   *   C o p y r i g h t   ( C ) 2 0 0 8 - 2 0 0 9   R y o   I i z u k a 
 
   * 
 
   *   T h i s   p r o g r a m   i s   f r e e   s o f t w a r e :   y o u   c a n   r e d i s t r i b u t e   i t   a n d / o r   m o d i f y 
 
   *   i t   u n d e r   t h e   t e r m s   o f   t h e   G N U   G e n e r a l   P u b l i c   L i c e n s e   a s   p u b l i s h e d   b y 
 
   *   t h e   F r e e   S o f t w a r e   F o u n d a t i o n ,   e i t h e r   v e r s i o n   3   o f   t h e   L i c e n s e ,   o r 
 
   *   ( a t   y o u r   o p t i o n )   a n y   l a t e r   v e r s i o n . 
 
   *   
 
   *   T h i s   p r o g r a m   i s   d i s t r i b u t e d   i n   t h e   h o p e   t h a t   i t   w i l l   b e   u s e f u l , 
 
   *   b u t   W I T H O U T   A N Y   W A R R A N T Y ;   w i t h o u t   e v e n   t h e   i m p l i e d   w a r r a n t y   o f 
 
   *   M E R C H A N T A B I L I T Y   o r   F I T N E S S   F O R   A   P A R T I C U L A R   P U R P O S E .     S e e   t h e 
 
   *   G N U   G e n e r a l   P u b l i c   L i c e n s e   f o r   m o r e   d e t a i l s . 
 
   * 
 
   *   Y o u   s h o u l d   h a v e   r e c e i v e d   a   c o p y   o f   t h e   G N U   G e n e r a l   P u b l i c   L i c e n s e 
 
   *   a l o n g   w i t h   t h i s   p r o g r a m .     I f   n o t ,   s e e   < h t t p : / / w w w . g n u . o r g / l i c e n s e s / > . 
 
   *   
 
   *   F o r   f u r t h e r   i n f o r m a t i o n   p l e a s e   c o n t a c t . 
 
   * 	 h t t p : / / n y a t l a . j p / n y a t o o l k i t / 
 
   * 	 < a i r m a i l ( a t ) e b o n y . p l a l a . o r . j p >   o r   < n y a t l a ( a t ) n y a t l a . j p > 
 
   *   
 
   * / 
 
 u s i n g   j p . n y a t l a . n y a r t o o l k i t . c s . c o r e ; 
 
 
 
 n a m e s p a c e   j p . n y a t l a . n y a r t o o l k i t . c s . m a r k e r s y s t e m 
 
 { 
 
         p u b l i c   c l a s s   N y A R S i n g l e C a m e r a S y s t e m 
 
         { 
 
 	         / * *   [pe$P0Sn0F A R 00000n0Rg$P[ m m ] g0Y00* / 
 
 	         p u b l i c   c o n s t   d o u b l e   F R U S T U M _ D E F A U L T _ F A R _ C L I P = 1 0 0 0 0 ; 
 
 	         / * *   [pe$P0Sn0N E A R 00000n0Rg$P[ m m ] g0Y00* / 
 
 	         p u b l i c   c o n s t   d o u b l e   F R U S T U M _ D E F A U L T _ N E A R _ C L I P = 1 0 ; 
 
         	 
 
 	         p r o t e c t e d   N y A R P a r a m   _ r e f _ p a r a m ; 
 
 	         p r o t e c t e d   N y A R F r u s t u m   _ f r u s t u m ; 	 
 
 	         p r o t e c t e d   N y A R S i n g l e C a m e r a S y s t e m ( N y A R P a r a m   i _ r e f _ c p a r a m ) 
 
 	         { 
 
 	 	         t h i s . _ o b s e r v e r = n e w   O b s e r v e r L i s t ( 3 ) ; 
 
 	 	         t h i s . _ r e f _ p a r a m = i _ r e f _ c p a r a m ; 
 
 	 	         t h i s . _ f r u s t u m = n e w   N y A R F r u s t u m ( ) ; 
 
 	 	         t h i s . s e t P r o j e c t i o n M a t r i x C l i p p i n g ( F R U S T U M _ D E F A U L T _ N E A R _ C L I P ,   F R U S T U M _ D E F A U L T _ F A R _ C L I P ) ; 
 
         	 	 
 
 	         } 
 
 	         / * * 
 
 	           *   [ r e a d o n l y ] 
 
 	           *   s(Wn0000000000000ԏW0~0Y00
 
 	           *   @ r e t u r n 
 
 	           * / 
 
 	         p u b l i c   N y A R F r u s t u m   g e t F r u s t u m ( ) 
 
 	         { 
 
 	 	         r e t u r n   t h i s . _ f r u s t u m ; 
 
 	         } 
 
                 / * * 
 
                   *   [ r e a d o n l y ] 
 
                   *   s(Wn0000000000000000ԏW0~0Y00
 
                   *   @ r e t u r n 
 
                   * / 
 
                 p u b l i c   N y A R P a r a m   g e t A R P a r a m ( ) 
 
                 { 
 
                         r e t u r n   t h i s . _ r e f _ p a r a m ; 
 
                 } 
 
 	         / * * 
 
 	           *   S000000-[W0~0Y00
 
 	           *   S0n0peo00$P0fe_0{v2nn0{ @ l i n k   I O b s e r v e r } 000000x00{ @ l i n k   # E V _ U P D A T E } w0OW0~0Y00
 
 	           *   @ p a r a m   i _ n e a r 
 
 	           *   eW0D0N E A R 00000
 
 	           *   @ p a r a m   i _ f a r 
 
 	           *   eW0D0F A R 00000
 
 	           * / 
 
 	         p u b l i c   v i r t u a l   v o i d   s e t P r o j e c t i o n M a t r i x C l i p p i n g ( d o u b l e   i _ n e a r , d o u b l e   i _ f a r ) 
 
 	         { 
 
 	 	         N y A R I n t S i z e   s = t h i s . _ r e f _ p a r a m . g e t S c r e e n S i z e ( ) ; 
 
 	 	         t h i s . _ f r u s t u m . s e t V a l u e ( t h i s . _ r e f _ p a r a m . g e t P e r s p e c t i v e P r o j e c t i o n M a t r i x ( ) , s . w , s . h , i _ n e a r , i _ f a r ) ; 
 
 	 	         / / 0000n0w
 
 	 	         t h i s . _ o b s e r v e r . n o t i f y O n U p d a t e C a m e r a P a r a m e t o r ( t h i s . _ r e f _ p a r a m , i _ n e a r , i _ f a r ) ; 
 
 	         } 	 
 
         	 
 
         	 
 
 	         / / 
 
 	         / / 	 0000w|
 
 	         / / 
 
 	         p r o t e c t e d   c l a s s   O b s e r v e r L i s t   :   N y A R P o i n t e r S t a c k < I N y A R S i n g l e C a m e r a S y s t e m O b s e r v e r > 
 
 	         { 
 
 	 	         p u b l i c   O b s e r v e r L i s t ( i n t   i _ l e n g t h ) 
 
                         { 
 
 	 	 	         b a s e . i n i t I n s t a n c e ( i _ l e n g t h ) ; 
 
 	 	         } 
 
 	 	         p u b l i c   v o i d   n o t i f y O n U p d a t e C a m e r a P a r a m e t o r ( N y A R P a r a m   i _ p a r a m , d o u b l e   i _ n e a r , d o u b l e   i _ f a r ) 
 
 	 	         { 
 
 	 	 	         f o r ( i n t   i = 0 ; i < t h i s . _ l e n g t h ; i + + ) { 
 
 	 	 	 	         t h i s . _ i t e m s [ i ] . o n U p d a t e C a m e r a P a r a m e t o r ( i _ p a r a m , i _ n e a r , i _ f a r ) ; 
 
 	 	 	         } 
 
 	 	         } 
 
 	         } 
 
 	         p r o t e c t e d   O b s e r v e r L i s t   _ o b s e r v e r ; 
 
 	         / * * 
 
 	           *   { @ l i n k   N y A R S i n g l e C a m e r a S y s t e m } n00000w000x0000000RW0~0Y00
 
 	           *   S0n0peo0000000L0wRBfk0O(uW0~0Y00000L0O(uY00S0h0o0YO0B00~0[000
 
 	           *   @ p a r a m   i _ o b s e r v e r 
 
 	           *   wHQn000000000000
 
 	           * / 
 
 	         p u b l i c   v o i d   a d d O b s e r v e r ( I N y A R S i n g l e C a m e r a S y s t e m O b s e r v e r   i _ o b s e r v e r ) 
 
 	         { 
 
 	 	         t h i s . _ o b s e r v e r . p u s h A s s e r t ( i _ o b s e r v e r ) ; 
 
 	 	         N y A R F r u s t u m . F r u s t u m P a r a m   f = t h i s . g e t F r u s t u m ( ) . g e t F r u s t u m P a r a m ( n e w   N y A R F r u s t u m . F r u s t u m P a r a m ( ) ) ; 
 
 	 	         i _ o b s e r v e r . o n U p d a t e C a m e r a P a r a m e t o r ( t h i s . _ r e f _ p a r a m ,   f . n e a r ,   f . f a r ) ; 	 	 
 
 	         } 
 
         } 
 
 } 