merge upstream/master into andrew/scripting

This commit is contained in:
Andrew Meadows 2014-04-09 15:38:56 -07:00
commit 22d2f84cff
542 changed files with 3956 additions and 2091 deletions

14
LICENSE
View file

@ -1 +1,13 @@
All rights reserved. © High Fidelity, Inc. 2013
Copyright 2014 High Fidelity, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View file

@ -1,9 +1,12 @@
//
// AnimationServer.cpp
// hifi
// animation-server/src
//
// Created by Stephen Birarda on 12/5/2013.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <algorithm>

View file

@ -1,13 +1,16 @@
//
// AnimationServer.h
// hifi
// animation-server/src
//
// Created by Stephen Birarda on 12/5/2013.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __hifi__AnimationServer__
#define __hifi__AnimationServer__
#ifndef hifi_AnimationServer_h
#define hifi_AnimationServer_h
#include <QtCore/QCoreApplication>
@ -21,4 +24,4 @@ private slots:
};
#endif /* defined(__hifi__AnimationServer__) */
#endif // hifi_AnimationServer_h

View file

@ -1,9 +1,12 @@
//
// main.cpp
// Animation Server
// animation-server/src
//
// Created by Brad Hefta-Gaub on 05/16/2013
// Copyright (c) 2012 High Fidelity, Inc. All rights reserved.
// Created by Brad Hefta-Gaub on 05/16/2013.
// Copyright 2012 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "AnimationServer.h"

View file

@ -1,9 +1,12 @@
//
// Agent.cpp
// hifi
// assignment-client/src
//
// Created by Stephen Birarda on 7/1/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <QtCore/QCoreApplication>

View file

@ -1,13 +1,16 @@
//
// Agent.h
// hifi
// assignment-client/src
//
// Created by Stephen Birarda on 7/1/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __hifi__Agent__
#define __hifi__Agent__
#ifndef hifi_Agent_h
#define hifi_Agent_h
#include <vector>
@ -64,4 +67,4 @@ private:
MixedAudioRingBuffer _receivedAudioBuffer;
};
#endif /* defined(__hifi__Agent__) */
#endif // hifi_Agent_h

View file

@ -1,9 +1,12 @@
//
// AssignmentClient.cpp
// hifi
// assignment-client/src
//
// Created by Stephen Birarda on 11/25/2013.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <QtCore/QProcess>

View file

@ -1,13 +1,16 @@
//
// AssignmentClient.h
// hifi
// assignment-client/src
//
// Created by Stephen Birarda on 11/25/2013.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __hifi__AssignmentClient__
#define __hifi__AssignmentClient__
#ifndef hifi_AssignmentClient_h
#define hifi_AssignmentClient_h
#include <QtCore/QCoreApplication>
@ -27,4 +30,4 @@ private:
SharedAssignmentPointer _currentAssignment;
};
#endif /* defined(__hifi__AssignmentClient__) */
#endif // hifi_AssignmentClient_h

View file

@ -1,9 +1,12 @@
//
// AssignmentClientMonitor.cpp
// hifi
// assignment-client/src
//
// Created by Stephen Birarda on 1/10/2014.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <Logging.h>
@ -53,4 +56,4 @@ void AssignmentClientMonitor::spawnChildClient() {
void AssignmentClientMonitor::childProcessFinished(int exitCode, QProcess::ExitStatus exitStatus) {
qDebug("Replacing dead child assignment client with a new one");
spawnChildClient();
}
}

View file

@ -1,13 +1,16 @@
//
// AssignmentClientMonitor.h
// hifi
// assignment-client/src
//
// Created by Stephen Birarda on 1/10/2014.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __hifi__AssignmentClientMonitor__
#define __hifi__AssignmentClientMonitor__
#ifndef hifi_AssignmentClientMonitor_h
#define hifi_AssignmentClientMonitor_h
#include <QtCore/QCoreApplication>
#include <QtCore/QProcess>
@ -28,4 +31,4 @@ private:
QStringList _childArguments;
};
#endif /* defined(__hifi__AssignmentClientMonitor__) */
#endif // hifi_AssignmentClientMonitor_h

View file

@ -1,9 +1,12 @@
//
// AssignmentFactory.cpp
// hifi
// assignment-client/src
//
// Created by Stephen Birarda on 9/17/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <PacketHeaders.h>

View file

@ -1,13 +1,16 @@
//
// AssignmentFactory.h
// hifi
// assignment-client/src
//
// Created by Stephen Birarda on 9/17/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __hifi__AssignmentFactory__
#define __hifi__AssignmentFactory__
#ifndef hifi_AssignmentFactory_h
#define hifi_AssignmentFactory_h
#include <ThreadedAssignment.h>
@ -16,4 +19,4 @@ public:
static ThreadedAssignment* unpackAssignment(const QByteArray& packet);
};
#endif /* defined(__hifi__AssignmentFactory__) */
#endif // hifi_AssignmentFactory_h

View file

@ -1,9 +1,12 @@
//
// AssignmentThread.cpp
// hifi
// assignment-client/src
//
// Created by Stephen Birarda on 2014-03-28.
// Copyright (c) 2014 High Fidelity, Inc. All rights reserved.
// Created by Stephen Birarda on 2014.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "AssignmentThread.h"
@ -13,4 +16,4 @@ AssignmentThread::AssignmentThread(const SharedAssignmentPointer& assignment, QO
_assignment(assignment)
{
}
}

