/** * Gets the triangle vertex positions at the given triangle index * and stores them into the {@link Triangle} argument. * Also sets the triangle index to the <code>index</code> argument. * * @param index The index of the triangle. * Should be between 0 and {@link #getTriangleCount()}. * * @param tri The triangle to store the positions in */ public void getTriangle(int index, Triangle tri){ getTriangle(index, tri.get1(), tri.get2(), tri.get3()); tri.setIndex(index); tri.setNormal(null); }
triangle.setNormal(null);// clear the previous normal vector
/** * Gets the triangle vertex positions at the given triangle index * and stores them into the {@link Triangle} argument. * Also sets the triangle index to the <code>index</code> argument. * * @param index The index of the triangle. * Should be between 0 and {@link #getTriangleCount()}. * * @param tri The triangle to store the positions in */ public void getTriangle(int index, Triangle tri){ getTriangle(index, tri.get1(), tri.get2(), tri.get3()); tri.setIndex(index); tri.setNormal(null); }
/** * Gets the triangle vertex positions at the given triangle index * and stores them into the {@link Triangle} argument. * Also sets the triangle index to the <code>index</code> argument. * * @param index The index of the triangle. * Should be between 0 and {@link #getTriangleCount()}. * * @param tri The triangle to store the positions in */ public void getTriangle(int index, Triangle tri){ getTriangle(index, tri.get1(), tri.get2(), tri.get3()); tri.setIndex(index); tri.setNormal(null); }