예제 #1
0
        public void AddEntity(uint entity_id, SceneEntityType type)
        {
            Debug.Assert(entity_id > 0);

            SceneEntity entity;

            switch (type)
            {
            case SceneEntityType.ET_Model:
                entity = new SceneEntity();
                break;

            case SceneEntityType.ET_Light:
                entity = new SceneEntityLight();
                break;

            case SceneEntityType.ET_Camera:
            default:
                entity = new SceneEntityCamera();
                break;
            }

            entity.Id   = entity_id;
            entity.Type = type;
            scene_entity_category_[(int)type].Children.Add(new SceneEntityViewModel(wnd_, entity));
            scene_entity_category_[(int)type].Children.Last().SelectedInternal(true);

            entity.RetrieveProperties();
        }
예제 #2
0
 public KGEditorCommandSetCameraFarPlane(SceneEntityCamera camera, float far_plane)
     : base(KGEditorCommandCode.ECC_SetCameraFarPlane, "Set camera far plane")
 {
     camera_    = camera;
     far_plane_ = far_plane;
 }
예제 #3
0
 public KGEditorCommandSetCameraAspect(SceneEntityCamera camera, float aspect)
     : base(KGEditorCommandCode.ECC_SetCameraAspect, "Set camera aspect")
 {
     camera_ = camera;
     aspect_ = aspect;
 }
예제 #4
0
 public KGEditorCommandSetCameraFoV(SceneEntityCamera camera, float fov)
     : base(KGEditorCommandCode.ECC_SetCameraFoV, "Set camera fov")
 {
     camera_ = camera;
     fov_    = fov;
 }
예제 #5
0
 public KGEditorCommandSetCameraUpVec(SceneEntityCamera camera, float[] up_vec)
     : base(KGEditorCommandCode.ECC_SetCameraUpVec, "Set camera up vec")
 {
     camera_ = camera;
     up_vec_ = up_vec;
 }
예제 #6
0
 public KGEditorCommandSetCameraLookAt(SceneEntityCamera camera, float[] look_at)
     : base(KGEditorCommandCode.ECC_SetCameraLookAt, "Set camera look at")
 {
     camera_  = camera;
     look_at_ = look_at;
 }