View file

@ -1,13 +1,16 @@
//
// AssignmentThread.h
// hifi
// assignment-client/src
//
// Created by Stephen Birarda on 2014-03-28.
// Copyright (c) 2014 High Fidelity, Inc. All rights reserved.
// Created by Stephen Birarda on 2014.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __hifi__AssignmentThread__
#define __hifi__AssignmentThread__
#ifndef hifi_AssignmentThread_h
#define hifi_AssignmentThread_h
#include <QtCore/QThread>
@ -20,4 +23,4 @@ private:
SharedAssignmentPointer _assignment;
};
#endif /* defined(__hifi__AssignmentThread__) */
#endif // hifi_AssignmentThread_h

View file

@ -1,9 +1,12 @@
//
// AudioMixer.cpp
// hifi
// assignment-client/src/audio
//
// Created by Stephen Birarda on 8/22/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <mmintrin.h>

View file

@ -1,13 +1,16 @@
//
// AudioMixer.h
// hifi
// assignment-client/src/audio
//
// Created by Stephen Birarda on 8/22/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __hifi__AudioMixer__
#define __hifi__AudioMixer__
#ifndef hifi_AudioMixer_h
#define hifi_AudioMixer_h
#include <AudioRingBuffer.h>
@ -50,4 +53,4 @@ private:
int _sumMixes;
};
#endif /* defined(__hifi__AudioMixer__) */
#endif // hifi_AudioMixer_h

View file

@ -1,9 +1,12 @@
//
// AudioMixerClientData.cpp
// hifi
// assignment-client/src/audio
//
// Created by Stephen Birarda on 10/18/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <QDebug>

View file

@ -1,13 +1,16 @@
//
// AudioMixerClientData.h
// hifi
// assignment-client/src/audio
//
// Created by Stephen Birarda on 10/18/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __hifi__AudioMixerClientData__
#define __hifi__AudioMixerClientData__
#ifndef hifi_AudioMixerClientData_h
#define hifi_AudioMixerClientData_h
#include <vector>
@ -31,4 +34,4 @@ private:
std::vector<PositionalAudioRingBuffer*> _ringBuffers;
};
#endif /* defined(__hifi__AudioMixerClientData__) */
#endif // hifi_AudioMixerClientData_h

View file

@ -1,9 +1,12 @@
//
// AvatarAudioRingBuffer.cpp
// hifi
// assignment-client/src/audio
//
// Created by Stephen Birarda on 6/5/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <PacketHeaders.h>
@ -18,4 +21,4 @@ AvatarAudioRingBuffer::AvatarAudioRingBuffer() :
int AvatarAudioRingBuffer::parseData(const QByteArray& packet) {
_shouldLoopbackForNode = (packetTypeForPacket(packet) == PacketTypeMicrophoneAudioWithEcho);
return PositionalAudioRingBuffer::parseData(packet);
}
}

View file

@ -1,13 +1,16 @@
//
// AvatarAudioRingBuffer.h
// hifi
// assignment-client/src/audio
//
// Created by Stephen Birarda on 6/5/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __hifi__AvatarAudioRingBuffer__
#define __hifi__AvatarAudioRingBuffer__
#ifndef hifi_AvatarAudioRingBuffer_h
#define hifi_AvatarAudioRingBuffer_h
#include <QtCore/QUuid>
@ -24,4 +27,4 @@ private:
AvatarAudioRingBuffer& operator= (const AvatarAudioRingBuffer&);
};
#endif /* defined(__hifi__AvatarAudioRingBuffer__) */
#endif // hifi_AvatarAudioRingBuffer_h

View file

@ -1,14 +1,13 @@
//
// AvatarMixer.cpp
// hifi
// assignment-client/src/avatars
//
// Created by Stephen Birarda on 9/5/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Original avatar-mixer main created by Leonardo Murillo on 03/25/13.
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
// The avatar mixer receives head, hand and positional data from all connected
// nodes, and broadcasts that data back to them, every BROADCAST_INTERVAL ms.
#include <QtCore/QCoreApplication>
#include <QtCore/QDateTime>

View file

@ -1,13 +1,19 @@
//
// AvatarMixer.h
// hifi
// assignment-client/src/avatars
//
// Created by Stephen Birarda on 9/5/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// The avatar mixer receives head, hand and positional data from all connected
// nodes, and broadcasts that data back to them, every BROADCAST_INTERVAL ms.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __hifi__AvatarMixer__
#define __hifi__AvatarMixer__
#ifndef hifi_AvatarMixer_h
#define hifi_AvatarMixer_h
#include <ThreadedAssignment.h>
@ -43,4 +49,4 @@ private:
int _sumIdentityPackets;
};
#endif /* defined(__hifi__AvatarMixer__) */
#endif // hifi_AvatarMixer_h

View file

@ -1,9 +1,12 @@
//
// AvatarMixerClientData.cpp
// hifi
// assignment-client/src/avatars
//
// Created by Stephen Birarda on 2/4/2014.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "AvatarMixerClientData.h"

View file

@ -1,13 +1,16 @@
//
// AvatarMixerClientData.h
// hifi
// assignment-client/src/avatars
//
// Created by Stephen Birarda on 2/4/2014.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __hifi__AvatarMixerClientData__
#define __hifi__AvatarMixerClientData__
#ifndef hifi_AvatarMixerClientData_h
#define hifi_AvatarMixerClientData_h
#include <QtCore/QUrl>
@ -37,4 +40,4 @@ private:
quint64 _identityChangeTimestamp;
};
#endif /* defined(__hifi__AvatarMixerClientData__) */
#endif // hifi_AvatarMixerClientData_h

