protected override BaseMeshPoint CreateSubKeyPoint(BaseMeshPoint previous, Vector3 currentPoint, float widthRatio = 1) { QuadPoint keyPoint = new QuadPoint(currentPoint); Vector3 opDir = Vector3.Cross(((previous as QuadPoint).GetQuadLeft() - previous.Point_Center), (currentPoint - previous.Point_Center)); //垂直于面Previous 和current的向量 Vector3 currentDir = Vector3.Cross(opDir, (previous.Point_Center - currentPoint)).normalized; //当前点的方向线 keyPoint.CenterLeftDirNor = currentDir; return(keyPoint); }
public override void AddPoint(Vector3 Point) { // base.AddPoint(Point); BaseMeshPoint meshPoint = new BaseMeshPoint(Point); m_AllSubKeyPathpoints.Add(meshPoint); m_AllSubMeshPoints.Add(Point); if (m_AllSubMeshPoints.Count <= 2) { return; } m_AllSubTrangles.Add(m_AllSubMeshPoints.Count - 3); m_AllSubTrangles.Add(m_AllSubMeshPoints.Count - 1); m_AllSubTrangles.Add(m_AllSubMeshPoints.Count - 2); }
protected override BaseMeshPoint CreateSubKeyPoint(BaseMeshPoint previous, Vector3 currentPoint, float widthRatio = 1) { return(null); }
//Create SubPoint Between Two KeyLinePoint protected abstract BaseMeshPoint CreateSubKeyPoint(BaseMeshPoint previous, Vector3 currentPoint, float widthRatio = 1);