Skip to content
Snippets Groups Projects
Commit 5a0557b4 authored by Alexander Rose's avatar Alexander Rose
Browse files

fix

parent 4091d9d8
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,7 @@ namespace VolumeData {
const _scale = Mat4.zero(), _translate = Mat4.zero();
export function getGridToCartesianTransform(volume: VolumeData) {
const { data: { space } } = volume;
const scale = Mat4.fromScaling(_scale, Vec3.div(Vec3.zero(), Box3D.size(volume.fractionalBox), Vec3.ofArray(space.dimensions)));
const scale = Mat4.fromScaling(_scale, Vec3.div(Vec3.zero(), Box3D.size(Vec3.zero(), volume.fractionalBox), Vec3.ofArray(space.dimensions)));
const translate = Mat4.fromTranslation(_translate, volume.fractionalBox.min);
return Mat4.mul3(Mat4.zero(), volume.cell.fromFractional, translate, scale);
}
......
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