View file

@ -1,9 +1,12 @@
//
// main.cpp
// assignment-client
// assignment-client/src
//
// Created by Stephen Birarda on 8/22/13.
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <Logging.h>
@ -37,4 +40,4 @@ int main(int argc, char* argv[]) {
AssignmentClient client(argc, argv);
return client.exec();
}
}
}

View file

@ -1,9 +1,12 @@
//
// MetavoxelServer.cpp
// hifi
// assignment-client/src/metavoxels
//
// Created by Andrzej Kapolka on 12/18/13.
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <QDateTime>

View file

@ -1,13 +1,16 @@
//
// MetavoxelServer.h
// hifi
// assignment-client/src/metavoxels
//
// Created by Andrzej Kapolka on 12/18/13.
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __hifi__MetavoxelServer__
#define __hifi__MetavoxelServer__
#ifndef hifi_MetavoxelServer_h
#define hifi_MetavoxelServer_h
#include <QList>
#include <QTimer>
@ -92,4 +95,4 @@ private:
QList<SendRecord> _sendRecords;
};
#endif /* defined(__hifi__MetavoxelServer__) */
#endif // hifi_MetavoxelServer_h

View file

@ -1,11 +1,12 @@
//
// OctreeInboundPacketProcessor.cpp
// voxel-server
// assignment-client/src/octree
//
// Created by Brad Hefta-Gaub on 8/21/13
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
// Created by Brad Hefta-Gaub on 8/21/13.
// Copyright 2013 High Fidelity, Inc.
//
// Threaded or non-threaded network packet processor for the voxel-server
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <PacketHeaders.h>

View file

@ -1,15 +1,18 @@
//
// OctreeInboundPacketProcessor.h
// voxel-server
// assignment-client/src/octree
//
// Created by Brad Hefta-Gaub on 8/21/13
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
// Created by Brad Hefta-Gaub on 8/21/13.
// Copyright 2013 High Fidelity, Inc.
//
// Threaded or non-threaded network packet processor for the voxel-server
// Threaded or non-threaded network packet processor for the voxel-server
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __octree_server__OctreeInboundPacketProcessor__
#define __octree_server__OctreeInboundPacketProcessor__
#ifndef hifi_OctreeInboundPacketProcessor_h
#define hifi_OctreeInboundPacketProcessor_h
#include <map>
@ -80,4 +83,4 @@ private:
NodeToSenderStatsMap _singleSenderStats;
};
#endif // __octree_server__OctreeInboundPacketProcessor__
#endif // hifi_OctreeInboundPacketProcessor_h

View file

@ -1,9 +1,12 @@
//
// OctreeQueryNode.cpp
// hifi
// assignment-client/src/octree
//
// Created by Stephen Birarda on 3/21/13.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "PacketHeaders.h"

View file

@ -1,13 +1,16 @@
//
// OctreeQueryNode.h
// hifi
// assignment-client/src/octree
//
// Created by Brad Hefta-Gaub on 12/4/13.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __hifi__OctreeQueryNode__
#define __hifi__OctreeQueryNode__
#ifndef hifi_OctreeQueryNode_h
#define hifi_OctreeQueryNode_h
#include <iostream>
#include <NodeData.h>
@ -135,4 +138,4 @@ private:
bool _isShuttingDown;
};
#endif /* defined(__hifi__OctreeQueryNode__) */
#endif // hifi_OctreeQueryNode_h

View file

@ -1,8 +1,12 @@
//
// OctreeSendThread.cpp
// assignment-client/src/octree
//
// Created by Brad Hefta-Gaub on 8/21/13
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
// Created by Brad Hefta-Gaub on 8/21/13.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <QMutexLocker>

View file

@ -1,14 +1,18 @@
//
// OctreeSendThread.h
// assignment-client/src/octree
//
// Created by Brad Hefta-Gaub on 8/21/13
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
// Created by Brad Hefta-Gaub on 8/21/13.
// Copyright 2013 High Fidelity, Inc.
//
// Threaded or non-threaded object for sending voxels to a client
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __octree_server__OctreeSendThread__
#define __octree_server__OctreeSendThread__
#ifndef hifi_OctreeSendThread_h
#define hifi_OctreeSendThread_h
#include <GenericThread.h>
#include <NetworkPacket.h>
@ -51,4 +55,4 @@ private:
bool _isShuttingDown;
};
#endif // __octree_server__OctreeSendThread__
#endif // hifi_OctreeSendThread_h

View file

@ -1,9 +1,12 @@
//
// OctreeServer.cpp
// hifi
// assignment-client/src/octree
//
// Created by Brad Hefta-Gaub on 9/16/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <QJsonObject>

View file

@ -1,14 +1,16 @@
//
// OctreeServer.h
// voxel-server
// assignment-client/src/octree
//
// Created by Brad Hefta-Gaub on 8/21/13
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
// Created by Brad Hefta-Gaub on 8/21/13.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __octree_server__OctreeServer__
#define __octree_server__OctreeServer__
#ifndef hifi_OctreeServer_h
#define hifi_OctreeServer_h
#include <QStringList>
#include <QDateTime>
@ -217,4 +219,4 @@ protected:
static QMutex _threadsDidCallWriteDatagramMutex;
};
#endif // __octree_server__OctreeServer__
#endif // hifi_OctreeServer_h

