/** * Get the triangle of this geometry at the specified local coordinate. * @param x local to the terrain patch * @param z local to the terrain patch * @return the triangle in world coordinates, or null if the point does intersect this patch on the XZ axis */ public Triangle getTriangle(float x, float z) { return geomap.getTriangleAtPoint(x, z, getWorldScale() , getWorldTranslation()); }
/** * Get a representation of the underlying triangle at the given point, * translated to world coordinates. * * @param x local x coordinate * @param z local z coordinate * @return a triangle in world space not local space */ protected Triangle getTriangleAtPoint(float x, float z, Vector3f scale, Vector3f translation) { Triangle tri = getTriangleAtPoint(x, z); if (tri != null) { tri.get1().multLocal(scale).addLocal(translation); tri.get2().multLocal(scale).addLocal(translation); tri.get3().multLocal(scale).addLocal(translation); } return tri; }
/** * Get the triangle of this geometry at the specified local coordinate. * @param x local to the terrain patch * @param z local to the terrain patch * @return the triangle in world coordinates, or null if the point does intersect this patch on the XZ axis */ public Triangle getTriangle(float x, float z) { return geomap.getTriangleAtPoint(x, z, getWorldScale() , getWorldTranslation()); }
/** * Get a representation of the underlying triangle at the given point, * translated to world coordinates. * * @param x local x coordinate * @param z local z coordinate * @return a triangle in world space not local space */ protected Triangle getTriangleAtPoint(float x, float z, Vector3f scale, Vector3f translation) { Triangle tri = getTriangleAtPoint(x, z); if (tri != null) { tri.get1().multLocal(scale).addLocal(translation); tri.get2().multLocal(scale).addLocal(translation); tri.get3().multLocal(scale).addLocal(translation); } return tri; }