mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 20:56:25 +02:00
added keyboard commands for erase all and add scene
This commit is contained in:
parent
5415543dcd
commit
d3fd5d1a75
1 changed files with 18 additions and 4 deletions
|
@ -712,6 +712,20 @@ void testPointToVoxel()
|
|||
}
|
||||
}
|
||||
|
||||
void sendVoxelServerEraseAll() {
|
||||
char message[100];
|
||||
sprintf(message,"%c%s",'Z',"erase all");
|
||||
int messageSize = strlen(message)+1;
|
||||
::agentList.broadcastToAgents(message, messageSize,AgentList::AGENTS_OF_TYPE_VOXEL);
|
||||
}
|
||||
|
||||
void sendVoxelServerAddScene() {
|
||||
char message[100];
|
||||
sprintf(message,"%c%s",'Z',"add scene");
|
||||
int messageSize = strlen(message)+1;
|
||||
::agentList.broadcastToAgents(message, messageSize,AgentList::AGENTS_OF_TYPE_VOXEL);
|
||||
}
|
||||
|
||||
void shiftPaintingColor()
|
||||
{
|
||||
// About the color of the paintbrush... first determine the dominant color
|
||||
|
@ -821,11 +835,11 @@ void key(unsigned char k, int x, int y)
|
|||
if (k == '*') ::starsOn = !::starsOn; // toggle stars
|
||||
if (k == '&') {
|
||||
::paintOn = !::paintOn; // toggle paint
|
||||
setupPaintingVoxel(); // also randomizes colors
|
||||
}
|
||||
if (k == '^') {
|
||||
shiftPaintingColor(); // shifts randomize color between R,G,B dominant
|
||||
::setupPaintingVoxel(); // also randomizes colors
|
||||
}
|
||||
if (k == '^') ::shiftPaintingColor(); // shifts randomize color between R,G,B dominant
|
||||
if (k == '-') ::sendVoxelServerEraseAll(); // sends erase all command to voxel server
|
||||
if (k == '%') ::sendVoxelServerAddScene(); // sends add scene command to voxel server
|
||||
if (k == 'n')
|
||||
{
|
||||
noise_on = !noise_on; // Toggle noise
|
||||
|
|
Loading…
Reference in a new issue