View file

@ -1,13 +1,16 @@
//
// OctreeServerConsts.h
// octree-server
// assignment-client/src/octree
//
// Created by Brad Hefta-Gaub on 12/4/13
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
// Created by Brad Hefta-Gaub on 12/4/13.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __octree_server__OctreeServerConsts__
#define __octree_server__OctreeServerConsts__
#ifndef hifi_OctreeServerConsts_h
#define hifi_OctreeServerConsts_h
#include <SharedUtil.h>
#include <NodeList.h> // for MAX_PACKET_SIZE
@ -18,4 +21,4 @@ const int INTERVALS_PER_SECOND = 60;
const int OCTREE_SEND_INTERVAL_USECS = (1000 * 1000)/INTERVALS_PER_SECOND;
const int SENDING_TIME_TO_SPARE = 5 * 1000; // usec of sending interval to spare for calculating voxels
#endif // __octree_server__OctreeServerConsts__
#endif // hifi_OctreeServerConsts_h

View file

@ -1,14 +1,16 @@
//
// ParticleNodeData.h
// hifi
// assignment-client/src/particles
//
// Created by Brad Hefta-Gaub on 12/4/13
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
// Created by Brad Hefta-Gaub on 12/4/13.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __hifi__ParticleNodeData__
#define __hifi__ParticleNodeData__
#ifndef hifi_ParticleNodeData_h
#define hifi_ParticleNodeData_h
#include <PacketHeaders.h>
@ -29,4 +31,4 @@ private:
quint64 _lastDeletedParticlesSentAt;
};
#endif /* defined(__hifi__ParticleNodeData__) */
#endif // hifi_ParticleNodeData_h

View file

@ -1,9 +1,12 @@
//
// ParticleServer.cpp
// hifi
// assignment-client/src/particles
//
// Created by Brad Hefta-Gaub on 12/4/13
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Created by Brad Hefta-Gaub on 12/4/13.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <QTimer>

View file

@ -1,14 +1,16 @@
//
// ParticleServer.h
// particle-server
// assignment-client/src/particles
//
// Created by Brad Hefta-Gaub on 12/2/13
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
// Created by Brad Hefta-Gaub on 12/2/13.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __particle_server__ParticleServer__
#define __particle_server__ParticleServer__
#ifndef hifi_ParticleServer_h
#define hifi_ParticleServer_h
#include "../octree/OctreeServer.h"
@ -45,4 +47,4 @@ public slots:
private:
};
#endif // __particle_server__ParticleServer__
#endif // hifi_ParticleServer_h

View file

@ -1,16 +1,19 @@
//
// ParticleServerConsts.h
// particle-server
// assignment-client/src/particles
//
// Created by Brad Hefta-Gaub on 8/21/13
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
// Created by Brad Hefta-Gaub on 8/21/13.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __particle_server__ParticleServerConsts__
#define __particle_server__ParticleServerConsts__
#ifndef hifi_ParticleServerConsts_h
#define hifi_ParticleServerConsts_h
extern const char* PARTICLE_SERVER_NAME;
extern const char* PARTICLE_SERVER_LOGGING_TARGET_NAME;
extern const char* LOCAL_PARTICLES_PERSIST_FILE;
#endif // __particle_server__ParticleServerConsts__
#endif // hifi_ParticleServerConsts_h

View file

@ -1,13 +1,16 @@
//
// VoxelNodeData.h
// hifi
// assignment-client/src/voxels
//
// Created by Stephen Birarda on 3/21/13.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __hifi__VoxelNodeData__
#define __hifi__VoxelNodeData__
#ifndef hifi_VoxelNodeData_h
#define hifi_VoxelNodeData_h
#include <PacketHeaders.h>
@ -19,4 +22,4 @@ public:
virtual PacketType getMyPacketType() const { return PacketTypeVoxelData; }
};
#endif /* defined(__hifi__VoxelNodeData__) */
#endif // hifi_VoxelNodeData_h

View file

@ -1,9 +1,12 @@
//
// VoxelServer.cpp
// hifi
// assignment-client/src/voxels
//
// Created by Brad Hefta-Gaub on 9/16/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <VoxelTree.h>

View file

@ -1,14 +1,16 @@
//
// VoxelServer.h
// voxel-server
// assignment-client/src/voxels
//
// Created by Brad Hefta-Gaub on 8/21/13
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
// Created by Brad Hefta-Gaub on 8/21/13.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __voxel_server__VoxelServer__
#define __voxel_server__VoxelServer__
#ifndef hifi_VoxelServer_h
#define hifi_VoxelServer_h
#include <QStringList>
#include <QDateTime>
@ -53,4 +55,4 @@ private:
unsigned char _tempOutputBuffer[MAX_PACKET_SIZE];
};
#endif // __voxel_server__VoxelServer__
#endif // hifi_VoxelServer_h

View file

