Ejemplo n.º 1
0
 /// <summary>
 /// Gets Custom Model Parameters
 /// </summary>
 /// <param name="modelname"></param>
 public ModelPara(string modelname)
 {
     this.BasePara = StiLib.Vision.vsBasePara.VSTypeDefault(VSType.SLModel);
     this.modelname = modelname;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Gets Custom Model Parameters
 /// </summary>
 /// <param name="modelname"></param>
 /// <param name="shader"></param>
 public ModelPara(string modelname, string shader)
 {
     this.BasePara = StiLib.Vision.vsBasePara.VSTypeContentDefault(VSType.SLModel, shader);
     this.modelname = modelname;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initialize Mask Parameters
 /// </summary>
 /// <param name="basepara"></param>
 /// <param name="masktype"></param>
 public MaskPara(vsBasePara basepara, MaskType masktype)
 {
     basepara.vstype = VSType.Mask;
     this.BasePara = basepara;
     this.masktype = masktype;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initialize Model Parameters
 /// </summary>
 /// <param name="basepara"></param>
 /// <param name="modelname"></param>
 public ModelPara(vsBasePara basepara, string modelname)
 {
     basepara.vstype = VSType.SLModel;
     this.BasePara = basepara;
     this.modelname = modelname;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Initialize Image Parameters
 /// </summary>
 /// <param name="basepara"></param>
 public ImagePara(vsBasePara basepara)
 {
     basepara.vstype = VSType.Image;
     this.BasePara = basepara;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Gets Custom ImagePara
 /// </summary>
 /// <param name="imagename"></param>
 public ImagePara(string imagename)
 {
     this.BasePara = StiLib.Vision.vsBasePara.VSTypeContentDefault(VSType.Image, imagename);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Gets a Custom CollectionPara with -- CollectionCenter: (0, 0, 0), CollectionSpeed: (0, 0, 0) 
 /// </summary>
 /// <param name="shader"></param>
 public CollectionPara(string shader)
 {
     this.BasePara = StiLib.Vision.vsBasePara.VSTypeContentDefault(VSType.VSCollection, shader);
     this.CollectionCenter = Vector3.Zero;
     this.CollectionSpeed = Vector3.Zero;
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Initialize Text Parameters
 /// </summary>
 /// <param name="basepara"></param>
 public TextPara(vsBasePara basepara)
 {
     basepara.vstype = VSType.Text;
     this.BasePara = basepara;
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Initialize Bar Parameters
 /// </summary>
 /// <param name="basepara"></param>
 /// <param name="width"></param>
 /// <param name="height"></param>
 public BarPara(vsBasePara basepara, float width, float height)
 {
     basepara.vstype = VSType.Bar;
     basepara.primitivetype = PrimitiveType.TriangleFan;
     this.BasePara = basepara;
     this.width = width;
     this.height = height;
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Initialize Collection Parameters
 /// </summary>
 /// <param name="basepara"></param>
 /// <param name="collectioncenter"></param>
 /// <param name="collectionspeed"></param>
 public CollectionPara(vsBasePara basepara, Vector3 collectioncenter, Vector3 collectionspeed)
 {
     basepara.vstype = VSType.VSCollection;
     this.BasePara = basepara;
     this.CollectionCenter = collectioncenter;
     this.CollectionSpeed = collectionspeed;
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Gets a Custom VideoPara
 /// </summary>
 /// <param name="videoname"></param>
 public VideoPara(string videoname)
 {
     this.BasePara = StiLib.Vision.vsBasePara.VSTypeContentDefault(VSType.SLVideo, videoname);
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Initialize Video Parameters
 /// </summary>
 /// <param name="basepara"></param>
 public VideoPara(vsBasePara basepara)
 {
     basepara.vstype = VSType.SLVideo;
     this.BasePara = basepara;
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Gets a Custom TextPara
 /// </summary>
 /// <param name="spritefont"></param>
 public TextPara(string spritefont)
 {
     this.BasePara = StiLib.Vision.vsBasePara.VSTypeContentDefault(VSType.Text, spritefont);
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Initialize PrimitivePara Parameters
 /// </summary>
 /// <param name="vertices"></param>
 /// <param name="indices"></param>
 /// <param name="center"></param>
 /// <param name="diameter"></param>
 /// <param name="orientation"></param>
 /// <param name="orientation3d"></param>
 /// <param name="rotationspeed"></param>
 /// <param name="rotationspeed3d"></param>
 /// <param name="direction"></param>
 /// <param name="speed"></param>
 /// <param name="speed3d"></param>
 /// <param name="space"></param>
 /// <param name="color"></param>
 /// <param name="visible"></param>
 /// <param name="contentname"></param>
 /// <param name="lifetime"></param>
 /// <param name="primitivetype"></param>
 public PrimitivePara(VertexPositionColor[] vertices, int[] indices, Vector3 center, float diameter, float orientation, Vector3 orientation3d, float rotationspeed, Vector3 rotationspeed3d, float direction, float speed, Vector3 speed3d, float space, Color color, bool visible, string contentname, double lifetime, PrimitiveType primitivetype)
 {
     this.vertices = vertices;
     this.indices = indices;
     this.BasePara = new vsBasePara(center, diameter, orientation, orientation3d, rotationspeed, rotationspeed3d, direction, speed, speed3d, space, color, visible, VSType.Primitive, contentname, lifetime, primitivetype);
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Initialize Grating Parameters
 /// </summary>
 /// <param name="basepara"></param>
 /// <param name="maskpara"></param>
 /// <param name="shape"></param>
 /// <param name="gratingtype"></param>
 /// <param name="movetype"></param>
 /// <param name="tf"></param>
 /// <param name="sf"></param>
 /// <param name="sphase"></param>
 /// <param name="luminance"></param>
 /// <param name="contrast"></param>
 /// <param name="lhcolor"></param>
 /// <param name="rlcolor"></param>
 /// <param name="resolution"></param>
 public GratingPara(vsBasePara basepara, MaskPara maskpara, Shape shape, GratingType gratingtype, MoveType movetype, float tf, float sf, float sphase, float luminance, float contrast, Color lhcolor, Color rlcolor, int resolution)
 {
     basepara.vstype = VSType.Grating;
     basepara.primitivetype = PrimitiveType.TriangleStrip;
     this.BasePara = basepara;
     this.maskpara = maskpara;
     this.shape = shape;
     this.gratingtype = gratingtype;
     this.movetype = movetype;
     this.tf = tf;
     this.sf = sf;
     this.sphase = sphase;
     this.luminance = luminance;
     this.contrast = contrast;
     this.lhcolor = lhcolor;
     this.rlcolor = rlcolor;
     this.resolution = resolution;
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Initialize Primitive Parameters
 /// </summary>
 /// <param name="vertices"></param>
 /// <param name="indices"></param>
 /// <param name="basepara"></param>
 public PrimitivePara(VertexPositionColor[] vertices, int[] indices, vsBasePara basepara)
 {
     this.vertices = vertices;
     this.indices = indices;
     basepara.vstype = VSType.Primitive;
     this.BasePara = basepara;
 }
Ejemplo n.º 17
0
        /// <summary>
        /// Initialize Quad Parameters
        /// </summary>
        /// <param name="center"></param>
        /// <param name="normal"></param>
        /// <param name="up"></param>
        /// <param name="width"></param>
        /// <param name="height"></param>
        public Quad(Vector3 center, Vector3 normal, Vector3 up, float width, float height)
        {
            BasePara = StiLib.Vision.vsBasePara.VS_PTypeDefault(VSType.SLQuad, PrimitiveType.TriangleList);
            vertices = new VertexPositionNormalTexture[4];
            indices = new int[6];
            BasePara.center = center;
            Normal = normal;
            Up = up;

            // Calculate the quad corners
            Left = Vector3.Cross(normal, Up);
            Vector3 uppercenter = (Up * height / 2) + center;
            UpperLeft = uppercenter + (Left * width / 2);
            UpperRight = uppercenter - (Left * width / 2);
            LowerLeft = UpperLeft - (Up * height);
            LowerRight = UpperRight - (Up * height);

            FillVertices();
        }