use of org.joml.Vector3ic in project Terasology by MovingBlocks.
the class SparseObjectFacet3D method getWorldEntries.
/**
* @return a <b>new</b> map with world-based position entries
*/
public Map<Vector3ic, T> getWorldEntries() {
Map<Vector3ic, T> result = Maps.newLinkedHashMap();
for (Entry<Vector3ic, T> entry : relData.entrySet()) {
Vector3ic relPos = entry.getKey();
Vector3ic worldPos = relativeToWorld(relPos.x(), relPos.y(), relPos.z());
result.put(worldPos, entry.getValue());
}
return result;
}
use of org.joml.Vector3ic in project Terasology by MovingBlocks.
the class SparseFieldFacet3D method getWorldEntries.
/**
* @return a <b>new</b> map with world-based position entries
*/
public Map<Vector3i, Number> getWorldEntries() {
Map<Vector3i, Number> result = Maps.newLinkedHashMap();
for (Entry<Vector3ic, Number> entry : relData.entrySet()) {
Vector3ic relPos = entry.getKey();
Vector3i worldPos = relativeToWorld(relPos.x(), relPos.y(), relPos.z());
result.put(worldPos, entry.getValue());
}
return result;
}
Aggregations