@ -1,13 +1,16 @@
//
// VoxelServerConsts.h
// voxel-server
// assignment-client/src/voxels
//
// Created by Brad Hefta-Gaub on 8/21/13
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
// Created by Brad Hefta-Gaub on 8/21/13.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __voxel_server__VoxelServerConsts__
#define __voxel_server__VoxelServerConsts__
#ifndef hifi_VoxelServerConsts_h
#define hifi_VoxelServerConsts_h
extern const char* VOXEL_SERVER_NAME;
extern const char* VOXEL_SERVER_LOGGING_TARGET_NAME;
@ -15,4 +18,4 @@ extern const char* LOCAL_VOXELS_PERSIST_FILE;
const int ENVIRONMENT_SEND_INTERVAL_USECS = 1000000;
#endif // __voxel_server__VoxelServerConsts__
#endif // hifi_VoxelServerConsts_h

View file

@ -1,3 +1,13 @@
#
# AutoMTC.cmake
#
# Created by Andrzej Kapolka on 12/31/13.
# Copyright 2013 High Fidelity, Inc.
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
macro(AUTO_MTC TARGET ROOT_DIR)
if (NOT TARGET mtc)
add_subdirectory("${ROOT_DIR}/tools/mtc" "${ROOT_DIR}/tools/mtc")
@ -8,6 +18,4 @@ macro(AUTO_MTC TARGET ROOT_DIR)
file(GLOB INCLUDE_FILES src/*.h)
add_custom_command(OUTPUT ${AUTOMTC_SRC} COMMAND mtc -o ${AUTOMTC_SRC} ${INCLUDE_FILES} DEPENDS mtc ${INCLUDE_FILES})
endmacro()
endmacro()

View file

@ -1,3 +1,12 @@
#
# IncludeGLM.cmake
#
# Copyright 2013 High Fidelity, Inc.
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
macro(INCLUDE_GLM TARGET ROOT_DIR)
find_package(GLM REQUIRED)

View file

@ -1,3 +1,12 @@
#
# LinkHifiLibrary.cmake
#
# Copyright 2013 High Fidelity, Inc.
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
macro(LINK_HIFI_LIBRARY LIBRARY TARGET ROOT_DIR)
if (NOT TARGET ${LIBRARY})

View file

@ -1,3 +1,12 @@
#
# SetupHifiLibrary.cmake
#
# Copyright 2013 High Fidelity, Inc.
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
macro(SETUP_HIFI_LIBRARY TARGET)
project(${TARGET})

View file

@ -1,3 +1,12 @@
#
# SetupHifiProject.cmake
#
# Copyright 2013 High Fidelity, Inc.
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
macro(SETUP_HIFI_PROJECT TARGET INCLUDE_QT)
project(${TARGET})

View file

@ -1,3 +1,6 @@
#
# FindFaceshift.cmake
#
# Try to find the Faceshift networking library
#
# You must provide a FACESHIFT_ROOT_DIR which contains lib and include directories
@ -9,8 +12,11 @@
# FACESHIFT_LIBRARIES - Link this to use Faceshift
#
# Created on 8/30/2013 by Andrzej Kapolka
# Copyright (c) 2013 High Fidelity
# Copyright 2013 High Fidelity, Inc.
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
if (FACESHIFT_LIBRARIES AND FACESHIFT_INCLUDE_DIRS)
# in cache already

View file

@ -1,16 +1,22 @@
#
# Try to find GLEW library and include path.
# Once done this will define
#
# GLEW_FOUND
# GLEW_INCLUDE_DIRS
# GLEW_LIBRARY
# FindGLEW.cmake
#
# Created on 2/6/2014 by Stephen Birarda
# Try to find GLEW library and include path.
# Once done this will define
#
# Adapted from FindGLEW.cmake available in the nvidia-texture-tools repository
# (https://code.google.com/p/nvidia-texture-tools/source/browse/trunk/cmake/FindGLEW.cmake?r=96)
# GLEW_FOUND
# GLEW_INCLUDE_DIRS
# GLEW_LIBRARY
#
# Created on 2/6/2014 by Stephen Birarda
# Copyright 2014 High Fidelity, Inc.
#
# Adapted from FindGLEW.cmake available in the nvidia-texture-tools repository
# (https://code.google.com/p/nvidia-texture-tools/source/browse/trunk/cmake/FindGLEW.cmake?r=96)
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
if (GLEW_INCLUDE_DIRS AND GLEW_LIBRARY)
set(GLEW_FOUND TRUE)
@ -20,7 +26,7 @@ else ()
find_path(GLEW_INCLUDE_DIRS GL/glew.h PATH_SUFFIXES include HINTS ${WIN_GLEW_SEARCH_DIRS})
find_library(GLEW_LIBRARY glew32s PATH_SUFFIXES "lib/Release/Win32" HINTS ${WIN_GLEW_SEARCH_DIRS})
find_library(GLEW_LIBRARY glew32s PATH_SUFFIXES "lib/Release/Win32" "lib" HINTS ${WIN_GLEW_SEARCH_DIRS})
endif ()
include(FindPackageHandleStandardArgs)

View file

@ -1,15 +1,23 @@
# Try to find GLUT library and include path.
# Once done this will define
#
# FindGLUT.cmake
#
# Try to find GLUT library and include path.
# Once done this will define
#
# GLUT_FOUND
# GLUT_INCLUDE_DIR
# GLUT_LIBRARIES
# GLUT_DLL_PATH - Optionally defined for Win32, if not in path
# GLUT_FOUND
# GLUT_INCLUDE_DIR
# GLUT_LIBRARIES
# GLUT_DLL_PATH - Optionally defined for Win32, if not in path
#
# Created on 2/6/2014 by Stephen Birarda
# Copyright 2014 High Fidelity, Inc.
#
# Adapted from FindGLUT.cmake available in tlorach's OpenGLText Repository
# https://raw.github.com/tlorach/OpenGLText/master/cmake/FindGLUT.cmake
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
# Adapted from FindGLUT.cmake available in tlorach's OpenGLText Repository
# https://raw.github.com/tlorach/OpenGLText/master/cmake/FindGLUT.cmake
if (GLUT_INCLUDE_DIR AND GLUT_LIBRARIES)
set(GLUT_FOUND TRUE)

View file

@ -1,4 +1,7 @@
# - Try to find the LibOVR library to use the Oculus
#
# FindLibOVR.cmake
#
# Try to find the LibOVR library to use the Oculus
#
# You must provide a LIBOVR_ROOT_DIR which contains Lib and Include directories
#
@ -9,8 +12,11 @@
# LIBOVR_LIBRARIES - Link this to use LibOVR
#
# Created on 5/9/2013 by Stephen Birarda
# Copyright (c) 2013 High Fidelity
# Copyright 2013 High Fidelity, Inc.
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
if (LIBOVR_LIBRARIES AND LIBOVR_INCLUDE_DIRS)
# in cache already

View file

@ -30,8 +30,6 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================
function(QT5_CREATE_TRANSLATION_CUSTOM _qm_files)
set(options)
set(oneValueArgs)

View file

@ -1,3 +1,6 @@
#
# FindQxmpp.cmake
#
# Try to find the qxmpp library
#
# You can provide a QXMPP_ROOT_DIR which contains lib and include directories
@ -9,8 +12,11 @@
# QXMPP_LIBRARIES - Link this to use qxmpp
#
# Created on 3/10/2014 by Stephen Birarda
# Copyright (c) 2014 High Fidelity
# Copyright 2014 High Fidelity, Inc.
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
if (QXMPP_LIBRARIES AND QXMPP_INCLUDE_DIRS)
# in cache already

View file

@ -1,3 +1,6 @@
#
# FindSixense.cmake
#
# Try to find the Sixense controller library
#
# You must provide a SIXENSE_ROOT_DIR which contains lib and include directories
@ -9,8 +12,11 @@
# SIXENSE_LIBRARIES - Link this to use Sixense
#
# Created on 11/15/2013 by Andrzej Kapolka
# Copyright (c) 2013 High Fidelity
# Copyright 2013 High Fidelity, Inc.
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
if (SIXENSE_LIBRARIES AND SIXENSE_INCLUDE_DIRS)
# in cache already

View file

@ -1,3 +1,6 @@
#
# FindVisage.cmake
#
# Try to find the Visage controller library
#
# You must provide a VISAGE_ROOT_DIR which contains lib and include directories
@ -9,8 +12,11 @@
# VISAGE_LIBRARIES - Link this to use Visage
#
# Created on 2/11/2014 by Andrzej Kapolka
# Copyright (c) 2014 High Fidelity
# Copyright 2014 High Fidelity, Inc.
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
if (VISAGE_LIBRARIES AND VISAGE_INCLUDE_DIRS)
# in cache already

View file

@ -1,9 +1,12 @@
//
// DomainServer.cpp
// hifi
// domain-server/src
//
// Created by Stephen Birarda on 9/26/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <signal.h>

View file

@ -1,13 +1,16 @@
//
// DomainServer.h
// hifi
// domain-server/src
//
// Created by Stephen Birarda on 9/26/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __hifi__DomainServer__
#define __hifi__DomainServer__
#ifndef hifi_DomainServer_h
#define hifi_DomainServer_h
#include <QtCore/QCoreApplication>
#include <QtCore/QHash>
@ -86,4 +89,4 @@ private slots:
void readAvailableDatagrams();
};
#endif /* defined(__hifi__DomainServer__) */
#endif // hifi_DomainServer_h

View file

@ -1,9 +1,12 @@
//
// DomainServerNodeData.cpp
// hifi
// domain-server/src
//
// Created by Stephen Birarda on 2/6/2014.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <QtCore/QDataStream>
@ -45,4 +48,4 @@ QJsonObject DomainServerNodeData::mergeJSONStatsFromNewObject(const QJsonObject&
}
return destinationObject;
}
}

