
            /**
            IMPORTANT !!!
       
            DO NOT EDIT THIS FILE. IT IS GENERATED FROM approriate xml file in xmlresources/gbcommands BY
            THE JavaClassesGenerator.xslt. MODIFY THESE FILES INSTEAD OF THIS ONE.
       
            IMPORTANT END !!!
            */
            package
            cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands;
	    		import java.util.*;    
    import javax.vecmath.*;    
    import cz.cuni.amis.pogamut.base.communication.messages.*;    
    import cz.cuni.amis.pogamut.base.agent.worldview.*;    
    import cz.cuni.amis.pogamut.base.agent.worldview.objects.*;    
    import cz.cuni.amis.pogamut.base.communication.translator.*;    
    import cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.*;    
    import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType.Category;    
    import cz.cuni.amis.pogamut.base.exceptions.*;    
    import cz.cuni.amis.pogamut.base3d.worldview.objects.*;    
    import cz.cuni.amis.pogamut.ut2004.communication.messages.*;    
    import cz.cuni.amis.pogamut.ut2004.agent.worldview.objects.*;    
                
            
            /**
              
		Add custom ray for automatic ray tracing. If you send Id =
		Default, all rays will be erased and default set of rays will be
		loaded (straight ahead (1,0,0) with 250 length, 45 degrees left
		(1,–1,0) with 200 length, 45 degrees right (1,1,0) with 200
		length). This set of rays is also loaded by default. If you want
		to change existing ray, just support its Id in ADDRAY command
		along with new parameters. Direction of the rays work as
		follows. Bot is looking to x axis, that means if I want ray
		straight ahead I specify some vector on positive x axis (vectors
		in unreal are specified by (x,y,z) so it would look like this
		(1,0,0) or this (123,0,0) – numbers doesn't matter, its about
		direction - vectors will be normalized). If I want ray behind it
		would be (–1,0,0). 90 degrees right (0,1,0) etc.
	
                          Corresponding GameBots command is 
                          ADDRAY.
                      
             */
            
            public class
            AddRay extends
        CommandMessage
                        
            {
            
            
            
            /**
              Creates new instance of command AddRay.
              
		Add custom ray for automatic ray tracing. If you send Id =
		Default, all rays will be erased and default set of rays will be
		loaded (straight ahead (1,0,0) with 250 length, 45 degrees left
		(1,–1,0) with 200 length, 45 degrees right (1,1,0) with 200
		length). This set of rays is also loaded by default. If you want
		to change existing ray, just support its Id in ADDRAY command
		along with new parameters. Direction of the rays work as
		follows. Bot is looking to x axis, that means if I want ray
		straight ahead I specify some vector on positive x axis (vectors
		in unreal are specified by (x,y,z) so it would look like this
		(1,0,0) or this (123,0,0) – numbers doesn't matter, its about
		direction - vectors will be normalized). If I want ray behind it
		would be (–1,0,0). 90 degrees right (0,1,0) etc.
	Corresponding GameBots message for this command is 
              ADDRAY.
                  @param Id 
			User set Id of the ray, so the ray can be identified.
		
                  @param Direction 
			Vector direction of the ray (it will be relative - added to
			the vector, where the bot is looking, also takes into
			account angle of the floor the bot is standing on).
		
                  @param Length 
			Specifies the length of the ray (in UT units).
		
                  @param FastTrace 
			True if we want to use FastTrace function instead of Trace
			function (a bit faster but less information provided - just
			information if we hit something or not).
		
                  @param FloorCorrection 
      If we should correct ray directions accoring floor normal. Note: Has issue - we can't set set rays up or down when correction is active.
		
                  @param TraceActors 
			If we want to trace also actors – bots, monsters, players,
			items. False if we want to trace just level geometry.
		
              */
             public AddRay(
                String Id,  Vector3d Direction,  int Length,  boolean FastTrace,  boolean FloorCorrection,  boolean TraceActors) {
                    
                    this.Id = Id;
                
                    this.Direction = Direction;
                
                    this.Length = Length;
                
                    this.FastTrace = FastTrace;
                
                    this.FloorCorrection = FloorCorrection;
                
                    this.TraceActors = TraceActors;
                
                }
               
            
            		/**
		             Creates new instance of command AddRay.
		             
		Add custom ray for automatic ray tracing. If you send Id =
		Default, all rays will be erased and default set of rays will be
		loaded (straight ahead (1,0,0) with 250 length, 45 degrees left
		(1,–1,0) with 200 length, 45 degrees right (1,1,0) with 200
		length). This set of rays is also loaded by default. If you want
		to change existing ray, just support its Id in ADDRAY command
		along with new parameters. Direction of the rays work as
		follows. Bot is looking to x axis, that means if I want ray
		straight ahead I specify some vector on positive x axis (vectors
		in unreal are specified by (x,y,z) so it would look like this
		(1,0,0) or this (123,0,0) – numbers doesn't matter, its about
		direction - vectors will be normalized). If I want ray behind it
		would be (–1,0,0). 90 degrees right (0,1,0) etc.
	Corresponding GameBots message for this command is 
		             ADDRAY.
		             <p></p>WARNING: this is empty-command constructor, you have to use setters to fill it up!
		             */
            		public  AddRay() {
            		}
            	
            
            /////// Properties BEGIN
            
        /**
        
			User set Id of the ray, so the ray can be identified.
		 */
        protected
         String Id = 
        	null;
        
        
        /**
        
			User set Id of the ray, so the ray can be identified.
		 */
        public
        String getId() {
            return
         Id;
        }
        

        
            /**         
        
			User set Id of the ray, so the ray can be identified.
		 */
        public AddRay setId(String Id) {
            this.Id = Id;
            return this;
            }
       
        /**
        
			Vector direction of the ray (it will be relative - added to
			the vector, where the bot is looking, also takes into
			account angle of the floor the bot is standing on).
		 */
        protected
         Vector3d Direction = 
        	null;
        
        
        /**
        
			Vector direction of the ray (it will be relative - added to
			the vector, where the bot is looking, also takes into
			account angle of the floor the bot is standing on).
		 */
        public
        Vector3d getDirection() {
            return
         Direction;
        }
        

        
            /**         
        
			Vector direction of the ray (it will be relative - added to
			the vector, where the bot is looking, also takes into
			account angle of the floor the bot is standing on).
		 */
        public AddRay setDirection(Vector3d Direction) {
            this.Direction = Direction;
            return this;
            }
       
        /**
        
			Specifies the length of the ray (in UT units).
		 */
        protected
         int Length = 
        	0;
        
        
        /**
        
			Specifies the length of the ray (in UT units).
		 */
        public
        int getLength() {
            return
         Length;
        }
        

        
            /**         
        
			Specifies the length of the ray (in UT units).
		 */
        public AddRay setLength(int Length) {
            this.Length = Length;
            return this;
            }
       
        /**
        
			True if we want to use FastTrace function instead of Trace
			function (a bit faster but less information provided - just
			information if we hit something or not).
		 */
        protected
         boolean FastTrace = 
        	false;
        
        
        /**
        
			True if we want to use FastTrace function instead of Trace
			function (a bit faster but less information provided - just
			information if we hit something or not).
		 */
        public
        boolean isFastTrace() {
            return
         FastTrace;
        }
        

        
            /**         
        
			True if we want to use FastTrace function instead of Trace
			function (a bit faster but less information provided - just
			information if we hit something or not).
		 */
        public AddRay setFastTrace(boolean FastTrace) {
            this.FastTrace = FastTrace;
            return this;
            }
       
        /**
        
      If we should correct ray directions accoring floor normal. Note: Has issue - we can't set set rays up or down when correction is active.
		 */
        protected
         boolean FloorCorrection = 
        	false;
        
        
        /**
        
      If we should correct ray directions accoring floor normal. Note: Has issue - we can't set set rays up or down when correction is active.
		 */
        public
        boolean isFloorCorrection() {
            return
         FloorCorrection;
        }
        

        
            /**         
        
      If we should correct ray directions accoring floor normal. Note: Has issue - we can't set set rays up or down when correction is active.
		 */
        public AddRay setFloorCorrection(boolean FloorCorrection) {
            this.FloorCorrection = FloorCorrection;
            return this;
            }
       
        /**
        
			If we want to trace also actors – bots, monsters, players,
			items. False if we want to trace just level geometry.
		 */
        protected
         boolean TraceActors = 
        	false;
        
        
        /**
        
			If we want to trace also actors – bots, monsters, players,
			items. False if we want to trace just level geometry.
		 */
        public
        boolean isTraceActors() {
            return
         TraceActors;
        }
        

        
            /**         
        
			If we want to trace also actors – bots, monsters, players,
			items. False if we want to trace just level geometry.
		 */
        public AddRay setTraceActors(boolean TraceActors) {
            this.TraceActors = TraceActors;
            return this;
            }
       
            /////// Properties END
            
            /////// Extra Java code BEGIN
                        	
            	/////// Additional code from xslt BEGIN            	 
            			
            		
            		
            	/////// Additional code from xslt END            
				                    
	            /////// Extra Java from XML BEGIN
            		
            	/////// Extra Java from XML END
            	    
            /////// Extra Java code END
            
            
            
            /**
              * Cloning constructor.
              */
             public AddRay(AddRay original) {
                
                     this.Id=original.Id;
                
                     this.Direction=original.Direction;
                
                     this.Length=original.Length;
                
                     this.FastTrace=original.FastTrace;
                
                     this.FloorCorrection=original.FloorCorrection;
                
                     this.TraceActors=original.TraceActors;
                
             }   
             
             
                
                 
            public String toString() {
                return
                
                    	super.toString();
                     
             }
             
             public String toHtmlString() {
                return super.toString() +
             
            "<b>Id</b> : " + 
            String.valueOf(Id) + 
            " <br/> " +
             
            "<b>Direction</b> : " + 
            String.valueOf(Direction) + 
            " <br/> " +
             
            "<b>Length</b> : " + 
            String.valueOf(Length) + 
            " <br/> " +
             
            "<b>FastTrace</b> : " + 
            String.valueOf(FastTrace) + 
            " <br/> " +
             
            "<b>FloorCorrection</b> : " + 
            String.valueOf(FloorCorrection) + 
            " <br/> " +
             
            "<b>TraceActors</b> : " + 
            String.valueOf(TraceActors) + 
            " <br/> " +
             "";
             }            
             
             
             
                 public String toMessage() {
              		StringBuffer buf = new StringBuffer();
              		buf.append("ADDRAY");
              		
		    					if (Id != null) {
		    						buf.append(" {Id " + Id + "}");
		    					}
		    				
		    					if (Direction != null) {
		    						buf.append(" {Direction " + 
		    							Direction.getX() + "," + 
		    							Direction.getY() + "," + 
		    							Direction.getZ() + "}");
		    					}
		    				
		    					buf.append(" {Length " + Length + "}");
		    				
		    					buf.append(" {FastTrace " + FastTrace + "}");
		    				
		    					buf.append(" {FloorCorrection " + FloorCorrection + "}");
		    				
		    					buf.append(" {TraceActors " + TraceActors + "}");
		    				            
            		return buf.toString();
            }
             
             }
                         
        