mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
removed UI for want exists bits, defaults to true
This commit is contained in:
parent
ef2d27aba6
commit
4f9c7fed59
8 changed files with 7 additions and 26 deletions
|
@ -1116,11 +1116,6 @@ void Application::setWantsResIn(bool wantsResIn) {
|
|||
_myAvatar.setWantResIn(wantsResIn);
|
||||
}
|
||||
|
||||
void Application::setWantsExistsBits(bool wantsExistsBits) {
|
||||
_myAvatar.setWantExistsBits(wantsExistsBits);
|
||||
_voxels.setWantExistsBits(wantsExistsBits);
|
||||
}
|
||||
|
||||
void Application::setWantsDelta(bool wantsDelta) {
|
||||
_myAvatar.setWantDelta(wantsDelta);
|
||||
}
|
||||
|
@ -1283,7 +1278,6 @@ void Application::initMenu() {
|
|||
debugMenu->addAction("Wants Res-In", this, SLOT(setWantsResIn(bool)))->setCheckable(true);
|
||||
debugMenu->addAction("Wants Monochrome", this, SLOT(setWantsMonochrome(bool)))->setCheckable(true);
|
||||
debugMenu->addAction("Wants View Delta Sending", this, SLOT(setWantsDelta(bool)))->setCheckable(true);
|
||||
debugMenu->addAction("Wants Exists Bits", this, SLOT(setWantsExistsBits(bool)), Qt::CTRL | Qt::Key_M)->setCheckable(true);
|
||||
}
|
||||
|
||||
void Application::updateFrustumRenderModeAction() {
|
||||
|
|
|
@ -90,7 +90,6 @@ private slots:
|
|||
void doTreeStats();
|
||||
void setWantsMonochrome(bool wantsMonochrome);
|
||||
void setWantsResIn(bool wantsResIn);
|
||||
void setWantsExistsBits(bool wantsExistsBits);
|
||||
void setWantsDelta(bool wantsDelta);
|
||||
void updateVoxelModeActions();
|
||||
void addVoxelInFrontOfAvatar();
|
||||
|
|
|
@ -106,14 +106,14 @@ int VoxelSystem::parseData(unsigned char* sourceBuffer, int numBytes) {
|
|||
{
|
||||
PerformanceWarning warn(_renderWarningsOn, "readBitstreamToTree()");
|
||||
// ask the VoxelTree to read the bitstream into the tree
|
||||
_tree->readBitstreamToTree(voxelData, numBytes - 1, true, _wantsExistBits);
|
||||
_tree->readBitstreamToTree(voxelData, numBytes - 1, true, WANT_EXISTS_BITS);
|
||||
}
|
||||
break;
|
||||
case PACKET_HEADER_VOXEL_DATA_MONOCHROME:
|
||||
{
|
||||
PerformanceWarning warn(_renderWarningsOn, "readBitstreamToTree()");
|
||||
// ask the VoxelTree to read the MONOCHROME bitstream into the tree
|
||||
_tree->readBitstreamToTree(voxelData, numBytes - 1, false, _wantsExistBits);
|
||||
_tree->readBitstreamToTree(voxelData, numBytes - 1, false, WANT_EXISTS_BITS);
|
||||
}
|
||||
break;
|
||||
case PACKET_HEADER_Z_COMMAND:
|
||||
|
@ -424,7 +424,6 @@ int VoxelSystem::updateNodeInArraysAsPartialVBO(VoxelNode* node) {
|
|||
|
||||
void VoxelSystem::init() {
|
||||
|
||||
_wantsExistBits = false;
|
||||
_renderWarningsOn = false;
|
||||
_callsToTreesToArrays = 0;
|
||||
_setupNewVoxelsForDrawingLastFinished = 0;
|
||||
|
|
|
@ -79,10 +79,6 @@ public:
|
|||
void createLine(glm::vec3 point1, glm::vec3 point2, float unitSize, rgbColor color, bool destructive = false);
|
||||
void createSphere(float r,float xc, float yc, float zc, float s, bool solid,
|
||||
creationMode mode, bool destructive = false, bool debug = false);
|
||||
|
||||
void setWantExistsBits(bool on) { _wantsExistBits = on; };
|
||||
bool getWantExistsBits() const { return _wantsExistBits; };
|
||||
|
||||
private:
|
||||
// disallow copying of VoxelSystem objects
|
||||
VoxelSystem(const VoxelSystem&);
|
||||
|
@ -157,8 +153,6 @@ private:
|
|||
|
||||
bool _voxelsDirty;
|
||||
|
||||
bool _wantsExistBits;
|
||||
|
||||
public:
|
||||
void updateVBOs();
|
||||
void updateFullVBOs(); // all voxels in the VBO
|
||||
|
|
|
@ -57,8 +57,7 @@ AvatarData::AvatarData() :
|
|||
_keyState(NO_KEY_DOWN),
|
||||
_wantResIn(false),
|
||||
_wantColor(true),
|
||||
_wantDelta(false),
|
||||
_wantExistsBits(false)
|
||||
_wantDelta(false)
|
||||
{
|
||||
};
|
||||
|
||||
|
@ -137,7 +136,6 @@ int AvatarData::getBroadcastData(unsigned char* destinationBuffer) {
|
|||
if (_wantResIn) { setAtBit(wantItems,WANT_RESIN_AT_BIT); }
|
||||
if (_wantColor) { setAtBit(wantItems,WANT_COLOR_AT_BIT); }
|
||||
if (_wantDelta) { setAtBit(wantItems,WANT_DELTA_AT_BIT); }
|
||||
if (_wantExistsBits) { setAtBit(wantItems,WANT_EXISTS_BITS_BIT); }
|
||||
*destinationBuffer++ = wantItems;
|
||||
|
||||
return destinationBuffer - bufferStart;
|
||||
|
@ -224,7 +222,6 @@ int AvatarData::parseData(unsigned char* sourceBuffer, int numBytes) {
|
|||
_wantResIn = oneAtBit(wantItems,WANT_RESIN_AT_BIT);
|
||||
_wantColor = oneAtBit(wantItems,WANT_COLOR_AT_BIT);
|
||||
_wantDelta = oneAtBit(wantItems,WANT_DELTA_AT_BIT);
|
||||
_wantExistsBits = oneAtBit(wantItems,WANT_EXISTS_BITS_BIT);
|
||||
|
||||
return sourceBuffer - startPosition;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
const int WANT_RESIN_AT_BIT = 0;
|
||||
const int WANT_COLOR_AT_BIT = 1;
|
||||
const int WANT_DELTA_AT_BIT = 2;
|
||||
const int WANT_EXISTS_BITS_BIT = 4;
|
||||
|
||||
enum KeyState
|
||||
{
|
||||
|
@ -105,11 +104,9 @@ public:
|
|||
bool getWantResIn() const { return _wantResIn; }
|
||||
bool getWantColor() const { return _wantColor; }
|
||||
bool getWantDelta() const { return _wantDelta; }
|
||||
bool getWantExistsBits() const { return _wantExistsBits; }
|
||||
void setWantResIn(bool wantResIn) { _wantResIn = wantResIn; }
|
||||
void setWantColor(bool wantColor) { _wantColor = wantColor; }
|
||||
void setWantDelta(bool wantDelta) { _wantDelta = wantDelta; }
|
||||
void setWantExistsBits(bool wantExistsBits) { _wantExistsBits = wantExistsBits; }
|
||||
|
||||
protected:
|
||||
// privatize the copy constructor and assignment operator so they cannot be called
|
||||
|
@ -161,7 +158,6 @@ protected:
|
|||
bool _wantResIn;
|
||||
bool _wantColor;
|
||||
bool _wantDelta;
|
||||
bool _wantExistsBits;
|
||||
};
|
||||
|
||||
#endif /* defined(__hifi__AvatarData__) */
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
typedef bool (*RecurseVoxelTreeOperation)(VoxelNode* node, void* extraData);
|
||||
typedef enum {GRADIENT, RANDOM, NATURAL} creationMode;
|
||||
|
||||
#define WANT_EXISTS_BITS true
|
||||
|
||||
class VoxelTree {
|
||||
public:
|
||||
// when a voxel is created in the tree (object new'd)
|
||||
|
|
|
@ -168,7 +168,7 @@ void resInVoxelDistributor(AgentList* agentList,
|
|||
bytesWritten = randomTree.encodeTreeBitstream(agentData->getMaxSearchLevel(), subTree,
|
||||
&tempOutputBuffer[0], MAX_VOXEL_PACKET_SIZE - 1,
|
||||
agentData->nodeBag, &viewFrustum,
|
||||
agentData->getWantColor(),agentData->getWantExistsBits());
|
||||
agentData->getWantColor(),WANT_EXISTS_BITS);
|
||||
|
||||
if (agentData->getAvailable() >= bytesWritten) {
|
||||
agentData->writeToPacket(&tempOutputBuffer[0], bytesWritten);
|
||||
|
@ -306,7 +306,7 @@ printf("huh... bag STILL empty, what to do? Add the root?...\n");
|
|||
bytesWritten = randomTree.encodeTreeBitstream(INT_MAX, subTree,
|
||||
&tempOutputBuffer[0], MAX_VOXEL_PACKET_SIZE - 1,
|
||||
agentData->nodeBag, &agentData->getCurrentViewFrustum(),
|
||||
agentData->getWantColor(), agentData->getWantExistsBits(),
|
||||
agentData->getWantColor(), WANT_EXISTS_BITS,
|
||||
wantDelta, lastViewFrustum);
|
||||
|
||||
if (agentData->getAvailable() >= bytesWritten) {
|
||||
|
|
Loading…
Reference in a new issue