View file

@ -1,13 +1,16 @@
//
// DomainServerNodeData.h
// hifi
// domain-server/src
//
// Created by Stephen Birarda on 2/6/2014.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef __hifi__DomainServerNodeData__
#define __hifi__DomainServerNodeData__
#ifndef hifi_DomainServerNodeData_h
#define hifi_DomainServerNodeData_h
#include <QtCore/QHash>
#include <QtCore/QUuid>
@ -35,4 +38,4 @@ private:
QJsonObject _statsJSONObject;
};
#endif /* defined(__hifi__DomainServerNodeData__) */
#endif // hifi_DomainServerNodeData_h

View file

@ -1,9 +1,9 @@
//
// main.cpp
// Domain Server
// domain-server/src
//
// Created by Philip Rosedale on 11/20/12.
// Copyright (c) 2012 High Fidelity, Inc. All rights reserved.
// Copyright 2012 High Fidelity, Inc.
//
// The Domain Server keeps a list of nodes that have connected to it, and echoes that list of
// nodes out to nodes when they check in.
@ -11,6 +11,9 @@
// The connection is stateless... the domain server will set you inactive if it does not hear from
// you in LOGOFF_CHECK_INTERVAL milliseconds, meaning your info will not be sent to other users.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <QtCore/QCoreApplication>

