Newer
Older
Plot_On_Reality / Assets / Originals / Scripts / MainMenu / AddNewGraph / GraphData.cs
t-nagao on 1 Feb 2023 2 KB first
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GraphData
{
    private int graphNum; //0:直線、1:平面、2:その他、3:点
    private bool dataFomulaInputted;
    private bool dataListInputted;
    private Vector3 linePassingPoint;
    private Vector3 lineDirection;
    private Vector4 planeCoefficient;
    private GameObject graphObject;
    private Vector3 crossPoint;
    private int crossMessage;
    /* -crossMessage-
     * 10:直線と直線 -> 交点あり
     * 11:直線と直線 -> 平行
     * 12:直線と直線 -> 全く同じ直線
     * 13:直線と直線 -> 交わるが計算不可(遠い)
     * 14:直線と直線 -> ねじれの位置
     * -------------------------------
     * 20:直線と平面 -> 交点あり
     * 21:直線と平面 -> 平行
     * 22:直線と平面 -> -----
     * 23:直線と平面 -> 交わるが計算不可(遠い)
     * 24:直線と平面 -> 平面上の線である
     * --------------------------------
     * 30:平面と平面 -> 交線あり
     * 31:平面と平面 -> 平行
     * 32:平面と平面 -> 全く同じ平面
     * 33:平面と平面 -> 交わるが計算不可(遠い)
     */
    public void setGraphNum(int n)
    {
        graphNum = n;
    }
    public int getGraphNum()
    {
        return graphNum;
    }

    public void setDataFormulaInputted(bool b)
    {
        dataFomulaInputted = b;
    }
    public bool isDataFormulaInputted()
    {
        return dataFomulaInputted;
    }

    public void setDataListInputted(bool b)
    {
        dataListInputted = b;
    }
    public bool isDataListInputted()
    {
        return dataListInputted;
    }

    public void setGraphObject(GameObject go)
    {
        graphObject = go;
    }

    public GameObject getgraphObject()
    {
        return graphObject;
    }

    public void setLinePassingPoint(Vector3 point)
    {
        linePassingPoint = point;
    }
    public Vector3 getLinePassingPoint()
    {
        return linePassingPoint;
    }

    public void setLineDirection(Vector3 direct)
    {
        lineDirection = direct;
    }

    public Vector3 getLineDirection()
    {
        return lineDirection;
    }

    public void setPlaneCoefficient(Vector4 plane)
    {
        planeCoefficient = plane;
    }
    public Vector4 getPlaneCoefficient()
    {
        return planeCoefficient;
    }

    public void setCrossPoint(Vector3 crossPoint)
    {
        this.crossPoint = crossPoint;
    }
    public Vector3 getCrossPoint()
    {
        return crossPoint;
    }

    public void setCrossMessage(int num)
    {
        crossMessage = num;
    }

    public int getCrossMessage()
    {
        return crossMessage;
    }
}