Диссертация (1137096), страница 49
Текст из файла (страница 49)
0 , 0 . 0 , 0 . 0 , 0 . 0 , 0 . 0 , 0 . 0 , } ;}@ A n y Lo g i cI n t er n al Co d eg en A P Ip r o t e c t e d s t a t i c f i n a l double [ ] _arrow1_pointsDX_xjal ( ) {r e t u r n new d o u b l e [ ] { 0 . 0 , 0 . 0 , 1 . 0 , −2.0 , −7.0 , −5.0 , −5.0 ,}@ A n y Lo g i cI n t er n al Co d eg en A P Ip r o t e c t e d s t a t i c f i n a l double [ ] _arrow1_pointsDY_xjal ( ) {r e t u r n new d o u b l e [ ] { 0 .
0 , 9 . 0 , 9 . 0 , 1 5 . 0 , 9 . 0 , 9 . 0 , 0 . 0 , } ;}@ A n y Lo g i cI n t er n al Co d eg en A P I,};,};};};23459155920592559305935p r o t e ct ed s t a t i c f i n a l double [ ] _arrow1_pointsDZ_xjal ( ) {r e t u r n new d o u b l e [ ] { 0 . 0 , 0 . 0 , 0 . 0 , 0 . 0 , 0 . 0 , 0 . 0 , 0 . 0 ,}};@ O v er r i d e@ A n y Lo g i cI n t er n al Co d eg en A P Ip u b l i c b o o l e a n o n S h a p e C l i c k ( i n t _ sh ap e , i n t i n d e x , d o u b l e c l i c k x , d o u b l e c l i c k y ) {switch ( _shape ) {c a s e _ ar r o w 3 :if ( true ) {S h a p e P o l y L i n e s e l f = t h i s . ar r o w 3 ;s c r o l l i n g (0 , −100) ;}break ;c a s e _ ar r o w 2 :if ( true ) {S h a p e P o l y L i n e s e l f = t h i s . ar r o w 2 ;s c r o l l i n g (100 ,0) ;}break ;c a s e _ ar r o w 4 :if ( true ) {S h a p e P o l y L i n e s e l f = t h i s .
ar r o w 4 ;594059455950s c r o l l i n g ( −100 ,0) ;}break ;c a s e _ ar r o w 1 :if ( true ) {S h a p e P o l y L i n e s e l f = t h i s . ar r o w 1 ;s c r o l l i n g (0 ,100) ;}break ;d e f a u l t : r e t u r n s u p e r . o n S h a p e C l i c k ( _ sh ap e , i n d e x , c l i c k x , c l i c k y ) ;}return false ;}595559605965597059755980598559905995@ O v er r i d e@ A n y Lo g i cI n t er n al Co d eg en A P Ip u b l i c v o i d e x e c u t e S h a p e C o n t r o l A c t i o n ( i n t _ sh ap e , i n t i n d e x ) {switch ( _shape ) {case _button_expl : {ShapeButton s e l f = t h i s . b u t t o n _ e x p l ;double x_try , y_try ;do {i f ( d i s t r _ e x p l .
e q u a l s ( " Равномерное р асп р едел ен и е " ) ) {x _ t r y = a0 + l e n 1 ∗Math . random ( ) ;y _ t r y = b0 + l e n 2 ∗Math . random ( ) ;} e l s e i f ( d i s t r _ e x p l . e q u a l s ( " Нормальное р асп р едел ен и е " ) ) {x _ t r y = a0 + n o r m al ( 0 , l e n 1 , l e n 1 / 2 + mu_norm_expl_x ∗ l e n 1 / 2 , s c a l e .
t o P i x e l s ( s i g _ n o r m _ e x p l _ x , LENGTH_UNIT_METER ) ) ;y _ t r y = b0 + n o r m al ( 0 , l e n 2 , l e n 2 / 2 + mu_norm_expl_y ∗ l e n 2 / 2 , s c a l e . t o P i x e l s ( s i g _ n o r m _ e x p l _ y , LENGTH_UNIT_METER ) ) ;} e l s e i f ( d i s t r _ e x p l . e q u a l s ( " Тр еу го л ь н о е р асп р едел ен и е " ) ) {x _ t r y = a0 + t r i a n g u l a r ( 0 , l e n 1 , l e n 1 / 2 + c _ t r i a n _ e x p l _ x ∗ l e n 1 / 2 ) ;y _ t r y = b0 + t r i a n g u l a r ( 0 , l e n 2 , l e n 2 / 2 + c _ t r i a n _ e x p l _ y ∗ l e n 2 / 2 ) ;} else {x _ t r y = a0 + l a p l a c e ( s c a l e . t o P i x e l s ( a _ l a p l _ e x p l _ x , LENGTH_UNIT_METER ) , l e n 1 / 2 + b _ l a p l _ e x p l _ x ∗ l e n 1 / 2 ) ;y _ t r y = b0 + l a p l a c e ( s c a l e .
t o P i x e l s ( a _ l a p l _ e x p l _ y , LENGTH_UNIT_METER ) , l e n 2 / 2 + b _ l a p l _ e x p l _ y ∗ l e n 2 / 2 ) ;}} w h i l e ( ! i n R e c t a n g l e ( a0 , b0 , a0 + l e n 1 , b0+ l e n 2 , x _ t r y , y _ t r y ) ) ;a d d _ e x p l o s i o n ( ) . setXYZ ( x _ t r y , y _ t r y , 0 ) ;t _ e x p l . add ( e x p l , t ) ;x _ e x p l . add ( e x p l , x _ t r y ) ;y _ e x p l . add ( e x p l , y _ t r y ) ;d a t a b a s e . m o d i f y ( " INSERT INTO e x p l o s i o n v a l u e s ( " + I n t e g e r . t o S t r i n g ( v e r s i o n ) + " , "+D o u b l e . t o S t r i n g ( x _ t r y ) + " , " +D o u b l e .
t o S t r i n g ( y _ t r y ) + " , " +D o u b l e . t o S t r i n g ( v a r e p s i l o n _ 0 ) + " , "+D o u b l e . t o S t r i n g ( v a r e p s i l o n _ 1 ) + " , " +D o u b l e . t o S t r i n g ( v a r e p s i l o n _ 2 ) + " , "+D o u b l e . t o S t r i n g ( t _ e x p l . g e t ( e x p l ) ) + " , " + I n t e g e r . t o S t r i n g ( e x p l +1 ) + " ) " ) ;f o r ( i n t i = 0 ; i < p e r s o n . s i z e ( ) ; i ++) {p e r s o n . g e t ( i ) . t _ e x p l . add ( e x p l , t _ e x p l .
g e t ( e x p l ) ) ;p e r s o n . g e t ( i ) . n _ e x p l ++;i f ( p e r s o n . g e t ( i ) . d i s t a n c e T o ( x _ t r y , y _ t r y ) <= e x p l o s i o n . g e t ( e x p l ) . e p s i l o n 0 ) {person . get ( i ) . t_1 = 0;person . get ( i ) . s e t _ s t a t u s ( Status . k i l l e d ) ;person . get ( i ) . set_status_change ( tru e ) ;person . get ( i ) . s e t _ s i t u a t i o n ( Si t u a t io n .
immediately ) ;} e l s e i f ( p e r s o n . g e t ( i ) . d i s t a n c e T o ( x _ t r y , y _ t r y ) <= e x p l o s i o n . g e t ( e x p l ) . e p s i l o n 1 ) {p e r s o n . g e t ( i ) . t _ 1 = D o u b l e . POSITIVE_INFINITY;person . get ( i ) . s e t _ s t a t u s ( Status . in ju red ) ;235600060056010601560206025603060356040person .
get ( i ) . set_status_change ( tru e ) ;p e r s o n . g e t ( i ) . s e t _ v _ h a t _ m a x ( ( p e r s o n . g e t ( i ) . d i s t a n c e T o ( x _ t r y , y _ t r y )−e x p l o s i o n . g e t ( e x p l ) . e p s i l o n 0 ) / ( e x p l o s i o n . g e t ( e x p l ) .
e p s i l o n 1 −e x p l o s i o n . g e t ( e x p l ) . e p s i l o n 0 ) ∗ p e r s o n . g e t ( i ) . v _ h at _ m ax ) ;i f ( p e r s o n . g e t ( i ) . g e t V e l o c i t y ( ) > p e r s o n . g e t ( i ) . v _ h at _ m ax ) {p e r s o n . g e t ( i ) . s e t V e l o c i t y ( p e r s o n . g e t ( i ) . v _ h at _ m ax ) ;}person . get ( i ) . s e t _ s i t u a t i o n ( Si t u a t io n .
immediately ) ;} e l s e i f ( p e r s o n . g e t ( i ) . d i s t a n c e T o ( x _ t r y , y _ t r y ) <= e x p l o s i o n . g e t ( e x p l ) . e p s i l o n 2 ) {p e r s o n . g e t ( i ) . t _ 1 = t _ e x p l . g e t ( e x p l ) + k ap p a_ 1∗Math . exp (−( p e r s o n . g e t ( i ) . d i s t a n c e T o ( x _ t r y , y _ t r y )−e x p l o s i o n . g e t ( e x p l ) . e p s i l o n 1 ) ) ;person . get ( i ) . s e t _ s t a t u s ( Status .
d i s o r i e n te d ) ;person . get ( i ) . set_status_change ( tru e ) ;person . get ( i ) . s e t _ s i t u a t i o n ( Si t u a t io n . immediately ) ;} else {p e r s o n . g e t ( i ) . t _ 1 = t _ e x p l . g e t ( e x p l ) + k ap p a_ 1∗Math . exp (−( p e r s o n . g e t ( i ) . d i s t a n c e T o ( x _ t r y , y _ t r y )−e x p l o s i o n . g e t ( e x p l ) . e p s i l o n 1 ) ) ;person .
get ( i ) . s e t _ s i t u a t i o n ( Si t u a t io n . immediately ) ;}person . get ( i ) . set_expl ( tru e ) ;}e x p l ++;button_expl. setVisible ( false ) ;;}break ;case _ bu tt on _s t at : {ShapeButton s e l f = t h i s . b u t t o n _ s t a t ;viewArea_stat . navigateTo () ;;}break ;case _button_base : {ShapeButton s e l f = t h i s . button_base ;viewArea_base . navigateTo ( ) ;;}break ;c a s e _ b u t t o n _ zo o m : {S h a p e B u t t o n s e l f = t h i s . b u t t o n _ zo o m ;v i e w A r e a _ b a s e . s e t S c a l i n g ( v i e w A r e a _ b a s e . ZOOM_TO_FIT ) ;viewArea_base . navigateTo ( ) ;;}break ;case _button_scale : {ShapeButton s e l f = t h i s . b u t t o n _ s c a l e ;v i e w A r e a _ b a s e .
s e t S c a l i n g ( v i e w A r e a _ b a s e . SPECIFIED_ZOOM ) ;viewArea_base . navigateTo ( ) ;;}break ;default :s u p e r . e x e c u t e S h a p e C o n t r o l A c t i o n ( _ sh ap e , i n d e x ) ;break ;}}60456050ShapeScale scale_Shape ;ShapeButton b u t t o n _ e x p l ;ShapeButton b u t t o n _ s t a t ;ShapeButton button_base ;S h a p e B u t t o n b u t t o n _ zo o m ;ShapeButton b u t t o n _ s c a l e ;TimePlot p l o t _ s t ;TimePlot p l o t _ s a v e d ;ShapeRectangle r e c t a n g l e _ b a s e ;6055/ ∗∗∗ <i >П о л ь зо в а т ел ь не должен вызывать этот метод </ i >∗/@ A n y Lo g i cI n t er n al Co d eg en A P I6060p r i v a t e v o i d _ a r c _ r i g h t _ S e t D y n a m i c P a r a m s _ x j a l ( S h ap eA r c s h a p e ) {shape .
setX (a0 + l e n 1);shape . setY (6065 b21 +( b22−b21 ) / 2);shape . setRadiusX (s c a l e . t o P i x e l s ( edge_x , LENGTH_UNIT_METER ));6070shape . setRadiusY (( b22−b21 ) / 2 + s c a l e . t o P i x e l s ( edge_y , LENGTH_UNIT_METER ));}6075S h ap eA r c a r c _ r i g h t ;/ ∗∗236∗ <i >П о л ь зо в а т ел ь не должен вызывать этот метод </ i >∗/@ A n y Lo g i cI n t er n al Co d eg en A P Ip r i v a t e v o i d _ a r c _ l e f t _ S e t D y n a m i c P a r a m s _ x j a l ( S h ap eA r c s h a p e ) {shape .
setX (6080a0);6085shape . setY (b11 +( b12−b11 ) / 2);shape . setRadiusX (s c a l e . t o P i x e l s ( edge_x , LENGTH_UNIT_METER )6090 ) ;shape . setRadiusY (( b12−b11 ) / 2 + s c a l e . t o P i x e l s ( edge_y , LENGTH_UNIT_METER ));}6095S h ap eA r c a r c _ l e f t ;ShapeRectangle r e c t a n g l e _ s t a t ;ShapeRectangle geometry ;ShapeText t e x t ;6100ShapeRectangle geometry1 ;ShapeText t e x t 1 ;ShapeRectangle geometry2 ;ShapeText t e x t 2 ;ShapeRectangle geometry3 ;6105ShapeText t e x t 3 ;ShapeRectangle geometry4 ;ShapeText t e x t 4 ;ShapeRectangle geometry5 ;ShapeText t e x t 5 ;6110/ ∗∗∗ <i >П о л ь зо в а т ел ь не должен вызывать этот метод </ i >∗/@ A n y Lo g i cI n t er n al Co d eg en A P I6115p r i v a t e v o i d _ e x p l o s i o n _ p r e s e n t a t i o n _ S e t D y n a m i c P a r a m s _ x j a l ( S h a p e E m b e d d e d O b j e c t P r e s e n t a t i o n sh ap e , i n t i n d e x ) {shape .
setEmbeddedObject_xjal (e x p l o si o n . get ( index ));}612061256130613561406145/ ∗∗∗ <i >П о л ь зо в а т ел ь не должен вызывать этот метод </ i >∗/@ A n y Lo g i cI n t er n al Co d eg en A P Ip u b l i c ShapeEmbeddedObjectPresentation _ e x p l o s i o n _ p r e s e n t a t i o n _ c r e a t e S h a p e W i t h S t a t i c P r o p e r t i e s _ x j a l ( f i n a l i n t _index ) {S h a p e E m b e d d e d O b j e c t P r e s e n t a t i o n s h a p e = new S h a p e E m b e d d e d O b j e c t P r e s e n t a t i o n ( Main . t h i s , SHAPE_DRAW_2D3D , t r u e , −160.0 , −170.0 , 0 . 0 ,0.0 ,f a l se , e x p l o si o n . get ( _index ) ) ;r e t u r n shape ;}/ ∗∗∗ <i >П о л ь зо в а т ел ь не должен вызывать этот метод </ i >∗/@ A n y Lo g i cI n t er n al Co d eg en A P Iprivate int _explosion_presentation_Replication () {returnexplosion .