Пример #1
0
        protected override bool ValidateMesh()
        {
            if (lineWidth == 0)
            {
                Debug.LogWarning("LineMesh::ValidateMesh: Line width can't be equal to zero!");
                return(false);
            }

            if (lineVerts.Length < 1)
            {
                Debug.LogWarning("LineMesh::ValidateMesh: Parameter size must be bigger than one!");
                return(false);
            }

            if (MeshHelper.HasDuplicates(lineVerts))
            {
                Debug.LogWarning("LineMesh::ValidateMesh: Duplicate points detected!");
                return(false);
            }

            if (lineWidth < 0)
            {
                lineWidth = -lineWidth;
            }
            return(true);
        }
 protected override bool ValidateMesh()
 {
     if (MeshHelper.HasDuplicates(Points))
     {
         Debug.LogWarning("TriangulatedMesh::ValidateMesh: Duplicate points detected!");
         return(false);
     }
     return(true);
 }
Пример #3
0
 protected override bool ValidateMesh()
 {
     if (MeshHelper.HasDuplicates(SplinePoints))
     {
         Debug.LogWarning("SplineShapeMesh::ValidateMesh: Duplicate points detected!");
         return(false);
     }
     if (Resolution < CatmullRomSpline.MIN_RESOLUTION)
     {
         Resolution = CatmullRomSpline.MIN_RESOLUTION;
     }
     return(true);
 }