public void setcurvesection(curvesection sectionright) { _posSectionStart = new Vector3(sectionright._posSectionStart.x, sectionright._posSectionStart.y, sectionright._posSectionStart.z); _posSectionDest = new Vector3(sectionright._posSectionDest.x, sectionright._posSectionDest.y, sectionright._posSectionDest.z); _dirtoNextP = new Vector3(sectionright._dirtoNextP.x, sectionright._dirtoNextP.y, sectionright._dirtoNextP.z); _dirtoOppositeP = new Vector3(sectionright._dirtoOppositeP.x, sectionright._dirtoOppositeP.y, sectionright._dirtoOppositeP.z); _distSection = sectionright._distSection; _distSqrSection = sectionright._distSqrSection; }
} // void newConstructLineGuide(int iSeqCurve, Vector3[] _arrv3PosLineSection) //@ Process // After build up Spline Curve. bool newAssignLineguide__(int iSeqCurve, Vector3[] _arrv3PosLineSection) { if (null == _arrv3PosLineSection) { return(false); } //@ list need at least 2 more points, because of set direction from to. if (_arrv3PosLineSection.Length > 1) { curvesection[] arrLineSection = new curvesection[_arrv3PosLineSection.Length - 1]; curvesection posSection; Vector3 v3Curr = Vector3.zero; Vector3 v3Next = Vector3.zero; int iLastLineGuide = _arrv3PosLineSection.Length - 1; for (int iSeqSP = 0; iSeqSP < iLastLineGuide; ++iSeqSP) { v3Curr = _arrv3PosLineSection[iSeqSP]; v3Next = _arrv3PosLineSection[iSeqSP + 1]; posSection = new curvesection(); posSection.setcurvesection(v3Curr, v3Next); arrLineSection[iSeqSP] = posSection; } ConstructedBuildLine = true; if (null == m_arrPosLineGuides) { m_arrPosLineGuides = new curvesection[iSeqCurve + 1][]; } if (iSeqCurve >= m_arrPosLineGuides.Length) { Array.Resize(ref m_arrPosLineGuides, iSeqCurve + 1); } m_arrPosLineGuides[iSeqCurve] = arrLineSection; return(true); } // if (_arrv3PosLineSection.Length > 1) else { Debug.Log("newAssignLineguide__ need at least 2 points.//"); ConstructedBuildLine = false; } // if (_arrv3PosLineSection.Length > 1) return(false); } // bool newAssignLineguide__(int iSeqCurve, Vector3[] _arrv3PosLineSection )