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(); }
public KGEditorCommandSetCameraFarPlane(SceneEntityCamera camera, float far_plane) : base(KGEditorCommandCode.ECC_SetCameraFarPlane, "Set camera far plane") { camera_ = camera; far_plane_ = far_plane; }
public KGEditorCommandSetCameraAspect(SceneEntityCamera camera, float aspect) : base(KGEditorCommandCode.ECC_SetCameraAspect, "Set camera aspect") { camera_ = camera; aspect_ = aspect; }
public KGEditorCommandSetCameraFoV(SceneEntityCamera camera, float fov) : base(KGEditorCommandCode.ECC_SetCameraFoV, "Set camera fov") { camera_ = camera; fov_ = fov; }
public KGEditorCommandSetCameraUpVec(SceneEntityCamera camera, float[] up_vec) : base(KGEditorCommandCode.ECC_SetCameraUpVec, "Set camera up vec") { camera_ = camera; up_vec_ = up_vec; }
public KGEditorCommandSetCameraLookAt(SceneEntityCamera camera, float[] look_at) : base(KGEditorCommandCode.ECC_SetCameraLookAt, "Set camera look at") { camera_ = camera; look_at_ = look_at; }