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