mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 20:36:38 +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()
|
void shiftPaintingColor()
|
||||||
{
|
{
|
||||||
// About the color of the paintbrush... first determine the dominant color
|
// 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 == '*') ::starsOn = !::starsOn; // toggle stars
|
||||||
if (k == '&') {
|
if (k == '&') {
|
||||||
::paintOn = !::paintOn; // toggle paint
|
::paintOn = !::paintOn; // toggle paint
|
||||||
setupPaintingVoxel(); // also randomizes colors
|
::setupPaintingVoxel(); // also randomizes colors
|
||||||
}
|
|
||||||
if (k == '^') {
|
|
||||||
shiftPaintingColor(); // shifts randomize color between R,G,B dominant
|
|
||||||
}
|
}
|
||||||
|
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')
|
if (k == 'n')
|
||||||
{
|
{
|
||||||
noise_on = !noise_on; // Toggle noise
|
noise_on = !noise_on; // Toggle noise
|
||||||
|
|
Loading…
Reference in a new issue