public RailCamera(Vector3 camEye, Vector3 camFocus, Vector3 camUp)
            : base(camEye, camFocus, camUp)
        {
            model = QModel.FromSimpleModel( Editor.Instance.LoadModel("camera.obj", false) );

            focusModel = Editor.Instance.LoadModel("focus_pin.obj", false);

            model.Transformation.Translation = Eye;
            focusModel.Transformation.Translation = Focus;
            focusModel.Transformation.Scaling = new Vector3(0.2f, 0.2f, 0.2f);

            Editor.Instance.AddModel(focusModel);
            Editor.Instance.AddModel(model);

            model.Meshes[0].WireFrame = true;
            Update();
        }
Example #2
0
 public static QModel FromSimpleModel(SimpleModel simpleModel)
 {
     QModel model = new QModel(simpleModel.Id, simpleModel.Name);
     model.Meshes = simpleModel.Meshes;
     return model;
 }