Exemple #1
0
 /**
  * default value
  */
 public BlendSpaceGrid()
 {
     GridDimensions       = new BSBox();
     GridDimensions.Min   = new Vector3(0, 0, 0);
     GridDimensions.Max   = new Vector3(100, 100, 0);
     NumGridPointsForAxis = new Vector2(5, 5);
 }
Exemple #2
0
        /* Set the grid box, so we can normalize the sample points */
        public void SetGridBox(BlendAxis BlendParamX, BlendAxis BlendParamY)
        {
            BSBox GridBox = new BSBox();

            GridBox.Min.X = BlendParamX.Min;
            GridBox.Max.X = BlendParamX.Max;
            GridBox.Min.Y = BlendParamY.Min;
            GridBox.Max.Y = BlendParamY.Max;

            Vector3 Size = GridBox.GetSize();

            Size.X = Math.Max(Size.X, 0.00001f);
            Size.Y = Math.Max(Size.Y, 0.00001f);
            Size.Z = Math.Max(Size.Z, 0.00001f);

            GridMin         = GridBox.Min;
            RecipGridSize.X = 1.0f / Size.X;
            RecipGridSize.Y = 1.0f / Size.Y;
            RecipGridSize.Z = 1.0f / Size.Z;
        }