mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
hook tree stat calculation to menu
This commit is contained in:
parent
eb4508aafb
commit
474b0465a7
4 changed files with 13 additions and 12 deletions
|
@ -530,7 +530,7 @@ void Application::keyPressEvent(QKeyEvent* event) {
|
|||
|
||||
case Qt::Key_S:
|
||||
if (isShifted) {
|
||||
doTreeStats();
|
||||
_voxels.collectStatsForTreesAndVBOs();
|
||||
} else {
|
||||
_myAvatar.setDriveKeys(BACK, 1);
|
||||
}
|
||||
|
@ -1161,10 +1161,6 @@ void Application::doTrueVoxelColors() {
|
|||
_voxels.trueColorize();
|
||||
}
|
||||
|
||||
void Application::doTreeStats() {
|
||||
_voxels.collectStatsForTreesAndVBOs();
|
||||
}
|
||||
|
||||
void Application::disableLowResMoving(bool disableLowResMoving) {
|
||||
_myAvatar.setWantLowResMoving(!disableLowResMoving);
|
||||
}
|
||||
|
|
|
@ -168,7 +168,6 @@ private slots:
|
|||
void doFalseColorizeBySource();
|
||||
void doFalseColorizeInView();
|
||||
void doTrueVoxelColors();
|
||||
void doTreeStats();
|
||||
void setWantsMonochrome(bool wantsMonochrome);
|
||||
void disableLowResMoving(bool disableLowResMoving);
|
||||
void disableDeltaSending(bool disableDeltaSending);
|
||||
|
|
|
@ -255,7 +255,11 @@ Menu::Menu() :
|
|||
updateFrustumRenderModeAction();
|
||||
|
||||
addActionToQMenuAndActionHash(debugMenu, MenuOption::RunTimingTests, 0, this, SLOT(runTests()));
|
||||
addActionToQMenuAndActionHash(debugMenu, MenuOption::TreeStats, Qt::SHIFT | Qt::Key_S);
|
||||
addActionToQMenuAndActionHash(debugMenu,
|
||||
MenuOption::TreeStats,
|
||||
Qt::SHIFT | Qt::Key_S,
|
||||
appInstance->getVoxels(),
|
||||
SLOT(collectStatsForTreesAndVBOs()));
|
||||
|
||||
// debugMenu->addAction("Calculate Tree Stats", this, SLOT(doTreeStats()), Qt::SHIFT | Qt::Key_S);
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
//
|
||||
// Cube.h
|
||||
// VoxelSystem.h
|
||||
// interface
|
||||
//
|
||||
// Created by Philip on 12/31/12.
|
||||
// Copyright (c) 2012 High Fidelity, Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef __interface__Cube__
|
||||
#define __interface__Cube__
|
||||
#ifndef __interface__VoxelSystem__
|
||||
#define __interface__VoxelSystem__
|
||||
|
||||
#include "InterfaceConfig.h"
|
||||
#include <glm/glm.hpp>
|
||||
|
@ -29,6 +29,7 @@ class ProgramObject;
|
|||
const int NUM_CHILDREN = 8;
|
||||
|
||||
class VoxelSystem : public NodeData, public VoxelNodeDeleteHook, public NodeListHook {
|
||||
Q_OBJECT
|
||||
public:
|
||||
VoxelSystem(float treeScale = TREE_SCALE, int maxVoxels = MAX_VOXELS_PER_SYSTEM);
|
||||
~VoxelSystem();
|
||||
|
@ -81,8 +82,6 @@ public:
|
|||
|
||||
bool findSpherePenetration(const glm::vec3& center, float radius, glm::vec3& penetration);
|
||||
bool findCapsulePenetration(const glm::vec3& start, const glm::vec3& end, float radius, glm::vec3& penetration);
|
||||
|
||||
void collectStatsForTreesAndVBOs();
|
||||
|
||||
void deleteVoxelAt(float x, float y, float z, float s);
|
||||
VoxelNode* getVoxelAt(float x, float y, float z, float s) const;
|
||||
|
@ -101,6 +100,9 @@ public:
|
|||
virtual void nodeDeleted(VoxelNode* node);
|
||||
virtual void nodeAdded(Node* node);
|
||||
virtual void nodeKilled(Node* node);
|
||||
|
||||
public slots:
|
||||
void collectStatsForTreesAndVBOs();
|
||||
|
||||
protected:
|
||||
float _treeScale;
|
||||
|
|
Loading…
Reference in a new issue