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 KGEditorCommandSetProjectiveTex(SceneEntityLight light, string name) : base(KGEditorCommandCode.ECC_SetLightProjectiveTex, "Set projective texture") { light_ = light; name_ = name; }
public KGEditorCommandSetLightOuterAngle(SceneEntityLight light, float angle) : base(KGEditorCommandCode.ECC_SetLightOuterAngle, "Set light outer angle") { light_ = light; angle_ = angle; }
public KGEditorCommandSetLightFalloff(SceneEntityLight light, float[] falloff) : base(KGEditorCommandCode.ECC_SetLightFalloff, "Set light falloff") { light_ = light; falloff_ = falloff; }
public KGEditorCommandSetLightColor(SceneEntityLight light, float[] color) : base(KGEditorCommandCode.ECC_SetLightColor, "Set light color") { light_ = light; color_ = color; }
public KGEditorCommandSetLightAttrib(SceneEntityLight light, int attrib) : base(KGEditorCommandCode.ECC_SetLightAttrib, "Set light attribute") { light_ = light; attrib_ = attrib; }
public KGEditorCommandSetLightEnabled(SceneEntityLight light, bool enabled) : base(KGEditorCommandCode.ECC_SetLightEnabled, "Set light enabled") { light_ = light; enabled_ = enabled; }