コード例 #1
0
ファイル: SLCamera.cs プロジェクト: thakgit/StiLib
        /// <summary>
        /// Copy Current Instance and Change to Current GraphicsDevice Viewport
        /// </summary>
        /// <param name="gd"></param>
        /// <returns></returns>
        public object Clone(GraphicsDevice gd)
        {
            SLCamera cam = new SLCamera();

            cam.SetCamera(Position, Target, Up, projectionType, FoV, NearPlane, FarPlane, gd.Viewport);
            return(cam);
        }
コード例 #2
0
ファイル: SLVideo.cs プロジェクト: babaq/StiLib
 /// <summary>
 /// Init with Custom VideoPara 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="videopara"></param>
 public SLVideo(float distance2display, float displayratio, float displaysize, SLCamera camera, Unit unit, GraphicsDevice gd, IServiceProvider service, string path, VideoPara videopara)
     : base(distance2display, displayratio, displaysize, gd, camera, unit)
 {
     Para = videopara;
     LoadContent(service, path, videopara.BasePara.contentname);
     Init(gd);
 }
コード例 #3
0
ファイル: VisionStimulus.cs プロジェクト: babaq/StiLib
 /// <summary>
 /// Set Configuration Parameters
 /// </summary>
 /// <param name="distance2display"></param>
 /// <param name="displayratio"></param>
 /// <param name="displaysize"></param>
 /// <param name="fullscreen_w_pixel"></param>
 /// <param name="fullscreen_h_pixel"></param>
 /// <param name="camera"></param>
 /// <param name="unit"></param>
 public void SetConfig(float distance2display, float displayratio, float displaysize, int fullscreen_w_pixel, int fullscreen_h_pixel, SLCamera camera, Unit unit)
 {
     this.distance2Display = distance2display;
     this.displayRatio = displayratio;
     this.displaySize = displaysize;
     this.display_W_pixel = fullscreen_w_pixel;
     this.display_H_pixel = fullscreen_h_pixel;
     this.globalCamera = camera.Clone() as SLCamera;
     this.unit = unit;
 }
コード例 #4
0
ファイル: Primitive.cs プロジェクト: babaq/StiLib
 /// <summary>
 /// Init with Custom PrimitivePara 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="primitivepara"></param>
 public Primitive(float distance2display, float displayratio, float displaysize, SLCamera camera, Unit unit, GraphicsDevice gd, PrimitivePara primitivepara)
     : base(distance2display, displayratio, displaysize, gd, camera, unit)
 {
     Para = primitivepara;
     Init(gd);
 }
コード例 #5
0
ファイル: VisionStimulus.cs プロジェクト: babaq/StiLib
 /// <summary>
 /// Initialize Vision Stimulus
 /// </summary>
 /// <param name="distance2display"></param>
 /// <param name="displayratio"></param>
 /// <param name="displaysize"></param>
 /// <param name="fullscreen_w_pixel"></param>
 /// <param name="fullscreen_h_pixel"></param>
 /// <param name="camera"></param>
 /// <param name="unit"></param>
 public VisionStimulus(float distance2display, float displayratio, float displaysize, int fullscreen_w_pixel, int fullscreen_h_pixel, SLCamera camera, Unit unit)
 {
     InitVS(distance2display, displayratio, displaysize, fullscreen_w_pixel, fullscreen_h_pixel, camera, unit);
 }
コード例 #6
0
ファイル: VisionStimulus.cs プロジェクト: babaq/StiLib
 /// <summary>
 /// Initialize Vision Stimulus Configuration
 /// </summary>
 /// <param name="distance2display"></param>
 /// <param name="displayratio"></param>
 /// <param name="displaysize"></param>
 /// <param name="fullscreen_w_pixel"></param>
 /// <param name="fullscreen_h_pixel"></param>
 /// <param name="camera"></param>
 /// <param name="unit"></param>
 public void InitVS(float distance2display, float displayratio, float displaysize, int fullscreen_w_pixel, int fullscreen_h_pixel, SLCamera camera, Unit unit)
 {
     if ((this.distance2Display != distance2display) || (this.displayRatio != displayratio) || (this.displaySize != displaysize) || (this.display_W_pixel != fullscreen_w_pixel) || (this.display_H_pixel != fullscreen_h_pixel) || (!this.globalCamera.Equals(camera)) || (this.unit != unit))
     {
         SetConfig(distance2display, displayratio, displaysize, fullscreen_w_pixel, fullscreen_h_pixel, camera, unit);
         Config();
     }
 }
コード例 #7
0
ファイル: VisionStimulus.cs プロジェクト: babaq/StiLib
 /// <summary>
 /// Initialize Vision Stimulus According to Current GraphicsDevice Fullscreen Resolution, 
 /// and Set Internal GraphicsDevice Reference
 /// </summary>
 /// <param name="distance2display"></param>
 /// <param name="displayratio"></param>
 /// <param name="displaysize"></param>
 /// <param name="gd"></param>
 /// <param name="camera"></param>
 /// <param name="unit"></param>
 public VisionStimulus(float distance2display, float displayratio, float displaysize, GraphicsDevice gd, SLCamera camera, Unit unit)
     : this(distance2display, displayratio, displaysize, gd.DisplayMode.Width, gd.DisplayMode.Height, camera, unit)
 {
     gdRef = gd;
 }
コード例 #8
0
ファイル: Bar.cs プロジェクト: babaq/StiLib
 /// <summary>
 /// Init Bar with Custom BarPara 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="barpara"></param>
 public Bar(float distance2display, float displayratio, float displaysize, SLCamera camera, Unit unit, GraphicsDevice gd, BarPara barpara)
     : base(distance2display, displayratio, displaysize, gd, camera, unit)
 {
     Para = barpara;
     Init(gd);
 }
コード例 #9
0
ファイル: SLQuad.cs プロジェクト: babaq/StiLib
 /// <summary>
 /// Init SLQuad with Custom Quad Parameters 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="quad"></param>
 public SLQuad(float distance2display, float displayratio, float displaysize, SLCamera camera, Unit unit, GraphicsDevice gd, IServiceProvider service, string path, Quad quad)
     : base(distance2display, displayratio, displaysize, gd, camera, unit)
 {
     Para = quad;
     LoadContent(service, path, quad.BasePara.contentname);
     Init(gd);
 }
コード例 #10
0
ファイル: SLCamera.cs プロジェクト: babaq/StiLib
 /// <summary>
 /// Copy Current Instance and Change to Current GraphicsDevice Viewport
 /// </summary>
 /// <param name="gd"></param>
 /// <returns></returns>
 public object Clone(GraphicsDevice gd)
 {
     SLCamera cam = new SLCamera();
     cam.SetCamera(Position, Target, Up, projectionType, FoV, NearPlane, FarPlane, gd.Viewport);
     return cam;
 }
コード例 #11
0
ファイル: SLModel.cs プロジェクト: babaq/StiLib
 /// <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);
 }