예제 #1
0
파일: Agent.cs 프로젝트: kphu1301/AGMGSK
 /// <summary>
 /// Create an Agent.
 /// All Agents are collidable and have a single instance Object3D named agentObject.
 /// Set StepSize, create first, follow and above cameras.
 /// Set first as agentCamera
 /// <param name="stage"></param>
 /// <param name="label"></param>
 /// <param name="position"></param>
 /// <param name="orientAxis"></param>
 /// <param name="radians"></param>
 /// <param name="meshFile"></param>
 /// </summary>
 public Agent(Stage stage, string label, Vector3 position, Vector3 orientAxis, float radians, string meshFile)
     : base(stage, label, meshFile)
 {
     // create an Object3D for this agent
     agentObject = addObject(position, orientAxis, radians);
     first       = new Camera(stage, agentObject, Camera.CameraEnum.FirstCamera);
     follow      = new Camera(stage, agentObject, Camera.CameraEnum.FollowCamera);
     above       = new Camera(stage, agentObject, Camera.CameraEnum.AboveCamera);
     stage.addCamera(first);
     stage.addCamera(follow);
     stage.addCamera(above);
     agentCamera = first;
 }
예제 #2
0
파일: Agent.cs 프로젝트: vfigu/AGMGSK
        /// <summary>
        /// Create an Agent.
        /// All Agents are collidable and have a single instance Object3D named agentObject.
        /// Set StepSize, create first, follow and above cameras.
        /// Set first as agentCamera
        /// <param name="stage"></param>
        /// <param name="label"></param>
        /// <param name="position"></param>
        /// <param name="orientAxis"></param>
        /// <param name="radians"></param>
        /// <param name="meshFile"></param>
        /// </summary>
        public Agent(Stage stage, string label, Vector3 position, Vector3 orientAxis,
                     float radians, string meshFile, string objOfInterest = null, List <Model3D> objList = null, float boundingMultiplier = 1.05f)
            : base(stage, label, meshFile, boundingMultiplier)
        {
            // create an Object3D for this agent
            agentObject  = addObject(position, orientAxis, radians);
            treasure     = objOfInterest;
            treasureList = objList;
            nCount       = treasureList.Count;

            first  = new Camera(stage, agentObject, Camera.CameraEnum.FirstCamera);
            follow = new Camera(stage, agentObject, Camera.CameraEnum.FollowCamera);
            above  = new Camera(stage, agentObject, Camera.CameraEnum.AboveCamera);
            stage.addCamera(first);
            stage.addCamera(follow);
            stage.addCamera(above);
            agentCamera = first;
        }