Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment