예제 #1
0
    // Start is called before the first frame update
    void Start()
    {
        m_id = CurvePlugin.CreateCurve();

        // Create some empty parent objects
        m_keyPointParent = new GameObject("Key Points");
        m_keyPointParent.transform.SetParent(this.transform);

        m_controlPointParent = new GameObject("Control Points");
        m_controlPointParent.transform.SetParent(this.transform);

        m_lineRendererParent = new GameObject("Hermite Lines");
        m_lineRendererParent.transform.SetParent(this.transform);

        //AppendVecKey(new Vector3(0, 0, 0));
        //AppendVecKey(new Vector3(3, 0, 0));
        //CurvePlugin.CurveValue curveValue = new CurvePlugin.CurveValue();
        //CurvePlugin.GetValue(m_id, 0.5, ref curveValue);
        //Debug.Log(PluginHelpFunction.DoubleArrayToVector3(curveValue.vec));

        CurvePlugin.SetVecInterpolationType(m_id, (int)m_vecInterpolationType);
        CurvePlugin.SetQuatInterpolationType(m_id, (int)m_quatInterpolationType);
        CurvePlugin.SetEulerInterpolationType(m_id, (int)m_eulerInterpolationType);

        m_curveLineRenderer.sortingOrder        = 0;
        m_controlPointLineRenderer.sortingOrder = 0;
    }
예제 #2
0
 public void SetEulerInterpolationType(int type)
 {
     CurvePlugin.SetEulerInterpolationType(m_id, type);
     m_eulerInterpolationType = (EulerInterpolationType)type;
 }