getArea() public method

public getArea ( ) : double
return double
示例#1
0
        //------------------------------------ADDS----------------------------------------//

        /**
         * Method used to add a face properly for internal methods
         *
         * @param v1 a face vertex
         * @param v2 a face vertex
         * @param v3 a face vertex
         */
        private Face addFace(Vertex v1, Vertex v2, Vertex v3)
        {
            if (!(v1.equals(v2) || v1.equals(v3) || v2.equals(v3)))
            {
                Face face = new Face(v1, v2, v3);
                if (face.getArea() > TOL)
                {
                    faces.Add(face);
                    return(face);
                }
                else
                {
                    return(null);
                }
            }
            else
            {
                return(null);
            }
        }
示例#2
0
 //------------------------------------ADDS----------------------------------------//
 /**
  * Method used to add a face properly for internal methods
  *
  * @param v1 a face vertex
  * @param v2 a face vertex
  * @param v3 a face vertex
  */
 private Face addFace(Vertex v1, Vertex v2, Vertex v3)
 {
     if (!(v1.equals(v2) || v1.equals(v3) || v2.equals(v3)))
     {
         Face face = new Face(v1, v2, v3);
         if (face.getArea() > TOL)
         {
             faces.Add(face);
             return face;
         }
         else
         {
             return null;
         }
     }
     else
     {
         return null;
     }
 }