mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 05:09:23 +02:00
Voxel UI code cleanup
This commit is contained in:
parent
9dc729fb67
commit
3df9d6674b
5 changed files with 6 additions and 20 deletions
|
@ -4,6 +4,7 @@
|
||||||
//
|
//
|
||||||
// Created by Seth Alves on 5/19/15.
|
// Created by Seth Alves on 5/19/15.
|
||||||
// Copyright 2015 High Fidelity, Inc.
|
// Copyright 2015 High Fidelity, Inc.
|
||||||
|
// Copyright 2022 Overte e.V.
|
||||||
//
|
//
|
||||||
// Distributed under the Apache License, Version 2.0.
|
// Distributed under the Apache License, Version 2.0.
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
@ -1030,12 +1031,6 @@ void RenderablePolyVoxEntityItem::uncompressVolumeData() {
|
||||||
quint16 voxelYDataSize = voxelYSize;
|
quint16 voxelYDataSize = voxelYSize;
|
||||||
quint16 voxelZDataSize = voxelZSize;
|
quint16 voxelZDataSize = voxelZSize;
|
||||||
|
|
||||||
/*if(entity->isEdged()){
|
|
||||||
voxelXDataSize++;
|
|
||||||
voxelYDataSize++;
|
|
||||||
voxelZDataSize++;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
int rawSize = voxelXDataSize * voxelYDataSize * voxelZDataSize;
|
int rawSize = voxelXDataSize * voxelYDataSize * voxelZDataSize;
|
||||||
|
|
||||||
QByteArray compressedData;
|
QByteArray compressedData;
|
||||||
|
@ -1064,9 +1059,6 @@ void RenderablePolyVoxEntityItem::setVoxelsFromData(QByteArray uncompressedData,
|
||||||
withWriteLock([&] {
|
withWriteLock([&] {
|
||||||
if (isEdged()) {
|
if (isEdged()) {
|
||||||
low += 1;
|
low += 1;
|
||||||
//voxelXSize += 2;
|
|
||||||
//voxelYSize += 2;
|
|
||||||
//voxelZSize += 2;
|
|
||||||
}
|
}
|
||||||
loop3(ivec3(0), ivec3(voxelXSize, voxelYSize, voxelZSize), [&](const ivec3& v) {
|
loop3(ivec3(0), ivec3(voxelXSize, voxelYSize, voxelZSize), [&](const ivec3& v) {
|
||||||
int uncompressedIndex = (v.z * (voxelYSize) * (voxelXSize)) + (v.y * (voxelZSize)) + v.x;
|
int uncompressedIndex = (v.z * (voxelYSize) * (voxelXSize)) + (v.y * (voxelZSize)) + v.x;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
// Created by Brad Hefta-Gaub on 12/4/13.
|
// Created by Brad Hefta-Gaub on 12/4/13.
|
||||||
// Copyright 2013 High Fidelity, Inc.
|
// Copyright 2013 High Fidelity, Inc.
|
||||||
// Copyright 2020 Vircadia contributors.
|
// Copyright 2020 Vircadia contributors.
|
||||||
|
// Copyright 2022 Overte e.V.
|
||||||
//
|
//
|
||||||
// Distributed under the Apache License, Version 2.0.
|
// Distributed under the Apache License, Version 2.0.
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// Created by Ryan Huffman on 13 Nov 2014
|
// Created by Ryan Huffman on 13 Nov 2014
|
||||||
// Copyright 2014 High Fidelity, Inc.
|
// Copyright 2014 High Fidelity, Inc.
|
||||||
// Copyright 2020 Vircadia contributors.
|
// Copyright 2020 Vircadia contributors.
|
||||||
|
// Copyright 2022 Overte e.V.
|
||||||
//
|
//
|
||||||
// Distributed under the Apache License, Version 2.0.
|
// Distributed under the Apache License, Version 2.0.
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
@ -1349,14 +1350,14 @@ const GROUPS = [
|
||||||
onDropdownChange: createPolyVoxPresetChangedFunction,
|
onDropdownChange: createPolyVoxPresetChangedFunction,
|
||||||
skipPropertyUpdate: true,
|
skipPropertyUpdate: true,
|
||||||
},
|
},
|
||||||
/*{
|
{
|
||||||
label: "Surface Style",
|
label: "Surface Style",
|
||||||
type: "dropdown",
|
type: "dropdown",
|
||||||
options: { 0: "Marching cubes", 1: "Cubic",
|
options: { 0: "Marching cubes", 1: "Cubic",
|
||||||
2: "Edged cubic", 3: "Edged marching cubes" },
|
2: "Edged cubic", 3: "Edged marching cubes" },
|
||||||
propertyID: "voxelSurfaceStyle",
|
propertyID: "voxelSurfaceStyle",
|
||||||
propertyName: "voxelSurfaceStyle",
|
propertyName: "voxelSurfaceStyle",
|
||||||
},*/
|
},
|
||||||
{
|
{
|
||||||
label: "X Texture URL",
|
label: "X Texture URL",
|
||||||
type: "string",
|
type: "string",
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
// Modified by David Back on 1/9/2018
|
// Modified by David Back on 1/9/2018
|
||||||
// Copyright 2014 High Fidelity, Inc.
|
// Copyright 2014 High Fidelity, Inc.
|
||||||
// Copyright 2020 Vircadia contributors
|
// Copyright 2020 Vircadia contributors
|
||||||
|
// Copyright 2022 Overte e.V.
|
||||||
//
|
//
|
||||||
// This script implements a class useful for building tools for editing entities.
|
// This script implements a class useful for building tools for editing entities.
|
||||||
//
|
//
|
||||||
|
|
|
@ -24,10 +24,7 @@ function loaded() {
|
||||||
elVoxelHelpPopup = document.getElementById("voxel-help-popup");
|
elVoxelHelpPopup = document.getElementById("voxel-help-popup");
|
||||||
|
|
||||||
elVoxelSphereSize = document.getElementById("voxel-sphere-size");
|
elVoxelSphereSize = document.getElementById("voxel-sphere-size");
|
||||||
//elVoxelEditDynamics = document.getElementById("voxel-edit-dynamics");
|
|
||||||
elVoxelRemove = document.getElementById("voxel-remove");
|
elVoxelRemove = document.getElementById("voxel-remove");
|
||||||
//elVoxelPointerMode = document.getElementById("voxel-pointer-mode");
|
|
||||||
//elVoxelBrushLength = document.getElementById("voxel-brush-length");
|
|
||||||
|
|
||||||
elPosY = document.getElementById("horiz-y");
|
elPosY = document.getElementById("horiz-y");
|
||||||
elMinorSpacing = document.getElementById("minor-spacing");
|
elMinorSpacing = document.getElementById("minor-spacing");
|
||||||
|
@ -179,19 +176,13 @@ function loaded() {
|
||||||
createAppMode: createAppModeValue,
|
createAppMode: createAppModeValue,
|
||||||
voxelEditMode: voxelEditModeValue,
|
voxelEditMode: voxelEditModeValue,
|
||||||
voxelSphereSize: elVoxelSphereSize.value,
|
voxelSphereSize: elVoxelSphereSize.value,
|
||||||
//voxelEditDynamics: elVoxelEditDynamics.value,
|
|
||||||
voxelRemove: elVoxelRemove.checked,
|
voxelRemove: elVoxelRemove.checked,
|
||||||
//voxelPointerMode: elVoxelPointerMode.value,
|
|
||||||
//voxelBrushLength: elVoxelBrushLength.value,
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
elVoxelSphereSize.addEventListener("change", emitUpdateEditTools);
|
elVoxelSphereSize.addEventListener("change", emitUpdateEditTools);
|
||||||
//elVoxelEditDynamics.addEventListener("change", emitUpdateEditTools);
|
|
||||||
elVoxelRemove.addEventListener("change", emitUpdateEditTools);
|
elVoxelRemove.addEventListener("change", emitUpdateEditTools);
|
||||||
//elVoxelPointerMode.addEventListener("change", emitUpdateEditTools);
|
|
||||||
//elVoxelBrushLength.addEventListener("change", emitUpdateEditTools);
|
|
||||||
|
|
||||||
elPosY.addEventListener("change", emitUpdate);
|
elPosY.addEventListener("change", emitUpdate);
|
||||||
elMinorSpacing.addEventListener("change", emitUpdate);
|
elMinorSpacing.addEventListener("change", emitUpdate);
|
||||||
|
|
Loading…
Reference in a new issue