Commit 3dcc80d3 authored by Matej Kovár's avatar Matej Kovár
Browse files

added getShortName method (name of the file without path)

parent 9a374c6f
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -225,6 +225,18 @@ public class HumanFace implements MeshListener, Serializable {
        return name;
    }
    
    /**
     * Returns short name of the face without its path in the name.
     * @return short name of the face without its path in the name
     */
    public String getShortName() {
        String name = this.getName();
        int from = name.length() - 1;
        while (Character.valueOf('\\').compareTo(name.charAt(from)) != 0) {from--;}
        name = name.substring(from + 1);
        return name;
    }
    
    /**
     * Returns already computed k-d tree of the triangular mesh or {@code null}.
     * @return Already computed k-d tree of the triangular mesh or {@code null}