public KGEditorCommandRemoveEntity(KGEditorCoreWrapper core, MainWindow wnd, SceneEntity entity) : base(KGEditorCommandCode.ECC_RemoveEntity, "Remove entity") { core_ = core; wnd_ = wnd; entity_ = entity; }
public KGEditorCommandAddCamera(KGEditorCoreWrapper core, MainWindow wnd, Scene scene, string name) : base(KGEditorCommandCode.ECC_AddCamera, "Add camera") { core_ = core; wnd_ = wnd; scene_ = scene; name_ = name; }
public KGEditorCommandAddModel(KGEditorCoreWrapper core, MainWindow wnd, Scene scene, string meshml_name) : base(KGEditorCommandCode.ECC_AddModel, "Add model") { core_ = core; wnd_ = wnd; scene_ = scene; model_name_ = meshml_name; }
public KGEditorCommandAddLight(KGEditorCoreWrapper core, MainWindow wnd, Scene scene, KGEditorCoreWrapper.LightType type, string name) : base(KGEditorCommandCode.ECC_AddLight, "Add light") { core_ = core; wnd_ = wnd; scene_ = scene; type_ = type; name_ = name; }
public KGEditorCommandSetControlMode(KGEditorCoreWrapper core, KGEditorCoreWrapper.ControlMode mode) : base(core, KGEditorCommandCode.ECC_SetControlMode, "Set control mode") { mode_ = mode; }
public KGEditorCommandSetProjectiveTex(KGEditorCoreWrapper core, uint id, string name) : base(core, KGEditorCommandCode.ECC_SetLightOuterAngle, "Set projective texture") { id_ = id; name_ = name; }
void MainWindowLoaded(object sender, RoutedEventArgs e) { IntPtr wnd = editor_wnd.Handle; core_ = new KGEditorCoreWrapper(wnd); core_.UpdatePropertyCallback(this.UpdatePropList); core_.UpdateSelectEntityCallback(this.UpdateSelectEntity); core_.UpdateAddEntityCallback(this.UpdateAddEntity); core_.UpdateRemoveEntityCallback(this.UpdateRemoveEntity); core_.AddModelCallback(this.AddModel); core_.AddLightCallback(this.AddLight); core_.AddCameraCallback(this.AddCamera); CompositionTarget.Rendering += this.MainWindowIdle; }
public KGEditorCommandSetLightEnabled(KGEditorCoreWrapper core, uint id, bool enabled) : base(core, KGEditorCommandCode.ECC_SetLightEnabled, "Set light enabled") { id_ = id; enabled_ = enabled; }
public KGEditorCommandSetCameraLookAt(KGEditorCoreWrapper core, uint id, float[] look_at) : base(core, KGEditorCommandCode.ECC_SetCameraLookAt, "Set camera look at") { id_ = id; look_at_ = look_at; }
public KGEditorCommandSelectEntity(KGEditorCoreWrapper core, uint id) : base(core, KGEditorCommandCode.ECC_SelectEntity, "Select entity") { id_ = id; }
public KGEditorCommand(KGEditorCoreWrapper core, KGEditorCommandCode code, string cmd_name) { core_ = core; code_ = code; cmd_name_ = cmd_name; }
public KGEditorCommandSetCameraFoV(KGEditorCoreWrapper core, uint id, float fov) : base(core, KGEditorCommandCode.ECC_SetCameraFoV, "Set camera fov") { id_ = id; fov_ = fov; }
public KGEditorCommandSetActiveCamera(KGEditorCoreWrapper core, uint id) : base(core, KGEditorCommandCode.ECC_SetActiveCamera, "Switch camera") { id_ = id; }
public KGEditorCommandSetCameraAspect(KGEditorCoreWrapper core, uint id, float aspect) : base(core, KGEditorCommandCode.ECC_SetCameraAspect, "Set camera aspect") { id_ = id; aspect_ = aspect; }
public KGEditorCommandRemoveEntity(KGEditorCoreWrapper core, uint entity_id) : base(core, KGEditorCommandCode.ECC_RemoveEntity, "Remove entity") { entity_id_ = entity_id; }
public KGEditorCommandHideEntity(KGEditorCoreWrapper core, uint id, bool hide) : base(core, KGEditorCommandCode.ECC_HideEntity, "Hide entity") { id_ = id; hide_ = hide; }
public KGEditorCommandAddLight(KGEditorCoreWrapper core, KGEditorCoreWrapper.LightType type, string name) : base(core, KGEditorCommandCode.ECC_AddLight, "Add light") { type_ = type; name_ = name; }
public KGEditorCommandSetCameraNearPlane(KGEditorCoreWrapper core, uint id, float near_plane) : base(core, KGEditorCommandCode.ECC_SetCameraNearPlane, "Set camera near plane") { id_ = id; near_plane_ = near_plane; }
public KGEditorCommandSetCameraUpVec(KGEditorCoreWrapper core, uint id, float[] up_vec) : base(core, KGEditorCommandCode.ECC_SetCameraUpVec, "Set camera up vec") { id_ = id; up_vec_ = up_vec; }
public KGEditorCommandSetEntityTranslation(KGEditorCoreWrapper core, uint id, float[] trans) : base(core, KGEditorCommandCode.ECC_SetEntityTranslation, "Set entity translation") { id_ = id; trans_ = trans; }
public KGEditorCommandClearEntities(KGEditorCoreWrapper core, KGEditorCoreWrapper.EntityType type) : base(core, KGEditorCommandCode.ECC_ClearEntities, "Clear entities") { type_ = type; }
public KGEditorCommandSetEntityName(KGEditorCoreWrapper core, uint id, string name) : base(core, KGEditorCommandCode.ECC_SetEntityName, "Set entity name") { id_ = id; name_ = name; }
public KGEditorCommandSetEntityRotation(KGEditorCoreWrapper core, uint id, float[] rot_quat) : base(core, KGEditorCommandCode.ECC_SetEntityRotation, "Set entity rotation") { id_ = id; rot_ = rot_quat; }
private void ControlMode(KGEditorCoreWrapper.ControlMode mode) { control_mode_ = mode; this.ExecuteCommand(new KGEditorCommandSetControlMode(core_, mode)); }
public KGEditorCommandSetEntityScaling(KGEditorCoreWrapper core, uint id, float[] scaling) : base(core, KGEditorCommandCode.ECC_SetEntityScaling, "Set entity scaling") { id_ = id; scaling_ = scaling; }
void MainWindowUnloaded(object sender, RoutedEventArgs e) { CompositionTarget.Rendering -= this.MainWindowIdle; core_.Dispose(); core_ = null; }
public KGEditorCommandAddModel(KGEditorCoreWrapper core, string meshml_name) : base(core, KGEditorCommandCode.ECC_AddModel, "Add model") { name_ = meshml_name; }
public KGEditorCommandSetLightAttrib(KGEditorCoreWrapper core, uint id, int attrib) : base(core, KGEditorCommandCode.ECC_SetLightAttrib, "Set light attribute") { id_ = id; attrib_ = attrib; }
public KGEditorCommandAddCamera(KGEditorCoreWrapper core, string name) : base(core, KGEditorCommandCode.ECC_AddCamera, "Add camera") { name_ = name; }
public KGEditorCommandSetLightColor(KGEditorCoreWrapper core, uint id, float[] color) : base(core, KGEditorCommandCode.ECC_SetLightColor, "Set light color") { id_ = id; color_ = color; }
public KGEditorCommandSetLightFalloff(KGEditorCoreWrapper core, uint id, float[] falloff) : base(core, KGEditorCommandCode.ECC_SetLightFalloff, "Set light falloff") { id_ = id; falloff_ = falloff; }
public KGEditorCommandSetLightOuterAngle(KGEditorCoreWrapper core, uint id, float angle) : base(core, KGEditorCommandCode.ECC_SetLightOuterAngle, "Set light outer angle") { id_ = id; angle_ = angle; }
public KGEditorCommandSetCameraFarPlane(KGEditorCoreWrapper core, uint id, float far_plane) : base(core, KGEditorCommandCode.ECC_SetCameraFarPlane, "Set camera far plane") { id_ = id; far_plane_ = far_plane; }
public KGEditorCommandSetSkyboxName(KGEditorCoreWrapper core, string name) : base(core, KGEditorCommandCode.ECC_SetSkyboxName, "Set skybox name") { name_ = name; }
private void AddLight(KGEditorCoreWrapper.LightType type) { string type_str; switch (type) { case KGEditorCoreWrapper.LightType.LT_Ambient: type_str = "Ambient"; break; case KGEditorCoreWrapper.LightType.LT_Directional: type_str = "Directional"; break; case KGEditorCoreWrapper.LightType.LT_Point: type_str = "Point"; break; case KGEditorCoreWrapper.LightType.LT_Spot: default: type_str = "Spot"; break; } string light_name; int index = 0; for (;;) { light_name = type_str + index.ToString(); bool found = false; foreach (var light in scene_entity_category_[1].Children) { if (core_.EntityName(light.Entity.ID) == light_name) { found = true; break; } } if (!found) { break; } ++ index; } this.ExecuteCommand(new KGEditorCommandAddLight(core_, type, light_name)); }