View file

@ -1,13 +1,15 @@
//
// addVoxelOnMouseClickExample.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 2/6/14.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// This is an example script that demonstrates use of the Camera and Voxels class to implement
// clicking on a voxel and adding a new voxel on the clicked on face
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
function mousePressEvent(event) {

View file

@ -1,14 +1,17 @@
//
// audioBall.js
// hifi
// examples
//
// Created by Athanasios Gaitatzes on 2/10/14.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// This script creates a particle in front of the user that stays in front of
// the user's avatar as they move, and animates it's radius and color
// in response to the audio intensity.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var sound = new Sound("https://s3-us-west-1.amazonaws.com/highfidelity-public/sounds/Animals/mexicanWhipoorwill.raw");
var CHANCE_OF_PLAYING_SOUND = 0.01;

View file

@ -1,13 +1,15 @@
//
// audioDeviceExample.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 3/22/14
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// This is an example script that demonstrates use of the Menu object
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var outputDevices = AudioDevice.getOutputDevices();
var defaultOutputDevice = AudioDevice.getDefaultOutputDevice();

View file

@ -1,13 +1,15 @@
//
// bot.js
// hifi
// examples
//
// Created by Stephen Birarda on 2/20/14.
// Modified by Philip on 3/3/14
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// This is an example script that demonstrates an NPC avatar.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
function getRandomFloat(min, max) {

View file

@ -1,12 +1,14 @@
//
// cameraExample.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 2/6/14.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// This is an example script that demonstrates use of the Camera class
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var damping = 0.9;

View file

@ -1,6 +1,14 @@
//
// cameraExample.js
// examples
//
// Copyright 2014 High Fidelity, Inc.
//
// This sample script watches your hydra hands and makes clapping sound when they come close together fast
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
function length(v) {
return Math.sqrt(v.x * v.x + v.y * v.y + v.z * v.z);

View file

@ -1,12 +1,14 @@
//
// clipboardExample.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 1/28/14.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// This is an example script that demonstrates use of the Clipboard class
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var selectedVoxel = { x: 0, y: 0, z: 0, s: 0 };

View file

@ -1,14 +1,16 @@
//
// collidingParticles.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 12/31/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// This is an example script that creates a couple particles, and sends them on a collision course.
// One of the particles has a script that when it collides with another particle, it swaps colors with that particle.
// The other particle has a script that when it collides with another particle it set's it's script to a suicide script.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var currentIteration = 0;

View file

@ -1,12 +1,14 @@
//
// controllerExample.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 1/28/14.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// This is an example script that demonstrates use of the Controller class
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
// initialize our triggers

View file

@ -1,12 +1,16 @@
//
// count.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 12/31/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// This is an example script that runs in a loop and displays a counter to the log
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
//
var count = 0;

View file

@ -1,9 +1,12 @@
//
// crazylegs.js
// hifi
// examples
//
// Created by Andrzej Kapolka on 3/6/14.
// Copyright (c) 2014 High Fidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var FREQUENCY = 5.0;

View file

@ -1,5 +1,13 @@
//
// defaultScripts.js
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// examples
//
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
Script.include("lookWithTouch.js");
Script.include("editVoxels.js");
Script.include("selectAudioDevice.js");

View file

@ -1,6 +1,14 @@
//
// drumStick.js
// examples
//
// Copyright 2014 High Fidelity, Inc.
//
// This example musical instrument script plays 'air drums' when you move your hands downward
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
function length(v) {
return Math.sqrt(v.x * v.x + v.y * v.y + v.z * v.z);

View file

@ -1,12 +1,15 @@
//
// editParticleExample.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 12/31/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// This is an example script that demonstrates creating and editing a particle
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var count = 0;
var moveUntil = 2000;

View file

@ -1,9 +1,9 @@
//
// editVoxels.js
// hifi
// examples
//
// Created by Philip Rosedale on February 8, 2014
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// Captures mouse clicks and edits voxels accordingly.
//
@ -15,6 +15,9 @@
//
// Click and drag to create more new voxels in the same direction
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var windowDimensions = Controller.getViewportDimensions();

View file

@ -1,12 +1,15 @@
//
// findParticleExample.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 1/24/14.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// This is an example script that demonstrates "finding" particles
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var iteration = 0;

View file

@ -1,9 +1,9 @@
//
// flockingBirds.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 3/4/14.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// This is an example script that generates particles that act like flocking birds
//
@ -13,12 +13,16 @@
// go back to gliding
// birds don't like to be below a certain altitude
// if they are below that altitude they will keep thrusting up, until they get ove
//
// flocking
// try to align your velocity with velocity of other birds
// try to fly toward center of flock
// but dont get too close
//
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var birdsInFlock = 40;

View file

@ -1,4 +1,12 @@
//
// fountain.js
// examples
//
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
function vLength(v) {
return Math.sqrt(v.x * v.x + v.y * v.y + v.z * v.z);

View file

@ -1,6 +1,14 @@
// Add your JavaScript for assignment below this line
// The following is an example of Conway's Game of Life (http://en.wikipedia.org/wiki/Conway's_Game_of_Life)
//
// gameoflife.js
// examples
//
// Copyright 2014 High Fidelity, Inc.
//
// The following is an example of Conway's Game of Life (http://en.wikipedia.org/wiki/Conway's_Game_of_Life)
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var NUMBER_OF_CELLS_EACH_DIMENSION = 64;
var NUMBER_OF_CELLS = NUMBER_OF_CELLS_EACH_DIMENSION * NUMBER_OF_CELLS_EACH_DIMENSION;

View file

@ -1,12 +1,14 @@
//
// globalCollisionsExample.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 1/29/14.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// This is an example script that demonstrates use of the Controller class
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//

View file

@ -1,18 +1,19 @@
//
// gun.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 12/31/13.
// Modified by Philip on 3/3/14
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// This is an example script that turns the hydra controllers and mouse into a particle gun.
// It reads the controller, watches for trigger pulls, and launches particles.
// When particles collide with voxels they blow little holes out of the voxels.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
function getRandomFloat(min, max) {
return Math.random() * (max - min) + min;
}

View file

@ -1,12 +1,14 @@
//
// hideAvatarExample.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 1/28/14.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// This is an example script that demonstrates how to enable or disable local rendering of your own avatar
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
function keyReleaseEvent(event) {

View file

@ -1,13 +1,15 @@
//
// hydraMove.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 2/10/14.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// This is an example script that demonstrates use of the Controller and MyAvatar classes to implement
// avatar flying through the hydra/controller joysticks
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var damping = 0.9;

View file

@ -1,12 +1,15 @@
//
// includeExample.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 3/24/14
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// This is an example script that demonstrates use of the Script.include() feature
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
// You can include scripts from URLs
Script.include("http://public.highfidelity.io/scripts/lookWithTouch.js");

View file

@ -1,9 +1,9 @@
//
// inspect.js
// hifi
// examples
//
// Created by Clément Brisset on March 20, 2014
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// Allows you to inspect non moving objects (Voxels or Avatars) using Atl, Control (Command on Mac) and Shift
//
@ -13,6 +13,9 @@
// Once you are in a mode left click on the object to inspect and hold the click
// Dragging the mouse will move your camera according to the mode you are in.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var PI = 3.14 // No need for something more precise

View file

@ -1,3 +1,12 @@
//
// localVoxelsExample.js
// examples
//
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var TREE_SCALE = 16384;
var tree = LocalVoxels("tree");

View file

@ -1,9 +1,9 @@
//
// lookAtExample.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 2/6/14.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// This is an example script that demonstrates use of the Camera class's lookAt(), keepLookingAt(), and stopLookingAt()
// features.
@ -12,6 +12,8 @@
// on the face of the voxel that you clicked. Click again and it will stop looking at that point. While in this fixed mode
// you can use the arrow keys to change the position of the camera.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var lookingAtSomething = false;

View file

@ -1,12 +1,14 @@
//
// lookWithMouse.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 1/28/14.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// This is an example script that demonstrates use of the Controller class
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var alwaysLook = true; // if you want the mouse look to happen only when you click, change this to false

View file

@ -1,12 +1,14 @@
//
// lookWithTouch.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 1/28/14.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// This is an example script that demonstrates use of the Controller class
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var startedTouching = false;

View file

@ -1,12 +1,15 @@
//
// menuExample.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 2/24/14
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// This is an example script that demonstrates use of the Menu object
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
function setupMenus() {

View file

@ -1,6 +1,14 @@
//
// movingVoxel.js
// examples
//
// Copyright 2014 High Fidelity, Inc.
//
// This sample script creates a voxel moving back and forth in a line
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var position = { x: 0, y: 0, z: 0 };
var oldPosition = { x: 0, y: 0, z:0 };

View file

@ -1,9 +1,9 @@
//
// multitouchExample.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 2/9/14.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// This is an example script that demonstrates use of the Controller class's multi-touch features
//
@ -11,6 +11,9 @@
// * Four finger rotate gesture will rotate your avatar.
// * Three finger swipe up/down will adjust the pitch of your avatars head.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var lastX = 0;
var lastY = 0;

View file

@ -1,12 +1,14 @@
//
// overlaysExample.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 2/14/14.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// This is an example script that demonstrates use of the Overlays class
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//

View file

@ -1,9 +1,12 @@
//
// paintGun.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 12/31/13.
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
// initialize our triggers

View file

@ -1,9 +1,14 @@
//
// particleBird.js
// hifi
// examples
//
// Copyright 2014 High Fidelity, Inc.
//
// This sample script moves a voxel around like a bird and sometimes makes tweeting noises
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
function vLength(v) {
return Math.sqrt(v.x * v.x + v.y * v.y + v.z * v.z);

View file

@ -1,12 +1,15 @@
//
// particleModelExample.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 1/28/14.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// This is an example script that demonstrates creating and editing a particle
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var count = 0;
var stopAfter = 100;

View file

@ -1,6 +1,12 @@
//
// playSound.js
// examples
//
// Copyright 2014 High Fidelity, Inc.
// This sample script loads a sound file and plays it at the 'fingertip' of the
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// First, load the clap sound from a URL
var clap = new Sound("https://s3-us-west-1.amazonaws.com/highfidelity-public/sounds/Animals/bushtit_1.raw");

View file

@ -1,12 +1,14 @@
//
// rayPickExample.js
// hifi
// examples
//
// Created by Brad Hefta-Gaub on 2/6/14.
// Copyright (c) 2014 HighFidelity, Inc. All rights reserved.
// Copyright 2014 High Fidelity, Inc.
//
// This is an example script that demonstrates use of the Camera class
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
function mouseMoveEvent(event) {

Some files were not shown because too many files have changed in this diff Show more