Beispiel #1
0
 public RectCoordinates(RectCoordinates other)
 {
     front = other.front;
     back  = other.back;
     left  = other.left;
     right = other.right;
 }
Beispiel #2
0
        public override void Reset()
        {
            gameObject = null;
            rect       = new FsmRect();
            rect.Value = new Rect(0f, 0f, 0.5f, 0.5f);

            coordinates = RectCoordinates.Viewport;

            everyFrame = false;
        }
Beispiel #3
0
    public void Setup(int x, int y, ID i)
    {
        // GameObject Data
        coor            = new RectCoordinates(x, y);
        typeID          = (int)i;
        gameObject.name = co.terrData[typeID].name;

        // Terrain Data
        sr.sprite = co.terrData[typeID].sprite;
    }
        public override void Reset()
        {
            gameObject = null;
            rect = new FsmRect();
            rect.Value = new Rect(0f,0f,0.5f,0.5f);

            coordinates = RectCoordinates.Viewport;

            everyFrame = false;
        }
    public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
    {
        RectCoordinates coordinates = new RectCoordinates(
            property.FindPropertyRelative("x").intValue,
            property.FindPropertyRelative("y").intValue
            );

        position = EditorGUI.PrefixLabel(position, label);
        GUI.Label(position, coordinates.ToString());
    }
        public void UpdateConfigurations(Calibration calibration, PrinterSizeProfile sizeprofile, bool bUseSpecialPrintTestPoints)
        {
            entire_z_height_offset    = calibration.ENTIRE_Z_HEIGHT_OFFSET;
            corner_height_back_right  = calibration.CORNER_HEIGHT_BACK_RIGHT + calibration.CORNER_HEIGHT_BACK_RIGHT_OFFSET;
            corner_height_back_left   = calibration.CORNER_HEIGHT_BACK_LEFT + calibration.CORNER_HEIGHT_BACK_LEFT_OFFSET;
            corner_height_front_left  = calibration.CORNER_HEIGHT_FRONT_LEFT + calibration.CORNER_HEIGHT_FRONT_LEFT_OFFSET;
            corner_height_front_right = calibration.CORNER_HEIGHT_FRONT_RIGHT + calibration.CORNER_HEIGHT_FRONT_RIGHT_OFFSET;
            g32_version = calibration.G32_VERSION;
            RectCoordinates rectCoordinates = !bUseSpecialPrintTestPoints || !sizeprofile.G32ProbePoints.ContainsKey(byte.MaxValue) ? (!sizeprofile.G32ProbePoints.ContainsKey(g32_version) ? sizeprofile.G32ProbePoints.First <KeyValuePair <int, RectCoordinates> >().Value : sizeprofile.G32ProbePoints[g32_version]) : sizeprofile.G32ProbePoints[byte.MaxValue];

            backRight  = new Vector(rectCoordinates.right, rectCoordinates.back, corner_height_back_right);
            backLeft   = new Vector(rectCoordinates.left, rectCoordinates.back, corner_height_back_left);
            frontLeft  = new Vector(rectCoordinates.left, rectCoordinates.front, corner_height_front_left);
            frontRight = new Vector(rectCoordinates.right, rectCoordinates.front, corner_height_front_right);
            center     = new Vector(sizeprofile.HomeLocation.x, sizeprofile.HomeLocation.y, 0.0f);
        }