/// <summary> /// Init with Custom ModelPara /// </summary> /// <param name="gd"></param> /// <param name="service"></param> /// <param name="path"></param> /// <param name="modelpara"></param> public SLModel(GraphicsDevice gd, IServiceProvider service, string path, ModelPara modelpara) : base(gd) { Para = modelpara; LoadContent(service, path, modelpara.modelname); Init(gd); }
/// <summary> /// Init to default SLModel parameter /// </summary> /// <param name="gd"></param> /// <param name="service"></param> /// <param name="path"></param> /// <param name="modelname"></param> public SLModel(GraphicsDevice gd, IServiceProvider service, string path, string modelname) : base(gd) { Para = new ModelPara(modelname); LoadContent(service, path, modelname); Init(gd); }
/// <summary> /// Init with Custom ModelPara and Configuration /// </summary> /// <param name="distance2display"></param> /// <param name="displayratio"></param> /// <param name="displaysize"></param> /// <param name="camera"></param> /// <param name="unit"></param> /// <param name="gd"></param> /// <param name="service"></param> /// <param name="path"></param> /// <param name="modelpara"></param> public SLModel(float distance2display, float displayratio, float displaysize, SLCamera camera, Unit unit, GraphicsDevice gd, IServiceProvider service, string path, ModelPara modelpara) : base(distance2display, displayratio, displaysize, gd, camera, unit) { Para = modelpara; LoadContent(service, path, modelpara.modelname); Init(gd); }
/// <summary> /// Sets Default ModelPara, need LoadContent() and Init() /// </summary> public SLModel() { Para = new ModelPara(""); }
/// <summary> /// Init with Custom ModelPara /// </summary> /// <param name="gd"></param> /// <param name="modelpara"></param> public void Init(GraphicsDevice gd, ModelPara modelpara) { modelpara.modelname = Para.modelname; modelpara.BasePara.contentname = Para.BasePara.contentname; Para = modelpara; Init(gd); }
/// <summary> /// Init with Custom ModelPara and StiLib Configuration File /// </summary> /// <param name="gd"></param> /// <param name="slconfig"></param> /// <param name="service"></param> /// <param name="path"></param> /// <param name="modelpara"></param> public SLModel(GraphicsDevice gd, AssemblySettings slconfig, IServiceProvider service, string path, ModelPara modelpara) : base(gd, slconfig) { Para = modelpara; LoadContent(service, path, modelpara.modelname); Init(gd); }