Merge branch 'vive-ui' into bug-fix/hmd-ui-center-improvements

This commit is contained in:
Anthony J. Thibault 2016-06-13 09:48:58 -07:00
commit ccf85c1f7c
101 changed files with 5051 additions and 1977 deletions

View file

@ -24,6 +24,16 @@ macro(SETUP_HIFI_LIBRARY)
set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS -mavx)
endif()
endforeach()
# add compiler flags to AVX2 source files
file(GLOB_RECURSE AVX2_SRCS "src/avx2/*.cpp" "src/avx2/*.c")
foreach(SRC ${AVX2_SRCS})
if (WIN32)
set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS /arch:AVX2)
elseif (APPLE OR UNIX)
set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS "-mavx2 -mfma")
endif()
endforeach()
setup_memory_debugger()

View file

@ -1,5 +1,5 @@
{
"version": 1.2,
"version": 1.3,
"settings": [
{
"name": "metaverse",
@ -71,6 +71,76 @@
}
]
},
{
"name": "descriptors",
"label": "Description",
"help": "This data will be queryable from your server. It may be collected by High Fidelity and used to share your domain with others.",
"settings": [
{
"name": "description",
"label": "Description",
"help": "A description of your domain (256 character limit)."
},
{
"name": "maturity",
"label": "Maturity",
"help": "A maturity rating, available as a guideline for content on your domain.",
"default": "unrated",
"type": "select",
"options": [
{
"value": "unrated",
"label": "Unrated"
},
{
"value": "everyone",
"label": "Everyone"
},
{
"value": "teen",
"label": "Teen (13+)"
},
{
"value": "mature",
"label": "Mature (17+)"
},
{
"value": "adult",
"label": "Adult (18+)"
}
]
},
{
"name": "hosts",
"label": "Hosts",
"type": "table",
"help": "Usernames of hosts who can reliably show your domain to new visitors.",
"numbered": false,
"columns": [
{
"name": "host",
"label": "Username",
"can_set": true
}
]
},
{
"name": "tags",
"label": "Tags",
"type": "table",
"help": "Common categories under which your domain falls.",
"numbered": false,
"columns": [
{
"name": "tag",
"label": "Tag",
"can_set": true
}
]
}
]
},
{
"name": "security",
"label": "Security",

View file

@ -0,0 +1,132 @@
//
// DomainMetadata.cpp
// domain-server/src
//
// Created by Zach Pomerantz on 5/25/2016.
// Copyright 2016 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 "DomainMetadata.h"
#include <HifiConfigVariantMap.h>
#include <DependencyManager.h>
#include <LimitedNodeList.h>
#include "DomainServerNodeData.h"
const QString DomainMetadata::USERS = "users";
const QString DomainMetadata::USERS_NUM_TOTAL = "num_users";
const QString DomainMetadata::USERS_NUM_ANON = "num_anon_users";
const QString DomainMetadata::USERS_HOSTNAMES = "user_hostnames";
// users metadata will appear as (JSON):
// { "num_users": Number,
// "num_anon_users": Number,
// "user_hostnames": { <HOSTNAME>: Number }
// }
const QString DomainMetadata::DESCRIPTORS = "descriptors";
const QString DomainMetadata::DESCRIPTORS_DESCRIPTION = "description";
const QString DomainMetadata::DESCRIPTORS_CAPACITY = "capacity"; // parsed from security
const QString DomainMetadata::DESCRIPTORS_RESTRICTION = "restriction"; // parsed from ACL
const QString DomainMetadata::DESCRIPTORS_MATURITY = "maturity";
const QString DomainMetadata::DESCRIPTORS_HOSTS = "hosts";
const QString DomainMetadata::DESCRIPTORS_TAGS = "tags";
// descriptors metadata will appear as (JSON):
// { "capacity": Number,
// TODO: "hours": String, // UTF-8 representation of the week, split into 15" segments
// "restriction": String, // enum of either open, hifi, or acl
// "maturity": String, // enum corresponding to ESRB ratings
// "hosts": [ String ], // capped list of usernames
// "description": String, // capped description
// TODO: "img": {
// "src": String,
// "type": String,
// "size": Number,
// "updated_at": Number,
// },
// "tags": [ String ], // capped list of tags
// }
// metadata will appear as (JSON):
// { users: <USERS>, descriptors: <DESCRIPTORS> }
//
// it is meant to be sent to and consumed by an external API
DomainMetadata::DomainMetadata() {
_metadata[USERS] = {};
_metadata[DESCRIPTORS] = {};
}
void DomainMetadata::setDescriptors(QVariantMap& settings) {
const QString CAPACITY = "security.maximum_user_capacity";
const QVariant* capacityVariant = valueForKeyPath(settings, CAPACITY);
unsigned int capacity = capacityVariant ? capacityVariant->toUInt() : 0;
// TODO: Keep parity with ACL development.
const QString RESTRICTION = "security.restricted_access";
const QString RESTRICTION_OPEN = "open";
// const QString RESTRICTION_HIFI = "hifi";
const QString RESTRICTION_ACL = "acl";
const QVariant* isRestrictedVariant = valueForKeyPath(settings, RESTRICTION);
bool isRestricted = isRestrictedVariant ? isRestrictedVariant->toBool() : false;
QString restriction = isRestricted ? RESTRICTION_ACL : RESTRICTION_OPEN;
QVariantMap descriptors = settings[DESCRIPTORS].toMap();
descriptors[DESCRIPTORS_CAPACITY] = capacity;
descriptors[DESCRIPTORS_RESTRICTION] = restriction;
_metadata[DESCRIPTORS] = descriptors;
#if DEV_BUILD || PR_BUILD
qDebug() << "Domain metadata descriptors set:" << descriptors;
#endif
}
void DomainMetadata::updateUsers() {
static const QString DEFAULT_HOSTNAME = "*";
auto nodeList = DependencyManager::get<LimitedNodeList>();
int numConnected = 0;
int numConnectedAnonymously = 0;
QVariantMap userHostnames;
// figure out the breakdown of currently connected interface clients
nodeList->eachNode([&numConnected, &numConnectedAnonymously, &userHostnames](const SharedNodePointer& node) {
auto linkedData = node->getLinkedData();
if (linkedData) {
auto nodeData = static_cast<DomainServerNodeData*>(linkedData);
if (!nodeData->wasAssigned()) {
++numConnected;
if (nodeData->getUsername().isEmpty()) {
++numConnectedAnonymously;
}
// increment the count for this hostname (or the default if we don't have one)
auto placeName = nodeData->getPlaceName();
auto hostname = placeName.isEmpty() ? DEFAULT_HOSTNAME : placeName;
userHostnames[hostname] = userHostnames[hostname].toInt() + 1;
}
}
});
QVariantMap users = {
{ USERS_NUM_TOTAL, numConnected },
{ USERS_NUM_ANON, numConnectedAnonymously },
{ USERS_HOSTNAMES, userHostnames }};
_metadata[USERS] = users;
#if DEV_BUILD || PR_BUILD
qDebug() << "Domain metadata users updated:" << users;
#endif
}
void DomainMetadata::usersChanged() {
++_tic;
#if DEV_BUILD || PR_BUILD
qDebug() << "Domain metadata users change detected";
#endif
}

View file

@ -0,0 +1,65 @@
//
// DomainMetadata.h
// domain-server/src
//
// Created by Zach Pomerantz on 5/25/2016.
// Copyright 2016 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_DomainMetadata_h
#define hifi_DomainMetadata_h
#include <stdint.h>
#include <QVariantMap>
#include <QJsonObject>
class DomainMetadata : public QObject {
Q_OBJECT
static const QString USERS;
static const QString USERS_NUM_TOTAL;
static const QString USERS_NUM_ANON;
static const QString USERS_HOSTNAMES;
static const QString DESCRIPTORS;
static const QString DESCRIPTORS_DESCRIPTION;
static const QString DESCRIPTORS_CAPACITY;
static const QString DESCRIPTORS_HOURS;
static const QString DESCRIPTORS_RESTRICTION;
static const QString DESCRIPTORS_MATURITY;
static const QString DESCRIPTORS_HOSTS;
static const QString DESCRIPTORS_TAGS;
static const QString DESCRIPTORS_IMG;
static const QString DESCRIPTORS_IMG_SRC;
static const QString DESCRIPTORS_IMG_TYPE;
static const QString DESCRIPTORS_IMG_SIZE;
static const QString DESCRIPTORS_IMG_UPDATED_AT;
public:
DomainMetadata();
// Returns the last set metadata
// If connected users have changed, metadata may need to be updated
// this should be checked by storing tic = getTic() between calls
// and testing it for equality before the next get (tic == getTic())
QJsonObject get() { return QJsonObject::fromVariantMap(_metadata); }
QJsonObject getUsers() { return QJsonObject::fromVariantMap(_metadata[USERS].toMap()); }
QJsonObject getDescriptors() { return QJsonObject::fromVariantMap(_metadata[DESCRIPTORS].toMap()); }
uint32_t getTic() { return _tic; }
void setDescriptors(QVariantMap& settings);
void updateUsers();
public slots:
void usersChanged();
protected:
QVariantMap _metadata;
uint32_t _tic{ 0 };
};
#endif // hifi_DomainMetadata_h

View file

@ -94,6 +94,10 @@ DomainServer::DomainServer(int argc, char* argv[]) :
qRegisterMetaType<DomainServerWebSessionData>("DomainServerWebSessionData");
qRegisterMetaTypeStreamOperators<DomainServerWebSessionData>("DomainServerWebSessionData");
// update the metadata when a user (dis)connects
connect(this, &DomainServer::userConnected, &_metadata, &DomainMetadata::usersChanged);
connect(this, &DomainServer::userDisconnected, &_metadata, &DomainMetadata::usersChanged);
// make sure we hear about newly connected nodes from our gatekeeper
connect(&_gatekeeper, &DomainGatekeeper::connectedNode, this, &DomainServer::handleConnectedNode);
@ -112,6 +116,9 @@ DomainServer::DomainServer(int argc, char* argv[]) :
optionallyGetTemporaryName(args);
}
// update the metadata with current descriptors
_metadata.setDescriptors(_settingsManager.getSettingsMap());
}
DomainServer::~DomainServer() {
@ -767,12 +774,16 @@ QUrl DomainServer::oauthAuthorizationURL(const QUuid& stateUUID) {
}
void DomainServer::handleConnectedNode(SharedNodePointer newNode) {
DomainServerNodeData* nodeData = reinterpret_cast<DomainServerNodeData*>(newNode->getLinkedData());
DomainServerNodeData* nodeData = static_cast<DomainServerNodeData*>(newNode->getLinkedData());
// reply back to the user with a PacketType::DomainList
sendDomainListToNode(newNode, nodeData->getSendingSockAddr());
// if this node is a user (unassigned Agent), signal
if (newNode->getType() == NodeType::Agent && !nodeData->wasAssigned()) {
emit userConnected();
}
// send out this node to our other connected nodes
broadcastNewNode(newNode);
}
@ -1067,62 +1078,39 @@ void DomainServer::performIPAddressUpdate(const HifiSockAddr& newPublicSockAddr)
sendHeartbeatToMetaverse(newPublicSockAddr.getAddress().toString());
}
void DomainServer::sendHeartbeatToMetaverse(const QString& networkAddress) {
const QString DOMAIN_UPDATE = "/api/v1/domains/%1";
auto nodeList = DependencyManager::get<LimitedNodeList>();
const QUuid& domainID = nodeList->getSessionUUID();
// setup the domain object to send to the data server
const QString PUBLIC_NETWORK_ADDRESS_KEY = "network_address";
const QString AUTOMATIC_NETWORKING_KEY = "automatic_networking";
// Setup the domain object to send to the data server
QJsonObject domainObject;
if (!networkAddress.isEmpty()) {
static const QString PUBLIC_NETWORK_ADDRESS_KEY = "network_address";
domainObject[PUBLIC_NETWORK_ADDRESS_KEY] = networkAddress;
}
static const QString AUTOMATIC_NETWORKING_KEY = "automatic_networking";
domainObject[AUTOMATIC_NETWORKING_KEY] = _automaticNetworkingSetting;
// add a flag to indicate if this domain uses restricted access - for now that will exclude it from listings
const QString RESTRICTED_ACCESS_FLAG = "restricted";
// Add a flag to indicate if this domain uses restricted access -
// for now that will exclude it from listings
static const QString RESTRICTED_ACCESS_FLAG = "restricted";
domainObject[RESTRICTED_ACCESS_FLAG] =
_settingsManager.valueOrDefaultValueForKeyPath(RESTRICTED_ACCESS_SETTINGS_KEYPATH).toBool();
// figure out the breakdown of currently connected interface clients
int numConnectedUnassigned = 0;
QJsonObject userHostnames;
static const QString DEFAULT_HOSTNAME = "*";
nodeList->eachNode([&numConnectedUnassigned, &userHostnames](const SharedNodePointer& node) {
if (node->getLinkedData()) {
auto nodeData = static_cast<DomainServerNodeData*>(node->getLinkedData());
if (!nodeData->wasAssigned()) {
++numConnectedUnassigned;
// increment the count for this hostname (or the default if we don't have one)
auto hostname = nodeData->getPlaceName().isEmpty() ? DEFAULT_HOSTNAME : nodeData->getPlaceName();
userHostnames[hostname] = userHostnames[hostname].toInt() + 1;
}
}
});
// Add the metadata to the heartbeat
static const QString DOMAIN_HEARTBEAT_KEY = "heartbeat";
static const QString HEARTBEAT_NUM_USERS_KEY = "num_users";
static const QString HEARTBEAT_USER_HOSTNAMES_KEY = "user_hostnames";
auto tic = _metadata.getTic();
if (_metadataTic != tic) {
_metadataTic = tic;
_metadata.updateUsers();
}
domainObject[DOMAIN_HEARTBEAT_KEY] = _metadata.getUsers();
QJsonObject heartbeatObject;
heartbeatObject[HEARTBEAT_NUM_USERS_KEY] = numConnectedUnassigned;
heartbeatObject[HEARTBEAT_USER_HOSTNAMES_KEY] = userHostnames;
domainObject[DOMAIN_HEARTBEAT_KEY] = heartbeatObject;
QString domainUpdateJSON = QString("{\"domain\": %1 }").arg(QString(QJsonDocument(domainObject).toJson()));
QString domainUpdateJSON = QString("{\"domain\":%1}").arg(QString(QJsonDocument(domainObject).toJson(QJsonDocument::Compact)));
static const QString DOMAIN_UPDATE = "/api/v1/domains/%1";
DependencyManager::get<AccountManager>()->sendRequest(DOMAIN_UPDATE.arg(uuidStringWithoutCurlyBraces(domainID)),
AccountManagerAuth::Required,
QNetworkAccessManager::PutOperation,
@ -1918,11 +1906,10 @@ void DomainServer::nodeAdded(SharedNodePointer node) {
}
void DomainServer::nodeKilled(SharedNodePointer node) {
// if this peer connected via ICE then remove them from our ICE peers hash
_gatekeeper.removeICEPeer(node->getUUID());
DomainServerNodeData* nodeData = reinterpret_cast<DomainServerNodeData*>(node->getLinkedData());
DomainServerNodeData* nodeData = static_cast<DomainServerNodeData*>(node->getLinkedData());
if (nodeData) {
// if this node's UUID matches a static assignment we need to throw it back in the assignment queue
@ -1934,15 +1921,22 @@ void DomainServer::nodeKilled(SharedNodePointer node) {
}
}
// If this node was an Agent ask DomainServerNodeData to potentially remove the interpolation we stored
nodeData->removeOverrideForKey(USERNAME_UUID_REPLACEMENT_STATS_KEY,
uuidStringWithoutCurlyBraces(node->getUUID()));
// cleanup the connection secrets that we set up for this node (on the other nodes)
foreach (const QUuid& otherNodeSessionUUID, nodeData->getSessionSecretHash().keys()) {
SharedNodePointer otherNode = DependencyManager::get<LimitedNodeList>()->nodeWithUUID(otherNodeSessionUUID);
if (otherNode) {
reinterpret_cast<DomainServerNodeData*>(otherNode->getLinkedData())->getSessionSecretHash().remove(node->getUUID());
static_cast<DomainServerNodeData*>(otherNode->getLinkedData())->getSessionSecretHash().remove(node->getUUID());
}
}
if (node->getType() == NodeType::Agent) {
// if this node was an Agent ask DomainServerNodeData to remove the interpolation we potentially stored
nodeData->removeOverrideForKey(USERNAME_UUID_REPLACEMENT_STATS_KEY,
uuidStringWithoutCurlyBraces(node->getUUID()));
// if this node is a user (unassigned Agent), signal
if (!nodeData->wasAssigned()) {
emit userDisconnected();
}
}
}

View file

@ -26,6 +26,7 @@
#include <LimitedNodeList.h>
#include "DomainGatekeeper.h"
#include "DomainMetadata.h"
#include "DomainServerSettingsManager.h"
#include "DomainServerWebSessionData.h"
#include "WalletTransaction.h"
@ -91,6 +92,8 @@ private slots:
signals:
void iceServerChanged();
void userConnected();
void userDisconnected();
private:
void setupNodeListAndAssignments(const QUuid& sessionUUID = QUuid::createUuid());
@ -167,6 +170,9 @@ private:
DomainServerSettingsManager _settingsManager;
DomainMetadata _metadata;
uint32_t _metadataTic{ 0 };
HifiSockAddr _iceServerSocket;
std::unique_ptr<NLPacket> _iceServerHeartbeatPacket;

View file

@ -1,22 +1,40 @@
{
"name": "Oculus Touch to Standard",
"channels": [
{ "from": "OculusTouch.LY", "filters": "invert", "to": "Standard.LY" },
{ "from": "OculusTouch.LX", "to": "Standard.LX" },
{ "from": "OculusTouch.A", "to": "Standard.A" },
{ "from": "OculusTouch.B", "to": "Standard.B" },
{ "from": "OculusTouch.X", "to": "Standard.X" },
{ "from": "OculusTouch.Y", "to": "Standard.Y" },
{ "from": "OculusTouch.LY", "filters": "invert", "to": "Standard.LY" },
{ "from": "OculusTouch.LX", "to": "Standard.LX" },
{ "from": "OculusTouch.LT", "to": "Standard.LT" },
{ "from": "OculusTouch.LS", "to": "Standard.LS" },
{ "from": "OculusTouch.LeftGrip", "to": "Standard.LeftGrip" },
{ "from": "OculusTouch.LeftHand", "to": "Standard.LeftHand" },
{ "from": "OculusTouch.RY", "filters": "invert", "to": "Standard.RY" },
{ "from": "OculusTouch.RX", "to": "Standard.RX" },
{ "from": "OculusTouch.RY", "filters": "invert", "to": "Standard.RY" },
{ "from": "OculusTouch.RX", "to": "Standard.RX" },
{ "from": "OculusTouch.RT", "to": "Standard.RT" },
{ "from": "OculusTouch.RB", "to": "Standard.RB" },
{ "from": "OculusTouch.RS", "to": "Standard.RS" },
{ "from": "OculusTouch.RightGrip", "to": "Standard.RightGrip" },
{ "from": "OculusTouch.RightHand", "to": "Standard.RightHand" },
{ "from": "OculusTouch.LeftApplicationMenu", "to": "Standard.Back" },
{ "from": "OculusTouch.RightApplicationMenu", "to": "Standard.Start" },
{ "from": "OculusTouch.LeftHand", "to": "Standard.LeftHand" },
{ "from": "OculusTouch.RightHand", "to": "Standard.RightHand" }
{ "from": "OculusTouch.LeftPrimaryThumbTouch", "to": "Standard.LeftPrimaryThumbTouch" },
{ "from": "OculusTouch.LeftSecondaryThumbTouch", "to": "Standard.LeftSecondaryThumbTouch" },
{ "from": "OculusTouch.RightPrimaryThumbTouch", "to": "Standard.RightPrimaryThumbTouch" },
{ "from": "OculusTouch.RightSecondaryThumbTouch", "to": "Standard.RightSecondaryThumbTouch" },
{ "from": "OculusTouch.LeftPrimaryIndexTouch", "to": "Standard.LeftPrimaryIndexTouch" },
{ "from": "OculusTouch.RightPrimaryIndexTouch", "to": "Standard.RightPrimaryIndexTouch" },
{ "from": "OculusTouch.LSTouch", "to": "Standard.LSTouch" },
{ "from": "OculusTouch.RSTouch", "to": "Standard.RSTouch" },
{ "from": "OculusTouch.LeftThumbUp", "to": "Standard.LeftThumbUp" },
{ "from": "OculusTouch.RightThumbUp", "to": "Standard.RightThumbUp" },
{ "from": "OculusTouch.LeftIndexPoint", "to": "Standard.LeftIndexPoint" },
{ "from": "OculusTouch.RightIndexPoint", "to": "Standard.RightIndexPoint" }
]
}

View file

@ -5,7 +5,7 @@
{ "from": "Vive.LX", "when": "Vive.LSX", "to": "Standard.LX" },
{ "from": "Vive.LT", "to": "Standard.LT" },
{ "from": "Vive.LeftGrip", "to": "Standard.LB" },
{ "from": "Vive.LeftGrip", "to": "Standard.LeftGrip" },
{ "from": "Vive.LS", "to": "Standard.LS" },
{ "from": "Vive.LSTouch", "to": "Standard.LSTouch" },
@ -13,7 +13,7 @@
{ "from": "Vive.RX", "when": "Vive.RSX", "to": "Standard.RX" },
{ "from": "Vive.RT", "to": "Standard.RT" },
{ "from": "Vive.RightGrip", "to": "Standard.RB" },
{ "from": "Vive.RightGrip", "to": "Standard.RightGrip" },
{ "from": "Vive.RS", "to": "Standard.RS" },
{ "from": "Vive.RSTouch", "to": "Standard.RSTouch" },

View file

@ -1,14 +1,14 @@
{
"name": "XBox to Standard",
"channels": [
{ "from": "GamePad.LY", "to": "Standard.LY" },
{ "from": "GamePad.LX", "to": "Standard.LX" },
{ "from": "GamePad.LY", "filters": { "type": "deadZone", "min": 0.05 }, "to": "Standard.LY" },
{ "from": "GamePad.LX", "filters": { "type": "deadZone", "min": 0.05 }, "to": "Standard.LX" },
{ "from": "GamePad.LT", "to": "Standard.LT" },
{ "from": "GamePad.LB", "to": "Standard.LB" },
{ "from": "GamePad.LS", "to": "Standard.LS" },
{ "from": "GamePad.RY", "to": "Standard.RY" },
{ "from": "GamePad.RX", "to": "Standard.RX" },
{ "from": "GamePad.RY", "filters": { "type": "deadZone", "min": 0.05 }, "to": "Standard.RY" },
{ "from": "GamePad.RX", "filters": { "type": "deadZone", "min": 0.05 }, "to": "Standard.RX" },
{ "from": "GamePad.RT", "to": "Standard.RT" },
{ "from": "GamePad.RB", "to": "Standard.RB" },
{ "from": "GamePad.RS", "to": "Standard.RS" },

View file

@ -341,7 +341,7 @@ Window {
HifiControls.GlyphButton {
glyph: hifi.glyphs.reload
color: hifi.buttons.white
color: hifi.buttons.black
colorScheme: root.colorScheme
width: hifi.dimensions.controlLineHeight
@ -349,8 +349,8 @@ Window {
}
HifiControls.Button {
text: "ADD TO WORLD"
color: hifi.buttons.white
text: "Add To World"
color: hifi.buttons.black
colorScheme: root.colorScheme
width: 120
@ -360,8 +360,8 @@ Window {
}
HifiControls.Button {
text: "RENAME"
color: hifi.buttons.white
text: "Rename"
color: hifi.buttons.black
colorScheme: root.colorScheme
width: 80
@ -372,7 +372,7 @@ Window {
HifiControls.Button {
id: deleteButton
text: "DELETE"
text: "Delete"
color: hifi.buttons.red
colorScheme: root.colorScheme
width: 80

View file

@ -264,6 +264,7 @@ Window {
HifiControls.Button {
text: "Load Defaults"
color: hifi.buttons.black
height: 26
onClicked: loadDefaults()
}
}

View file

@ -10,16 +10,20 @@
//
#ifdef HAS_BUGSPLAT
#include "Application.h"
#include "CrashReporter.h"
#ifdef _WIN32
#include <new.h>
#include <Windows.h>
#include <DbgHelp.h>
#include <csignal>
#include <QDebug>
#pragma comment(lib, "Dbghelp.lib")
// SetUnhandledExceptionFilter can be overridden by the CRT at the point that an error occurs. More information
// can be found here: http://www.codeproject.com/Articles/154686/SetUnhandledExceptionFilter-and-the-C-C-Runtime-Li
// A fairly common approach is to patch the SetUnhandledExceptionFilter so that it cannot be overridden and so
@ -77,13 +81,37 @@ BOOL redirectLibraryFunctionToFunction(char* library, char* function, void* fn)
return bRet;
}
void printStackTrace(ULONG framesToSkip = 1) {
HANDLE process = GetCurrentProcess();
SymInitialize(process, NULL, TRUE);
void* stack[100];
uint16_t frames = CaptureStackBackTrace(framesToSkip, 100, stack, NULL);
SYMBOL_INFO* symbol = (SYMBOL_INFO *)calloc(sizeof(SYMBOL_INFO) + 256 * sizeof(char), 1);
symbol->MaxNameLen = 255;
symbol->SizeOfStruct = sizeof(SYMBOL_INFO);
for (uint16_t i = 0; i < frames; ++i) {
SymFromAddr(process, (DWORD64)(stack[i]), 0, symbol);
qWarning() << QString("%1: %2 - 0x%0X").arg(QString::number(frames - i - 1), QString(symbol->Name), QString::number(symbol->Address, 16));
}
free(symbol);
// Try to force the log to sync to the filesystem
auto app = qApp;
if (app && app->getLogger()) {
app->getLogger()->sync();
}
}
void handleSignal(int signal) {
// Throw so BugSplat can handle
throw(signal);
}
void handlePureVirtualCall() {
void __cdecl handlePureVirtualCall() {
qWarning() << "Pure virtual function call detected";
printStackTrace(2);
// Throw so BugSplat can handle
throw("ERROR: Pure virtual call");
}
@ -107,6 +135,8 @@ _purecall_handler __cdecl noop_set_purecall_handler(_purecall_handler pNew) {
return nullptr;
}
#ifdef HAS_BUGSPLAT
static const DWORD BUG_SPLAT_FLAGS = MDSF_PREVENTHIJACKING | MDSF_USEGUARDMEMORY;
CrashReporter::CrashReporter(QString bugSplatDatabase, QString bugSplatApplicationName, QString version)
@ -133,3 +163,4 @@ CrashReporter::CrashReporter(QString bugSplatDatabase, QString bugSplatApplicati
}
}
#endif
#endif

View file

@ -115,3 +115,7 @@ QString FileLogger::getLogData() {
}
return result;
}
void FileLogger::sync() {
_persistThreadInstance->waitIdle();
}

View file

@ -28,6 +28,7 @@ public:
virtual void addMessage(const QString&) override;
virtual QString getLogData() override;
virtual void locateLog() override;
void sync();
signals:
void rollingLogFile(QString newFilename);

View file

@ -84,7 +84,6 @@ Avatar::Avatar(RigPointer rig) :
_acceleration(0.0f),
_lastAngularVelocity(0.0f),
_lastOrientation(),
_leanScale(0.5f),
_worldUpDirection(DEFAULT_UP_DIRECTION),
_moving(false),
_initialized(false),

View file

@ -210,7 +210,6 @@ protected:
glm::vec3 _angularAcceleration;
glm::quat _lastOrientation;
float _leanScale;
glm::vec3 _worldUpDirection;
float _stringLength;
bool _moving; ///< set when position is changing

View file

@ -54,8 +54,6 @@ Head::Head(Avatar* owningAvatar) :
_deltaPitch(0.0f),
_deltaYaw(0.0f),
_deltaRoll(0.0f),
_deltaLeanSideways(0.0f),
_deltaLeanForward(0.0f),
_isCameraMoving(false),
_isLookingAtMe(false),
_lookingAtMeStarted(0),
@ -70,7 +68,6 @@ void Head::init() {
void Head::reset() {
_baseYaw = _basePitch = _baseRoll = 0.0f;
_leanForward = _leanSideways = 0.0f;
}
void Head::simulate(float deltaTime, bool isMine, bool billboard) {
@ -118,13 +115,6 @@ void Head::simulate(float deltaTime, bool isMine, bool billboard) {
auto eyeTracker = DependencyManager::get<EyeTracker>();
_isEyeTrackerConnected = eyeTracker->isTracking();
}
// Twist the upper body to follow the rotation of the head, but only do this with my avatar,
// since everyone else will see the full joint rotations for other people.
const float BODY_FOLLOW_HEAD_YAW_RATE = 0.1f;
const float BODY_FOLLOW_HEAD_FACTOR = 0.66f;
float currentTwist = getTorsoTwist();
setTorsoTwist(currentTwist + (getFinalYaw() * BODY_FOLLOW_HEAD_FACTOR - currentTwist) * BODY_FOLLOW_HEAD_YAW_RATE);
}
if (!(_isFaceTrackerConnected || billboard)) {
@ -301,17 +291,13 @@ void Head::applyEyelidOffset(glm::quat headOrientation) {
}
}
void Head::relaxLean(float deltaTime) {
void Head::relax(float deltaTime) {
// restore rotation, lean to neutral positions
const float LEAN_RELAXATION_PERIOD = 0.25f; // seconds
float relaxationFactor = 1.0f - glm::min(deltaTime / LEAN_RELAXATION_PERIOD, 1.0f);
_deltaYaw *= relaxationFactor;
_deltaPitch *= relaxationFactor;
_deltaRoll *= relaxationFactor;
_leanSideways *= relaxationFactor;
_leanForward *= relaxationFactor;
_deltaLeanSideways *= relaxationFactor;
_deltaLeanForward *= relaxationFactor;
}
void Head::setScale (float scale) {
@ -419,8 +405,3 @@ float Head::getFinalPitch() const {
float Head::getFinalRoll() const {
return glm::clamp(_baseRoll + _deltaRoll, MIN_HEAD_ROLL, MAX_HEAD_ROLL);
}
void Head::addLeanDeltas(float sideways, float forward) {
_deltaLeanSideways += sideways;
_deltaLeanForward += forward;
}

View file

@ -59,8 +59,6 @@ public:
glm::vec3 getRightDirection() const { return getOrientation() * IDENTITY_RIGHT; }
glm::vec3 getUpDirection() const { return getOrientation() * IDENTITY_UP; }
glm::vec3 getFrontDirection() const { return getOrientation() * IDENTITY_FRONT; }
float getFinalLeanSideways() const { return _leanSideways + _deltaLeanSideways; }
float getFinalLeanForward() const { return _leanForward + _deltaLeanForward; }
glm::quat getEyeRotation(const glm::vec3& eyePosition) const;
@ -91,8 +89,7 @@ public:
virtual float getFinalYaw() const;
virtual float getFinalRoll() const;
void relaxLean(float deltaTime);
void addLeanDeltas(float sideways, float forward);
void relax(float deltaTime);
float getTimeWithoutTalking() const { return _timeWithoutTalking; }
@ -132,10 +129,6 @@ private:
float _deltaYaw;
float _deltaRoll;
// delta lean angles for lean perturbations (driven by collisions)
float _deltaLeanSideways;
float _deltaLeanForward;
bool _isCameraMoving;
bool _isLookingAtMe;
quint64 _lookingAtMeStarted;

View file

@ -190,9 +190,6 @@ MyAvatar::MyAvatar(RigPointer rig) :
if (!headData->getBlendshapeCoefficients().isEmpty()) {
_headData->setBlendshapeCoefficients(headData->getBlendshapeCoefficients());
}
// head lean
_headData->setLeanForward(headData->getLeanForward());
_headData->setLeanSideways(headData->getLeanSideways());
// head orientation
_headData->setLookAtPosition(headData->getLookAtPosition());
}
@ -237,7 +234,7 @@ QByteArray MyAvatar::toByteArray(bool cullSmallChanges, bool sendAll) {
void MyAvatar::reset(bool andRecenter, bool andReload, bool andHead) {
if (QThread::currentThread() != thread()) {
QMetaObject::invokeMethod(this, "reset", Q_ARG(bool, andRecenter));
QMetaObject::invokeMethod(this, "reset", Q_ARG(bool, andRecenter), Q_ARG(bool, andReload), Q_ARG(bool, andHead));
return;
}
@ -306,7 +303,7 @@ void MyAvatar::update(float deltaTime) {
}
Head* head = getHead();
head->relaxLean(deltaTime);
head->relax(deltaTime);
updateFromTrackers(deltaTime);
// Get audio loudness data from audio input device
@ -574,16 +571,6 @@ void MyAvatar::updateFromTrackers(float deltaTime) {
head->setDeltaYaw(estimatedRotation.y * magnifyFieldOfView);
head->setDeltaRoll(estimatedRotation.z);
}
// Update torso lean distance based on accelerometer data
const float TORSO_LENGTH = 0.5f;
glm::vec3 relativePosition = estimatedPosition - glm::vec3(0.0f, -TORSO_LENGTH, 0.0f);
const float MAX_LEAN = 45.0f;
head->setLeanSideways(glm::clamp(glm::degrees(atanf(relativePosition.x * _leanScale / TORSO_LENGTH)),
-MAX_LEAN, MAX_LEAN));
head->setLeanForward(glm::clamp(glm::degrees(atanf(relativePosition.z * _leanScale / TORSO_LENGTH)),
-MAX_LEAN, MAX_LEAN));
}
glm::vec3 MyAvatar::getLeftHandPosition() const {
@ -692,7 +679,6 @@ void MyAvatar::saveData() {
settings.setValue("headPitch", getHead()->getBasePitch());
settings.setValue("leanScale", _leanScale);
settings.setValue("scale", _targetScale);
settings.setValue("fullAvatarURL",
@ -809,7 +795,6 @@ void MyAvatar::loadData() {
getHead()->setBasePitch(loadSetting(settings, "headPitch", 0.0f));
_leanScale = loadSetting(settings, "leanScale", 0.05f);
_targetScale = loadSetting(settings, "scale", 1.0f);
setScale(glm::vec3(_targetScale));
@ -1270,13 +1255,13 @@ void MyAvatar::prepareForPhysicsSimulation() {
void MyAvatar::harvestResultsFromPhysicsSimulation(float deltaTime) {
glm::vec3 position = getPosition();
glm::quat orientation = getOrientation();
if (_characterController.isEnabled()) {
if (_characterController.isEnabledAndReady()) {
_characterController.getPositionAndOrientation(position, orientation);
}
nextAttitude(position, orientation);
_bodySensorMatrix = _follow.postPhysicsUpdate(*this, _bodySensorMatrix);
if (_characterController.isEnabled()) {
if (_characterController.isEnabledAndReady()) {
setVelocity(_characterController.getLinearVelocity() + _characterController.getFollowVelocity());
} else {
setVelocity(getVelocity() + _characterController.getFollowVelocity());
@ -1659,7 +1644,7 @@ void MyAvatar::updatePosition(float deltaTime) {
vec3 velocity = getVelocity();
const float MOVING_SPEED_THRESHOLD_SQUARED = 0.0001f; // 0.01 m/s
if (!_characterController.isEnabled()) {
if (!_characterController.isEnabledAndReady()) {
// _characterController is not in physics simulation but it can still compute its target velocity
updateMotors();
_characterController.computeNewVelocity(deltaTime, velocity);
@ -1833,6 +1818,16 @@ void MyAvatar::updateMotionBehaviorFromMenu() {
_motionBehaviors &= ~AVATAR_MOTION_SCRIPTED_MOTOR_ENABLED;
}
setCharacterControllerEnabled(menu->isOptionChecked(MenuOption::EnableCharacterController));
}
void MyAvatar::setCharacterControllerEnabled(bool enabled) {
if (QThread::currentThread() != thread()) {
QMetaObject::invokeMethod(this, "setCharacterControllerEnabled", Q_ARG(bool, enabled));
return;
}
bool ghostingAllowed = true;
EntityTreeRenderer* entityTreeRenderer = qApp->getEntities();
if (entityTreeRenderer) {
@ -1841,12 +1836,11 @@ void MyAvatar::updateMotionBehaviorFromMenu() {
ghostingAllowed = zone->getGhostingAllowed();
}
}
bool checked = menu->isOptionChecked(MenuOption::EnableCharacterController);
if (!ghostingAllowed) {
checked = true;
}
_characterController.setEnabled(ghostingAllowed ? enabled : true);
}
_characterController.setEnabled(checked);
bool MyAvatar::getCharacterControllerEnabled() {
return _characterController.isEnabled();
}
void MyAvatar::clearDriveKeys() {
@ -2054,14 +2048,17 @@ bool MyAvatar::FollowHelper::shouldActivateVertical(const MyAvatar& myAvatar, co
void MyAvatar::FollowHelper::prePhysicsUpdate(MyAvatar& myAvatar, const glm::mat4& desiredBodyMatrix, const glm::mat4& currentBodyMatrix, bool hasDriveInput) {
_desiredBodyMatrix = desiredBodyMatrix;
if (!isActive(Rotation) && shouldActivateRotation(myAvatar, desiredBodyMatrix, currentBodyMatrix)) {
activate(Rotation);
}
if (!isActive(Horizontal) && shouldActivateHorizontal(myAvatar, desiredBodyMatrix, currentBodyMatrix)) {
activate(Horizontal);
}
if (!isActive(Vertical) && (shouldActivateVertical(myAvatar, desiredBodyMatrix, currentBodyMatrix) || hasDriveInput)) {
activate(Vertical);
if (myAvatar.getHMDLeanRecenterEnabled()) {
if (!isActive(Rotation) && shouldActivateRotation(myAvatar, desiredBodyMatrix, currentBodyMatrix)) {
activate(Rotation);
}
if (!isActive(Horizontal) && shouldActivateHorizontal(myAvatar, desiredBodyMatrix, currentBodyMatrix)) {
activate(Horizontal);
}
if (!isActive(Vertical) && (shouldActivateVertical(myAvatar, desiredBodyMatrix, currentBodyMatrix) || hasDriveInput)) {
activate(Vertical);
}
}
glm::mat4 desiredWorldMatrix = myAvatar.getSensorToWorldMatrix() * _desiredBodyMatrix;

View file

@ -69,7 +69,6 @@ class MyAvatar : public Avatar {
Q_PROPERTY(AudioListenerMode audioListenerModeCustom READ getAudioListenerModeCustom)
//TODO: make gravity feature work Q_PROPERTY(glm::vec3 gravity READ getGravity WRITE setGravity)
Q_PROPERTY(glm::vec3 leftHandPosition READ getLeftHandPosition)
Q_PROPERTY(glm::vec3 rightHandPosition READ getRightHandPosition)
Q_PROPERTY(glm::vec3 leftHandTipPosition READ getLeftHandTipPosition)
@ -84,6 +83,9 @@ class MyAvatar : public Avatar {
Q_PROPERTY(float energy READ getEnergy WRITE setEnergy)
Q_PROPERTY(bool hmdLeanRecenterEnabled READ getHMDLeanRecenterEnabled WRITE setHMDLeanRecenterEnabled)
Q_PROPERTY(bool characterControllerEnabled READ getCharacterControllerEnabled WRITE setCharacterControllerEnabled)
public:
explicit MyAvatar(RigPointer rig);
~MyAvatar();
@ -123,9 +125,6 @@ public:
void setRealWorldFieldOfView(float realWorldFov) { _realWorldFieldOfView.set(realWorldFov); }
void setLeanScale(float scale) { _leanScale = scale; }
float getLeanScale() const { return _leanScale; }
Q_INVOKABLE glm::vec3 getDefaultEyePosition() const;
float getRealWorldFieldOfView() { return _realWorldFieldOfView.get(); }
@ -163,6 +162,9 @@ public:
Q_INVOKABLE bool getClearOverlayWhenDriving() const { return _clearOverlayWhenDriving; }
Q_INVOKABLE void setClearOverlayWhenDriving(bool on) { _clearOverlayWhenDriving = on; }
Q_INVOKABLE void setHMDLeanRecenterEnabled(bool value) { _hmdLeanRecenterEnabled = value; }
Q_INVOKABLE bool getHMDLeanRecenterEnabled() const { return _hmdLeanRecenterEnabled; }
// get/set avatar data
void saveData();
void loadData();
@ -266,6 +268,9 @@ public:
bool hasDriveInput() const;
Q_INVOKABLE void setCharacterControllerEnabled(bool enabled);
Q_INVOKABLE bool getCharacterControllerEnabled();
public slots:
void increaseSize();
void decreaseSize();
@ -472,6 +477,8 @@ private:
ThreadSafeValueCache<controller::Pose> _leftHandControllerPoseInSensorFrameCache { controller::Pose() };
ThreadSafeValueCache<controller::Pose> _rightHandControllerPoseInSensorFrameCache { controller::Pose() };
bool _hmdLeanRecenterEnabled = true;
float AVATAR_MOVEMENT_ENERGY_CONSTANT { 0.001f };
float AUDIO_ENERGY_CONSTANT { 0.000001f };
float MAX_AVATAR_MOVEMENT_PER_FRAME { 30.0f };

View file

@ -106,10 +106,6 @@ void SkeletonModel::updateRig(float deltaTime, glm::mat4 parentTransform) {
MyAvatar* myAvatar = static_cast<MyAvatar*>(_owningAvatar);
Rig::HeadParameters headParams;
headParams.enableLean = qApp->isHMDMode();
headParams.leanSideways = head->getFinalLeanSideways();
headParams.leanForward = head->getFinalLeanForward();
headParams.torsoTwist = head->getTorsoTwist();
if (qApp->isHMDMode()) {
headParams.isInHMD = true;
@ -131,7 +127,6 @@ void SkeletonModel::updateRig(float deltaTime, glm::mat4 parentTransform) {
headParams.worldHeadOrientation = head->getFinalOrientationInWorldFrame();
}
headParams.leanJointIndex = geometry.leanJointIndex;
headParams.neckJointIndex = geometry.neckJointIndex;
headParams.isTalking = head->getTimeWithoutTalking() <= 1.5f;

View file

@ -129,16 +129,6 @@ void setupPreferences() {
preference->setStep(1);
preferences->addPreference(preference);
}
{
auto getter = [=]()->float { return myAvatar->getLeanScale(); };
auto setter = [=](float value) { myAvatar->setLeanScale(value); };
auto preference = new SpinnerPreference(AVATAR_TUNING, "Lean scale (applies to Faceshift users)", getter, setter);
preference->setMin(0);
preference->setMax(99.9f);
preference->setDecimals(2);
preference->setStep(1);
preferences->addPreference(preference);
}
{
auto getter = [=]()->float { return myAvatar->getUniformScale(); };
auto setter = [=](float value) { myAvatar->setTargetScaleVerbose(value); }; // The hell?

View file

@ -931,11 +931,6 @@ glm::quat Rig::getJointDefaultRotationInParentFrame(int jointIndex) {
}
void Rig::updateFromHeadParameters(const HeadParameters& params, float dt) {
if (params.enableLean) {
updateLeanJoint(params.leanJointIndex, params.leanSideways, params.leanForward, params.torsoTwist);
} else {
_animVars.unset("lean");
}
updateNeckJoint(params.neckJointIndex, params);
_animVars.set("isTalking", params.isTalking);
@ -953,15 +948,6 @@ static const glm::vec3 X_AXIS(1.0f, 0.0f, 0.0f);
static const glm::vec3 Y_AXIS(0.0f, 1.0f, 0.0f);
static const glm::vec3 Z_AXIS(0.0f, 0.0f, 1.0f);
void Rig::updateLeanJoint(int index, float leanSideways, float leanForward, float torsoTwist) {
if (isIndexValid(index)) {
glm::quat absRot = (glm::angleAxis(-RADIANS_PER_DEGREE * leanSideways, Z_AXIS) *
glm::angleAxis(-RADIANS_PER_DEGREE * leanForward, X_AXIS) *
glm::angleAxis(RADIANS_PER_DEGREE * torsoTwist, Y_AXIS));
_animVars.set("lean", absRot);
}
}
void Rig::computeHeadNeckAnimVars(const AnimPose& hmdPose, glm::vec3& headPositionOut, glm::quat& headOrientationOut,
glm::vec3& neckPositionOut, glm::quat& neckOrientationOut) const {

View file

@ -42,15 +42,10 @@ public:
};
struct HeadParameters {
float leanSideways = 0.0f; // degrees
float leanForward = 0.0f; // degrees
float torsoTwist = 0.0f; // degrees
bool enableLean = false;
glm::quat worldHeadOrientation = glm::quat(); // world space (-z forward)
glm::quat rigHeadOrientation = glm::quat(); // rig space (-z forward)
glm::vec3 rigHeadPosition = glm::vec3(); // rig space
bool isInHMD = false;
int leanJointIndex = -1;
int neckJointIndex = -1;
bool isTalking = false;
};
@ -222,7 +217,6 @@ protected:
void applyOverridePoses();
void buildAbsoluteRigPoses(const AnimPoseVec& relativePoses, AnimPoseVec& absolutePosesOut);
void updateLeanJoint(int index, float leanSideways, float leanForward, float torsoTwist);
void updateNeckJoint(int index, const HeadParameters& params);
void computeHeadNeckAnimVars(const AnimPose& hmdPose, glm::vec3& headPositionOut, glm::quat& headOrientationOut,
glm::vec3& neckPositionOut, glm::quat& neckOrientationOut) const;

View file

@ -10,7 +10,6 @@
//
#include <math.h>
#include <stdint.h>
#include <string.h>
#include <assert.h>
@ -119,68 +118,18 @@ static void FIR_1x4_SSE(float* src, float* dst0, float* dst1, float* dst2, float
}
}
//
// Detect AVX/AVX2 support
//
#if defined(_MSC_VER)
#include <intrin.h>
static bool cpuSupportsAVX() {
int info[4];
int mask = (1 << 27) | (1 << 28); // OSXSAVE and AVX
__cpuidex(info, 0x1, 0);
bool result = false;
if ((info[2] & mask) == mask) {
if ((_xgetbv(_XCR_XFEATURE_ENABLED_MASK) & 0x6) == 0x6) {
result = true;
}
}
return result;
}
#elif defined(__GNUC__)
#include <cpuid.h>
static bool cpuSupportsAVX() {
unsigned int eax, ebx, ecx, edx;
unsigned int mask = (1 << 27) | (1 << 28); // OSXSAVE and AVX
bool result = false;
if (__get_cpuid(0x1, &eax, &ebx, &ecx, &edx) && ((ecx & mask) == mask)) {
__asm__("xgetbv" : "=a"(eax), "=d"(edx) : "c"(0));
if ((eax & 0x6) == 0x6) {
result = true;
}
}
return result;
}
#else
static bool cpuSupportsAVX() {
return false;
}
#endif
//
// Runtime CPU dispatch
//
typedef void FIR_1x4_t(float* src, float* dst0, float* dst1, float* dst2, float* dst3, float coef[4][HRTF_TAPS], int numFrames);
FIR_1x4_t FIR_1x4_AVX; // separate compilation with VEX-encoding enabled
#include "CPUDetect.h"
void FIR_1x4_AVX(float* src, float* dst0, float* dst1, float* dst2, float* dst3, float coef[4][HRTF_TAPS], int numFrames);
static void FIR_1x4(float* src, float* dst0, float* dst1, float* dst2, float* dst3, float coef[4][HRTF_TAPS], int numFrames) {
static FIR_1x4_t* f = cpuSupportsAVX() ? FIR_1x4_AVX : FIR_1x4_SSE; // init on first call
(*f)(src, dst0, dst1, dst2, dst3, coef, numFrames); // dispatch
static auto f = cpuSupportsAVX() ? FIR_1x4_AVX : FIR_1x4_SSE;
(*f)(src, dst0, dst1, dst2, dst3, coef, numFrames); // dispatch
}
// 4 channel planar to interleaved

View file

@ -32,7 +32,7 @@ public:
// input: mono source
// output: interleaved stereo mix buffer (accumulates into existing output)
// index: HRTF subject index
// azimuth: clockwise panning angle [0, 360] in degrees
// azimuth: clockwise panning angle in radians
// gain: gain factor for distance attenuation
// numFrames: must be HRTF_BLOCK in this version
//

View file

@ -14,552 +14,11 @@
#include <algorithm>
#include "AudioSRC.h"
#include "AudioSRCData.h"
//
// prototype lowpass filter
//
// Minimum-phase equiripple FIR
// taps = 96, oversampling = 32
//
// passband = 0.918
// stopband = 1.010
// passband ripple = +-0.01dB
// stopband attn = -125dB (-70dB at 1.000)
//
static const int PROTOTYPE_TAPS = 96; // filter taps per phase
static const int PROTOTYPE_PHASES = 32; // oversampling factor
static const float prototypeFilter[PROTOTYPE_TAPS * PROTOTYPE_PHASES] = {
0.00000000e+00f, 1.55021703e-05f, 1.46054865e-05f, 2.07057160e-05f, 2.91335519e-05f, 4.00091078e-05f,
5.33544450e-05f, 7.03618468e-05f, 9.10821639e-05f, 1.16484613e-04f, 1.47165999e-04f, 1.84168304e-04f,
2.28429617e-04f, 2.80913884e-04f, 3.42940399e-04f, 4.15773039e-04f, 5.01023255e-04f, 6.00234953e-04f,
7.15133271e-04f, 8.47838855e-04f, 1.00032516e-03f, 1.17508881e-03f, 1.37452550e-03f, 1.60147614e-03f,
1.85886458e-03f, 2.14985024e-03f, 2.47783071e-03f, 2.84666764e-03f, 3.26016878e-03f, 3.72252797e-03f,
4.23825900e-03f, 4.81207874e-03f, 5.44904143e-03f, 6.15447208e-03f, 6.93399929e-03f, 7.79337059e-03f,
8.73903392e-03f, 9.77729117e-03f, 1.09149561e-02f, 1.21591316e-02f, 1.35171164e-02f, 1.49965439e-02f,
1.66053136e-02f, 1.83515384e-02f, 2.02435362e-02f, 2.22899141e-02f, 2.44995340e-02f, 2.68813362e-02f,
2.94443254e-02f, 3.21979928e-02f, 3.51514690e-02f, 3.83143719e-02f, 4.16960560e-02f, 4.53060504e-02f,
4.91538115e-02f, 5.32486197e-02f, 5.75998650e-02f, 6.22164253e-02f, 6.71072811e-02f, 7.22809789e-02f,
7.77457552e-02f, 8.35095233e-02f, 8.95796944e-02f, 9.59631768e-02f, 1.02666457e-01f, 1.09695215e-01f,
1.17054591e-01f, 1.24748885e-01f, 1.32781656e-01f, 1.41155521e-01f, 1.49872243e-01f, 1.58932534e-01f,
1.68335961e-01f, 1.78081143e-01f, 1.88165339e-01f, 1.98584621e-01f, 2.09333789e-01f, 2.20406193e-01f,
2.31793899e-01f, 2.43487398e-01f, 2.55475740e-01f, 2.67746404e-01f, 2.80285305e-01f, 2.93076743e-01f,
3.06103423e-01f, 3.19346351e-01f, 3.32784916e-01f, 3.46396772e-01f, 3.60158039e-01f, 3.74043042e-01f,
3.88024564e-01f, 4.02073759e-01f, 4.16160177e-01f, 4.30251886e-01f, 4.44315429e-01f, 4.58315954e-01f,
4.72217175e-01f, 4.85981675e-01f, 4.99570709e-01f, 5.12944586e-01f, 5.26062401e-01f, 5.38882630e-01f,
5.51362766e-01f, 5.63459860e-01f, 5.75130384e-01f, 5.86330458e-01f, 5.97016050e-01f, 6.07143161e-01f,
6.16667840e-01f, 6.25546499e-01f, 6.33735979e-01f, 6.41193959e-01f, 6.47878856e-01f, 6.53750084e-01f,
6.58768549e-01f, 6.62896349e-01f, 6.66097381e-01f, 6.68337353e-01f, 6.69583869e-01f, 6.69807061e-01f,
6.68979117e-01f, 6.67075139e-01f, 6.64072812e-01f, 6.59952827e-01f, 6.54699116e-01f, 6.48298688e-01f,
6.40742160e-01f, 6.32023668e-01f, 6.22141039e-01f, 6.11095903e-01f, 5.98893921e-01f, 5.85544600e-01f,
5.71061707e-01f, 5.55463040e-01f, 5.38770639e-01f, 5.21010762e-01f, 5.02213839e-01f, 4.82414572e-01f,
4.61651859e-01f, 4.39968628e-01f, 4.17412000e-01f, 3.94032951e-01f, 3.69886464e-01f, 3.45031084e-01f,
3.19529091e-01f, 2.93446187e-01f, 2.66851164e-01f, 2.39815999e-01f, 2.12415399e-01f, 1.84726660e-01f,
1.56829293e-01f, 1.28804933e-01f, 1.00736965e-01f, 7.27100355e-02f, 4.48100810e-02f, 1.71237415e-02f,
-1.02620228e-02f, -3.72599591e-02f, -6.37832871e-02f, -8.97457733e-02f, -1.15062201e-01f, -1.39648782e-01f,
-1.63423488e-01f, -1.86306368e-01f, -2.08220103e-01f, -2.29090072e-01f, -2.48845046e-01f, -2.67417270e-01f,
-2.84742946e-01f, -3.00762597e-01f, -3.15421127e-01f, -3.28668542e-01f, -3.40459849e-01f, -3.50755400e-01f,
-3.59521402e-01f, -3.66729768e-01f, -3.72358475e-01f, -3.76391839e-01f, -3.78820421e-01f, -3.79641287e-01f,
-3.78858203e-01f, -3.76481336e-01f, -3.72527677e-01f, -3.67020780e-01f, -3.59990760e-01f, -3.51474372e-01f,
-3.41514630e-01f, -3.30160971e-01f, -3.17468898e-01f, -3.03499788e-01f, -2.88320749e-01f, -2.72004315e-01f,
-2.54628056e-01f, -2.36274454e-01f, -2.17030464e-01f, -1.96986952e-01f, -1.76238733e-01f, -1.54883647e-01f,
-1.33022496e-01f, -1.10758449e-01f, -8.81964466e-02f, -6.54430504e-02f, -4.26055475e-02f, -1.97916415e-02f,
2.89108184e-03f, 2.53355868e-02f, 4.74362201e-02f, 6.90887518e-02f, 9.01914308e-02f, 1.10644978e-01f,
1.30353494e-01f, 1.49224772e-01f, 1.67170735e-01f, 1.84107975e-01f, 1.99958067e-01f, 2.14648181e-01f,
2.28111323e-01f, 2.40286622e-01f, 2.51119890e-01f, 2.60563701e-01f, 2.68577740e-01f, 2.75129027e-01f,
2.80192144e-01f, 2.83749177e-01f, 2.85790223e-01f, 2.86312986e-01f, 2.85323221e-01f, 2.82834421e-01f,
2.78867915e-01f, 2.73452721e-01f, 2.66625431e-01f, 2.58429983e-01f, 2.48917457e-01f, 2.38145826e-01f,
2.26179680e-01f, 2.13089734e-01f, 1.98952740e-01f, 1.83850758e-01f, 1.67870897e-01f, 1.51104879e-01f,
1.33648388e-01f, 1.15600665e-01f, 9.70639763e-02f, 7.81429119e-02f, 5.89439889e-02f, 3.95749746e-02f,
2.01442353e-02f, 7.60241152e-04f, -1.84690990e-02f, -3.74370397e-02f, -5.60385970e-02f, -7.41711039e-02f,
-9.17348686e-02f, -1.08633632e-01f, -1.24775254e-01f, -1.40071993e-01f, -1.54441372e-01f, -1.67806284e-01f,
-1.80095654e-01f, -1.91244732e-01f, -2.01195605e-01f, -2.09897310e-01f, -2.17306320e-01f, -2.23386736e-01f,
-2.28110407e-01f, -2.31457193e-01f, -2.33415044e-01f, -2.33980051e-01f, -2.33156463e-01f, -2.30956673e-01f,
-2.27401097e-01f, -2.22518148e-01f, -2.16343899e-01f, -2.08921985e-01f, -2.00303365e-01f, -1.90545790e-01f,
-1.79713804e-01f, -1.67877977e-01f, -1.55114789e-01f, -1.41505907e-01f, -1.27137921e-01f, -1.12101628e-01f,
-9.64915640e-02f, -8.04054232e-02f, -6.39434707e-02f, -4.72078814e-02f, -3.03021635e-02f, -1.33305082e-02f,
3.60284977e-03f, 2.03942507e-02f, 3.69413014e-02f, 5.31433810e-02f, 6.89024656e-02f, 8.41234679e-02f,
9.87150268e-02f, 1.12589969e-01f, 1.25665865e-01f, 1.37865538e-01f, 1.49117506e-01f, 1.59356490e-01f,
1.68523664e-01f, 1.76567229e-01f, 1.83442499e-01f, 1.89112308e-01f, 1.93547212e-01f, 1.96725586e-01f,
1.98633878e-01f, 1.99266486e-01f, 1.98625999e-01f, 1.96723008e-01f, 1.93576075e-01f, 1.89211557e-01f,
1.83663562e-01f, 1.76973516e-01f, 1.69190033e-01f, 1.60368490e-01f, 1.50570805e-01f, 1.39864815e-01f,
1.28324021e-01f, 1.16026978e-01f, 1.03056879e-01f, 8.95008829e-02f, 7.54496798e-02f, 6.09968238e-02f,
4.62380664e-02f, 3.12708901e-02f, 1.61936956e-02f, 1.10531988e-03f, -1.38957653e-02f, -2.87119784e-02f,
-4.32472742e-02f, -5.74078385e-02f, -7.11026311e-02f, -8.42439713e-02f, -9.67481917e-02f, -1.08536049e-01f,
-1.19533350e-01f, -1.29671345e-01f, -1.38887238e-01f, -1.47124498e-01f, -1.54333373e-01f, -1.60470968e-01f,
-1.65501755e-01f, -1.69397631e-01f, -1.72138140e-01f, -1.73710602e-01f, -1.74110159e-01f, -1.73339798e-01f,
-1.71410274e-01f, -1.68340111e-01f, -1.64155335e-01f, -1.58889414e-01f, -1.52582850e-01f, -1.45283122e-01f,
-1.37044042e-01f, -1.27925722e-01f, -1.17993860e-01f, -1.07319421e-01f, -9.59781808e-02f, -8.40500777e-02f,
-7.16188049e-02f, -5.87710561e-02f, -4.55961475e-02f, -3.21851919e-02f, -1.86306406e-02f, -5.02554942e-03f,
8.53698384e-03f, 2.19645467e-02f, 3.51659468e-02f, 4.80518693e-02f, 6.05355056e-02f, 7.25330700e-02f,
8.39645094e-02f, 9.47537898e-02f, 1.04829753e-01f, 1.14126254e-01f, 1.22582788e-01f, 1.30144907e-01f,
1.36764459e-01f, 1.42400029e-01f, 1.47017076e-01f, 1.50588312e-01f, 1.53093700e-01f, 1.54520736e-01f,
1.54864367e-01f, 1.54127119e-01f, 1.52318991e-01f, 1.49457408e-01f, 1.45567062e-01f, 1.40679709e-01f,
1.34833933e-01f, 1.28074855e-01f, 1.20453893e-01f, 1.12028129e-01f, 1.02860307e-01f, 9.30178765e-02f,
8.25730032e-02f, 7.16016450e-02f, 6.01833134e-02f, 4.84002546e-02f, 3.63370724e-02f, 2.40800037e-02f,
1.17163168e-02f, -6.66217400e-04f, -1.29801121e-02f, -2.51385315e-02f, -3.70562030e-02f, -4.86497748e-02f,
-5.98384928e-02f, -7.05447859e-02f, -8.06947592e-02f, -9.02187441e-02f, -9.90517313e-02f, -1.07133911e-01f,
-1.14410951e-01f, -1.20834483e-01f, -1.26362422e-01f, -1.30959116e-01f, -1.34595787e-01f, -1.37250547e-01f,
-1.38908600e-01f, -1.39562374e-01f, -1.39211442e-01f, -1.37862602e-01f, -1.35529795e-01f, -1.32233909e-01f,
-1.28002721e-01f, -1.22870611e-01f, -1.16878278e-01f, -1.10072477e-01f, -1.02505698e-01f, -9.42356124e-02f,
-8.53248753e-02f, -7.58404912e-02f, -6.58532924e-02f, -5.54376360e-02f, -4.46705953e-02f, -3.36315414e-02f,
-2.24015972e-02f, -1.10628991e-02f, 3.01894735e-04f, 1.16101918e-02f, 2.27801642e-02f, 3.37311642e-02f,
4.43845430e-02f, 5.46640016e-02f, 6.44962637e-02f, 7.38115400e-02f, 8.25440784e-02f, 9.06325572e-02f,
9.80206066e-02f, 1.04657146e-01f, 1.10496723e-01f, 1.15499920e-01f, 1.19633523e-01f, 1.22870824e-01f,
1.25191729e-01f, 1.26582959e-01f, 1.27038061e-01f, 1.26557494e-01f, 1.25148528e-01f, 1.22825305e-01f,
1.19608512e-01f, 1.15525479e-01f, 1.10609643e-01f, 1.04900592e-01f, 9.84435537e-02f, 9.12890948e-02f,
8.34927732e-02f, 7.51146973e-02f, 6.62190194e-02f, 5.68735547e-02f, 4.71491262e-02f, 3.71191855e-02f,
2.68591932e-02f, 1.64459573e-02f, 5.95731808e-03f, -4.52874940e-03f, -1.49344723e-02f, -2.51829130e-02f,
-3.51986373e-02f, -4.49081427e-02f, -5.42404654e-02f, -6.31276969e-02f, -7.15054163e-02f, -7.93132713e-02f,
-8.64953327e-02f, -9.30005042e-02f, -9.87829011e-02f, -1.03802223e-01f, -1.08023943e-01f, -1.11419636e-01f,
-1.13967111e-01f, -1.15650603e-01f, -1.16460855e-01f, -1.16395152e-01f, -1.15457368e-01f, -1.13657871e-01f,
-1.11013433e-01f, -1.07547117e-01f, -1.03288073e-01f, -9.82712708e-02f, -9.25372646e-02f, -8.61318657e-02f,
-7.91057486e-02f, -7.15141053e-02f, -6.34161588e-02f, -5.48747791e-02f, -4.59559696e-02f, -3.67282941e-02f,
-2.72624874e-02f, -1.76307914e-02f, -7.90648674e-03f, 1.83670340e-03f, 1.15251424e-02f, 2.10858716e-02f,
3.04471304e-02f, 3.95388944e-02f, 4.82933904e-02f, 5.66456655e-02f, 6.45340054e-02f, 7.19003487e-02f,
7.86908695e-02f, 8.48562395e-02f, 9.03519908e-02f, 9.51389501e-02f, 9.91834077e-02f, 1.02457361e-01f,
1.04938834e-01f, 1.06611872e-01f, 1.07466724e-01f, 1.07499917e-01f, 1.06714213e-01f, 1.05118588e-01f,
1.02728167e-01f, 9.95640680e-02f, 9.56532488e-02f, 9.10282406e-02f, 8.57269309e-02f, 7.97922261e-02f,
7.32717395e-02f, 6.62174249e-02f, 5.86850536e-02f, 5.07339959e-02f, 4.24265058e-02f, 3.38274345e-02f,
2.50036502e-02f, 1.60234844e-02f, 6.95628026e-03f, -2.12820655e-03f, -1.11602438e-02f, -2.00708281e-02f,
-2.87920337e-02f, -3.72576320e-02f, -4.54035426e-02f, -5.31684173e-02f, -6.04938939e-02f, -6.73253212e-02f,
-7.36119310e-02f, -7.93072981e-02f, -8.43697556e-02f, -8.87625537e-02f, -9.24542939e-02f, -9.54189981e-02f,
-9.76364402e-02f, -9.90921435e-02f, -9.97776003e-02f, -9.96902366e-02f, -9.88334463e-02f, -9.72165780e-02f,
-9.48547668e-02f, -9.17688999e-02f, -8.79853312e-02f, -8.35357688e-02f, -7.84569594e-02f, -7.27903677e-02f,
-6.65818940e-02f, -5.98814932e-02f, -5.27427333e-02f, -4.52224733e-02f, -3.73802459e-02f, -2.92780037e-02f,
-2.09794209e-02f, -1.25495498e-02f, -4.05425988e-03f, 4.44034349e-03f, 1.28682571e-02f, 2.11643361e-02f,
2.92645357e-02f, 3.71066200e-02f, 4.46305203e-02f, 5.17788267e-02f, 5.84972389e-02f, 6.47349496e-02f,
7.04450836e-02f, 7.55849928e-02f, 8.01165748e-02f, 8.40066506e-02f, 8.72270848e-02f, 8.97550618e-02f,
9.15732179e-02f, 9.26698315e-02f, 9.30387881e-02f, 9.26796720e-02f, 9.15978025e-02f, 8.98040443e-02f,
8.73148489e-02f, 8.41520461e-02f, 8.03426093e-02f, 7.59185468e-02f, 7.09165136e-02f, 6.53776255e-02f,
5.93470480e-02f, 5.28736293e-02f, 4.60095655e-02f, 3.88099545e-02f, 3.13323302e-02f, 2.36362162e-02f,
1.57827398e-02f, 7.83395091e-03f, -1.47413782e-04f, -8.09864153e-03f, -1.59574406e-02f, -2.36623595e-02f,
-3.11534717e-02f, -3.83725840e-02f, -4.52638947e-02f, -5.17743411e-02f, -5.78539729e-02f, -6.34564348e-02f,
-6.85392092e-02f, -7.30640654e-02f, -7.69971954e-02f, -8.03096220e-02f, -8.29772975e-02f, -8.49813524e-02f,
-8.63081836e-02f, -8.69495746e-02f, -8.69027157e-02f, -8.61702687e-02f, -8.47602668e-02f, -8.26860569e-02f,
-7.99661981e-02f, -7.66242997e-02f, -7.26887788e-02f, -6.81926752e-02f, -6.31733712e-02f, -5.76722279e-02f,
-5.17343061e-02f, -4.54080069e-02f, -3.87446321e-02f, -3.17980032e-02f, -2.46239897e-02f, -1.72801497e-02f,
-9.82518156e-03f, -2.31845300e-03f, 5.18037510e-03f, 1.26119044e-02f, 1.99174857e-02f, 2.70395921e-02f,
3.39223499e-02f, 4.05119404e-02f, 4.67570465e-02f, 5.26092142e-02f, 5.80232695e-02f, 6.29576539e-02f,
6.73747113e-02f, 7.12410320e-02f, 7.45276905e-02f, 7.72104218e-02f, 7.92698394e-02f, 8.06915952e-02f,
8.14664004e-02f, 8.15901977e-02f, 8.10640907e-02f, 7.98943315e-02f, 7.80922975e-02f, 7.56743792e-02f,
7.26617861e-02f, 6.90804346e-02f, 6.49606433e-02f, 6.03370049e-02f, 5.52479503e-02f, 4.97355660e-02f,
4.38451300e-02f, 3.76248662e-02f, 3.11254263e-02f, 2.43995757e-02f, 1.75017105e-02f, 1.04874823e-02f,
3.41321948e-03f, -3.66433362e-03f, -1.06886566e-02f, -1.76037566e-02f, -2.43547422e-02f, -3.08881238e-02f,
-3.71523818e-02f, -4.30982377e-02f, -4.86791529e-02f, -5.38515978e-02f, -5.85754991e-02f, -6.28144137e-02f,
-6.65359631e-02f, -6.97119559e-02f, -7.23186409e-02f, -7.43369897e-02f, -7.57526047e-02f, -7.65560812e-02f,
-7.67428560e-02f, -7.63134051e-02f, -7.52730583e-02f, -7.36321241e-02f, -7.14055927e-02f, -6.86132027e-02f,
-6.52791213e-02f, -6.14318004e-02f, -5.71037475e-02f, -5.23312158e-02f, -4.71539306e-02f, -4.16147519e-02f,
-3.57593331e-02f, -2.96357023e-02f, -2.32939478e-02f, -1.67857228e-02f, -1.01639251e-02f, -3.48213128e-03f,
3.20566951e-03f, 9.84566549e-03f, 1.63845318e-02f, 2.27699627e-02f, 2.89509937e-02f, 3.48784838e-02f,
4.05054571e-02f, 4.57875191e-02f, 5.06831561e-02f, 5.51541055e-02f, 5.91656321e-02f, 6.26867948e-02f,
6.56907214e-02f, 6.81547545e-02f, 7.00607045e-02f, 7.13948753e-02f, 7.21482790e-02f, 7.23165894e-02f,
7.19002973e-02f, 7.09044846e-02f, 6.93390331e-02f, 6.72183039e-02f, 6.45611568e-02f, 6.13906537e-02f,
5.77340810e-02f, 5.36223917e-02f, 4.90902973e-02f, 4.41756853e-02f, 3.89195025e-02f, 3.33653266e-02f,
2.75589553e-02f, 2.15482187e-02f, 1.53823433e-02f, 9.11173206e-03f, 2.78750380e-03f, -3.53899736e-03f,
-9.81648845e-03f, -1.59942887e-02f, -2.20226002e-02f, -2.78530676e-02f, -3.34389835e-02f, -3.87358558e-02f,
-4.37015752e-02f, -4.82968641e-02f, -5.24856104e-02f, -5.62350079e-02f, -5.95160314e-02f, -6.23034090e-02f,
-6.45760369e-02f, -6.63170246e-02f, -6.75138263e-02f, -6.81583864e-02f, -6.82471093e-02f, -6.77809819e-02f,
-6.67654439e-02f, -6.52104027e-02f, -6.31301405e-02f, -6.05431381e-02f, -5.74719510e-02f, -5.39430121e-02f,
-4.99864152e-02f, -4.56356108e-02f, -4.09271785e-02f, -3.59005358e-02f, -3.05975021e-02f, -2.50620982e-02f,
-1.93400931e-02f, -1.34786109e-02f, -7.52582921e-03f, -1.53047296e-03f, 4.45846396e-03f, 1.03922252e-02f,
1.62226043e-02f, 2.19024111e-02f, 2.73857927e-02f, 3.26286453e-02f, 3.75889120e-02f, 4.22270162e-02f,
4.65060678e-02f, 5.03922602e-02f, 5.38550360e-02f, 5.68673912e-02f, 5.94061299e-02f, 6.14518959e-02f,
6.29894927e-02f, 6.40078422e-02f, 6.45002081e-02f, 6.44641312e-02f, 6.39014463e-02f, 6.28183549e-02f,
6.12252434e-02f, 5.91366226e-02f, 5.65710713e-02f, 5.35509478e-02f, 5.01023211e-02f, 4.62546289e-02f,
4.20405644e-02f, 3.74956324e-02f, 3.26580309e-02f, 2.75681921e-02f, 2.22685138e-02f, 1.68029869e-02f,
1.12168479e-02f, 5.55616360e-03f, -1.32475496e-04f, -5.80242145e-03f, -1.14072870e-02f, -1.69013632e-02f,
-2.22399629e-02f, -2.73798231e-02f, -3.22793559e-02f, -3.68992177e-02f, -4.12022700e-02f, -4.51542301e-02f,
-4.87237130e-02f, -5.18825743e-02f, -5.46061242e-02f, -5.68733215e-02f, -5.86668721e-02f, -5.99735198e-02f,
-6.07838952e-02f, -6.10928895e-02f, -6.08993923e-02f, -6.02064781e-02f, -5.90213291e-02f, -5.73550887e-02f,
-5.52228853e-02f, -5.26435817e-02f, -4.96396897e-02f, -4.62371294e-02f, -4.24650256e-02f, -3.83554628e-02f,
-3.39432096e-02f, -2.92654225e-02f, -2.43613233e-02f, -1.92718970e-02f, -1.40395616e-02f, -8.70771728e-03f,
-3.32056777e-03f, 2.07744785e-03f, 7.44190391e-03f, 1.27287222e-02f, 1.78946228e-02f, 2.28975002e-02f,
2.76965843e-02f, 3.22530140e-02f, 3.65299534e-02f, 4.04930363e-02f, 4.41105069e-02f, 4.73536159e-02f,
5.01967201e-02f, 5.26175750e-02f, 5.45974724e-02f, 5.61213729e-02f, 5.71780843e-02f, 5.77601946e-02f,
5.78643759e-02f, 5.74910914e-02f, 5.66448597e-02f, 5.53340158e-02f, 5.35707338e-02f, 5.13708843e-02f,
4.87538683e-02f, 4.57425137e-02f, 4.23627999e-02f, 3.86437075e-02f, 3.46169024e-02f, 3.03165387e-02f,
2.57788894e-02f, 2.10421222e-02f, 1.61459251e-02f, 1.11311994e-02f, 6.03970466e-03f, 9.13695817e-04f,
-4.20433431e-03f, -9.27218149e-03f, -1.42480682e-02f, -1.90911878e-02f, -2.37618648e-02f, -2.82220093e-02f,
-3.24353766e-02f, -3.63678336e-02f, -3.99876924e-02f, -4.32659237e-02f, -4.61764207e-02f, -4.86961602e-02f,
-5.08054551e-02f, -5.24880386e-02f, -5.37312181e-02f, -5.45260166e-02f, -5.48671104e-02f, -5.47530531e-02f,
-5.41860463e-02f, -5.31721475e-02f, -5.17210363e-02f, -4.98459868e-02f, -4.75637647e-02f, -4.48944406e-02f,
-4.18612746e-02f, -3.84904206e-02f, -3.48107925e-02f, -3.08537797e-02f, -2.66529685e-02f, -2.22438695e-02f,
-1.76636682e-02f, -1.29507560e-02f, -8.14466071e-03f, -3.28544776e-03f, 1.58643018e-03f, 6.43050440e-03f,
1.12067405e-02f, 1.58756642e-02f, 2.03989020e-02f, 2.47393345e-02f, 2.88614617e-02f, 3.27317634e-02f,
3.63187992e-02f, 3.95936470e-02f, 4.25300387e-02f, 4.51045672e-02f, 4.72968940e-02f, 4.90899703e-02f,
5.04700047e-02f, 5.14267809e-02f, 5.19535643e-02f, 5.20472034e-02f, 5.17082287e-02f, 5.09406434e-02f,
4.97521048e-02f, 4.81537188e-02f, 4.61599131e-02f, 4.37884262e-02f, 4.10600706e-02f, 3.79985488e-02f,
3.46302622e-02f, 3.09841217e-02f, 2.70912412e-02f, 2.29847199e-02f, 1.86992847e-02f, 1.42711599e-02f,
9.73752669e-03f, 5.13643650e-03f, 5.06379454e-04f, -4.11408166e-03f, -8.68649476e-03f, -1.31729621e-02f,
-1.75363807e-02f, -2.17408089e-02f, -2.57516979e-02f, -2.95362143e-02f, -3.30635093e-02f, -3.63049622e-02f,
-3.92344048e-02f, -4.18283298e-02f, -4.40661418e-02f, -4.59301913e-02f, -4.74060505e-02f, -4.84825511e-02f,
-4.91518827e-02f, -4.94096235e-02f, -4.92548579e-02f, -4.86900251e-02f, -4.77210458e-02f, -4.63571741e-02f,
-4.46108878e-02f, -4.24979107e-02f, -4.00368564e-02f, -3.72492987e-02f, -3.41594108e-02f, -3.07938448e-02f,
-2.71814552e-02f, -2.33531198e-02f, -1.93413598e-02f, -1.51802063e-02f, -1.09048013e-02f, -6.55114338e-03f,
-2.15581014e-03f, 2.24443555e-03f, 6.61280814e-03f, 1.09129453e-02f, 1.51091980e-02f, 1.91667630e-02f,
2.30522168e-02f, 2.67335907e-02f, 3.01807365e-02f, 3.33655579e-02f, 3.62622051e-02f, 3.88473226e-02f,
4.11002204e-02f, 4.30030300e-02f, 4.45408790e-02f, 4.57019705e-02f, 4.64777109e-02f, 4.68627135e-02f,
4.68549093e-02f, 4.64554958e-02f, 4.56689373e-02f, 4.45029599e-02f, 4.29683919e-02f, 4.10791386e-02f,
3.88520159e-02f, 3.63066475e-02f, 3.34652385e-02f, 3.03523892e-02f, 2.69949681e-02f, 2.34217263e-02f,
1.96632025e-02f, 1.57513974e-02f, 1.17194459e-02f, 7.60145677e-03f, 3.43215481e-03f, -7.53454950e-04f,
-4.92025229e-03f, -9.03345904e-03f, -1.30587503e-02f, -1.69627406e-02f, -2.07130441e-02f, -2.42787472e-02f,
-2.76304969e-02f, -3.07408842e-02f, -3.35845310e-02f, -3.61384026e-02f, -3.83819804e-02f, -4.02973364e-02f,
-4.18693911e-02f, -4.30859849e-02f, -4.39379525e-02f, -4.44192202e-02f, -4.45268207e-02f, -4.42609489e-02f,
-4.36249417e-02f, -4.26251693e-02f, -4.12710965e-02f, -3.95751119e-02f, -3.75524034e-02f, -3.52209020e-02f,
-3.26010732e-02f, -2.97156826e-02f, -2.65897306e-02f, -2.32501339e-02f, -1.97255230e-02f, -1.60459906e-02f,
-1.22428645e-02f, -8.34840613e-03f, -4.39555788e-03f, -4.17641093e-04f, 3.55186529e-03f, 7.47969548e-03f,
1.13330289e-02f, 1.50796895e-02f, 1.86886063e-02f, 2.21298440e-02f, 2.53750227e-02f, 2.83974776e-02f,
3.11724713e-02f, 3.36774564e-02f, 3.58921485e-02f, 3.77988281e-02f, 3.93823848e-02f, 4.06304645e-02f,
4.15335460e-02f, 4.20850895e-02f, 4.22814530e-02f, 4.21220657e-02f, 4.16092724e-02f, 4.07484568e-02f,
3.95478256e-02f, 3.80185099e-02f, 3.61742882e-02f, 3.40316228e-02f, 3.16093467e-02f, 2.89286854e-02f,
2.60129143e-02f, 2.28872072e-02f, 1.95785162e-02f, 1.61151429e-02f, 1.25266872e-02f, 8.84367289e-03f,
5.09737541e-03f, 1.31946573e-03f, -2.45819207e-03f, -6.20382907e-03f, -9.88599514e-03f, -1.34739714e-02f,
-1.69377975e-02f, -2.02487225e-02f, -2.33793144e-02f, -2.63038233e-02f, -2.89981802e-02f, -3.14404213e-02f,
-3.36107546e-02f, -3.54916723e-02f, -3.70682427e-02f, -3.83280672e-02f, -3.92614736e-02f, -3.98615776e-02f,
-4.01243243e-02f, -4.00484517e-02f, -3.96356708e-02f, -3.88903731e-02f, -3.78198781e-02f, -3.64341365e-02f,
-3.47457457e-02f, -3.27698392e-02f, -3.05238882e-02f, -2.80276282e-02f, -2.53028218e-02f, -2.23730957e-02f,
-1.92637467e-02f, -1.60015029e-02f, -1.26142882e-02f, -9.13104283e-03f, -5.58138981e-03f, -1.99542434e-03f,
1.59649307e-03f, 5.16408174e-03f, 8.67737144e-03f, 1.21068581e-02f, 1.54239205e-02f, 1.86009100e-02f,
2.16114772e-02f, 2.44306994e-02f, 2.70354163e-02f, 2.94042665e-02f, 3.15179985e-02f, 3.33595356e-02f,
3.49141593e-02f, 3.61696229e-02f, 3.71161871e-02f, 3.77468512e-02f, 3.80571878e-02f, 3.80455485e-02f,
3.77129900e-02f, 3.70632810e-02f, 3.61028508e-02f, 3.48407199e-02f, 3.32884428e-02f, 3.14600053e-02f,
2.93716228e-02f, 2.70417408e-02f, 2.44907277e-02f, 2.17407576e-02f, 1.88156734e-02f, 1.57406803e-02f,
1.25421761e-02f, 9.24754692e-03f, 5.88488640e-03f, 2.48280587e-03f, -9.29864758e-04f, -4.32426314e-03f,
-7.67179184e-03f, -1.09442952e-02f, -1.41143886e-02f, -1.71555974e-02f, -2.00425787e-02f, -2.27514891e-02f,
-2.52599054e-02f, -2.75472706e-02f, -2.95949315e-02f, -3.13863062e-02f, -3.29069832e-02f, -3.41450096e-02f,
-3.50907101e-02f, -3.57369992e-02f, -3.60793163e-02f, -3.61156751e-02f, -3.58467080e-02f, -3.52755740e-02f,
-3.44080617e-02f, -3.32523628e-02f, -3.18191314e-02f, -3.01213186e-02f, -2.81740846e-02f, -2.59946393e-02f,
-2.36021125e-02f, -2.10173975e-02f, -1.82629132e-02f, -1.53624700e-02f, -1.23410560e-02f, -9.22456599e-03f,
-6.03967755e-03f, -2.81350877e-03f, 4.26514319e-04f, 3.65292660e-03f, 6.83848944e-03f, 9.95638508e-03f,
1.29804234e-02f, 1.58853076e-02f, 1.86468203e-02f, 2.12420277e-02f, 2.36494909e-02f, 2.58493792e-02f,
2.78237450e-02f, 2.95565060e-02f, 3.10338053e-02f, 3.22438572e-02f, 3.31772716e-02f, 3.38269627e-02f,
3.41883176e-02f, 3.42591610e-02f, 3.40397435e-02f, 3.35328606e-02f, 3.27436351e-02f, 3.16796573e-02f,
3.03507246e-02f, 2.87689689e-02f, 2.69484839e-02f, 2.49054827e-02f, 2.26579086e-02f, 2.02254442e-02f,
1.76292617e-02f, 1.48918382e-02f, 1.20368159e-02f, 9.08872468e-03f, 6.07283273e-03f, 3.01489838e-03f,
-5.90212194e-05f, -3.12287666e-03f, -6.15069532e-03f, -9.11695091e-03f, -1.19967033e-02f, -1.47657868e-02f,
-1.74011004e-02f, -1.98807214e-02f, -2.21841025e-02f, -2.42922632e-02f, -2.61879368e-02f, -2.78557311e-02f,
-2.92821801e-02f, -3.04559562e-02f, -3.13678907e-02f, -3.20110632e-02f, -3.23808087e-02f, -3.24749193e-02f,
-3.22933847e-02f, -3.18386269e-02f, -3.11153366e-02f, -3.01304804e-02f, -2.88932552e-02f, -2.74148734e-02f,
-2.57086673e-02f, -2.37898314e-02f, -2.16752343e-02f, -1.93835013e-02f, -1.69345799e-02f, -1.43497284e-02f,
-1.16513243e-02f, -8.86259097e-03f, -6.00748525e-03f, -3.11044903e-03f, -1.96143386e-04f, 2.71056658e-03f,
5.58512222e-03f, 8.40318833e-03f, 1.11410160e-02f, 1.37756382e-02f, 1.62850338e-02f, 1.86482666e-02f,
2.08457445e-02f, 2.28593437e-02f, 2.46725329e-02f, 2.62705694e-02f, 2.76405329e-02f, 2.87715470e-02f,
2.96547092e-02f, 3.02833419e-02f, 3.06529059e-02f, 3.07610441e-02f, 3.06076742e-02f, 3.01949567e-02f,
2.95271502e-02f, 2.86107876e-02f, 2.74543883e-02f, 2.60685701e-02f, 2.44657863e-02f, 2.26603655e-02f,
2.06682557e-02f, 1.85070033e-02f, 1.61954603e-02f, 1.37537720e-02f, 1.12030588e-02f, 8.56537064e-03f,
5.86336215e-03f, 3.12021752e-03f, 3.59345288e-04f, -2.39571357e-03f, -5.12158252e-03f, -7.79518527e-03f,
-1.03939536e-02f, -1.28961026e-02f, -1.52805838e-02f, -1.75275761e-02f, -1.96183935e-02f, -2.15357712e-02f,
-2.32639542e-02f, -2.47888545e-02f, -2.60981899e-02f, -2.71814567e-02f, -2.80302370e-02f, -2.86380088e-02f,
-2.90003996e-02f, -2.91151172e-02f, -2.89819544e-02f, -2.86028697e-02f, -2.79818317e-02f, -2.71249297e-02f,
-2.60401957e-02f, -2.47375751e-02f, -2.32288414e-02f, -2.15275091e-02f, -1.96486443e-02f, -1.76087964e-02f,
-1.54258426e-02f, -1.31187994e-02f, -1.07076937e-02f, -8.21335282e-03f, -5.65730582e-03f, -3.06143405e-03f,
-4.47990175e-04f, 2.16074548e-03f, 4.74260737e-03f, 7.27569124e-03f, 9.73864733e-03f, 1.21106824e-02f,
1.43719841e-02f, 1.65036001e-02f, 1.84878471e-02f, 2.03083286e-02f, 2.19500531e-02f, 2.33996493e-02f,
2.46453861e-02f, 2.56773512e-02f, 2.64874345e-02f, 2.70694463e-02f, 2.74192279e-02f, 2.75344951e-02f,
2.74150667e-02f, 2.70627089e-02f, 2.64811913e-02f, 2.56761950e-02f, 2.46553112e-02f, 2.34279326e-02f,
2.20051823e-02f, 2.03998041e-02f, 1.86260730e-02f, 1.66996483e-02f, 1.46373888e-02f, 1.24573628e-02f,
1.01784699e-02f, 7.82046099e-03f, 5.40366356e-03f, 2.94886537e-03f, 4.77074685e-04f, -1.99056008e-03f,
-4.43309957e-03f, -6.82975366e-03f, -9.16032780e-03f, -1.14051392e-02f, -1.35453571e-02f, -1.55631186e-02f,
-1.74416221e-02f, -1.91653203e-02f, -2.07200521e-02f, -2.20931290e-02f, -2.32734389e-02f, -2.42515770e-02f,
-2.50198790e-02f, -2.55724740e-02f, -2.59053977e-02f, -2.60165073e-02f, -2.59056121e-02f, -2.55744100e-02f,
-2.50263861e-02f, -2.42670139e-02f, -2.33034172e-02f, -2.21444752e-02f, -2.08007704e-02f, -1.92843016e-02f,
-1.76086143e-02f, -1.57885066e-02f, -1.38399632e-02f, -1.17800468e-02f, -9.62665505e-03f, -7.39846180e-03f,
-5.11473979e-03f, -2.79509520e-03f, -4.59475153e-04f, 1.87219411e-03f, 4.18004886e-03f, 6.44446028e-03f,
8.64630036e-03f, 1.07670050e-02f, 1.27887263e-02f, 1.46946183e-02f, 1.64687696e-02f, 1.80965074e-02f,
1.95644657e-02f, 2.08606409e-02f, 2.19745569e-02f, 2.28973400e-02f, 2.36217678e-02f, 2.41423032e-02f,
2.44552329e-02f, 2.45585559e-02f, 2.44521268e-02f, 2.41375247e-02f, 2.36181843e-02f, 2.28991883e-02f,
2.19873596e-02f, 2.08911372e-02f, 1.96204854e-02f, 1.81868423e-02f, 1.66029686e-02f, 1.48829260e-02f,
1.30418196e-02f, 1.10957823e-02f, 9.06176569e-03f, 6.95742371e-03f, 4.80095797e-03f, 2.61094572e-03f,
4.06163422e-04f, -1.79448120e-03f, -3.97227507e-03f, -6.10867089e-03f, -8.18559133e-03f, -1.01855447e-02f,
-1.20916775e-02f, -1.38880736e-02f, -1.55597947e-02f, -1.70929424e-02f, -1.84749792e-02f, -1.96945768e-02f,
-2.07419008e-02f, -2.16086011e-02f, -2.22879060e-02f, -2.27746496e-02f, -2.30653527e-02f, -2.31582122e-02f,
-2.30530853e-02f, -2.27516002e-02f, -2.22569518e-02f, -2.15740851e-02f, -2.07094459e-02f, -1.96710504e-02f,
-1.84683607e-02f, -1.71122258e-02f, -1.56147530e-02f, -1.39891960e-02f, -1.22499260e-02f, -1.04121226e-02f,
-8.49187069e-03f, -6.50583812e-03f, -4.47121574e-03f, -2.40553061e-03f, -3.26560349e-04f, 1.74792849e-03f,
3.80020986e-03f, 5.81284812e-03f, 7.76878436e-03f, 9.65152189e-03f, 1.14452321e-02f, 1.31348903e-02f,
1.47064602e-02f, 1.61469015e-02f, 1.74443880e-02f, 1.85883329e-02f, 1.95694960e-02f, 2.03800747e-02f,
2.10137416e-02f, 2.14657028e-02f, 2.17327470e-02f, 2.18132189e-02f, 2.17071096e-02f, 2.14159688e-02f,
2.09429396e-02f, 2.02927056e-02f, 1.94714591e-02f, 1.84867806e-02f, 1.73476996e-02f, 1.60644888e-02f,
1.46486021e-02f, 1.31126305e-02f, 1.14700918e-02f, 9.73543186e-03f, 7.92379251e-03f, 6.05090462e-03f,
4.13301608e-03f, 2.18669055e-03f, 2.28581333e-04f, -1.72441072e-03f, -3.65572200e-03f, -5.54887990e-03f,
-7.38782061e-03f, -9.15706782e-03f, -1.08417082e-02f, -1.24276657e-02f, -1.39017311e-02f, -1.52516970e-02f,
-1.64664949e-02f, -1.75361817e-02f, -1.84521823e-02f, -1.92071599e-02f, -1.97953056e-02f, -2.02121243e-02f,
-2.04547147e-02f, -2.05216098e-02f, -2.04128534e-02f, -2.01300439e-02f, -1.96761990e-02f, -1.90558123e-02f,
-1.82748056e-02f, -1.73404276e-02f, -1.62612067e-02f, -1.50469098e-02f, -1.37084115e-02f, -1.22575769e-02f,
-1.07072432e-02f, -9.07102930e-03f, -7.36320826e-03f, -5.59869147e-03f, -3.79270806e-03f, -1.96092013e-03f,
-1.19027325e-04f, 1.71713152e-03f, 3.53191747e-03f, 5.30986343e-03f, 7.03590331e-03f, 8.69547560e-03f,
1.02746006e-02f, 1.17601122e-02f, 1.31396009e-02f, 1.44016653e-02f, 1.55359973e-02f, 1.65332483e-02f,
1.73855033e-02f, 1.80859434e-02f, 1.86291305e-02f, 1.90110277e-02f, 1.92289384e-02f, 1.92815880e-02f,
1.91691688e-02f, 1.88932135e-02f, 1.84567183e-02f, 1.78639790e-02f, 1.71206377e-02f, 1.62336473e-02f,
1.52110920e-02f, 1.40622274e-02f, 1.27973510e-02f, 1.14277163e-02f, 9.96541843e-03f, 8.42333112e-03f,
6.81491991e-03f, 5.15420944e-03f, 3.45559138e-03f, 1.73374462e-03f, 3.49154958e-06f, -1.72033182e-03f,
-3.42300908e-03f, -5.09002877e-03f, -6.70728983e-03f, -8.26110592e-03f, -9.73843101e-03f, -1.11269177e-02f,
-1.24149972e-02f, -1.35920411e-02f, -1.46483675e-02f, -1.55754162e-02f, -1.63657097e-02f, -1.70130158e-02f,
-1.75123254e-02f, -1.78599156e-02f, -1.80533642e-02f, -1.80916471e-02f, -1.79749596e-02f, -1.77049199e-02f,
-1.72844059e-02f, -1.67175734e-02f, -1.60098348e-02f, -1.51677846e-02f, -1.41991369e-02f, -1.31126308e-02f,
-1.19180614e-02f, -1.06260158e-02f, -9.24795820e-03f, -7.79599691e-03f, -6.28282689e-03f, -4.72166017e-03f,
-3.12602130e-03f, -1.50971188e-03f, 1.13358008e-04f, 1.72924640e-03f, 3.32419869e-03f, 4.88457483e-03f,
6.39719332e-03f, 7.84928507e-03f, 9.22860374e-03f, 1.05236737e-02f, 1.17237027e-02f, 1.28187631e-02f,
1.37999219e-02f, 1.46591627e-02f, 1.53896448e-02f, 1.59855771e-02f, 1.64423748e-02f, 1.67566705e-02f,
1.69263151e-02f, 1.69504088e-02f, 1.68293192e-02f, 1.65646048e-02f, 1.61591292e-02f, 1.56168830e-02f,
1.49430466e-02f, 1.41438870e-02f, 1.32267343e-02f, 1.21999194e-02f, 1.10726150e-02f, 9.85491162e-03f,
8.55755480e-03f, 7.19198626e-03f, 5.77013714e-03f, 4.30443841e-03f, 2.80758857e-03f, 1.29252809e-03f,
-2.27683018e-04f, -1.74000213e-03f, -3.23153173e-03f, -4.68956247e-03f, -6.10171563e-03f, -7.45612506e-03f,
-8.74136426e-03f, -9.94672023e-03f, -1.10621909e-02f, -1.20785406e-02f, -1.29874795e-02f, -1.37816456e-02f,
-1.44546479e-02f, -1.50012468e-02f, -1.54172106e-02f, -1.56995155e-02f, -1.58462779e-02f, -1.58567437e-02f,
-1.57313825e-02f, -1.54717967e-02f, -1.50807184e-02f, -1.45620705e-02f, -1.39207297e-02f, -1.31627253e-02f,
-1.22950111e-02f, -1.13254027e-02f, -1.02626834e-02f, -9.11627932e-03f, -7.89634415e-03f, -6.61364765e-03f,
-5.27939952e-03f, -3.90525708e-03f, -2.50314317e-03f, -1.08517576e-03f, 3.36418391e-04f, 1.74945190e-03f,
3.14186033e-03f, 4.50178261e-03f, 5.81769448e-03f, 7.07851939e-03f, 8.27365386e-03f, 9.39310326e-03f,
1.04276320e-02f, 1.13686527e-02f, 1.22085379e-02f, 1.29404450e-02f, 1.35585678e-02f, 1.40580446e-02f,
1.44350939e-02f, 1.46869568e-02f, 1.48120098e-02f, 1.48096348e-02f, 1.46804295e-02f, 1.44259781e-02f,
1.40489668e-02f, 1.35531325e-02f, 1.29432014e-02f, 1.22248563e-02f, 1.14046959e-02f, 1.04901687e-02f,
9.48948107e-03f, 8.41156632e-03f, 7.26596347e-03f, 6.06280447e-03f, 4.81257444e-03f, 3.52622627e-03f,
2.21492506e-03f, 8.89983592e-04f, -4.37153812e-04f, -1.75513167e-03f, -3.05265494e-03f, -4.31872834e-03f,
-5.54261874e-03f, -6.71396264e-03f, -7.82302244e-03f, -8.86045250e-03f, -9.81773278e-03f, -1.06869351e-02f,
-1.14610023e-02f, -1.21336754e-02f, -1.26995953e-02f, -1.31543908e-02f, -1.34945718e-02f, -1.37177266e-02f,
-1.38224110e-02f, -1.38082286e-02f, -1.36757739e-02f, -1.34266887e-02f, -1.30635886e-02f, -1.25900369e-02f,
-1.20105709e-02f, -1.13305978e-02f, -1.05563538e-02f, -9.69485926e-03f, -8.75389081e-03f, -7.74181164e-03f,
-6.66761679e-03f, -5.54076187e-03f, -4.37111830e-03f, -3.16893052e-03f, -1.94457115e-03f, -7.08705149e-04f,
5.28079290e-04f, 1.75515870e-03f, 2.96204304e-03f, 4.13848585e-03f, 5.27451557e-03f, 6.36060039e-03f,
7.38755863e-03f, 8.34692530e-03f, 9.23070802e-03f, 1.00316534e-02f, 1.07432528e-02f, 1.13597680e-02f,
1.18763350e-02f, 1.22889283e-02f, 1.25944631e-02f, 1.27907515e-02f, 1.28765994e-02f, 1.28517102e-02f,
1.27167966e-02f, 1.24734480e-02f, 1.21242371e-02f, 1.16725839e-02f, 1.11228281e-02f, 1.04800592e-02f,
9.75022575e-03f, 8.93990424e-03f, 8.05644990e-03f, 7.10768601e-03f, 6.10205625e-03f, 5.04843878e-03f,
3.95605458e-03f, 2.83441418e-03f, 1.69331277e-03f, 5.42568186e-04f, -6.07877124e-04f, -1.74818575e-03f,
-2.86860405e-03f, -3.95962685e-03f, -5.01201657e-03f, -6.01690058e-03f, -6.96589716e-03f, -7.85110424e-03f,
-8.66518231e-03f, -9.40145619e-03f, -1.00540095e-02f, -1.06175123e-02f, -1.10876024e-02f, -1.14606062e-02f,
-1.17337519e-02f, -1.19051415e-02f, -1.19737311e-02f, -1.19393909e-02f, -1.18028751e-02f, -1.15657387e-02f,
-1.12305357e-02f, -1.08005049e-02f, -1.02797519e-02f, -9.67318729e-03f, -8.98632838e-03f, -8.22543877e-03f,
-7.39737215e-03f, -6.50950785e-03f, -5.56975395e-03f, -4.58632875e-03f, -3.56792674e-03f, -2.52340823e-03f,
-1.46183597e-03f, -3.92391156e-04f, 6.75701684e-04f, 1.73331709e-03f, 2.77141530e-03f, 3.78118353e-03f,
4.75407672e-03f, 5.68193005e-03f, 6.55698994e-03f, 7.37195674e-03f, 8.12013345e-03f, 8.79539509e-03f,
9.39225030e-03f, 9.90597190e-03f, 1.03324819e-02f, 1.06685242e-02f, 1.09116177e-02f, 1.10600973e-02f,
1.11130936e-02f, 1.10705983e-02f, 1.09333788e-02f, 1.07030445e-02f, 1.03819949e-02f, 9.97335332e-03f,
9.48107464e-03f, 8.90968434e-03f, 8.26449756e-03f, 7.55132972e-03f, 6.77664458e-03f, 5.94731079e-03f,
5.07073939e-03f, 4.15462520e-03f, 3.20700306e-03f, 2.23616222e-03f, 1.25050340e-03f, 2.58592562e-04f,
-7.31105992e-04f, -1.71003848e-03f, -2.66991104e-03f, -3.60254805e-03f, -4.50009626e-03f, -5.35500152e-03f,
-6.16013372e-03f, -6.90880302e-03f, -7.59484887e-03f, -8.21267759e-03f, -8.75730297e-03f, -9.22437062e-03f,
-9.61022818e-03f, -9.91196266e-03f, -1.01273334e-02f, -1.02549146e-02f, -1.02939949e-02f, -1.02446487e-02f,
-1.01077102e-02f, -9.88473930e-03f, -9.57804506e-03f, -9.19065219e-03f, -8.72623997e-03f, -8.18914967e-03f,
-7.58431711e-03f, -6.91725624e-03f, -6.19393169e-03f, -5.42085678e-03f, -4.60486090e-03f, -3.75314479e-03f,
-2.87318400e-03f, -1.97263669e-03f, -1.05936420e-03f, -1.41184633e-04f, 7.73935206e-04f, 1.67818033e-03f,
2.56387121e-03f, 3.42348245e-03f, 4.24972968e-03f, 5.03575853e-03f, 5.77493594e-03f, 6.46117800e-03f,
7.08885263e-03f, 7.65282423e-03f, 8.14856911e-03f, 8.57214716e-03f, 8.92027019e-03f, 9.19029194e-03f,
9.38027470e-03f, 9.48895025e-03f, 9.51578399e-03f, 9.46091429e-03f, 9.32518284e-03f, 9.11016180e-03f,
8.81806173e-03f, 8.45171440e-03f, 8.01466407e-03f, 7.51094572e-03f, 6.94521826e-03f, 6.32261691e-03f,
5.64875255e-03f, 4.92963671e-03f, 4.17165548e-03f, 3.38149573e-03f, 2.56610069e-03f, 1.73253154e-03f,
8.88083719e-04f, 4.00140997e-05f, -8.04377007e-04f, -1.63786496e-03f, -2.45336348e-03f, -3.24394120e-03f,
-4.00297149e-03f, -4.72406012e-03f, -5.40122825e-03f, -6.02886353e-03f, -6.60184564e-03f, -7.11547043e-03f,
-7.56567204e-03f, -7.94886879e-03f, -8.26207948e-03f, -8.50298133e-03f, -8.66984745e-03f, -8.76158174e-03f,
-8.77778600e-03f, -8.71866903e-03f, -8.58510255e-03f, -8.37858953e-03f, -8.10125332e-03f, -7.75580633e-03f,
-7.34555568e-03f, -6.87431135e-03f, -6.34642360e-03f, -5.76669768e-03f, -5.14031767e-03f, -4.47294897e-03f,
-3.77043291e-03f, -3.03903272e-03f, -2.28511456e-03f, -1.51527024e-03f, -7.36178447e-04f, 4.54225562e-05f,
8.22859022e-04f, 1.58943109e-03f, 2.33866278e-03f, 3.06420334e-03f, 3.75990680e-03f, 4.42002538e-03f,
5.03901750e-03f, 5.61180111e-03f, 6.13366220e-03f, 6.60043272e-03f, 7.00831931e-03f, 7.35414500e-03f,
7.63524392e-03f, 7.84953557e-03f, 7.99547645e-03f, 8.07218955e-03f, 8.07933095e-03f, 8.01721906e-03f,
7.88666864e-03f, 7.68919343e-03f, 7.42679720e-03f, 7.10202788e-03f, 6.71802523e-03f, 6.27832934e-03f,
5.78702253e-03f, 5.24853339e-03f, 4.66776048e-03f, 4.04985033e-03f, 3.40032055e-03f, 2.72486114e-03f,
2.02943382e-03f, 1.32005555e-03f, 6.02922229e-04f, -1.15810889e-04f, -8.29962401e-04f, -1.53344695e-03f,
-2.22024937e-03f, -2.88460828e-03f, -3.52090915e-03f, -4.12386103e-03f, -4.68844782e-03f, -5.21000854e-03f,
-5.68433641e-03f, -6.10753890e-03f, -6.47629357e-03f, -6.78770430e-03f, -7.03936807e-03f, -7.22944790e-03f,
-7.35662441e-03f, -7.42012069e-03f, -7.41971164e-03f, -7.35573757e-03f, -7.22905724e-03f, -7.04107429e-03f,
-6.79370122e-03f, -6.48940038e-03f, -6.13102314e-03f, -5.72192873e-03f, -5.26590521e-03f, -4.76707464e-03f,
-4.22993214e-03f, -3.65930825e-03f, -3.06022345e-03f, -2.43797793e-03f, -1.79803310e-03f, -1.14594988e-03f,
-4.87389180e-04f, 1.71985886e-04f, 8.26505744e-04f, 1.47057292e-03f, 2.09875564e-03f, 2.70572827e-03f,
3.28638788e-03f, 3.83592350e-03f, 4.34975506e-03f, 4.82368759e-03f, 5.25383132e-03f, 5.63677359e-03f,
5.96942535e-03f, 6.24924092e-03f, 6.47405650e-03f, 6.64226721e-03f, 6.75269253e-03f, 6.80469430e-03f,
6.79815717e-03f, 6.73340631e-03f, 6.61130455e-03f, 6.43322863e-03f, 6.20094526e-03f, 5.91677710e-03f,
5.58340169e-03f, 5.20393196e-03f, 4.78187614e-03f, 4.32106320e-03f, 3.82565711e-03f, 3.30005613e-03f,
2.74895362e-03f, 2.17719303e-03f, 1.58978015e-03f, 9.91844057e-04f, 3.88540330e-04f, -2.14916878e-04f,
-8.13361192e-04f, -1.40168257e-03f, -1.97489740e-03f, -2.52818059e-03f, -3.05688539e-03f, -3.55662656e-03f,
-4.02326574e-03f, -4.45296958e-03f, -4.84228652e-03f, -5.18803438e-03f, -5.48755315e-03f, -5.73848611e-03f,
-5.93891991e-03f, -6.08745626e-03f, -6.18305471e-03f, -6.22520840e-03f, -6.21382472e-03f, -6.14928419e-03f,
-6.03244633e-03f, -5.86455879e-03f, -5.64736180e-03f, -5.38296537e-03f, -5.07389363e-03f, -4.72301916e-03f,
-4.33361321e-03f, -3.90915761e-03f, -3.45353173e-03f, -2.97077347e-03f, -2.46516689e-03f, -1.94119584e-03f,
-1.40340595e-03f, -8.56512644e-04f, -3.05232133e-04f, 2.45691031e-04f, 7.91538060e-04f, 1.32763724e-03f,
1.84949345e-03f, 2.35267547e-03f, 2.83299113e-03f, 3.28645035e-03f, 3.70931698e-03f, 4.09812665e-03f,
4.44973511e-03f, 4.76135341e-03f, 5.03050354e-03f, 5.25513155e-03f, 5.43353323e-03f, 5.56447821e-03f,
5.64705544e-03f, 5.68083601e-03f, 5.66583437e-03f, 5.60238431e-03f, 5.49135375e-03f, 5.33391723e-03f,
5.13169207e-03f, 4.88664671e-03f, 4.60113202e-03f, 4.27780860e-03f, 3.91964875e-03f, 3.52989866e-03f,
3.11212090e-03f, 2.66999053e-03f, 2.20744344e-03f, 1.72859110e-03f, 1.23756351e-03f, 7.38678150e-04f,
2.36236760e-04f, -2.65462378e-04f, -7.62072815e-04f, -1.24943395e-03f, -1.72337956e-03f, -2.17993754e-03f,
-2.61530935e-03f, -3.02588421e-03f, -3.40825196e-03f, -3.75935360e-03f, -4.07630652e-03f, -4.35660760e-03f,
-4.59808398e-03f, -4.79883718e-03f, -4.95743843e-03f, -5.07271280e-03f, -5.14393833e-03f, -5.17077608e-03f,
-5.15318763e-03f, -5.09164480e-03f, -4.98686807e-03f, -4.84002285e-03f, -4.65260103e-03f, -4.42642977e-03f,
-4.16366446e-03f, -3.86678300e-03f, -3.53847751e-03f, -3.18177292e-03f, -2.79986847e-03f, -2.39618401e-03f,
-1.97429017e-03f, -1.53788782e-03f, -1.09083664e-03f, -6.36973406e-04f, -1.80264329e-04f, 2.75399352e-04f,
7.26104424e-04f, 1.16802598e-03f, 1.59744046e-03f, 2.01073128e-03f, 2.40446819e-03f, 2.77538562e-03f,
3.12044615e-03f, 3.43683203e-03f, 3.72202393e-03f, 3.97374850e-03f, 4.19002854e-03f, 4.36925418e-03f,
4.51006070e-03f, 4.61152219e-03f, 4.67293053e-03f, 4.69404975e-03f, 4.67490366e-03f, 4.61589307e-03f,
4.51775252e-03f, 4.38154991e-03f, 4.20868532e-03f, 4.00082377e-03f, 3.75997274e-03f, 3.48836415e-03f,
3.18851504e-03f, 2.86314343e-03f, 2.51519536e-03f, 2.14776743e-03f, 1.76411750e-03f, 1.36763070e-03f,
9.61751835e-04f, 5.50052405e-04f, 1.36015058e-04f, -2.76720943e-04f, -6.84698152e-04f, -1.08442387e-03f,
-1.47253691e-03f, -1.84578853e-03f, -2.20105818e-03f, -2.53544188e-03f, -2.84616998e-03f, -3.13076058e-03f,
-3.38689733e-03f, -3.61260297e-03f, -3.80606518e-03f, -3.96589267e-03f, -4.09087232e-03f, -4.18013173e-03f,
-4.23315965e-03f, -4.24970953e-03f, -4.22981560e-03f, -4.17392494e-03f, -4.08267808e-03f, -3.95709577e-03f,
-3.79845153e-03f, -3.60829670e-03f, -3.38844338e-03f, -3.14094669e-03f, -2.86809742e-03f, -2.57237442e-03f,
-2.25643831e-03f, -1.92312165e-03f, -1.57535841e-03f, -1.21624129e-03f, -8.48868370e-04f, -4.76457354e-04f,
-1.02227062e-04f, 2.70659894e-04f, 6.38948957e-04f, 9.99596773e-04f, 1.34950884e-03f, 1.68579412e-03f,
2.00565112e-03f, 2.30644176e-03f, 2.58570970e-03f, 2.84121989e-03f, 3.07087670e-03f, 3.27296771e-03f,
3.44584695e-03f, 3.58825627e-03f, 3.69915439e-03f, 3.77779535e-03f, 3.82369144e-03f, 3.83666312e-03f,
3.81678507e-03f, 3.76444486e-03f, 3.68027755e-03f, 3.56519883e-03f, 3.42038694e-03f, 3.24725992e-03f,
3.04745181e-03f, 2.82287635e-03f, 2.57555610e-03f, 2.30778342e-03f, 2.02193938e-03f, 1.72060684e-03f,
1.40642226e-03f, 1.08218540e-03f, 7.50708128e-04f, 4.14852040e-04f, 7.75468400e-05f, -2.58336678e-04f,
-5.89954675e-04f, -9.14464553e-04f, -1.22917409e-03f, -1.53142096e-03f, -1.81874942e-03f, -2.08875765e-03f,
-2.33925204e-03f, -2.56824046e-03f, -2.77387464e-03f, -2.95457151e-03f, -3.10891286e-03f, -3.23576957e-03f,
-3.33422309e-03f, -3.40361730e-03f, -3.44352432e-03f, -3.45380945e-03f, -3.43454926e-03f, -3.38612359e-03f,
-3.30910238e-03f, -3.20434413e-03f, -3.07289782e-03f, -2.91605448e-03f, -2.73534798e-03f, -2.53242439e-03f,
-2.30918427e-03f, -2.06766744e-03f, -1.81002532e-03f, -1.53857461e-03f, -1.25572213e-03f, -9.63956082e-04f,
-6.65804929e-04f, -3.63875198e-04f, -6.07622519e-05f, 2.40955893e-04f, 5.38685581e-04f, 8.29936911e-04f,
1.11224977e-03f, 1.38328230e-03f, 1.64080028e-03f, 1.88265574e-03f, 2.10694670e-03f, 2.31181334e-03f,
2.49567938e-03f, 2.65707799e-03f, 2.79477329e-03f, 2.90778929e-03f, 2.99526804e-03f, 3.05666792e-03f,
3.09159989e-03f, 3.09996074e-03f, 3.08183486e-03f, 3.03757314e-03f, 2.96768997e-03f, 2.87296391e-03f,
2.75438271e-03f, 2.61305979e-03f, 2.45041225e-03f, 2.26792371e-03f, 2.06728115e-03f, 1.85034398e-03f,
1.61901728e-03f, 1.37543970e-03f, 1.12168235e-03f, 8.60048928e-04f, 5.92781787e-04f, 3.22217129e-04f,
5.06437951e-05f, -2.19547817e-04f, -4.86132510e-04f, -7.46817210e-04f, -9.99443627e-04f, -1.24188233e-03f,
-1.47217245e-03f, -1.68839648e-03f, -1.88883105e-03f, -2.07184785e-03f, -2.23601745e-03f, -2.38006048e-03f,
-2.50288118e-03f, -2.60358292e-03f, -2.68144174e-03f, -2.73595307e-03f, -2.76679595e-03f, -2.77388624e-03f,
-2.75729794e-03f, -2.71735188e-03f, -2.65451985e-03f, -2.56952130e-03f, -2.46319204e-03f, -2.33660956e-03f,
-2.19096493e-03f, -2.02765268e-03f, -1.84815939e-03f, -1.65412932e-03f, -1.44731483e-03f, -1.22956426e-03f,
-1.00280075e-03f, -7.69022668e-04f, -5.30268510e-04f, -2.88586883e-04f, -4.60956253e-05f, 1.95186584e-04f,
4.33161045e-04f, 6.65873263e-04f, 8.91328897e-04f, 1.10770620e-03f, 1.31316296e-03f, 1.50610067e-03f,
1.68489795e-03f, 1.84814923e-03f, 1.99458512e-03f, 2.12304250e-03f, 2.23258384e-03f, 2.32237953e-03f,
2.39181962e-03f, 2.44043032e-03f, 2.46796938e-03f, 2.47430968e-03f, 2.45957831e-03f, 2.42401283e-03f,
2.36808884e-03f, 2.29238471e-03f, 2.19773378e-03f, 2.08501666e-03f, 1.95534528e-03f, 1.80993801e-03f,
1.65014053e-03f, 1.47739854e-03f, 1.29329221e-03f, 1.09944593e-03f, 8.97596290e-04f, 6.89486470e-04f,
4.76967544e-04f, 2.61847472e-04f, 4.59979030e-05f, -1.68770369e-04f, -3.80612759e-04f, -5.87744421e-04f,
-7.88452414e-04f, -9.81081718e-04f, -1.16402219e-03f, -1.33580811e-03f, -1.49504859e-03f, -1.64047131e-03f,
-1.77095587e-03f, -1.88548340e-03f, -1.98318254e-03f, -2.06335667e-03f, -2.12544333e-03f, -2.16903096e-03f,
-2.19389731e-03f, -2.19994674e-03f, -2.18726700e-03f, -2.15609170e-03f, -2.10683457e-03f, -2.04002290e-03f,
-1.95633800e-03f, -1.85665258e-03f, -1.74189023e-03f, -1.61313165e-03f, -1.47159921e-03f, -1.31856217e-03f,
-1.15541374e-03f, -9.83590913e-04f, -8.04645529e-04f, -6.20138811e-04f, -4.31664744e-04f, -2.40859759e-04f,
-4.93718861e-05f, 1.41183920e-04f, 3.29184443e-04f, 5.13049545e-04f, 6.91252710e-04f, 8.62329668e-04f,
1.02486089e-03f, 1.17753306e-03f, 1.31912530e-03f, 1.44851584e-03f, 1.56468190e-03f, 1.66675270e-03f,
1.75393226e-03f, 1.82562545e-03f, 1.88129935e-03f, 1.92062935e-03f, 1.94336360e-03f, 1.94946381e-03f,
1.93898469e-03f, 1.91211060e-03f, 1.86925265e-03f, 1.81081128e-03f, 1.73745800e-03f, 1.64989979e-03f,
1.54896085e-03f, 1.43565148e-03f, 1.31095906e-03f, 1.17607031e-03f, 1.03219054e-03f, 8.80596006e-04f,
7.22634695e-04f, 5.59715925e-04f, 3.93223384e-04f, 2.24602808e-04f, 5.53223372e-05f, -1.13204206e-04f,
-2.79527886e-04f, -4.42273875e-04f, -6.00090187e-04f, -7.51646708e-04f, -8.95738714e-04f, -1.03117771e-03f,
-1.15687770e-03f, -1.27187587e-03f, -1.37523688e-03f, -1.46618576e-03f, -1.54403989e-03f, -1.60825931e-03f,
-1.65836399e-03f, -1.69405240e-03f, -1.71514183e-03f, -1.72154028e-03f, -1.71331327e-03f, -1.69063272e-03f,
-1.65381037e-03f, -1.60326168e-03f, -1.53948863e-03f, -1.46318779e-03f, -1.37503217e-03f, -1.27591969e-03f,
-1.16672308e-03f, -1.04846883e-03f, -9.22232848e-04f, -7.89108246e-04f, -6.50329911e-04f, -5.07057241e-04f,
-3.60579584e-04f, -2.12138548e-04f, -6.30166060e-05f, 8.55107333e-05f, 2.32212191e-04f, 3.75851456e-04f,
5.15213418e-04f, 6.49182851e-04f, 7.76642588e-04f, 8.96585347e-04f, 1.00803198e-03f, 1.11010987e-03f,
1.20203475e-03f, 1.28308439e-03f, 1.35268783e-03f, 1.41030687e-03f, 1.45558664e-03f, 1.48819124e-03f,
1.50798717e-03f, 1.51486502e-03f, 1.50888467e-03f, 1.49022209e-03f, 1.45906012e-03f, 1.41583581e-03f,
1.36095722e-03f, 1.29499749e-03f, 1.21859138e-03f, 1.13249419e-03f, 1.03745344e-03f, 9.34384957e-04f,
8.24209226e-04f, 7.07921644e-04f, 5.86535461e-04f, 4.61118668e-04f, 3.32797940e-04f, 2.02615430e-04f,
7.17560319e-05f, -5.87215139e-05f, -1.87700771e-04f, -3.14093799e-04f, -4.36855019e-04f, -5.54982470e-04f,
-6.67514567e-04f, -7.73539543e-04f, -8.72216549e-04f, -9.62754726e-04f, -1.04446836e-03f, -1.11673823e-03f,
-1.17901020e-03f, -1.23084835e-03f, -1.27191263e-03f, -1.30189831e-03f, -1.32066941e-03f, -1.32816613e-03f,
-1.32437715e-03f, -1.30944714e-03f, -1.28360668e-03f, -1.24710492e-03f, -1.20038313e-03f, -1.14391116e-03f,
-1.07822250e-03f, -1.00394823e-03f, -9.21799577e-04f, -8.32520513e-04f, -7.36916195e-04f, -6.35853312e-04f,
-5.30218398e-04f, -4.20950684e-04f, -3.08981087e-04f, -1.95310152e-04f, -8.08721649e-05f, 3.33481785e-05f,
1.46369769e-04f, 2.57271691e-04f, 3.65123878e-04f, 4.69053422e-04f, 5.68205019e-04f, 6.61777482e-04f,
7.49035427e-04f, 8.29295760e-04f, 9.01919035e-04f, 9.66370937e-04f, 1.02218113e-03f, 1.06892877e-03f,
1.10630552e-03f, 1.13406370e-03f, 1.15204451e-03f, 1.16019052e-03f, 1.15848806e-03f, 1.14706630e-03f,
1.12606449e-03f, 1.09574589e-03f, 1.05645362e-03f, 1.00859266e-03f, 9.52601766e-04f, 8.89057609e-04f,
8.18535938e-04f, 7.41697389e-04f, 6.59241262e-04f, 5.71884368e-04f, 4.80414698e-04f, 3.85677252e-04f,
2.88406796e-04f, 1.89536836e-04f, 8.98491837e-05f, -9.79888746e-06f, -1.08531507e-04f, -2.05575498e-04f,
-3.00092231e-04f, -3.91327952e-04f, -4.78537671e-04f, -5.61003964e-04f, -6.38090388e-04f, -7.09209697e-04f,
-7.73747838e-04f, -8.31297964e-04f, -8.81364804e-04f, -9.23641236e-04f, -9.57793553e-04f, -9.83624619e-04f,
-1.00098424e-03f, -1.00979404e-03f, -1.01003977e-03f, -1.00180772e-03f, -9.85219816e-04f, -9.60506778e-04f,
-9.27905874e-04f, -8.87790902e-04f, -8.40553609e-04f, -7.86632276e-04f, -7.26559669e-04f, -6.60872173e-04f,
-5.90177860e-04f, -5.15099219e-04f, -4.36341554e-04f, -3.54526447e-04f, -2.70436804e-04f, -1.84757234e-04f,
-9.82406108e-05f, -1.16228429e-05f, 7.44116225e-05f, 1.59099493e-04f, 2.41739119e-04f, 3.21707034e-04f,
3.98276352e-04f, 4.70887555e-04f, 5.38973046e-04f, 6.01940918e-04f, 6.59368174e-04f, 7.10783030e-04f,
7.55802336e-04f, 7.94127086e-04f, 8.25478803e-04f, 8.49639386e-04f, 8.66487952e-04f, 8.75935969e-04f,
8.77948893e-04f, 8.72611584e-04f, 8.59994515e-04f, 8.40271458e-04f, 8.13696181e-04f, 7.80491851e-04f,
7.41053306e-04f, 6.95727202e-04f, 6.44936090e-04f, 5.89181503e-04f, 5.28946796e-04f, 4.64790448e-04f,
3.97272420e-04f, 3.27000597e-04f, 2.54559578e-04f, 1.80597276e-04f, 1.05760446e-04f, 3.06209047e-05f,
-4.41172003e-05f, -1.17884760e-04f, -1.90032814e-04f, -2.60000039e-04f, -3.27213235e-04f, -3.91110007e-04f,
-4.51226928e-04f, -5.07042112e-04f, -5.58194586e-04f, -6.04189222e-04f, -6.44816381e-04f, -6.79653847e-04f,
-7.08557315e-04f, -7.31282579e-04f, -7.47702169e-04f, -7.57731688e-04f, -7.61359812e-04f, -7.58589885e-04f,
-7.49503361e-04f, -7.34226582e-04f, -7.12935677e-04f, -6.85882645e-04f, -6.53307567e-04f, -6.15569562e-04f,
-5.72978650e-04f, -5.25977418e-04f, -4.74963705e-04f, -4.20426590e-04f, -3.62819514e-04f, -3.02647353e-04f,
-2.40497241e-04f, -1.76810216e-04f, -1.12210871e-04f, -4.71976690e-05f, 1.76624641e-05f, 8.18440593e-05f,
1.44804207e-04f, 2.06021410e-04f, 2.65025446e-04f, 3.21327783e-04f, 3.74487008e-04f, 4.24062432e-04f,
4.69715655e-04f, 5.11042943e-04f, 5.47794530e-04f, 5.79655168e-04f, 6.06446384e-04f, 6.27934546e-04f,
6.44010762e-04f, 6.54614698e-04f, 6.59636425e-04f, 6.59157826e-04f, 6.53158826e-04f, 6.41794049e-04f,
6.25154916e-04f, 6.03470855e-04f, 5.76917242e-04f, 5.45789736e-04f, 5.10368292e-04f, 4.70998661e-04f,
4.28021656e-04f, 3.81834126e-04f, 3.32863326e-04f, 2.81489629e-04f, 2.28231239e-04f, 1.73484261e-04f,
1.17756607e-04f, 6.14881351e-05f, 5.17778269e-06f, -5.07352374e-05f, -1.05745987e-04f, -1.59454662e-04f,
-2.11394268e-04f, -2.61151905e-04f, -3.08351703e-04f, -3.52598590e-04f, -3.93545002e-04f, -4.30916147e-04f,
-4.64387406e-04f, -4.93756593e-04f, -5.18755281e-04f, -5.39265493e-04f, -5.55137934e-04f, -5.66259303e-04f,
-5.72606783e-04f, -5.74140344e-04f, -5.70903292e-04f, -5.62934741e-04f, -5.50388898e-04f, -5.33351962e-04f,
-5.12028510e-04f, -4.86612455e-04f, -4.57392981e-04f, -4.24578939e-04f, -3.88503808e-04f, -3.49487518e-04f,
-3.07895836e-04f, -2.64036522e-04f, -2.18356445e-04f, -1.71198300e-04f, -1.22998901e-04f, -7.41392080e-05f,
-2.50280393e-05f, 2.38852047e-05f, 7.22663332e-05f, 1.19659647e-04f, 1.65718806e-04f, 2.10055385e-04f,
2.52324173e-04f, 2.92190427e-04f, 3.29337577e-04f, 3.63510150e-04f, 3.94385715e-04f, 4.21803288e-04f,
4.45519433e-04f, 4.65391876e-04f, 4.81270460e-04f, 4.93057625e-04f, 5.00688030e-04f, 5.04121708e-04f,
5.03379627e-04f, 4.98485604e-04f, 4.89499566e-04f, 4.76539317e-04f, 4.59760023e-04f, 4.39274612e-04f,
4.15334876e-04f, 3.88103885e-04f, 3.57902146e-04f, 3.24908089e-04f, 2.89490480e-04f, 2.51922687e-04f,
2.12512220e-04f, 1.71637404e-04f, 1.29609890e-04f, 8.67866183e-05f, 4.35312276e-05f, 1.98808307e-07f,
-4.28589070e-05f, -8.52865394e-05f, -1.26765698e-04f, -1.66922292e-04f, -2.05456466e-04f, -2.42095652e-04f,
-2.76487494e-04f, -3.08425602e-04f, -3.37638832e-04f, -3.63923042e-04f, -3.87022898e-04f, -4.06875144e-04f,
-4.23245129e-04f, -4.36071615e-04f, -4.45236993e-04f, -4.50724682e-04f, -4.52491230e-04f, -4.50548104e-04f,
-4.44936790e-04f, -4.35725612e-04f, -4.22987381e-04f, -4.06882738e-04f, -3.87548587e-04f, -3.65123104e-04f,
-3.39860288e-04f, -3.11947486e-04f, -2.81618569e-04f, -2.49166817e-04f, -2.14824344e-04f, -1.78876370e-04f,
-1.41684861e-04f, -1.03466427e-04f, -6.45996088e-05f, -2.53738050e-05f, 1.39035721e-05f, 5.28977578e-05f,
9.13010773e-05f, 1.28809554e-04f, 1.65139924e-04f, 2.00005346e-04f, 2.33095696e-04f, 2.64232233e-04f,
2.93070034e-04f, 3.19508024e-04f, 3.43252648e-04f, 3.64165224e-04f, 3.82074036e-04f, 3.96868082e-04f,
4.08408250e-04f, 4.16671952e-04f, 4.21556517e-04f, 4.23035822e-04f, 4.21172111e-04f, 4.15928838e-04f,
4.07377025e-04f, 3.95568598e-04f, 3.80628038e-04f, 3.62729177e-04f, 3.41921136e-04f, 3.18489958e-04f,
2.92497406e-04f, 2.64266550e-04f, 2.33955571e-04f, 2.01809261e-04f, 1.68092145e-04f, 1.33141461e-04f,
9.71043460e-05f, 6.03452880e-05f, 2.31264055e-05f, -1.43105089e-05f, -5.15607083e-05f, -8.84833364e-05f,
-1.24679461e-04f, -1.59910519e-04f, -1.93952723e-04f, -2.26496145e-04f, -2.57307566e-04f, -2.86175538e-04f,
-3.12853472e-04f, -3.37140613e-04f, -3.58914997e-04f, -3.77932329e-04f, -3.94117065e-04f, -4.07317063e-04f,
-4.17422308e-04f, -4.24419479e-04f, -4.28161231e-04f, -4.28700484e-04f, -4.26016659e-04f, -4.20088126e-04f,
-4.11009185e-04f, -3.98835037e-04f, -3.83585114e-04f, -3.65493072e-04f, -3.44616197e-04f, -3.21064387e-04f,
-2.95119418e-04f, -2.66863117e-04f, -2.36549174e-04f, -2.04391686e-04f, -1.70585806e-04f, -1.35432614e-04f,
-9.91006984e-05f, -6.19152828e-05f, -2.41012311e-05f, 1.40621144e-05f, 5.22867497e-05f, 9.03199843e-05f,
1.27917614e-04f, 1.64740292e-04f, 2.00634478e-04f, 2.35261402e-04f, 2.68377430e-04f, 2.99818019e-04f,
3.29273634e-04f, 3.56562766e-04f, 3.81532332e-04f, 4.03948113e-04f, 4.23655375e-04f, 4.40488930e-04f,
4.54376777e-04f, 4.65137195e-04f, 4.72679704e-04f, 4.77014073e-04f, 4.77982201e-04f, 4.75625277e-04f,
4.69878507e-04f, 4.60802987e-04f, 4.48367418e-04f, 4.32641679e-04f, 4.13709630e-04f, 3.91634147e-04f,
3.66512902e-04f, 3.38481392e-04f, 3.07634938e-04f, 2.74189182e-04f, 2.38229594e-04f, 1.99985879e-04f,
1.59632210e-04f, 1.17351364e-04f, 7.33404728e-05f, 2.78844831e-05f, -1.89099461e-05f, -6.67343638e-05f,
-1.15367449e-04f, -1.64649983e-04f, -2.14224348e-04f, -2.64019844e-04f, -3.13654244e-04f, -3.62990333e-04f,
-4.11800705e-04f, -4.59821928e-04f, -5.06946486e-04f, -5.52847863e-04f, -5.97397068e-04f, -6.40454770e-04f,
-6.81765968e-04f, -7.21210131e-04f, -7.58634477e-04f, -7.93939572e-04f, -8.26964876e-04f, -8.57585335e-04f,
-8.85733438e-04f, -9.11351007e-04f, -9.34300512e-04f, -9.54617442e-04f, -9.72159416e-04f, -9.87012089e-04f,
-9.99095133e-04f, -1.00846242e-03f, -1.01506022e-03f, -1.01897105e-03f, -1.02021427e-03f, -1.01887259e-03f,
-1.01497557e-03f, -1.00861358e-03f, -9.99877741e-04f, -9.88823136e-04f, -9.75617693e-04f, -9.60303769e-04f,
-9.43035535e-04f, -9.23922797e-04f, -9.03105429e-04f, -8.80708716e-04f, -8.56853281e-04f, -8.31685264e-04f,
-8.05348207e-04f, -7.77961627e-04f, -7.49713086e-04f, -7.20674604e-04f, -6.91032783e-04f, -6.60888020e-04f,
-6.30372917e-04f, -5.99673349e-04f, -5.68830563e-04f, -5.38013304e-04f, -5.07353303e-04f, -4.76915043e-04f,
-4.46832926e-04f, -4.17179291e-04f, -3.88083307e-04f, -3.59575024e-04f, -3.31820735e-04f, -3.04804303e-04f,
-2.78616041e-04f, -2.53335964e-04f, -2.28986996e-04f, -2.05619529e-04f, -1.83318449e-04f, -1.61979425e-04f,
-1.41791423e-04f, -1.22648816e-04f, -1.04625498e-04f, -8.77122910e-05f, -7.18653457e-05f, -5.71787106e-05f,
-4.34807639e-05f, -3.09618857e-05f, -1.94074401e-05f, -8.88017971e-06f, 6.09625220e-07f, 9.14020334e-06f,
1.67805558e-05f, 2.35369965e-05f, 2.94278194e-05f, 3.45049751e-05f, 3.88373828e-05f, 4.24291966e-05f,
4.53445665e-05f, 4.76965834e-05f, 4.93395567e-05f, 5.05392111e-05f, 5.12257065e-05f, 5.14579340e-05f,
5.12651750e-05f, 5.07312551e-05f, 4.98486765e-05f, 4.87082573e-05f, 4.73439631e-05f, 4.56740817e-05f,
4.38653618e-05f, 4.19399075e-05f, 3.99125668e-05f, 3.77616021e-05f, 3.56135997e-05f, 3.33554815e-05f,
3.11656899e-05f, 2.89038150e-05f, 2.67281634e-05f, 2.46192762e-05f, 2.24899205e-05f, 2.04698700e-05f,
1.84927655e-05f, 1.66762886e-05f, 1.49393771e-05f, 1.32258081e-05f, 1.16985586e-05f, 1.01874391e-05f,
8.99882100e-06f, 7.61267073e-06f, 6.57702907e-06f, 5.59829210e-06f, 4.27698546e-06f, 1.03248674e-05f,
};
//
// polyphase filter
//
static const int SRC_PHASEBITS = 8;
static const int SRC_PHASES = (1 << SRC_PHASEBITS);
static const int SRC_FRACBITS = 32 - SRC_PHASEBITS;
static const uint32_t SRC_FRACMASK = (1 << SRC_FRACBITS) - 1;
static const float QFRAC_TO_FLOAT = 1.0f / (1 << SRC_FRACBITS);
static const float Q32_TO_FLOAT = 1.0f / (1ULL << 32);
// blocking size in frames, chosen so block processing fits in L1 cache
static const int SRC_BLOCK = 1024;
#define lo32(a) ((uint32_t)(a))
#define hi32(a) ((int32_t)((a) >> 32))
// high/low part of int64_t
#define LO32(a) ((uint32_t)(a))
#define HI32(a) ((int32_t)((a) >> 32))
//
// Portable aligned malloc/free
@ -610,8 +69,8 @@ static void cubicInterpolation(const float* input, float* output, int inputSize,
// Lagrange interpolation using Farrow structure
for (int j = 0; j < outputSize; j++) {
int32_t i = hi32(offset);
uint32_t f = lo32(offset);
int32_t i = HI32(offset);
uint32_t f = LO32(offset);
// values outside the window are zero
float x0 = (i - 1 < 0) ? 0.0f : input[i - 1];
@ -649,7 +108,7 @@ int AudioSRC::createRationalFilter(int upFactor, int downFactor, float gain) {
numTaps = (numCoefs + upFactor - 1) / upFactor;
gain *= (float)oldCoefs / numCoefs;
}
numTaps = (numTaps + 3) & ~3; // SIMD4
numTaps = (numTaps + 7) & ~7; // SIMD8
// interpolate the coefficients of the prototype filter
float* tempFilter = new float[numTaps * numPhases];
@ -658,7 +117,7 @@ int AudioSRC::createRationalFilter(int upFactor, int downFactor, float gain) {
cubicInterpolation(prototypeFilter, tempFilter, prototypeCoefs, numCoefs, gain);
// create the polyphase filter
_polyphaseFilter = (float*)aligned_malloc(numTaps * numPhases * sizeof(float), 16); // SIMD4
_polyphaseFilter = (float*)aligned_malloc(numTaps * numPhases * sizeof(float), 32); // SIMD8
// rearrange into polyphase form, ordered by use
for (int i = 0; i < numPhases; i++) {
@ -699,7 +158,7 @@ int AudioSRC::createIrrationalFilter(int upFactor, int downFactor, float gain) {
numTaps = (numCoefs + upFactor - 1) / upFactor;
gain *= (float)oldCoefs / numCoefs;
}
numTaps = (numTaps + 3) & ~3; // SIMD4
numTaps = (numTaps + 7) & ~7; // SIMD8
// interpolate the coefficients of the prototype filter
float* tempFilter = new float[numTaps * numPhases];
@ -708,7 +167,7 @@ int AudioSRC::createIrrationalFilter(int upFactor, int downFactor, float gain) {
cubicInterpolation(prototypeFilter, tempFilter, prototypeCoefs, numCoefs, gain);
// create the polyphase filter, with extra phase at the end to simplify coef interpolation
_polyphaseFilter = (float*)aligned_malloc(numTaps * (numPhases + 1) * sizeof(float), 16); // SIMD4
_polyphaseFilter = (float*)aligned_malloc(numTaps * (numPhases + 1) * sizeof(float), 32); // SIMD8
// rearrange into polyphase form, ordered by fractional delay
for (int phase = 0; phase < numPhases; phase++) {
@ -741,14 +200,14 @@ int AudioSRC::createIrrationalFilter(int upFactor, int downFactor, float gain) {
#include <emmintrin.h>
int AudioSRC::multirateFilter1(const float* input0, float* output0, int inputFrames) {
int AudioSRC::multirateFilter1_SSE(const float* input0, float* output0, int inputFrames) {
int outputFrames = 0;
assert((_numTaps & 0x3) == 0); // SIMD4
assert(_numTaps % 4 == 0); // SIMD4
if (_step == 0) { // rational
int32_t i = hi32(_offset);
int32_t i = HI32(_offset);
while (i < inputFrames) {
@ -761,7 +220,7 @@ int AudioSRC::multirateFilter1(const float* input0, float* output0, int inputFra
//float coef = c0[j];
__m128 coef0 = _mm_loadu_ps(&c0[j]);
//acc0 += input0[i + j] * coef;
//acc += input[i + j] * coef;
acc0 = _mm_add_ps(_mm_mul_ps(_mm_loadu_ps(&input0[i + j]), coef0), acc0);
}
@ -781,10 +240,10 @@ int AudioSRC::multirateFilter1(const float* input0, float* output0, int inputFra
} else { // irrational
while (hi32(_offset) < inputFrames) {
while (HI32(_offset) < inputFrames) {
int32_t i = hi32(_offset);
uint32_t f = lo32(_offset);
int32_t i = HI32(_offset);
uint32_t f = LO32(_offset);
uint32_t phase = f >> SRC_FRACBITS;
__m128 frac = _mm_set1_ps((f & SRC_FRACMASK) * QFRAC_TO_FLOAT);
@ -802,7 +261,7 @@ int AudioSRC::multirateFilter1(const float* input0, float* output0, int inputFra
coef1 = _mm_sub_ps(coef1, coef0);
coef0 = _mm_add_ps(_mm_mul_ps(coef1, frac), coef0);
//acc0 += input0[i + j] * coef;
//acc += input[i + j] * coef;
acc0 = _mm_add_ps(_mm_mul_ps(_mm_loadu_ps(&input0[i + j]), coef0), acc0);
}
@ -821,14 +280,14 @@ int AudioSRC::multirateFilter1(const float* input0, float* output0, int inputFra
return outputFrames;
}
int AudioSRC::multirateFilter2(const float* input0, const float* input1, float* output0, float* output1, int inputFrames) {
int AudioSRC::multirateFilter2_SSE(const float* input0, const float* input1, float* output0, float* output1, int inputFrames) {
int outputFrames = 0;
assert((_numTaps & 0x3) == 0); // SIMD4
assert(_numTaps % 4 == 0); // SIMD4
if (_step == 0) { // rational
int32_t i = hi32(_offset);
int32_t i = HI32(_offset);
while (i < inputFrames) {
@ -842,7 +301,7 @@ int AudioSRC::multirateFilter2(const float* input0, const float* input1, float*
//float coef = c0[j];
__m128 coef0 = _mm_loadu_ps(&c0[j]);
//acc0 += input0[i + j] * coef;
//acc += input[i + j] * coef;
acc0 = _mm_add_ps(_mm_mul_ps(_mm_loadu_ps(&input0[i + j]), coef0), acc0);
acc1 = _mm_add_ps(_mm_mul_ps(_mm_loadu_ps(&input1[i + j]), coef0), acc1);
}
@ -866,10 +325,10 @@ int AudioSRC::multirateFilter2(const float* input0, const float* input1, float*
} else { // irrational
while (hi32(_offset) < inputFrames) {
while (HI32(_offset) < inputFrames) {
int32_t i = hi32(_offset);
uint32_t f = lo32(_offset);
int32_t i = HI32(_offset);
uint32_t f = LO32(_offset);
uint32_t phase = f >> SRC_FRACBITS;
__m128 frac = _mm_set1_ps((f & SRC_FRACMASK) * QFRAC_TO_FLOAT);
@ -888,7 +347,7 @@ int AudioSRC::multirateFilter2(const float* input0, const float* input1, float*
coef1 = _mm_sub_ps(coef1, coef0);
coef0 = _mm_add_ps(_mm_mul_ps(coef1, frac), coef0);
//acc0 += input0[i + j] * coef;
//acc += input[i + j] * coef;
acc0 = _mm_add_ps(_mm_mul_ps(_mm_loadu_ps(&input0[i + j]), coef0), acc0);
acc1 = _mm_add_ps(_mm_mul_ps(_mm_loadu_ps(&input1[i + j]), coef0), acc1);
}
@ -911,6 +370,24 @@ int AudioSRC::multirateFilter2(const float* input0, const float* input1, float*
return outputFrames;
}
//
// Runtime CPU dispatch
//
#include "CPUDetect.h"
int AudioSRC::multirateFilter1(const float* input0, float* output0, int inputFrames) {
static auto f = cpuSupportsAVX2() ? &AudioSRC::multirateFilter1_AVX2 : &AudioSRC::multirateFilter1_SSE;
return (this->*f)(input0, output0, inputFrames); // dispatch
}
int AudioSRC::multirateFilter2(const float* input0, const float* input1, float* output0, float* output1, int inputFrames) {
static auto f = cpuSupportsAVX2() ? &AudioSRC::multirateFilter2_AVX2 : &AudioSRC::multirateFilter2_SSE;
return (this->*f)(input0, input1, output0, output1, inputFrames); // dispatch
}
// convert int16_t to float, deinterleave stereo
void AudioSRC::convertInputFromInt16(const int16_t* input, float** outputs, int numFrames) {
__m128 scale = _mm_set1_ps(1/32768.0f);
@ -1069,7 +546,7 @@ int AudioSRC::multirateFilter1(const float* input0, float* output0, int inputFra
if (_step == 0) { // rational
int32_t i = hi32(_offset);
int32_t i = HI32(_offset);
while (i < inputFrames) {
@ -1096,10 +573,10 @@ int AudioSRC::multirateFilter1(const float* input0, float* output0, int inputFra
} else { // irrational
while (hi32(_offset) < inputFrames) {
while (HI32(_offset) < inputFrames) {
int32_t i = hi32(_offset);
uint32_t f = lo32(_offset);
int32_t i = HI32(_offset);
uint32_t f = LO32(_offset);
uint32_t phase = f >> SRC_FRACBITS;
float frac = (f & SRC_FRACMASK) * QFRAC_TO_FLOAT;
@ -1132,7 +609,7 @@ int AudioSRC::multirateFilter2(const float* input0, const float* input1, float*
if (_step == 0) { // rational
int32_t i = hi32(_offset);
int32_t i = HI32(_offset);
while (i < inputFrames) {
@ -1162,10 +639,10 @@ int AudioSRC::multirateFilter2(const float* input0, const float* input1, float*
} else { // irrational
while (hi32(_offset) < inputFrames) {
while (HI32(_offset) < inputFrames) {
int32_t i = hi32(_offset);
uint32_t f = lo32(_offset);
int32_t i = HI32(_offset);
uint32_t f = LO32(_offset);
uint32_t phase = f >> SRC_FRACBITS;
float frac = (f & SRC_FRACMASK) * QFRAC_TO_FLOAT;
@ -1320,7 +797,7 @@ AudioSRC::AudioSRC(int inputSampleRate, int outputSampleRate, int numChannels) {
assert(inputSampleRate > 0);
assert(outputSampleRate > 0);
assert(numChannels > 0);
assert(numChannels <= MAX_CHANNELS);
assert(numChannels <= SRC_MAX_CHANNELS);
_inputSampleRate = inputSampleRate;
_outputSampleRate = outputSampleRate;
@ -1349,7 +826,7 @@ AudioSRC::AudioSRC(int inputSampleRate, int outputSampleRate, int numChannels) {
_numTaps = createIrrationalFilter(_upFactor, _downFactor, 1.0f);
}
//printf("up=%d down=%.3f taps=%d\n", _upFactor, _downFactor + (lo32(_step)<<SRC_PHASEBITS) * Q32_TO_FLOAT, _numTaps);
//printf("up=%d down=%.3f taps=%d\n", _upFactor, _downFactor + (LO32(_step)<<SRC_PHASEBITS) * Q32_TO_FLOAT, _numTaps);
// filter history buffers
_numHistory = _numTaps - 1;
@ -1357,10 +834,10 @@ AudioSRC::AudioSRC(int inputSampleRate, int outputSampleRate, int numChannels) {
_history[1] = new float[2 * _numHistory];
// format conversion buffers
_inputs[0] = (float*)aligned_malloc(SRC_BLOCK * sizeof(float), 16); // SIMD4
_inputs[1] = (float*)aligned_malloc(SRC_BLOCK * sizeof(float), 16);
_outputs[0] = (float*)aligned_malloc(SRC_BLOCK * sizeof(float), 16);
_outputs[1] = (float*)aligned_malloc(SRC_BLOCK * sizeof(float), 16);
_inputs[0] = (float*)aligned_malloc(4*SRC_BLOCK * sizeof(float), 16); // SIMD4
_inputs[1] = _inputs[0] + 1*SRC_BLOCK;
_outputs[0] = _inputs[0] + 2*SRC_BLOCK;
_outputs[1] = _inputs[0] + 3*SRC_BLOCK;
// input blocking size, such that input and output are both guaranteed not to exceed SRC_BLOCK frames
_inputBlock = std::min(SRC_BLOCK, getMaxInput(SRC_BLOCK));
@ -1380,9 +857,6 @@ AudioSRC::~AudioSRC() {
delete[] _history[1];
aligned_free(_inputs[0]);
aligned_free(_inputs[1]);
aligned_free(_outputs[0]);
aligned_free(_outputs[1]);
}
//

View file

@ -14,11 +14,23 @@
#include <stdint.h>
static const int SRC_MAX_CHANNELS = 2;
// polyphase filter
static const int SRC_PHASEBITS = 8;
static const int SRC_PHASES = (1 << SRC_PHASEBITS);
static const int SRC_FRACBITS = 32 - SRC_PHASEBITS;
static const uint32_t SRC_FRACMASK = (1 << SRC_FRACBITS) - 1;
static const float QFRAC_TO_FLOAT = 1.0f / (1 << SRC_FRACBITS);
static const float Q32_TO_FLOAT = 1.0f / (1ULL << 32);
// blocking size in frames, chosen so block processing fits in L1 cache
static const int SRC_BLOCK = 256;
class AudioSRC {
public:
static const int MAX_CHANNELS = 2;
AudioSRC(int inputSampleRate, int outputSampleRate, int numChannels);
~AudioSRC();
@ -33,9 +45,9 @@ private:
float* _polyphaseFilter;
int* _stepTable;
float* _history[MAX_CHANNELS];
float* _inputs[MAX_CHANNELS];
float* _outputs[MAX_CHANNELS];
float* _history[SRC_MAX_CHANNELS];
float* _inputs[SRC_MAX_CHANNELS];
float* _outputs[SRC_MAX_CHANNELS];
int _inputSampleRate;
int _outputSampleRate;
@ -57,6 +69,12 @@ private:
int multirateFilter1(const float* input0, float* output0, int inputFrames);
int multirateFilter2(const float* input0, const float* input1, float* output0, float* output1, int inputFrames);
int multirateFilter1_SSE(const float* input0, float* output0, int inputFrames);
int multirateFilter2_SSE(const float* input0, const float* input1, float* output0, float* output1, int inputFrames);
int multirateFilter1_AVX2(const float* input0, float* output0, int inputFrames);
int multirateFilter2_AVX2(const float* input0, const float* input1, float* output0, float* output1, int inputFrames);
void convertInputFromInt16(const int16_t* input, float** outputs, int numFrames);
void convertOutputToInt16(float** inputs, int16_t* output, int numFrames);

View file

@ -0,0 +1,548 @@
//
// AudioSRCData.h
// libraries/audio/src
//
// Created by Ken Cooke on 6/6/16.
// Copyright 2016 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
//
//
// Prototype filter coefficients for audio sampling rate conversion.
//
// See "Design of Optimal Minimum Phase Digital FIR Filters Using Discrete Hilbert Transforms"
// IEEE TRANSACTIONS ON SIGNAL PROCESSING, May 2000
//
// Minimum-phase equiripple FIR lowpass
// taps = 96, phases = 32
//
// passband = 0.918 (20.2khz @ 44.1khz sampling rate)
// stopband = 1.010 (22.2khz @ 44.1khz sampling rate)
// passband ripple = +-0.01dB
// stopband attn = -125dB (-70dB at 1.000)
//
// Resampling algorithm:
// One of two methods is used, depending on whether the conversion is reducible to a ratio of small integers L/M.
// For rational ratio, the prototype is upsampled to L/M polyphase filter using 3rd-order Lagrange interpolation.
// For irrational ratio, the prototype is upsampled to 256/M polyphase filter, followed by linear interpolation.
// For both cases, oversampling at each stage ensures the original passband and stopband specifications are met.
//
static const int PROTOTYPE_TAPS = 96; // filter taps per phase
static const int PROTOTYPE_PHASES = 32; // oversampling factor
static const float prototypeFilter[PROTOTYPE_TAPS * PROTOTYPE_PHASES] = {
0.00000000e+00f, 1.55021703e-05f, 1.46054865e-05f, 2.07057160e-05f, 2.91335519e-05f, 4.00091078e-05f,
5.33544450e-05f, 7.03618468e-05f, 9.10821639e-05f, 1.16484613e-04f, 1.47165999e-04f, 1.84168304e-04f,
2.28429617e-04f, 2.80913884e-04f, 3.42940399e-04f, 4.15773039e-04f, 5.01023255e-04f, 6.00234953e-04f,
7.15133271e-04f, 8.47838855e-04f, 1.00032516e-03f, 1.17508881e-03f, 1.37452550e-03f, 1.60147614e-03f,
1.85886458e-03f, 2.14985024e-03f, 2.47783071e-03f, 2.84666764e-03f, 3.26016878e-03f, 3.72252797e-03f,
4.23825900e-03f, 4.81207874e-03f, 5.44904143e-03f, 6.15447208e-03f, 6.93399929e-03f, 7.79337059e-03f,
8.73903392e-03f, 9.77729117e-03f, 1.09149561e-02f, 1.21591316e-02f, 1.35171164e-02f, 1.49965439e-02f,
1.66053136e-02f, 1.83515384e-02f, 2.02435362e-02f, 2.22899141e-02f, 2.44995340e-02f, 2.68813362e-02f,
2.94443254e-02f, 3.21979928e-02f, 3.51514690e-02f, 3.83143719e-02f, 4.16960560e-02f, 4.53060504e-02f,
4.91538115e-02f, 5.32486197e-02f, 5.75998650e-02f, 6.22164253e-02f, 6.71072811e-02f, 7.22809789e-02f,
7.77457552e-02f, 8.35095233e-02f, 8.95796944e-02f, 9.59631768e-02f, 1.02666457e-01f, 1.09695215e-01f,
1.17054591e-01f, 1.24748885e-01f, 1.32781656e-01f, 1.41155521e-01f, 1.49872243e-01f, 1.58932534e-01f,
1.68335961e-01f, 1.78081143e-01f, 1.88165339e-01f, 1.98584621e-01f, 2.09333789e-01f, 2.20406193e-01f,
2.31793899e-01f, 2.43487398e-01f, 2.55475740e-01f, 2.67746404e-01f, 2.80285305e-01f, 2.93076743e-01f,
3.06103423e-01f, 3.19346351e-01f, 3.32784916e-01f, 3.46396772e-01f, 3.60158039e-01f, 3.74043042e-01f,
3.88024564e-01f, 4.02073759e-01f, 4.16160177e-01f, 4.30251886e-01f, 4.44315429e-01f, 4.58315954e-01f,
4.72217175e-01f, 4.85981675e-01f, 4.99570709e-01f, 5.12944586e-01f, 5.26062401e-01f, 5.38882630e-01f,
5.51362766e-01f, 5.63459860e-01f, 5.75130384e-01f, 5.86330458e-01f, 5.97016050e-01f, 6.07143161e-01f,
6.16667840e-01f, 6.25546499e-01f, 6.33735979e-01f, 6.41193959e-01f, 6.47878856e-01f, 6.53750084e-01f,
6.58768549e-01f, 6.62896349e-01f, 6.66097381e-01f, 6.68337353e-01f, 6.69583869e-01f, 6.69807061e-01f,
6.68979117e-01f, 6.67075139e-01f, 6.64072812e-01f, 6.59952827e-01f, 6.54699116e-01f, 6.48298688e-01f,
6.40742160e-01f, 6.32023668e-01f, 6.22141039e-01f, 6.11095903e-01f, 5.98893921e-01f, 5.85544600e-01f,
5.71061707e-01f, 5.55463040e-01f, 5.38770639e-01f, 5.21010762e-01f, 5.02213839e-01f, 4.82414572e-01f,
4.61651859e-01f, 4.39968628e-01f, 4.17412000e-01f, 3.94032951e-01f, 3.69886464e-01f, 3.45031084e-01f,
3.19529091e-01f, 2.93446187e-01f, 2.66851164e-01f, 2.39815999e-01f, 2.12415399e-01f, 1.84726660e-01f,
1.56829293e-01f, 1.28804933e-01f, 1.00736965e-01f, 7.27100355e-02f, 4.48100810e-02f, 1.71237415e-02f,
-1.02620228e-02f, -3.72599591e-02f, -6.37832871e-02f, -8.97457733e-02f, -1.15062201e-01f, -1.39648782e-01f,
-1.63423488e-01f, -1.86306368e-01f, -2.08220103e-01f, -2.29090072e-01f, -2.48845046e-01f, -2.67417270e-01f,
-2.84742946e-01f, -3.00762597e-01f, -3.15421127e-01f, -3.28668542e-01f, -3.40459849e-01f, -3.50755400e-01f,
-3.59521402e-01f, -3.66729768e-01f, -3.72358475e-01f, -3.76391839e-01f, -3.78820421e-01f, -3.79641287e-01f,
-3.78858203e-01f, -3.76481336e-01f, -3.72527677e-01f, -3.67020780e-01f, -3.59990760e-01f, -3.51474372e-01f,
-3.41514630e-01f, -3.30160971e-01f, -3.17468898e-01f, -3.03499788e-01f, -2.88320749e-01f, -2.72004315e-01f,
-2.54628056e-01f, -2.36274454e-01f, -2.17030464e-01f, -1.96986952e-01f, -1.76238733e-01f, -1.54883647e-01f,
-1.33022496e-01f, -1.10758449e-01f, -8.81964466e-02f, -6.54430504e-02f, -4.26055475e-02f, -1.97916415e-02f,
2.89108184e-03f, 2.53355868e-02f, 4.74362201e-02f, 6.90887518e-02f, 9.01914308e-02f, 1.10644978e-01f,
1.30353494e-01f, 1.49224772e-01f, 1.67170735e-01f, 1.84107975e-01f, 1.99958067e-01f, 2.14648181e-01f,
2.28111323e-01f, 2.40286622e-01f, 2.51119890e-01f, 2.60563701e-01f, 2.68577740e-01f, 2.75129027e-01f,
2.80192144e-01f, 2.83749177e-01f, 2.85790223e-01f, 2.86312986e-01f, 2.85323221e-01f, 2.82834421e-01f,
2.78867915e-01f, 2.73452721e-01f, 2.66625431e-01f, 2.58429983e-01f, 2.48917457e-01f, 2.38145826e-01f,
2.26179680e-01f, 2.13089734e-01f, 1.98952740e-01f, 1.83850758e-01f, 1.67870897e-01f, 1.51104879e-01f,
1.33648388e-01f, 1.15600665e-01f, 9.70639763e-02f, 7.81429119e-02f, 5.89439889e-02f, 3.95749746e-02f,
2.01442353e-02f, 7.60241152e-04f, -1.84690990e-02f, -3.74370397e-02f, -5.60385970e-02f, -7.41711039e-02f,
-9.17348686e-02f, -1.08633632e-01f, -1.24775254e-01f, -1.40071993e-01f, -1.54441372e-01f, -1.67806284e-01f,
-1.80095654e-01f, -1.91244732e-01f, -2.01195605e-01f, -2.09897310e-01f, -2.17306320e-01f, -2.23386736e-01f,
-2.28110407e-01f, -2.31457193e-01f, -2.33415044e-01f, -2.33980051e-01f, -2.33156463e-01f, -2.30956673e-01f,
-2.27401097e-01f, -2.22518148e-01f, -2.16343899e-01f, -2.08921985e-01f, -2.00303365e-01f, -1.90545790e-01f,
-1.79713804e-01f, -1.67877977e-01f, -1.55114789e-01f, -1.41505907e-01f, -1.27137921e-01f, -1.12101628e-01f,
-9.64915640e-02f, -8.04054232e-02f, -6.39434707e-02f, -4.72078814e-02f, -3.03021635e-02f, -1.33305082e-02f,
3.60284977e-03f, 2.03942507e-02f, 3.69413014e-02f, 5.31433810e-02f, 6.89024656e-02f, 8.41234679e-02f,
9.87150268e-02f, 1.12589969e-01f, 1.25665865e-01f, 1.37865538e-01f, 1.49117506e-01f, 1.59356490e-01f,
1.68523664e-01f, 1.76567229e-01f, 1.83442499e-01f, 1.89112308e-01f, 1.93547212e-01f, 1.96725586e-01f,
1.98633878e-01f, 1.99266486e-01f, 1.98625999e-01f, 1.96723008e-01f, 1.93576075e-01f, 1.89211557e-01f,
1.83663562e-01f, 1.76973516e-01f, 1.69190033e-01f, 1.60368490e-01f, 1.50570805e-01f, 1.39864815e-01f,
1.28324021e-01f, 1.16026978e-01f, 1.03056879e-01f, 8.95008829e-02f, 7.54496798e-02f, 6.09968238e-02f,
4.62380664e-02f, 3.12708901e-02f, 1.61936956e-02f, 1.10531988e-03f, -1.38957653e-02f, -2.87119784e-02f,
-4.32472742e-02f, -5.74078385e-02f, -7.11026311e-02f, -8.42439713e-02f, -9.67481917e-02f, -1.08536049e-01f,
-1.19533350e-01f, -1.29671345e-01f, -1.38887238e-01f, -1.47124498e-01f, -1.54333373e-01f, -1.60470968e-01f,
-1.65501755e-01f, -1.69397631e-01f, -1.72138140e-01f, -1.73710602e-01f, -1.74110159e-01f, -1.73339798e-01f,
-1.71410274e-01f, -1.68340111e-01f, -1.64155335e-01f, -1.58889414e-01f, -1.52582850e-01f, -1.45283122e-01f,
-1.37044042e-01f, -1.27925722e-01f, -1.17993860e-01f, -1.07319421e-01f, -9.59781808e-02f, -8.40500777e-02f,
-7.16188049e-02f, -5.87710561e-02f, -4.55961475e-02f, -3.21851919e-02f, -1.86306406e-02f, -5.02554942e-03f,
8.53698384e-03f, 2.19645467e-02f, 3.51659468e-02f, 4.80518693e-02f, 6.05355056e-02f, 7.25330700e-02f,
8.39645094e-02f, 9.47537898e-02f, 1.04829753e-01f, 1.14126254e-01f, 1.22582788e-01f, 1.30144907e-01f,
1.36764459e-01f, 1.42400029e-01f, 1.47017076e-01f, 1.50588312e-01f, 1.53093700e-01f, 1.54520736e-01f,
1.54864367e-01f, 1.54127119e-01f, 1.52318991e-01f, 1.49457408e-01f, 1.45567062e-01f, 1.40679709e-01f,
1.34833933e-01f, 1.28074855e-01f, 1.20453893e-01f, 1.12028129e-01f, 1.02860307e-01f, 9.30178765e-02f,
8.25730032e-02f, 7.16016450e-02f, 6.01833134e-02f, 4.84002546e-02f, 3.63370724e-02f, 2.40800037e-02f,
1.17163168e-02f, -6.66217400e-04f, -1.29801121e-02f, -2.51385315e-02f, -3.70562030e-02f, -4.86497748e-02f,
-5.98384928e-02f, -7.05447859e-02f, -8.06947592e-02f, -9.02187441e-02f, -9.90517313e-02f, -1.07133911e-01f,
-1.14410951e-01f, -1.20834483e-01f, -1.26362422e-01f, -1.30959116e-01f, -1.34595787e-01f, -1.37250547e-01f,
-1.38908600e-01f, -1.39562374e-01f, -1.39211442e-01f, -1.37862602e-01f, -1.35529795e-01f, -1.32233909e-01f,
-1.28002721e-01f, -1.22870611e-01f, -1.16878278e-01f, -1.10072477e-01f, -1.02505698e-01f, -9.42356124e-02f,
-8.53248753e-02f, -7.58404912e-02f, -6.58532924e-02f, -5.54376360e-02f, -4.46705953e-02f, -3.36315414e-02f,
-2.24015972e-02f, -1.10628991e-02f, 3.01894735e-04f, 1.16101918e-02f, 2.27801642e-02f, 3.37311642e-02f,
4.43845430e-02f, 5.46640016e-02f, 6.44962637e-02f, 7.38115400e-02f, 8.25440784e-02f, 9.06325572e-02f,
9.80206066e-02f, 1.04657146e-01f, 1.10496723e-01f, 1.15499920e-01f, 1.19633523e-01f, 1.22870824e-01f,
1.25191729e-01f, 1.26582959e-01f, 1.27038061e-01f, 1.26557494e-01f, 1.25148528e-01f, 1.22825305e-01f,
1.19608512e-01f, 1.15525479e-01f, 1.10609643e-01f, 1.04900592e-01f, 9.84435537e-02f, 9.12890948e-02f,
8.34927732e-02f, 7.51146973e-02f, 6.62190194e-02f, 5.68735547e-02f, 4.71491262e-02f, 3.71191855e-02f,
2.68591932e-02f, 1.64459573e-02f, 5.95731808e-03f, -4.52874940e-03f, -1.49344723e-02f, -2.51829130e-02f,
-3.51986373e-02f, -4.49081427e-02f, -5.42404654e-02f, -6.31276969e-02f, -7.15054163e-02f, -7.93132713e-02f,
-8.64953327e-02f, -9.30005042e-02f, -9.87829011e-02f, -1.03802223e-01f, -1.08023943e-01f, -1.11419636e-01f,
-1.13967111e-01f, -1.15650603e-01f, -1.16460855e-01f, -1.16395152e-01f, -1.15457368e-01f, -1.13657871e-01f,
-1.11013433e-01f, -1.07547117e-01f, -1.03288073e-01f, -9.82712708e-02f, -9.25372646e-02f, -8.61318657e-02f,
-7.91057486e-02f, -7.15141053e-02f, -6.34161588e-02f, -5.48747791e-02f, -4.59559696e-02f, -3.67282941e-02f,
-2.72624874e-02f, -1.76307914e-02f, -7.90648674e-03f, 1.83670340e-03f, 1.15251424e-02f, 2.10858716e-02f,
3.04471304e-02f, 3.95388944e-02f, 4.82933904e-02f, 5.66456655e-02f, 6.45340054e-02f, 7.19003487e-02f,
7.86908695e-02f, 8.48562395e-02f, 9.03519908e-02f, 9.51389501e-02f, 9.91834077e-02f, 1.02457361e-01f,
1.04938834e-01f, 1.06611872e-01f, 1.07466724e-01f, 1.07499917e-01f, 1.06714213e-01f, 1.05118588e-01f,
1.02728167e-01f, 9.95640680e-02f, 9.56532488e-02f, 9.10282406e-02f, 8.57269309e-02f, 7.97922261e-02f,
7.32717395e-02f, 6.62174249e-02f, 5.86850536e-02f, 5.07339959e-02f, 4.24265058e-02f, 3.38274345e-02f,
2.50036502e-02f, 1.60234844e-02f, 6.95628026e-03f, -2.12820655e-03f, -1.11602438e-02f, -2.00708281e-02f,
-2.87920337e-02f, -3.72576320e-02f, -4.54035426e-02f, -5.31684173e-02f, -6.04938939e-02f, -6.73253212e-02f,
-7.36119310e-02f, -7.93072981e-02f, -8.43697556e-02f, -8.87625537e-02f, -9.24542939e-02f, -9.54189981e-02f,
-9.76364402e-02f, -9.90921435e-02f, -9.97776003e-02f, -9.96902366e-02f, -9.88334463e-02f, -9.72165780e-02f,
-9.48547668e-02f, -9.17688999e-02f, -8.79853312e-02f, -8.35357688e-02f, -7.84569594e-02f, -7.27903677e-02f,
-6.65818940e-02f, -5.98814932e-02f, -5.27427333e-02f, -4.52224733e-02f, -3.73802459e-02f, -2.92780037e-02f,
-2.09794209e-02f, -1.25495498e-02f, -4.05425988e-03f, 4.44034349e-03f, 1.28682571e-02f, 2.11643361e-02f,
2.92645357e-02f, 3.71066200e-02f, 4.46305203e-02f, 5.17788267e-02f, 5.84972389e-02f, 6.47349496e-02f,
7.04450836e-02f, 7.55849928e-02f, 8.01165748e-02f, 8.40066506e-02f, 8.72270848e-02f, 8.97550618e-02f,
9.15732179e-02f, 9.26698315e-02f, 9.30387881e-02f, 9.26796720e-02f, 9.15978025e-02f, 8.98040443e-02f,
8.73148489e-02f, 8.41520461e-02f, 8.03426093e-02f, 7.59185468e-02f, 7.09165136e-02f, 6.53776255e-02f,
5.93470480e-02f, 5.28736293e-02f, 4.60095655e-02f, 3.88099545e-02f, 3.13323302e-02f, 2.36362162e-02f,
1.57827398e-02f, 7.83395091e-03f, -1.47413782e-04f, -8.09864153e-03f, -1.59574406e-02f, -2.36623595e-02f,
-3.11534717e-02f, -3.83725840e-02f, -4.52638947e-02f, -5.17743411e-02f, -5.78539729e-02f, -6.34564348e-02f,
-6.85392092e-02f, -7.30640654e-02f, -7.69971954e-02f, -8.03096220e-02f, -8.29772975e-02f, -8.49813524e-02f,
-8.63081836e-02f, -8.69495746e-02f, -8.69027157e-02f, -8.61702687e-02f, -8.47602668e-02f, -8.26860569e-02f,
-7.99661981e-02f, -7.66242997e-02f, -7.26887788e-02f, -6.81926752e-02f, -6.31733712e-02f, -5.76722279e-02f,
-5.17343061e-02f, -4.54080069e-02f, -3.87446321e-02f, -3.17980032e-02f, -2.46239897e-02f, -1.72801497e-02f,
-9.82518156e-03f, -2.31845300e-03f, 5.18037510e-03f, 1.26119044e-02f, 1.99174857e-02f, 2.70395921e-02f,
3.39223499e-02f, 4.05119404e-02f, 4.67570465e-02f, 5.26092142e-02f, 5.80232695e-02f, 6.29576539e-02f,
6.73747113e-02f, 7.12410320e-02f, 7.45276905e-02f, 7.72104218e-02f, 7.92698394e-02f, 8.06915952e-02f,
8.14664004e-02f, 8.15901977e-02f, 8.10640907e-02f, 7.98943315e-02f, 7.80922975e-02f, 7.56743792e-02f,
7.26617861e-02f, 6.90804346e-02f, 6.49606433e-02f, 6.03370049e-02f, 5.52479503e-02f, 4.97355660e-02f,
4.38451300e-02f, 3.76248662e-02f, 3.11254263e-02f, 2.43995757e-02f, 1.75017105e-02f, 1.04874823e-02f,
3.41321948e-03f, -3.66433362e-03f, -1.06886566e-02f, -1.76037566e-02f, -2.43547422e-02f, -3.08881238e-02f,
-3.71523818e-02f, -4.30982377e-02f, -4.86791529e-02f, -5.38515978e-02f, -5.85754991e-02f, -6.28144137e-02f,
-6.65359631e-02f, -6.97119559e-02f, -7.23186409e-02f, -7.43369897e-02f, -7.57526047e-02f, -7.65560812e-02f,
-7.67428560e-02f, -7.63134051e-02f, -7.52730583e-02f, -7.36321241e-02f, -7.14055927e-02f, -6.86132027e-02f,
-6.52791213e-02f, -6.14318004e-02f, -5.71037475e-02f, -5.23312158e-02f, -4.71539306e-02f, -4.16147519e-02f,
-3.57593331e-02f, -2.96357023e-02f, -2.32939478e-02f, -1.67857228e-02f, -1.01639251e-02f, -3.48213128e-03f,
3.20566951e-03f, 9.84566549e-03f, 1.63845318e-02f, 2.27699627e-02f, 2.89509937e-02f, 3.48784838e-02f,
4.05054571e-02f, 4.57875191e-02f, 5.06831561e-02f, 5.51541055e-02f, 5.91656321e-02f, 6.26867948e-02f,
6.56907214e-02f, 6.81547545e-02f, 7.00607045e-02f, 7.13948753e-02f, 7.21482790e-02f, 7.23165894e-02f,
7.19002973e-02f, 7.09044846e-02f, 6.93390331e-02f, 6.72183039e-02f, 6.45611568e-02f, 6.13906537e-02f,
5.77340810e-02f, 5.36223917e-02f, 4.90902973e-02f, 4.41756853e-02f, 3.89195025e-02f, 3.33653266e-02f,
2.75589553e-02f, 2.15482187e-02f, 1.53823433e-02f, 9.11173206e-03f, 2.78750380e-03f, -3.53899736e-03f,
-9.81648845e-03f, -1.59942887e-02f, -2.20226002e-02f, -2.78530676e-02f, -3.34389835e-02f, -3.87358558e-02f,
-4.37015752e-02f, -4.82968641e-02f, -5.24856104e-02f, -5.62350079e-02f, -5.95160314e-02f, -6.23034090e-02f,
-6.45760369e-02f, -6.63170246e-02f, -6.75138263e-02f, -6.81583864e-02f, -6.82471093e-02f, -6.77809819e-02f,
-6.67654439e-02f, -6.52104027e-02f, -6.31301405e-02f, -6.05431381e-02f, -5.74719510e-02f, -5.39430121e-02f,
-4.99864152e-02f, -4.56356108e-02f, -4.09271785e-02f, -3.59005358e-02f, -3.05975021e-02f, -2.50620982e-02f,
-1.93400931e-02f, -1.34786109e-02f, -7.52582921e-03f, -1.53047296e-03f, 4.45846396e-03f, 1.03922252e-02f,
1.62226043e-02f, 2.19024111e-02f, 2.73857927e-02f, 3.26286453e-02f, 3.75889120e-02f, 4.22270162e-02f,
4.65060678e-02f, 5.03922602e-02f, 5.38550360e-02f, 5.68673912e-02f, 5.94061299e-02f, 6.14518959e-02f,
6.29894927e-02f, 6.40078422e-02f, 6.45002081e-02f, 6.44641312e-02f, 6.39014463e-02f, 6.28183549e-02f,
6.12252434e-02f, 5.91366226e-02f, 5.65710713e-02f, 5.35509478e-02f, 5.01023211e-02f, 4.62546289e-02f,
4.20405644e-02f, 3.74956324e-02f, 3.26580309e-02f, 2.75681921e-02f, 2.22685138e-02f, 1.68029869e-02f,
1.12168479e-02f, 5.55616360e-03f, -1.32475496e-04f, -5.80242145e-03f, -1.14072870e-02f, -1.69013632e-02f,
-2.22399629e-02f, -2.73798231e-02f, -3.22793559e-02f, -3.68992177e-02f, -4.12022700e-02f, -4.51542301e-02f,
-4.87237130e-02f, -5.18825743e-02f, -5.46061242e-02f, -5.68733215e-02f, -5.86668721e-02f, -5.99735198e-02f,
-6.07838952e-02f, -6.10928895e-02f, -6.08993923e-02f, -6.02064781e-02f, -5.90213291e-02f, -5.73550887e-02f,
-5.52228853e-02f, -5.26435817e-02f, -4.96396897e-02f, -4.62371294e-02f, -4.24650256e-02f, -3.83554628e-02f,
-3.39432096e-02f, -2.92654225e-02f, -2.43613233e-02f, -1.92718970e-02f, -1.40395616e-02f, -8.70771728e-03f,
-3.32056777e-03f, 2.07744785e-03f, 7.44190391e-03f, 1.27287222e-02f, 1.78946228e-02f, 2.28975002e-02f,
2.76965843e-02f, 3.22530140e-02f, 3.65299534e-02f, 4.04930363e-02f, 4.41105069e-02f, 4.73536159e-02f,
5.01967201e-02f, 5.26175750e-02f, 5.45974724e-02f, 5.61213729e-02f, 5.71780843e-02f, 5.77601946e-02f,
5.78643759e-02f, 5.74910914e-02f, 5.66448597e-02f, 5.53340158e-02f, 5.35707338e-02f, 5.13708843e-02f,
4.87538683e-02f, 4.57425137e-02f, 4.23627999e-02f, 3.86437075e-02f, 3.46169024e-02f, 3.03165387e-02f,
2.57788894e-02f, 2.10421222e-02f, 1.61459251e-02f, 1.11311994e-02f, 6.03970466e-03f, 9.13695817e-04f,
-4.20433431e-03f, -9.27218149e-03f, -1.42480682e-02f, -1.90911878e-02f, -2.37618648e-02f, -2.82220093e-02f,
-3.24353766e-02f, -3.63678336e-02f, -3.99876924e-02f, -4.32659237e-02f, -4.61764207e-02f, -4.86961602e-02f,
-5.08054551e-02f, -5.24880386e-02f, -5.37312181e-02f, -5.45260166e-02f, -5.48671104e-02f, -5.47530531e-02f,
-5.41860463e-02f, -5.31721475e-02f, -5.17210363e-02f, -4.98459868e-02f, -4.75637647e-02f, -4.48944406e-02f,
-4.18612746e-02f, -3.84904206e-02f, -3.48107925e-02f, -3.08537797e-02f, -2.66529685e-02f, -2.22438695e-02f,
-1.76636682e-02f, -1.29507560e-02f, -8.14466071e-03f, -3.28544776e-03f, 1.58643018e-03f, 6.43050440e-03f,
1.12067405e-02f, 1.58756642e-02f, 2.03989020e-02f, 2.47393345e-02f, 2.88614617e-02f, 3.27317634e-02f,
3.63187992e-02f, 3.95936470e-02f, 4.25300387e-02f, 4.51045672e-02f, 4.72968940e-02f, 4.90899703e-02f,
5.04700047e-02f, 5.14267809e-02f, 5.19535643e-02f, 5.20472034e-02f, 5.17082287e-02f, 5.09406434e-02f,
4.97521048e-02f, 4.81537188e-02f, 4.61599131e-02f, 4.37884262e-02f, 4.10600706e-02f, 3.79985488e-02f,
3.46302622e-02f, 3.09841217e-02f, 2.70912412e-02f, 2.29847199e-02f, 1.86992847e-02f, 1.42711599e-02f,
9.73752669e-03f, 5.13643650e-03f, 5.06379454e-04f, -4.11408166e-03f, -8.68649476e-03f, -1.31729621e-02f,
-1.75363807e-02f, -2.17408089e-02f, -2.57516979e-02f, -2.95362143e-02f, -3.30635093e-02f, -3.63049622e-02f,
-3.92344048e-02f, -4.18283298e-02f, -4.40661418e-02f, -4.59301913e-02f, -4.74060505e-02f, -4.84825511e-02f,
-4.91518827e-02f, -4.94096235e-02f, -4.92548579e-02f, -4.86900251e-02f, -4.77210458e-02f, -4.63571741e-02f,
-4.46108878e-02f, -4.24979107e-02f, -4.00368564e-02f, -3.72492987e-02f, -3.41594108e-02f, -3.07938448e-02f,
-2.71814552e-02f, -2.33531198e-02f, -1.93413598e-02f, -1.51802063e-02f, -1.09048013e-02f, -6.55114338e-03f,
-2.15581014e-03f, 2.24443555e-03f, 6.61280814e-03f, 1.09129453e-02f, 1.51091980e-02f, 1.91667630e-02f,
2.30522168e-02f, 2.67335907e-02f, 3.01807365e-02f, 3.33655579e-02f, 3.62622051e-02f, 3.88473226e-02f,
4.11002204e-02f, 4.30030300e-02f, 4.45408790e-02f, 4.57019705e-02f, 4.64777109e-02f, 4.68627135e-02f,
4.68549093e-02f, 4.64554958e-02f, 4.56689373e-02f, 4.45029599e-02f, 4.29683919e-02f, 4.10791386e-02f,
3.88520159e-02f, 3.63066475e-02f, 3.34652385e-02f, 3.03523892e-02f, 2.69949681e-02f, 2.34217263e-02f,
1.96632025e-02f, 1.57513974e-02f, 1.17194459e-02f, 7.60145677e-03f, 3.43215481e-03f, -7.53454950e-04f,
-4.92025229e-03f, -9.03345904e-03f, -1.30587503e-02f, -1.69627406e-02f, -2.07130441e-02f, -2.42787472e-02f,
-2.76304969e-02f, -3.07408842e-02f, -3.35845310e-02f, -3.61384026e-02f, -3.83819804e-02f, -4.02973364e-02f,
-4.18693911e-02f, -4.30859849e-02f, -4.39379525e-02f, -4.44192202e-02f, -4.45268207e-02f, -4.42609489e-02f,
-4.36249417e-02f, -4.26251693e-02f, -4.12710965e-02f, -3.95751119e-02f, -3.75524034e-02f, -3.52209020e-02f,
-3.26010732e-02f, -2.97156826e-02f, -2.65897306e-02f, -2.32501339e-02f, -1.97255230e-02f, -1.60459906e-02f,
-1.22428645e-02f, -8.34840613e-03f, -4.39555788e-03f, -4.17641093e-04f, 3.55186529e-03f, 7.47969548e-03f,
1.13330289e-02f, 1.50796895e-02f, 1.86886063e-02f, 2.21298440e-02f, 2.53750227e-02f, 2.83974776e-02f,
3.11724713e-02f, 3.36774564e-02f, 3.58921485e-02f, 3.77988281e-02f, 3.93823848e-02f, 4.06304645e-02f,
4.15335460e-02f, 4.20850895e-02f, 4.22814530e-02f, 4.21220657e-02f, 4.16092724e-02f, 4.07484568e-02f,
3.95478256e-02f, 3.80185099e-02f, 3.61742882e-02f, 3.40316228e-02f, 3.16093467e-02f, 2.89286854e-02f,
2.60129143e-02f, 2.28872072e-02f, 1.95785162e-02f, 1.61151429e-02f, 1.25266872e-02f, 8.84367289e-03f,
5.09737541e-03f, 1.31946573e-03f, -2.45819207e-03f, -6.20382907e-03f, -9.88599514e-03f, -1.34739714e-02f,
-1.69377975e-02f, -2.02487225e-02f, -2.33793144e-02f, -2.63038233e-02f, -2.89981802e-02f, -3.14404213e-02f,
-3.36107546e-02f, -3.54916723e-02f, -3.70682427e-02f, -3.83280672e-02f, -3.92614736e-02f, -3.98615776e-02f,
-4.01243243e-02f, -4.00484517e-02f, -3.96356708e-02f, -3.88903731e-02f, -3.78198781e-02f, -3.64341365e-02f,
-3.47457457e-02f, -3.27698392e-02f, -3.05238882e-02f, -2.80276282e-02f, -2.53028218e-02f, -2.23730957e-02f,
-1.92637467e-02f, -1.60015029e-02f, -1.26142882e-02f, -9.13104283e-03f, -5.58138981e-03f, -1.99542434e-03f,
1.59649307e-03f, 5.16408174e-03f, 8.67737144e-03f, 1.21068581e-02f, 1.54239205e-02f, 1.86009100e-02f,
2.16114772e-02f, 2.44306994e-02f, 2.70354163e-02f, 2.94042665e-02f, 3.15179985e-02f, 3.33595356e-02f,
3.49141593e-02f, 3.61696229e-02f, 3.71161871e-02f, 3.77468512e-02f, 3.80571878e-02f, 3.80455485e-02f,
3.77129900e-02f, 3.70632810e-02f, 3.61028508e-02f, 3.48407199e-02f, 3.32884428e-02f, 3.14600053e-02f,
2.93716228e-02f, 2.70417408e-02f, 2.44907277e-02f, 2.17407576e-02f, 1.88156734e-02f, 1.57406803e-02f,
1.25421761e-02f, 9.24754692e-03f, 5.88488640e-03f, 2.48280587e-03f, -9.29864758e-04f, -4.32426314e-03f,
-7.67179184e-03f, -1.09442952e-02f, -1.41143886e-02f, -1.71555974e-02f, -2.00425787e-02f, -2.27514891e-02f,
-2.52599054e-02f, -2.75472706e-02f, -2.95949315e-02f, -3.13863062e-02f, -3.29069832e-02f, -3.41450096e-02f,
-3.50907101e-02f, -3.57369992e-02f, -3.60793163e-02f, -3.61156751e-02f, -3.58467080e-02f, -3.52755740e-02f,
-3.44080617e-02f, -3.32523628e-02f, -3.18191314e-02f, -3.01213186e-02f, -2.81740846e-02f, -2.59946393e-02f,
-2.36021125e-02f, -2.10173975e-02f, -1.82629132e-02f, -1.53624700e-02f, -1.23410560e-02f, -9.22456599e-03f,
-6.03967755e-03f, -2.81350877e-03f, 4.26514319e-04f, 3.65292660e-03f, 6.83848944e-03f, 9.95638508e-03f,
1.29804234e-02f, 1.58853076e-02f, 1.86468203e-02f, 2.12420277e-02f, 2.36494909e-02f, 2.58493792e-02f,
2.78237450e-02f, 2.95565060e-02f, 3.10338053e-02f, 3.22438572e-02f, 3.31772716e-02f, 3.38269627e-02f,
3.41883176e-02f, 3.42591610e-02f, 3.40397435e-02f, 3.35328606e-02f, 3.27436351e-02f, 3.16796573e-02f,
3.03507246e-02f, 2.87689689e-02f, 2.69484839e-02f, 2.49054827e-02f, 2.26579086e-02f, 2.02254442e-02f,
1.76292617e-02f, 1.48918382e-02f, 1.20368159e-02f, 9.08872468e-03f, 6.07283273e-03f, 3.01489838e-03f,
-5.90212194e-05f, -3.12287666e-03f, -6.15069532e-03f, -9.11695091e-03f, -1.19967033e-02f, -1.47657868e-02f,
-1.74011004e-02f, -1.98807214e-02f, -2.21841025e-02f, -2.42922632e-02f, -2.61879368e-02f, -2.78557311e-02f,
-2.92821801e-02f, -3.04559562e-02f, -3.13678907e-02f, -3.20110632e-02f, -3.23808087e-02f, -3.24749193e-02f,
-3.22933847e-02f, -3.18386269e-02f, -3.11153366e-02f, -3.01304804e-02f, -2.88932552e-02f, -2.74148734e-02f,
-2.57086673e-02f, -2.37898314e-02f, -2.16752343e-02f, -1.93835013e-02f, -1.69345799e-02f, -1.43497284e-02f,
-1.16513243e-02f, -8.86259097e-03f, -6.00748525e-03f, -3.11044903e-03f, -1.96143386e-04f, 2.71056658e-03f,
5.58512222e-03f, 8.40318833e-03f, 1.11410160e-02f, 1.37756382e-02f, 1.62850338e-02f, 1.86482666e-02f,
2.08457445e-02f, 2.28593437e-02f, 2.46725329e-02f, 2.62705694e-02f, 2.76405329e-02f, 2.87715470e-02f,
2.96547092e-02f, 3.02833419e-02f, 3.06529059e-02f, 3.07610441e-02f, 3.06076742e-02f, 3.01949567e-02f,
2.95271502e-02f, 2.86107876e-02f, 2.74543883e-02f, 2.60685701e-02f, 2.44657863e-02f, 2.26603655e-02f,
2.06682557e-02f, 1.85070033e-02f, 1.61954603e-02f, 1.37537720e-02f, 1.12030588e-02f, 8.56537064e-03f,
5.86336215e-03f, 3.12021752e-03f, 3.59345288e-04f, -2.39571357e-03f, -5.12158252e-03f, -7.79518527e-03f,
-1.03939536e-02f, -1.28961026e-02f, -1.52805838e-02f, -1.75275761e-02f, -1.96183935e-02f, -2.15357712e-02f,
-2.32639542e-02f, -2.47888545e-02f, -2.60981899e-02f, -2.71814567e-02f, -2.80302370e-02f, -2.86380088e-02f,
-2.90003996e-02f, -2.91151172e-02f, -2.89819544e-02f, -2.86028697e-02f, -2.79818317e-02f, -2.71249297e-02f,
-2.60401957e-02f, -2.47375751e-02f, -2.32288414e-02f, -2.15275091e-02f, -1.96486443e-02f, -1.76087964e-02f,
-1.54258426e-02f, -1.31187994e-02f, -1.07076937e-02f, -8.21335282e-03f, -5.65730582e-03f, -3.06143405e-03f,
-4.47990175e-04f, 2.16074548e-03f, 4.74260737e-03f, 7.27569124e-03f, 9.73864733e-03f, 1.21106824e-02f,
1.43719841e-02f, 1.65036001e-02f, 1.84878471e-02f, 2.03083286e-02f, 2.19500531e-02f, 2.33996493e-02f,
2.46453861e-02f, 2.56773512e-02f, 2.64874345e-02f, 2.70694463e-02f, 2.74192279e-02f, 2.75344951e-02f,
2.74150667e-02f, 2.70627089e-02f, 2.64811913e-02f, 2.56761950e-02f, 2.46553112e-02f, 2.34279326e-02f,
2.20051823e-02f, 2.03998041e-02f, 1.86260730e-02f, 1.66996483e-02f, 1.46373888e-02f, 1.24573628e-02f,
1.01784699e-02f, 7.82046099e-03f, 5.40366356e-03f, 2.94886537e-03f, 4.77074685e-04f, -1.99056008e-03f,
-4.43309957e-03f, -6.82975366e-03f, -9.16032780e-03f, -1.14051392e-02f, -1.35453571e-02f, -1.55631186e-02f,
-1.74416221e-02f, -1.91653203e-02f, -2.07200521e-02f, -2.20931290e-02f, -2.32734389e-02f, -2.42515770e-02f,
-2.50198790e-02f, -2.55724740e-02f, -2.59053977e-02f, -2.60165073e-02f, -2.59056121e-02f, -2.55744100e-02f,
-2.50263861e-02f, -2.42670139e-02f, -2.33034172e-02f, -2.21444752e-02f, -2.08007704e-02f, -1.92843016e-02f,
-1.76086143e-02f, -1.57885066e-02f, -1.38399632e-02f, -1.17800468e-02f, -9.62665505e-03f, -7.39846180e-03f,
-5.11473979e-03f, -2.79509520e-03f, -4.59475153e-04f, 1.87219411e-03f, 4.18004886e-03f, 6.44446028e-03f,
8.64630036e-03f, 1.07670050e-02f, 1.27887263e-02f, 1.46946183e-02f, 1.64687696e-02f, 1.80965074e-02f,
1.95644657e-02f, 2.08606409e-02f, 2.19745569e-02f, 2.28973400e-02f, 2.36217678e-02f, 2.41423032e-02f,
2.44552329e-02f, 2.45585559e-02f, 2.44521268e-02f, 2.41375247e-02f, 2.36181843e-02f, 2.28991883e-02f,
2.19873596e-02f, 2.08911372e-02f, 1.96204854e-02f, 1.81868423e-02f, 1.66029686e-02f, 1.48829260e-02f,
1.30418196e-02f, 1.10957823e-02f, 9.06176569e-03f, 6.95742371e-03f, 4.80095797e-03f, 2.61094572e-03f,
4.06163422e-04f, -1.79448120e-03f, -3.97227507e-03f, -6.10867089e-03f, -8.18559133e-03f, -1.01855447e-02f,
-1.20916775e-02f, -1.38880736e-02f, -1.55597947e-02f, -1.70929424e-02f, -1.84749792e-02f, -1.96945768e-02f,
-2.07419008e-02f, -2.16086011e-02f, -2.22879060e-02f, -2.27746496e-02f, -2.30653527e-02f, -2.31582122e-02f,
-2.30530853e-02f, -2.27516002e-02f, -2.22569518e-02f, -2.15740851e-02f, -2.07094459e-02f, -1.96710504e-02f,
-1.84683607e-02f, -1.71122258e-02f, -1.56147530e-02f, -1.39891960e-02f, -1.22499260e-02f, -1.04121226e-02f,
-8.49187069e-03f, -6.50583812e-03f, -4.47121574e-03f, -2.40553061e-03f, -3.26560349e-04f, 1.74792849e-03f,
3.80020986e-03f, 5.81284812e-03f, 7.76878436e-03f, 9.65152189e-03f, 1.14452321e-02f, 1.31348903e-02f,
1.47064602e-02f, 1.61469015e-02f, 1.74443880e-02f, 1.85883329e-02f, 1.95694960e-02f, 2.03800747e-02f,
2.10137416e-02f, 2.14657028e-02f, 2.17327470e-02f, 2.18132189e-02f, 2.17071096e-02f, 2.14159688e-02f,
2.09429396e-02f, 2.02927056e-02f, 1.94714591e-02f, 1.84867806e-02f, 1.73476996e-02f, 1.60644888e-02f,
1.46486021e-02f, 1.31126305e-02f, 1.14700918e-02f, 9.73543186e-03f, 7.92379251e-03f, 6.05090462e-03f,
4.13301608e-03f, 2.18669055e-03f, 2.28581333e-04f, -1.72441072e-03f, -3.65572200e-03f, -5.54887990e-03f,
-7.38782061e-03f, -9.15706782e-03f, -1.08417082e-02f, -1.24276657e-02f, -1.39017311e-02f, -1.52516970e-02f,
-1.64664949e-02f, -1.75361817e-02f, -1.84521823e-02f, -1.92071599e-02f, -1.97953056e-02f, -2.02121243e-02f,
-2.04547147e-02f, -2.05216098e-02f, -2.04128534e-02f, -2.01300439e-02f, -1.96761990e-02f, -1.90558123e-02f,
-1.82748056e-02f, -1.73404276e-02f, -1.62612067e-02f, -1.50469098e-02f, -1.37084115e-02f, -1.22575769e-02f,
-1.07072432e-02f, -9.07102930e-03f, -7.36320826e-03f, -5.59869147e-03f, -3.79270806e-03f, -1.96092013e-03f,
-1.19027325e-04f, 1.71713152e-03f, 3.53191747e-03f, 5.30986343e-03f, 7.03590331e-03f, 8.69547560e-03f,
1.02746006e-02f, 1.17601122e-02f, 1.31396009e-02f, 1.44016653e-02f, 1.55359973e-02f, 1.65332483e-02f,
1.73855033e-02f, 1.80859434e-02f, 1.86291305e-02f, 1.90110277e-02f, 1.92289384e-02f, 1.92815880e-02f,
1.91691688e-02f, 1.88932135e-02f, 1.84567183e-02f, 1.78639790e-02f, 1.71206377e-02f, 1.62336473e-02f,
1.52110920e-02f, 1.40622274e-02f, 1.27973510e-02f, 1.14277163e-02f, 9.96541843e-03f, 8.42333112e-03f,
6.81491991e-03f, 5.15420944e-03f, 3.45559138e-03f, 1.73374462e-03f, 3.49154958e-06f, -1.72033182e-03f,
-3.42300908e-03f, -5.09002877e-03f, -6.70728983e-03f, -8.26110592e-03f, -9.73843101e-03f, -1.11269177e-02f,
-1.24149972e-02f, -1.35920411e-02f, -1.46483675e-02f, -1.55754162e-02f, -1.63657097e-02f, -1.70130158e-02f,
-1.75123254e-02f, -1.78599156e-02f, -1.80533642e-02f, -1.80916471e-02f, -1.79749596e-02f, -1.77049199e-02f,
-1.72844059e-02f, -1.67175734e-02f, -1.60098348e-02f, -1.51677846e-02f, -1.41991369e-02f, -1.31126308e-02f,
-1.19180614e-02f, -1.06260158e-02f, -9.24795820e-03f, -7.79599691e-03f, -6.28282689e-03f, -4.72166017e-03f,
-3.12602130e-03f, -1.50971188e-03f, 1.13358008e-04f, 1.72924640e-03f, 3.32419869e-03f, 4.88457483e-03f,
6.39719332e-03f, 7.84928507e-03f, 9.22860374e-03f, 1.05236737e-02f, 1.17237027e-02f, 1.28187631e-02f,
1.37999219e-02f, 1.46591627e-02f, 1.53896448e-02f, 1.59855771e-02f, 1.64423748e-02f, 1.67566705e-02f,
1.69263151e-02f, 1.69504088e-02f, 1.68293192e-02f, 1.65646048e-02f, 1.61591292e-02f, 1.56168830e-02f,
1.49430466e-02f, 1.41438870e-02f, 1.32267343e-02f, 1.21999194e-02f, 1.10726150e-02f, 9.85491162e-03f,
8.55755480e-03f, 7.19198626e-03f, 5.77013714e-03f, 4.30443841e-03f, 2.80758857e-03f, 1.29252809e-03f,
-2.27683018e-04f, -1.74000213e-03f, -3.23153173e-03f, -4.68956247e-03f, -6.10171563e-03f, -7.45612506e-03f,
-8.74136426e-03f, -9.94672023e-03f, -1.10621909e-02f, -1.20785406e-02f, -1.29874795e-02f, -1.37816456e-02f,
-1.44546479e-02f, -1.50012468e-02f, -1.54172106e-02f, -1.56995155e-02f, -1.58462779e-02f, -1.58567437e-02f,
-1.57313825e-02f, -1.54717967e-02f, -1.50807184e-02f, -1.45620705e-02f, -1.39207297e-02f, -1.31627253e-02f,
-1.22950111e-02f, -1.13254027e-02f, -1.02626834e-02f, -9.11627932e-03f, -7.89634415e-03f, -6.61364765e-03f,
-5.27939952e-03f, -3.90525708e-03f, -2.50314317e-03f, -1.08517576e-03f, 3.36418391e-04f, 1.74945190e-03f,
3.14186033e-03f, 4.50178261e-03f, 5.81769448e-03f, 7.07851939e-03f, 8.27365386e-03f, 9.39310326e-03f,
1.04276320e-02f, 1.13686527e-02f, 1.22085379e-02f, 1.29404450e-02f, 1.35585678e-02f, 1.40580446e-02f,
1.44350939e-02f, 1.46869568e-02f, 1.48120098e-02f, 1.48096348e-02f, 1.46804295e-02f, 1.44259781e-02f,
1.40489668e-02f, 1.35531325e-02f, 1.29432014e-02f, 1.22248563e-02f, 1.14046959e-02f, 1.04901687e-02f,
9.48948107e-03f, 8.41156632e-03f, 7.26596347e-03f, 6.06280447e-03f, 4.81257444e-03f, 3.52622627e-03f,
2.21492506e-03f, 8.89983592e-04f, -4.37153812e-04f, -1.75513167e-03f, -3.05265494e-03f, -4.31872834e-03f,
-5.54261874e-03f, -6.71396264e-03f, -7.82302244e-03f, -8.86045250e-03f, -9.81773278e-03f, -1.06869351e-02f,
-1.14610023e-02f, -1.21336754e-02f, -1.26995953e-02f, -1.31543908e-02f, -1.34945718e-02f, -1.37177266e-02f,
-1.38224110e-02f, -1.38082286e-02f, -1.36757739e-02f, -1.34266887e-02f, -1.30635886e-02f, -1.25900369e-02f,
-1.20105709e-02f, -1.13305978e-02f, -1.05563538e-02f, -9.69485926e-03f, -8.75389081e-03f, -7.74181164e-03f,
-6.66761679e-03f, -5.54076187e-03f, -4.37111830e-03f, -3.16893052e-03f, -1.94457115e-03f, -7.08705149e-04f,
5.28079290e-04f, 1.75515870e-03f, 2.96204304e-03f, 4.13848585e-03f, 5.27451557e-03f, 6.36060039e-03f,
7.38755863e-03f, 8.34692530e-03f, 9.23070802e-03f, 1.00316534e-02f, 1.07432528e-02f, 1.13597680e-02f,
1.18763350e-02f, 1.22889283e-02f, 1.25944631e-02f, 1.27907515e-02f, 1.28765994e-02f, 1.28517102e-02f,
1.27167966e-02f, 1.24734480e-02f, 1.21242371e-02f, 1.16725839e-02f, 1.11228281e-02f, 1.04800592e-02f,
9.75022575e-03f, 8.93990424e-03f, 8.05644990e-03f, 7.10768601e-03f, 6.10205625e-03f, 5.04843878e-03f,
3.95605458e-03f, 2.83441418e-03f, 1.69331277e-03f, 5.42568186e-04f, -6.07877124e-04f, -1.74818575e-03f,
-2.86860405e-03f, -3.95962685e-03f, -5.01201657e-03f, -6.01690058e-03f, -6.96589716e-03f, -7.85110424e-03f,
-8.66518231e-03f, -9.40145619e-03f, -1.00540095e-02f, -1.06175123e-02f, -1.10876024e-02f, -1.14606062e-02f,
-1.17337519e-02f, -1.19051415e-02f, -1.19737311e-02f, -1.19393909e-02f, -1.18028751e-02f, -1.15657387e-02f,
-1.12305357e-02f, -1.08005049e-02f, -1.02797519e-02f, -9.67318729e-03f, -8.98632838e-03f, -8.22543877e-03f,
-7.39737215e-03f, -6.50950785e-03f, -5.56975395e-03f, -4.58632875e-03f, -3.56792674e-03f, -2.52340823e-03f,
-1.46183597e-03f, -3.92391156e-04f, 6.75701684e-04f, 1.73331709e-03f, 2.77141530e-03f, 3.78118353e-03f,
4.75407672e-03f, 5.68193005e-03f, 6.55698994e-03f, 7.37195674e-03f, 8.12013345e-03f, 8.79539509e-03f,
9.39225030e-03f, 9.90597190e-03f, 1.03324819e-02f, 1.06685242e-02f, 1.09116177e-02f, 1.10600973e-02f,
1.11130936e-02f, 1.10705983e-02f, 1.09333788e-02f, 1.07030445e-02f, 1.03819949e-02f, 9.97335332e-03f,
9.48107464e-03f, 8.90968434e-03f, 8.26449756e-03f, 7.55132972e-03f, 6.77664458e-03f, 5.94731079e-03f,
5.07073939e-03f, 4.15462520e-03f, 3.20700306e-03f, 2.23616222e-03f, 1.25050340e-03f, 2.58592562e-04f,
-7.31105992e-04f, -1.71003848e-03f, -2.66991104e-03f, -3.60254805e-03f, -4.50009626e-03f, -5.35500152e-03f,
-6.16013372e-03f, -6.90880302e-03f, -7.59484887e-03f, -8.21267759e-03f, -8.75730297e-03f, -9.22437062e-03f,
-9.61022818e-03f, -9.91196266e-03f, -1.01273334e-02f, -1.02549146e-02f, -1.02939949e-02f, -1.02446487e-02f,
-1.01077102e-02f, -9.88473930e-03f, -9.57804506e-03f, -9.19065219e-03f, -8.72623997e-03f, -8.18914967e-03f,
-7.58431711e-03f, -6.91725624e-03f, -6.19393169e-03f, -5.42085678e-03f, -4.60486090e-03f, -3.75314479e-03f,
-2.87318400e-03f, -1.97263669e-03f, -1.05936420e-03f, -1.41184633e-04f, 7.73935206e-04f, 1.67818033e-03f,
2.56387121e-03f, 3.42348245e-03f, 4.24972968e-03f, 5.03575853e-03f, 5.77493594e-03f, 6.46117800e-03f,
7.08885263e-03f, 7.65282423e-03f, 8.14856911e-03f, 8.57214716e-03f, 8.92027019e-03f, 9.19029194e-03f,
9.38027470e-03f, 9.48895025e-03f, 9.51578399e-03f, 9.46091429e-03f, 9.32518284e-03f, 9.11016180e-03f,
8.81806173e-03f, 8.45171440e-03f, 8.01466407e-03f, 7.51094572e-03f, 6.94521826e-03f, 6.32261691e-03f,
5.64875255e-03f, 4.92963671e-03f, 4.17165548e-03f, 3.38149573e-03f, 2.56610069e-03f, 1.73253154e-03f,
8.88083719e-04f, 4.00140997e-05f, -8.04377007e-04f, -1.63786496e-03f, -2.45336348e-03f, -3.24394120e-03f,
-4.00297149e-03f, -4.72406012e-03f, -5.40122825e-03f, -6.02886353e-03f, -6.60184564e-03f, -7.11547043e-03f,
-7.56567204e-03f, -7.94886879e-03f, -8.26207948e-03f, -8.50298133e-03f, -8.66984745e-03f, -8.76158174e-03f,
-8.77778600e-03f, -8.71866903e-03f, -8.58510255e-03f, -8.37858953e-03f, -8.10125332e-03f, -7.75580633e-03f,
-7.34555568e-03f, -6.87431135e-03f, -6.34642360e-03f, -5.76669768e-03f, -5.14031767e-03f, -4.47294897e-03f,
-3.77043291e-03f, -3.03903272e-03f, -2.28511456e-03f, -1.51527024e-03f, -7.36178447e-04f, 4.54225562e-05f,
8.22859022e-04f, 1.58943109e-03f, 2.33866278e-03f, 3.06420334e-03f, 3.75990680e-03f, 4.42002538e-03f,
5.03901750e-03f, 5.61180111e-03f, 6.13366220e-03f, 6.60043272e-03f, 7.00831931e-03f, 7.35414500e-03f,
7.63524392e-03f, 7.84953557e-03f, 7.99547645e-03f, 8.07218955e-03f, 8.07933095e-03f, 8.01721906e-03f,
7.88666864e-03f, 7.68919343e-03f, 7.42679720e-03f, 7.10202788e-03f, 6.71802523e-03f, 6.27832934e-03f,
5.78702253e-03f, 5.24853339e-03f, 4.66776048e-03f, 4.04985033e-03f, 3.40032055e-03f, 2.72486114e-03f,
2.02943382e-03f, 1.32005555e-03f, 6.02922229e-04f, -1.15810889e-04f, -8.29962401e-04f, -1.53344695e-03f,
-2.22024937e-03f, -2.88460828e-03f, -3.52090915e-03f, -4.12386103e-03f, -4.68844782e-03f, -5.21000854e-03f,
-5.68433641e-03f, -6.10753890e-03f, -6.47629357e-03f, -6.78770430e-03f, -7.03936807e-03f, -7.22944790e-03f,
-7.35662441e-03f, -7.42012069e-03f, -7.41971164e-03f, -7.35573757e-03f, -7.22905724e-03f, -7.04107429e-03f,
-6.79370122e-03f, -6.48940038e-03f, -6.13102314e-03f, -5.72192873e-03f, -5.26590521e-03f, -4.76707464e-03f,
-4.22993214e-03f, -3.65930825e-03f, -3.06022345e-03f, -2.43797793e-03f, -1.79803310e-03f, -1.14594988e-03f,
-4.87389180e-04f, 1.71985886e-04f, 8.26505744e-04f, 1.47057292e-03f, 2.09875564e-03f, 2.70572827e-03f,
3.28638788e-03f, 3.83592350e-03f, 4.34975506e-03f, 4.82368759e-03f, 5.25383132e-03f, 5.63677359e-03f,
5.96942535e-03f, 6.24924092e-03f, 6.47405650e-03f, 6.64226721e-03f, 6.75269253e-03f, 6.80469430e-03f,
6.79815717e-03f, 6.73340631e-03f, 6.61130455e-03f, 6.43322863e-03f, 6.20094526e-03f, 5.91677710e-03f,
5.58340169e-03f, 5.20393196e-03f, 4.78187614e-03f, 4.32106320e-03f, 3.82565711e-03f, 3.30005613e-03f,
2.74895362e-03f, 2.17719303e-03f, 1.58978015e-03f, 9.91844057e-04f, 3.88540330e-04f, -2.14916878e-04f,
-8.13361192e-04f, -1.40168257e-03f, -1.97489740e-03f, -2.52818059e-03f, -3.05688539e-03f, -3.55662656e-03f,
-4.02326574e-03f, -4.45296958e-03f, -4.84228652e-03f, -5.18803438e-03f, -5.48755315e-03f, -5.73848611e-03f,
-5.93891991e-03f, -6.08745626e-03f, -6.18305471e-03f, -6.22520840e-03f, -6.21382472e-03f, -6.14928419e-03f,
-6.03244633e-03f, -5.86455879e-03f, -5.64736180e-03f, -5.38296537e-03f, -5.07389363e-03f, -4.72301916e-03f,
-4.33361321e-03f, -3.90915761e-03f, -3.45353173e-03f, -2.97077347e-03f, -2.46516689e-03f, -1.94119584e-03f,
-1.40340595e-03f, -8.56512644e-04f, -3.05232133e-04f, 2.45691031e-04f, 7.91538060e-04f, 1.32763724e-03f,
1.84949345e-03f, 2.35267547e-03f, 2.83299113e-03f, 3.28645035e-03f, 3.70931698e-03f, 4.09812665e-03f,
4.44973511e-03f, 4.76135341e-03f, 5.03050354e-03f, 5.25513155e-03f, 5.43353323e-03f, 5.56447821e-03f,
5.64705544e-03f, 5.68083601e-03f, 5.66583437e-03f, 5.60238431e-03f, 5.49135375e-03f, 5.33391723e-03f,
5.13169207e-03f, 4.88664671e-03f, 4.60113202e-03f, 4.27780860e-03f, 3.91964875e-03f, 3.52989866e-03f,
3.11212090e-03f, 2.66999053e-03f, 2.20744344e-03f, 1.72859110e-03f, 1.23756351e-03f, 7.38678150e-04f,
2.36236760e-04f, -2.65462378e-04f, -7.62072815e-04f, -1.24943395e-03f, -1.72337956e-03f, -2.17993754e-03f,
-2.61530935e-03f, -3.02588421e-03f, -3.40825196e-03f, -3.75935360e-03f, -4.07630652e-03f, -4.35660760e-03f,
-4.59808398e-03f, -4.79883718e-03f, -4.95743843e-03f, -5.07271280e-03f, -5.14393833e-03f, -5.17077608e-03f,
-5.15318763e-03f, -5.09164480e-03f, -4.98686807e-03f, -4.84002285e-03f, -4.65260103e-03f, -4.42642977e-03f,
-4.16366446e-03f, -3.86678300e-03f, -3.53847751e-03f, -3.18177292e-03f, -2.79986847e-03f, -2.39618401e-03f,
-1.97429017e-03f, -1.53788782e-03f, -1.09083664e-03f, -6.36973406e-04f, -1.80264329e-04f, 2.75399352e-04f,
7.26104424e-04f, 1.16802598e-03f, 1.59744046e-03f, 2.01073128e-03f, 2.40446819e-03f, 2.77538562e-03f,
3.12044615e-03f, 3.43683203e-03f, 3.72202393e-03f, 3.97374850e-03f, 4.19002854e-03f, 4.36925418e-03f,
4.51006070e-03f, 4.61152219e-03f, 4.67293053e-03f, 4.69404975e-03f, 4.67490366e-03f, 4.61589307e-03f,
4.51775252e-03f, 4.38154991e-03f, 4.20868532e-03f, 4.00082377e-03f, 3.75997274e-03f, 3.48836415e-03f,
3.18851504e-03f, 2.86314343e-03f, 2.51519536e-03f, 2.14776743e-03f, 1.76411750e-03f, 1.36763070e-03f,
9.61751835e-04f, 5.50052405e-04f, 1.36015058e-04f, -2.76720943e-04f, -6.84698152e-04f, -1.08442387e-03f,
-1.47253691e-03f, -1.84578853e-03f, -2.20105818e-03f, -2.53544188e-03f, -2.84616998e-03f, -3.13076058e-03f,
-3.38689733e-03f, -3.61260297e-03f, -3.80606518e-03f, -3.96589267e-03f, -4.09087232e-03f, -4.18013173e-03f,
-4.23315965e-03f, -4.24970953e-03f, -4.22981560e-03f, -4.17392494e-03f, -4.08267808e-03f, -3.95709577e-03f,
-3.79845153e-03f, -3.60829670e-03f, -3.38844338e-03f, -3.14094669e-03f, -2.86809742e-03f, -2.57237442e-03f,
-2.25643831e-03f, -1.92312165e-03f, -1.57535841e-03f, -1.21624129e-03f, -8.48868370e-04f, -4.76457354e-04f,
-1.02227062e-04f, 2.70659894e-04f, 6.38948957e-04f, 9.99596773e-04f, 1.34950884e-03f, 1.68579412e-03f,
2.00565112e-03f, 2.30644176e-03f, 2.58570970e-03f, 2.84121989e-03f, 3.07087670e-03f, 3.27296771e-03f,
3.44584695e-03f, 3.58825627e-03f, 3.69915439e-03f, 3.77779535e-03f, 3.82369144e-03f, 3.83666312e-03f,
3.81678507e-03f, 3.76444486e-03f, 3.68027755e-03f, 3.56519883e-03f, 3.42038694e-03f, 3.24725992e-03f,
3.04745181e-03f, 2.82287635e-03f, 2.57555610e-03f, 2.30778342e-03f, 2.02193938e-03f, 1.72060684e-03f,
1.40642226e-03f, 1.08218540e-03f, 7.50708128e-04f, 4.14852040e-04f, 7.75468400e-05f, -2.58336678e-04f,
-5.89954675e-04f, -9.14464553e-04f, -1.22917409e-03f, -1.53142096e-03f, -1.81874942e-03f, -2.08875765e-03f,
-2.33925204e-03f, -2.56824046e-03f, -2.77387464e-03f, -2.95457151e-03f, -3.10891286e-03f, -3.23576957e-03f,
-3.33422309e-03f, -3.40361730e-03f, -3.44352432e-03f, -3.45380945e-03f, -3.43454926e-03f, -3.38612359e-03f,
-3.30910238e-03f, -3.20434413e-03f, -3.07289782e-03f, -2.91605448e-03f, -2.73534798e-03f, -2.53242439e-03f,
-2.30918427e-03f, -2.06766744e-03f, -1.81002532e-03f, -1.53857461e-03f, -1.25572213e-03f, -9.63956082e-04f,
-6.65804929e-04f, -3.63875198e-04f, -6.07622519e-05f, 2.40955893e-04f, 5.38685581e-04f, 8.29936911e-04f,
1.11224977e-03f, 1.38328230e-03f, 1.64080028e-03f, 1.88265574e-03f, 2.10694670e-03f, 2.31181334e-03f,
2.49567938e-03f, 2.65707799e-03f, 2.79477329e-03f, 2.90778929e-03f, 2.99526804e-03f, 3.05666792e-03f,
3.09159989e-03f, 3.09996074e-03f, 3.08183486e-03f, 3.03757314e-03f, 2.96768997e-03f, 2.87296391e-03f,
2.75438271e-03f, 2.61305979e-03f, 2.45041225e-03f, 2.26792371e-03f, 2.06728115e-03f, 1.85034398e-03f,
1.61901728e-03f, 1.37543970e-03f, 1.12168235e-03f, 8.60048928e-04f, 5.92781787e-04f, 3.22217129e-04f,
5.06437951e-05f, -2.19547817e-04f, -4.86132510e-04f, -7.46817210e-04f, -9.99443627e-04f, -1.24188233e-03f,
-1.47217245e-03f, -1.68839648e-03f, -1.88883105e-03f, -2.07184785e-03f, -2.23601745e-03f, -2.38006048e-03f,
-2.50288118e-03f, -2.60358292e-03f, -2.68144174e-03f, -2.73595307e-03f, -2.76679595e-03f, -2.77388624e-03f,
-2.75729794e-03f, -2.71735188e-03f, -2.65451985e-03f, -2.56952130e-03f, -2.46319204e-03f, -2.33660956e-03f,
-2.19096493e-03f, -2.02765268e-03f, -1.84815939e-03f, -1.65412932e-03f, -1.44731483e-03f, -1.22956426e-03f,
-1.00280075e-03f, -7.69022668e-04f, -5.30268510e-04f, -2.88586883e-04f, -4.60956253e-05f, 1.95186584e-04f,
4.33161045e-04f, 6.65873263e-04f, 8.91328897e-04f, 1.10770620e-03f, 1.31316296e-03f, 1.50610067e-03f,
1.68489795e-03f, 1.84814923e-03f, 1.99458512e-03f, 2.12304250e-03f, 2.23258384e-03f, 2.32237953e-03f,
2.39181962e-03f, 2.44043032e-03f, 2.46796938e-03f, 2.47430968e-03f, 2.45957831e-03f, 2.42401283e-03f,
2.36808884e-03f, 2.29238471e-03f, 2.19773378e-03f, 2.08501666e-03f, 1.95534528e-03f, 1.80993801e-03f,
1.65014053e-03f, 1.47739854e-03f, 1.29329221e-03f, 1.09944593e-03f, 8.97596290e-04f, 6.89486470e-04f,
4.76967544e-04f, 2.61847472e-04f, 4.59979030e-05f, -1.68770369e-04f, -3.80612759e-04f, -5.87744421e-04f,
-7.88452414e-04f, -9.81081718e-04f, -1.16402219e-03f, -1.33580811e-03f, -1.49504859e-03f, -1.64047131e-03f,
-1.77095587e-03f, -1.88548340e-03f, -1.98318254e-03f, -2.06335667e-03f, -2.12544333e-03f, -2.16903096e-03f,
-2.19389731e-03f, -2.19994674e-03f, -2.18726700e-03f, -2.15609170e-03f, -2.10683457e-03f, -2.04002290e-03f,
-1.95633800e-03f, -1.85665258e-03f, -1.74189023e-03f, -1.61313165e-03f, -1.47159921e-03f, -1.31856217e-03f,
-1.15541374e-03f, -9.83590913e-04f, -8.04645529e-04f, -6.20138811e-04f, -4.31664744e-04f, -2.40859759e-04f,
-4.93718861e-05f, 1.41183920e-04f, 3.29184443e-04f, 5.13049545e-04f, 6.91252710e-04f, 8.62329668e-04f,
1.02486089e-03f, 1.17753306e-03f, 1.31912530e-03f, 1.44851584e-03f, 1.56468190e-03f, 1.66675270e-03f,
1.75393226e-03f, 1.82562545e-03f, 1.88129935e-03f, 1.92062935e-03f, 1.94336360e-03f, 1.94946381e-03f,
1.93898469e-03f, 1.91211060e-03f, 1.86925265e-03f, 1.81081128e-03f, 1.73745800e-03f, 1.64989979e-03f,
1.54896085e-03f, 1.43565148e-03f, 1.31095906e-03f, 1.17607031e-03f, 1.03219054e-03f, 8.80596006e-04f,
7.22634695e-04f, 5.59715925e-04f, 3.93223384e-04f, 2.24602808e-04f, 5.53223372e-05f, -1.13204206e-04f,
-2.79527886e-04f, -4.42273875e-04f, -6.00090187e-04f, -7.51646708e-04f, -8.95738714e-04f, -1.03117771e-03f,
-1.15687770e-03f, -1.27187587e-03f, -1.37523688e-03f, -1.46618576e-03f, -1.54403989e-03f, -1.60825931e-03f,
-1.65836399e-03f, -1.69405240e-03f, -1.71514183e-03f, -1.72154028e-03f, -1.71331327e-03f, -1.69063272e-03f,
-1.65381037e-03f, -1.60326168e-03f, -1.53948863e-03f, -1.46318779e-03f, -1.37503217e-03f, -1.27591969e-03f,
-1.16672308e-03f, -1.04846883e-03f, -9.22232848e-04f, -7.89108246e-04f, -6.50329911e-04f, -5.07057241e-04f,
-3.60579584e-04f, -2.12138548e-04f, -6.30166060e-05f, 8.55107333e-05f, 2.32212191e-04f, 3.75851456e-04f,
5.15213418e-04f, 6.49182851e-04f, 7.76642588e-04f, 8.96585347e-04f, 1.00803198e-03f, 1.11010987e-03f,
1.20203475e-03f, 1.28308439e-03f, 1.35268783e-03f, 1.41030687e-03f, 1.45558664e-03f, 1.48819124e-03f,
1.50798717e-03f, 1.51486502e-03f, 1.50888467e-03f, 1.49022209e-03f, 1.45906012e-03f, 1.41583581e-03f,
1.36095722e-03f, 1.29499749e-03f, 1.21859138e-03f, 1.13249419e-03f, 1.03745344e-03f, 9.34384957e-04f,
8.24209226e-04f, 7.07921644e-04f, 5.86535461e-04f, 4.61118668e-04f, 3.32797940e-04f, 2.02615430e-04f,
7.17560319e-05f, -5.87215139e-05f, -1.87700771e-04f, -3.14093799e-04f, -4.36855019e-04f, -5.54982470e-04f,
-6.67514567e-04f, -7.73539543e-04f, -8.72216549e-04f, -9.62754726e-04f, -1.04446836e-03f, -1.11673823e-03f,
-1.17901020e-03f, -1.23084835e-03f, -1.27191263e-03f, -1.30189831e-03f, -1.32066941e-03f, -1.32816613e-03f,
-1.32437715e-03f, -1.30944714e-03f, -1.28360668e-03f, -1.24710492e-03f, -1.20038313e-03f, -1.14391116e-03f,
-1.07822250e-03f, -1.00394823e-03f, -9.21799577e-04f, -8.32520513e-04f, -7.36916195e-04f, -6.35853312e-04f,
-5.30218398e-04f, -4.20950684e-04f, -3.08981087e-04f, -1.95310152e-04f, -8.08721649e-05f, 3.33481785e-05f,
1.46369769e-04f, 2.57271691e-04f, 3.65123878e-04f, 4.69053422e-04f, 5.68205019e-04f, 6.61777482e-04f,
7.49035427e-04f, 8.29295760e-04f, 9.01919035e-04f, 9.66370937e-04f, 1.02218113e-03f, 1.06892877e-03f,
1.10630552e-03f, 1.13406370e-03f, 1.15204451e-03f, 1.16019052e-03f, 1.15848806e-03f, 1.14706630e-03f,
1.12606449e-03f, 1.09574589e-03f, 1.05645362e-03f, 1.00859266e-03f, 9.52601766e-04f, 8.89057609e-04f,
8.18535938e-04f, 7.41697389e-04f, 6.59241262e-04f, 5.71884368e-04f, 4.80414698e-04f, 3.85677252e-04f,
2.88406796e-04f, 1.89536836e-04f, 8.98491837e-05f, -9.79888746e-06f, -1.08531507e-04f, -2.05575498e-04f,
-3.00092231e-04f, -3.91327952e-04f, -4.78537671e-04f, -5.61003964e-04f, -6.38090388e-04f, -7.09209697e-04f,
-7.73747838e-04f, -8.31297964e-04f, -8.81364804e-04f, -9.23641236e-04f, -9.57793553e-04f, -9.83624619e-04f,
-1.00098424e-03f, -1.00979404e-03f, -1.01003977e-03f, -1.00180772e-03f, -9.85219816e-04f, -9.60506778e-04f,
-9.27905874e-04f, -8.87790902e-04f, -8.40553609e-04f, -7.86632276e-04f, -7.26559669e-04f, -6.60872173e-04f,
-5.90177860e-04f, -5.15099219e-04f, -4.36341554e-04f, -3.54526447e-04f, -2.70436804e-04f, -1.84757234e-04f,
-9.82406108e-05f, -1.16228429e-05f, 7.44116225e-05f, 1.59099493e-04f, 2.41739119e-04f, 3.21707034e-04f,
3.98276352e-04f, 4.70887555e-04f, 5.38973046e-04f, 6.01940918e-04f, 6.59368174e-04f, 7.10783030e-04f,
7.55802336e-04f, 7.94127086e-04f, 8.25478803e-04f, 8.49639386e-04f, 8.66487952e-04f, 8.75935969e-04f,
8.77948893e-04f, 8.72611584e-04f, 8.59994515e-04f, 8.40271458e-04f, 8.13696181e-04f, 7.80491851e-04f,
7.41053306e-04f, 6.95727202e-04f, 6.44936090e-04f, 5.89181503e-04f, 5.28946796e-04f, 4.64790448e-04f,
3.97272420e-04f, 3.27000597e-04f, 2.54559578e-04f, 1.80597276e-04f, 1.05760446e-04f, 3.06209047e-05f,
-4.41172003e-05f, -1.17884760e-04f, -1.90032814e-04f, -2.60000039e-04f, -3.27213235e-04f, -3.91110007e-04f,
-4.51226928e-04f, -5.07042112e-04f, -5.58194586e-04f, -6.04189222e-04f, -6.44816381e-04f, -6.79653847e-04f,
-7.08557315e-04f, -7.31282579e-04f, -7.47702169e-04f, -7.57731688e-04f, -7.61359812e-04f, -7.58589885e-04f,
-7.49503361e-04f, -7.34226582e-04f, -7.12935677e-04f, -6.85882645e-04f, -6.53307567e-04f, -6.15569562e-04f,
-5.72978650e-04f, -5.25977418e-04f, -4.74963705e-04f, -4.20426590e-04f, -3.62819514e-04f, -3.02647353e-04f,
-2.40497241e-04f, -1.76810216e-04f, -1.12210871e-04f, -4.71976690e-05f, 1.76624641e-05f, 8.18440593e-05f,
1.44804207e-04f, 2.06021410e-04f, 2.65025446e-04f, 3.21327783e-04f, 3.74487008e-04f, 4.24062432e-04f,
4.69715655e-04f, 5.11042943e-04f, 5.47794530e-04f, 5.79655168e-04f, 6.06446384e-04f, 6.27934546e-04f,
6.44010762e-04f, 6.54614698e-04f, 6.59636425e-04f, 6.59157826e-04f, 6.53158826e-04f, 6.41794049e-04f,
6.25154916e-04f, 6.03470855e-04f, 5.76917242e-04f, 5.45789736e-04f, 5.10368292e-04f, 4.70998661e-04f,
4.28021656e-04f, 3.81834126e-04f, 3.32863326e-04f, 2.81489629e-04f, 2.28231239e-04f, 1.73484261e-04f,
1.17756607e-04f, 6.14881351e-05f, 5.17778269e-06f, -5.07352374e-05f, -1.05745987e-04f, -1.59454662e-04f,
-2.11394268e-04f, -2.61151905e-04f, -3.08351703e-04f, -3.52598590e-04f, -3.93545002e-04f, -4.30916147e-04f,
-4.64387406e-04f, -4.93756593e-04f, -5.18755281e-04f, -5.39265493e-04f, -5.55137934e-04f, -5.66259303e-04f,
-5.72606783e-04f, -5.74140344e-04f, -5.70903292e-04f, -5.62934741e-04f, -5.50388898e-04f, -5.33351962e-04f,
-5.12028510e-04f, -4.86612455e-04f, -4.57392981e-04f, -4.24578939e-04f, -3.88503808e-04f, -3.49487518e-04f,
-3.07895836e-04f, -2.64036522e-04f, -2.18356445e-04f, -1.71198300e-04f, -1.22998901e-04f, -7.41392080e-05f,
-2.50280393e-05f, 2.38852047e-05f, 7.22663332e-05f, 1.19659647e-04f, 1.65718806e-04f, 2.10055385e-04f,
2.52324173e-04f, 2.92190427e-04f, 3.29337577e-04f, 3.63510150e-04f, 3.94385715e-04f, 4.21803288e-04f,
4.45519433e-04f, 4.65391876e-04f, 4.81270460e-04f, 4.93057625e-04f, 5.00688030e-04f, 5.04121708e-04f,
5.03379627e-04f, 4.98485604e-04f, 4.89499566e-04f, 4.76539317e-04f, 4.59760023e-04f, 4.39274612e-04f,
4.15334876e-04f, 3.88103885e-04f, 3.57902146e-04f, 3.24908089e-04f, 2.89490480e-04f, 2.51922687e-04f,
2.12512220e-04f, 1.71637404e-04f, 1.29609890e-04f, 8.67866183e-05f, 4.35312276e-05f, 1.98808307e-07f,
-4.28589070e-05f, -8.52865394e-05f, -1.26765698e-04f, -1.66922292e-04f, -2.05456466e-04f, -2.42095652e-04f,
-2.76487494e-04f, -3.08425602e-04f, -3.37638832e-04f, -3.63923042e-04f, -3.87022898e-04f, -4.06875144e-04f,
-4.23245129e-04f, -4.36071615e-04f, -4.45236993e-04f, -4.50724682e-04f, -4.52491230e-04f, -4.50548104e-04f,
-4.44936790e-04f, -4.35725612e-04f, -4.22987381e-04f, -4.06882738e-04f, -3.87548587e-04f, -3.65123104e-04f,
-3.39860288e-04f, -3.11947486e-04f, -2.81618569e-04f, -2.49166817e-04f, -2.14824344e-04f, -1.78876370e-04f,
-1.41684861e-04f, -1.03466427e-04f, -6.45996088e-05f, -2.53738050e-05f, 1.39035721e-05f, 5.28977578e-05f,
9.13010773e-05f, 1.28809554e-04f, 1.65139924e-04f, 2.00005346e-04f, 2.33095696e-04f, 2.64232233e-04f,
2.93070034e-04f, 3.19508024e-04f, 3.43252648e-04f, 3.64165224e-04f, 3.82074036e-04f, 3.96868082e-04f,
4.08408250e-04f, 4.16671952e-04f, 4.21556517e-04f, 4.23035822e-04f, 4.21172111e-04f, 4.15928838e-04f,
4.07377025e-04f, 3.95568598e-04f, 3.80628038e-04f, 3.62729177e-04f, 3.41921136e-04f, 3.18489958e-04f,
2.92497406e-04f, 2.64266550e-04f, 2.33955571e-04f, 2.01809261e-04f, 1.68092145e-04f, 1.33141461e-04f,
9.71043460e-05f, 6.03452880e-05f, 2.31264055e-05f, -1.43105089e-05f, -5.15607083e-05f, -8.84833364e-05f,
-1.24679461e-04f, -1.59910519e-04f, -1.93952723e-04f, -2.26496145e-04f, -2.57307566e-04f, -2.86175538e-04f,
-3.12853472e-04f, -3.37140613e-04f, -3.58914997e-04f, -3.77932329e-04f, -3.94117065e-04f, -4.07317063e-04f,
-4.17422308e-04f, -4.24419479e-04f, -4.28161231e-04f, -4.28700484e-04f, -4.26016659e-04f, -4.20088126e-04f,
-4.11009185e-04f, -3.98835037e-04f, -3.83585114e-04f, -3.65493072e-04f, -3.44616197e-04f, -3.21064387e-04f,
-2.95119418e-04f, -2.66863117e-04f, -2.36549174e-04f, -2.04391686e-04f, -1.70585806e-04f, -1.35432614e-04f,
-9.91006984e-05f, -6.19152828e-05f, -2.41012311e-05f, 1.40621144e-05f, 5.22867497e-05f, 9.03199843e-05f,
1.27917614e-04f, 1.64740292e-04f, 2.00634478e-04f, 2.35261402e-04f, 2.68377430e-04f, 2.99818019e-04f,
3.29273634e-04f, 3.56562766e-04f, 3.81532332e-04f, 4.03948113e-04f, 4.23655375e-04f, 4.40488930e-04f,
4.54376777e-04f, 4.65137195e-04f, 4.72679704e-04f, 4.77014073e-04f, 4.77982201e-04f, 4.75625277e-04f,
4.69878507e-04f, 4.60802987e-04f, 4.48367418e-04f, 4.32641679e-04f, 4.13709630e-04f, 3.91634147e-04f,
3.66512902e-04f, 3.38481392e-04f, 3.07634938e-04f, 2.74189182e-04f, 2.38229594e-04f, 1.99985879e-04f,
1.59632210e-04f, 1.17351364e-04f, 7.33404728e-05f, 2.78844831e-05f, -1.89099461e-05f, -6.67343638e-05f,
-1.15367449e-04f, -1.64649983e-04f, -2.14224348e-04f, -2.64019844e-04f, -3.13654244e-04f, -3.62990333e-04f,
-4.11800705e-04f, -4.59821928e-04f, -5.06946486e-04f, -5.52847863e-04f, -5.97397068e-04f, -6.40454770e-04f,
-6.81765968e-04f, -7.21210131e-04f, -7.58634477e-04f, -7.93939572e-04f, -8.26964876e-04f, -8.57585335e-04f,
-8.85733438e-04f, -9.11351007e-04f, -9.34300512e-04f, -9.54617442e-04f, -9.72159416e-04f, -9.87012089e-04f,
-9.99095133e-04f, -1.00846242e-03f, -1.01506022e-03f, -1.01897105e-03f, -1.02021427e-03f, -1.01887259e-03f,
-1.01497557e-03f, -1.00861358e-03f, -9.99877741e-04f, -9.88823136e-04f, -9.75617693e-04f, -9.60303769e-04f,
-9.43035535e-04f, -9.23922797e-04f, -9.03105429e-04f, -8.80708716e-04f, -8.56853281e-04f, -8.31685264e-04f,
-8.05348207e-04f, -7.77961627e-04f, -7.49713086e-04f, -7.20674604e-04f, -6.91032783e-04f, -6.60888020e-04f,
-6.30372917e-04f, -5.99673349e-04f, -5.68830563e-04f, -5.38013304e-04f, -5.07353303e-04f, -4.76915043e-04f,
-4.46832926e-04f, -4.17179291e-04f, -3.88083307e-04f, -3.59575024e-04f, -3.31820735e-04f, -3.04804303e-04f,
-2.78616041e-04f, -2.53335964e-04f, -2.28986996e-04f, -2.05619529e-04f, -1.83318449e-04f, -1.61979425e-04f,
-1.41791423e-04f, -1.22648816e-04f, -1.04625498e-04f, -8.77122910e-05f, -7.18653457e-05f, -5.71787106e-05f,
-4.34807639e-05f, -3.09618857e-05f, -1.94074401e-05f, -8.88017971e-06f, 6.09625220e-07f, 9.14020334e-06f,
1.67805558e-05f, 2.35369965e-05f, 2.94278194e-05f, 3.45049751e-05f, 3.88373828e-05f, 4.24291966e-05f,
4.53445665e-05f, 4.76965834e-05f, 4.93395567e-05f, 5.05392111e-05f, 5.12257065e-05f, 5.14579340e-05f,
5.12651750e-05f, 5.07312551e-05f, 4.98486765e-05f, 4.87082573e-05f, 4.73439631e-05f, 4.56740817e-05f,
4.38653618e-05f, 4.19399075e-05f, 3.99125668e-05f, 3.77616021e-05f, 3.56135997e-05f, 3.33554815e-05f,
3.11656899e-05f, 2.89038150e-05f, 2.67281634e-05f, 2.46192762e-05f, 2.24899205e-05f, 2.04698700e-05f,
1.84927655e-05f, 1.66762886e-05f, 1.49393771e-05f, 1.32258081e-05f, 1.16985586e-05f, 1.01874391e-05f,
8.99882100e-06f, 7.61267073e-06f, 6.57702907e-06f, 5.59829210e-06f, 4.27698546e-06f, 1.03248674e-05f,
};

View file

@ -0,0 +1,201 @@
//
// AudioSRC_avx2.cpp
// libraries/audio/src
//
// Created by Ken Cooke on 6/5/16.
// Copyright 2016 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 defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || defined(__x86_64__)
#include <assert.h>
#include <immintrin.h>
#include "../AudioSRC.h"
#ifndef __AVX2__
#error Must be compiled with /arch:AVX2 or -mavx2 -mfma.
#endif
// high/low part of int64_t
#define LO32(a) ((uint32_t)(a))
#define HI32(a) ((int32_t)((a) >> 32))
int AudioSRC::multirateFilter1_AVX2(const float* input0, float* output0, int inputFrames) {
int outputFrames = 0;
assert(_numTaps % 8 == 0); // SIMD8
if (_step == 0) { // rational
int32_t i = HI32(_offset);
while (i < inputFrames) {
const float* c0 = &_polyphaseFilter[_numTaps * _phase];
__m256 acc0 = _mm256_setzero_ps();
for (int j = 0; j < _numTaps; j += 8) {
//float coef = c0[j];
__m256 coef0 = _mm256_loadu_ps(&c0[j]);
//acc += input[i + j] * coef;
acc0 = _mm256_fmadd_ps(_mm256_loadu_ps(&input0[i + j]), coef0, acc0);
}
// horizontal sum
acc0 = _mm256_hadd_ps(acc0, acc0);
__m128 t0 = _mm_add_ps(_mm256_castps256_ps128(acc0), _mm256_extractf128_ps(acc0, 1));
t0 = _mm_add_ps(t0, _mm_movehdup_ps(t0));
_mm_store_ss(&output0[outputFrames], t0);
outputFrames += 1;
i += _stepTable[_phase];
if (++_phase == _upFactor) {
_phase = 0;
}
}
_offset = (int64_t)(i - inputFrames) << 32;
} else { // irrational
while (HI32(_offset) < inputFrames) {
int32_t i = HI32(_offset);
uint32_t f = LO32(_offset);
uint32_t phase = f >> SRC_FRACBITS;
float ftmp = (f & SRC_FRACMASK) * QFRAC_TO_FLOAT;
const float* c0 = &_polyphaseFilter[_numTaps * (phase + 0)];
const float* c1 = &_polyphaseFilter[_numTaps * (phase + 1)];
__m256 acc0 = _mm256_setzero_ps();
__m256 frac = _mm256_broadcast_ss(&ftmp);
for (int j = 0; j < _numTaps; j += 8) {
//float coef = c0[j] + frac * (c1[j] - c0[j]);
__m256 coef0 = _mm256_loadu_ps(&c0[j]);
__m256 coef1 = _mm256_loadu_ps(&c1[j]);
coef1 = _mm256_sub_ps(coef1, coef0);
coef0 = _mm256_fmadd_ps(coef1, frac, coef0);
//acc += input[i + j] * coef;
acc0 = _mm256_fmadd_ps(_mm256_loadu_ps(&input0[i + j]), coef0, acc0);
}
// horizontal sum
acc0 = _mm256_hadd_ps(acc0, acc0);
__m128 t0 = _mm_add_ps(_mm256_castps256_ps128(acc0), _mm256_extractf128_ps(acc0, 1));
t0 = _mm_add_ps(t0, _mm_movehdup_ps(t0));
_mm_store_ss(&output0[outputFrames], t0);
outputFrames += 1;
_offset += _step;
}
_offset -= (int64_t)inputFrames << 32;
}
_mm256_zeroupper();
return outputFrames;
}
int AudioSRC::multirateFilter2_AVX2(const float* input0, const float* input1, float* output0, float* output1, int inputFrames) {
int outputFrames = 0;
assert(_numTaps % 8 == 0); // SIMD8
if (_step == 0) { // rational
int32_t i = HI32(_offset);
while (i < inputFrames) {
const float* c0 = &_polyphaseFilter[_numTaps * _phase];
__m256 acc0 = _mm256_setzero_ps();
__m256 acc1 = _mm256_setzero_ps();
for (int j = 0; j < _numTaps; j += 8) {
//float coef = c0[j];
__m256 coef0 = _mm256_loadu_ps(&c0[j]);
//acc += input[i + j] * coef;
acc0 = _mm256_fmadd_ps(_mm256_loadu_ps(&input0[i + j]), coef0, acc0);
acc1 = _mm256_fmadd_ps(_mm256_loadu_ps(&input1[i + j]), coef0, acc1);
}
// horizontal sum
acc0 = _mm256_hadd_ps(acc0, acc1);
__m128 t0 = _mm_add_ps(_mm256_castps256_ps128(acc0), _mm256_extractf128_ps(acc0, 1));
t0 = _mm_add_ps(t0, _mm_movehdup_ps(t0));
_mm_store_ss(&output0[outputFrames], t0);
_mm_store_ss(&output1[outputFrames], _mm_shuffle_ps(t0, t0, _MM_SHUFFLE(0,0,0,2)));
outputFrames += 1;
i += _stepTable[_phase];
if (++_phase == _upFactor) {
_phase = 0;
}
}
_offset = (int64_t)(i - inputFrames) << 32;
} else { // irrational
while (HI32(_offset) < inputFrames) {
int32_t i = HI32(_offset);
uint32_t f = LO32(_offset);
uint32_t phase = f >> SRC_FRACBITS;
float ftmp = (f & SRC_FRACMASK) * QFRAC_TO_FLOAT;
const float* c0 = &_polyphaseFilter[_numTaps * (phase + 0)];
const float* c1 = &_polyphaseFilter[_numTaps * (phase + 1)];
__m256 acc0 = _mm256_setzero_ps();
__m256 acc1 = _mm256_setzero_ps();
__m256 frac = _mm256_broadcast_ss(&ftmp);
for (int j = 0; j < _numTaps; j += 8) {
//float coef = c0[j] + frac * (c1[j] - c0[j]);
__m256 coef0 = _mm256_loadu_ps(&c0[j]);
__m256 coef1 = _mm256_loadu_ps(&c1[j]);
coef1 = _mm256_sub_ps(coef1, coef0);
coef0 = _mm256_fmadd_ps(coef1, frac, coef0);
//acc += input[i + j] * coef;
acc0 = _mm256_fmadd_ps(_mm256_loadu_ps(&input0[i + j]), coef0, acc0);
acc1 = _mm256_fmadd_ps(_mm256_loadu_ps(&input1[i + j]), coef0, acc1);
}
// horizontal sum
acc0 = _mm256_hadd_ps(acc0, acc1);
__m128 t0 = _mm_add_ps(_mm256_castps256_ps128(acc0), _mm256_extractf128_ps(acc0, 1));
t0 = _mm_add_ps(t0, _mm_movehdup_ps(t0));
_mm_store_ss(&output0[outputFrames], t0);
_mm_store_ss(&output1[outputFrames], _mm_shuffle_ps(t0, t0, _MM_SHUFFLE(0,0,0,2)));
outputFrames += 1;
_offset += _step;
}
_offset -= (int64_t)inputFrames << 32;
}
_mm256_zeroupper();
return outputFrames;
}
#endif

View file

@ -31,9 +31,6 @@ HeadData::HeadData(AvatarData* owningAvatar) :
_baseYaw(0.0f),
_basePitch(0.0f),
_baseRoll(0.0f),
_leanSideways(0.0f),
_leanForward(0.0f),
_torsoTwist(0.0f),
_lookAtPosition(0.0f, 0.0f, 0.0f),
_audioLoudness(0.0f),
_isFaceTrackerConnected(false),
@ -132,12 +129,6 @@ QJsonObject HeadData::toJson() const {
if (getRawOrientation() != quat()) {
headJson[JSON_AVATAR_HEAD_ROTATION] = toJsonValue(getRawOrientation());
}
if (getLeanForward() != 0.0f) {
headJson[JSON_AVATAR_HEAD_LEAN_FORWARD] = getLeanForward();
}
if (getLeanSideways() != 0.0f) {
headJson[JSON_AVATAR_HEAD_LEAN_SIDEWAYS] = getLeanSideways();
}
auto lookat = getLookAtPosition();
if (lookat != vec3()) {
vec3 relativeLookAt = glm::inverse(_owningAvatar->getOrientation()) *
@ -171,12 +162,6 @@ void HeadData::fromJson(const QJsonObject& json) {
if (json.contains(JSON_AVATAR_HEAD_ROTATION)) {
setOrientation(quatFromJsonValue(json[JSON_AVATAR_HEAD_ROTATION]));
}
if (json.contains(JSON_AVATAR_HEAD_LEAN_FORWARD)) {
setLeanForward((float)json[JSON_AVATAR_HEAD_LEAN_FORWARD].toDouble());
}
if (json.contains(JSON_AVATAR_HEAD_LEAN_SIDEWAYS)) {
setLeanSideways((float)json[JSON_AVATAR_HEAD_LEAN_SIDEWAYS].toDouble());
}
if (json.contains(JSON_AVATAR_HEAD_LOOKAT)) {
auto relativeLookAt = vec3FromJsonValue(json[JSON_AVATAR_HEAD_LOOKAT]);

View file

@ -68,17 +68,6 @@ public:
const glm::vec3& getLookAtPosition() const { return _lookAtPosition; }
void setLookAtPosition(const glm::vec3& lookAtPosition) { _lookAtPosition = lookAtPosition; }
float getLeanSideways() const { return _leanSideways; }
float getLeanForward() const { return _leanForward; }
float getTorsoTwist() const { return _torsoTwist; }
virtual float getFinalLeanSideways() const { return _leanSideways; }
virtual float getFinalLeanForward() const { return _leanForward; }
void setLeanSideways(float leanSideways) { _leanSideways = leanSideways; }
void setLeanForward(float leanForward) { _leanForward = leanForward; }
void setTorsoTwist(float torsoTwist) { _torsoTwist = torsoTwist; }
friend class AvatarData;
QJsonObject toJson() const;
@ -89,9 +78,6 @@ protected:
float _baseYaw;
float _basePitch;
float _baseRoll;
float _leanSideways;
float _leanForward;
float _torsoTwist;
glm::vec3 _lookAtPosition;
float _audioLoudness;

View file

@ -31,6 +31,12 @@ namespace controller {
class Endpoint;
using EndpointPointer = std::shared_ptr<Endpoint>;
enum Hand {
LEFT = 0,
RIGHT,
BOTH
};
// NOTE: If something inherits from both InputDevice and InputPlugin, InputPlugin must go first.
// e.g. class Example : public InputPlugin, public InputDevice
// instead of class Example : public InputDevice, public InputPlugin
@ -55,6 +61,9 @@ public:
const QString& getName() const { return _name; }
// By default, Input Devices do not support haptics
virtual bool triggerHapticPulse(float strength, float duration, controller::Hand hand) { return false; }
// Update call MUST be called once per simulation loop
// It takes care of updating the action states and deltas
virtual void update(float deltaTime, const InputCalibrationData& inputCalibrationData) {};

View file

@ -140,6 +140,24 @@ namespace controller {
return DependencyManager::get<UserInputMapper>()->getActionNames();
}
bool ScriptingInterface::triggerHapticPulse(float strength, float duration, controller::Hand hand) const {
return DependencyManager::get<UserInputMapper>()->triggerHapticPulse(strength, duration, hand);
}
bool ScriptingInterface::triggerShortHapticPulse(float strength, controller::Hand hand) const {
const float SHORT_HAPTIC_DURATION_MS = 250.0f;
return DependencyManager::get<UserInputMapper>()->triggerHapticPulse(strength, SHORT_HAPTIC_DURATION_MS, hand);
}
bool ScriptingInterface::triggerHapticPulseOnDevice(unsigned int device, float strength, float duration, controller::Hand hand) const {
return DependencyManager::get<UserInputMapper>()->triggerHapticPulseOnDevice(device, strength, duration, hand);
}
bool ScriptingInterface::triggerShortHapticPulseOnDevice(unsigned int device, float strength, controller::Hand hand) const {
const float SHORT_HAPTIC_DURATION_MS = 250.0f;
return DependencyManager::get<UserInputMapper>()->triggerHapticPulseOnDevice(device, strength, SHORT_HAPTIC_DURATION_MS, hand);
}
void ScriptingInterface::updateMaps() {
QVariantMap newHardware;
auto userInputMapper = DependencyManager::get<controller::UserInputMapper>();

View file

@ -84,6 +84,11 @@ namespace controller {
Q_INVOKABLE Pose getPoseValue(const int& source) const;
Q_INVOKABLE Pose getPoseValue(StandardPoseChannel source, uint16_t device = 0) const;
Q_INVOKABLE bool triggerHapticPulse(float strength, float duration, controller::Hand hand = BOTH) const;
Q_INVOKABLE bool triggerShortHapticPulse(float strength, controller::Hand hand = BOTH) const;
Q_INVOKABLE bool triggerHapticPulseOnDevice(unsigned int device, float strength, float duration, controller::Hand hand = BOTH) const;
Q_INVOKABLE bool triggerShortHapticPulseOnDevice(unsigned int device, float strength, controller::Hand hand = BOTH) const;
Q_INVOKABLE QObject* newMapping(const QString& mappingName = QUuid::createUuid().toString());
Q_INVOKABLE void enableMapping(const QString& mappingName, bool enable = true);
Q_INVOKABLE void disableMapping(const QString& mappingName) { enableMapping(mappingName, false); }

View file

@ -68,9 +68,7 @@ namespace controller {
RIGHT_SECONDARY_INDEX_TOUCH,
RIGHT_INDEX_POINT,
LEFT_GRIP,
LEFT_GRIP_TOUCH,
RIGHT_GRIP,
RIGHT_GRIP_TOUCH,
NUM_STANDARD_BUTTONS
@ -87,9 +85,9 @@ namespace controller {
// Triggers
LT,
RT,
// Grips (Oculus touch squeeze)
LG,
RG,
// Grips
LEFT_GRIP,
RIGHT_GRIP,
NUM_STANDARD_AXES,
LZ = LT,
RZ = RT

View file

@ -62,14 +62,6 @@ namespace controller {
UserInputMapper::~UserInputMapper() {
}
int UserInputMapper::recordDeviceOfType(const QString& deviceName) {
if (!_deviceCounts.contains(deviceName)) {
_deviceCounts[deviceName] = 0;
}
_deviceCounts[deviceName] += 1;
return _deviceCounts[deviceName];
}
void UserInputMapper::registerDevice(InputDevice::Pointer device) {
Locker locker(_lock);
if (device->_deviceID == Input::INVALID_DEVICE) {
@ -77,8 +69,6 @@ void UserInputMapper::registerDevice(InputDevice::Pointer device) {
}
const auto& deviceID = device->_deviceID;
recordDeviceOfType(device->getName());
qCDebug(controllers) << "Registered input device <" << device->getName() << "> deviceID = " << deviceID;
for (const auto& inputMapping : device->getAvailableInputs()) {
@ -134,6 +124,15 @@ void UserInputMapper::removeDevice(int deviceID) {
_mappingsByDevice.erase(mappingsEntry);
}
for (const auto& inputMapping : device->getAvailableInputs()) {
const auto& input = inputMapping.first;
auto endpoint = _endpointsByInput.find(input);
if (endpoint != _endpointsByInput.end()) {
_inputsByEndpoint.erase((*endpoint).second);
_endpointsByInput.erase(input);
}
}
_registeredDevices.erase(proxyEntry);
emit hardwareChanged();
@ -336,10 +335,28 @@ QVector<QString> UserInputMapper::getActionNames() const {
return result;
}
bool UserInputMapper::triggerHapticPulse(float strength, float duration, controller::Hand hand) {
Locker locker(_lock);
bool toReturn = false;
for (auto device : _registeredDevices) {
toReturn = toReturn || device.second->triggerHapticPulse(strength, duration, hand);
}
return toReturn;
}
bool UserInputMapper::triggerHapticPulseOnDevice(uint16 deviceID, float strength, float duration, controller::Hand hand) {
Locker locker(_lock);
if (_registeredDevices.find(deviceID) != _registeredDevices.end()) {
return _registeredDevices[deviceID]->triggerHapticPulse(strength, duration, hand);
}
return false;
}
int actionMetaTypeId = qRegisterMetaType<Action>();
int inputMetaTypeId = qRegisterMetaType<Input>();
int inputPairMetaTypeId = qRegisterMetaType<Input::NamedPair>();
int poseMetaTypeId = qRegisterMetaType<controller::Pose>("Pose");
int handMetaTypeId = qRegisterMetaType<controller::Hand>();
QScriptValue inputToScriptValue(QScriptEngine* engine, const Input& input);
void inputFromScriptValue(const QScriptValue& object, Input& input);
@ -347,6 +364,8 @@ QScriptValue actionToScriptValue(QScriptEngine* engine, const Action& action);
void actionFromScriptValue(const QScriptValue& object, Action& action);
QScriptValue inputPairToScriptValue(QScriptEngine* engine, const Input::NamedPair& inputPair);
void inputPairFromScriptValue(const QScriptValue& object, Input::NamedPair& inputPair);
QScriptValue handToScriptValue(QScriptEngine* engine, const controller::Hand& hand);
void handFromScriptValue(const QScriptValue& object, controller::Hand& hand);
QScriptValue inputToScriptValue(QScriptEngine* engine, const Input& input) {
QScriptValue obj = engine->newObject();
@ -385,12 +404,21 @@ void inputPairFromScriptValue(const QScriptValue& object, Input::NamedPair& inpu
inputPair.second = QString(object.property("inputName").toVariant().toString());
}
QScriptValue handToScriptValue(QScriptEngine* engine, const controller::Hand& hand) {
return engine->newVariant((int)hand);
}
void handFromScriptValue(const QScriptValue& object, controller::Hand& hand) {
hand = Hand(object.toVariant().toInt());
}
void UserInputMapper::registerControllerTypes(QScriptEngine* engine) {
qScriptRegisterSequenceMetaType<QVector<Action> >(engine);
qScriptRegisterSequenceMetaType<Input::NamedVector>(engine);
qScriptRegisterMetaType(engine, actionToScriptValue, actionFromScriptValue);
qScriptRegisterMetaType(engine, inputToScriptValue, inputFromScriptValue);
qScriptRegisterMetaType(engine, inputPairToScriptValue, inputPairFromScriptValue);
qScriptRegisterMetaType(engine, handToScriptValue, handFromScriptValue);
qScriptRegisterMetaType(engine, Pose::toScriptValue, Pose::fromScriptValue);
}

View file

@ -89,6 +89,8 @@ namespace controller {
void setActionState(Action action, float value) { _actionStates[toInt(action)] = value; }
void deltaActionState(Action action, float delta) { _actionStates[toInt(action)] += delta; }
void setActionState(Action action, const Pose& value) { _poseStates[toInt(action)] = value; }
bool triggerHapticPulse(float strength, float duration, controller::Hand hand);
bool triggerHapticPulseOnDevice(uint16 deviceID, float strength, float duration, controller::Hand hand);
static Input makeStandardInput(controller::StandardButtonChannel button);
static Input makeStandardInput(controller::StandardAxisChannel axis);
@ -141,9 +143,6 @@ namespace controller {
std::vector<Pose> _poseStates = std::vector<Pose>(toInt(Action::NUM_ACTIONS));
std::vector<float> _lastStandardStates = std::vector<float>();
int recordDeviceOfType(const QString& deviceName);
QHash<const QString&, int> _deviceCounts;
static float getValue(const EndpointPointer& endpoint, bool peek = false);
static Pose getPose(const EndpointPointer& endpoint, bool peek = false);
@ -199,6 +198,7 @@ Q_DECLARE_METATYPE(QVector<controller::Input::NamedPair>)
Q_DECLARE_METATYPE(controller::Input)
Q_DECLARE_METATYPE(controller::Action)
Q_DECLARE_METATYPE(QVector<controller::Action>)
Q_DECLARE_METATYPE(controller::Hand)
// Cheating.
using UserInputMapper = controller::UserInputMapper;

View file

@ -759,7 +759,7 @@ FBXGeometry* FBXReader::extractFBXGeometry(const QVariantHash& mapping, const QS
model.preTransform = glm::translate(rotationOffset) * glm::translate(rotationPivot);
model.preRotation = glm::quat(glm::radians(preRotation));
model.rotation = glm::quat(glm::radians(rotation));
model.postRotation = glm::quat(glm::radians(postRotation));
model.postRotation = glm::inverse(glm::quat(glm::radians(postRotation)));
model.postTransform = glm::translate(-rotationPivot) * glm::translate(scaleOffset) *
glm::translate(scalePivot) * glm::scale(scale) * glm::translate(-scalePivot);
// NOTE: angles from the FBX file are in degrees
@ -927,6 +927,9 @@ FBXGeometry* FBXReader::extractFBXGeometry(const QVariantHash& mapping, const QS
// material.emissiveColor = getVec3(property.properties, index);
// material.emissiveFactor = 1.0;
} else if (property.properties.at(0) == "AmbientFactor") {
material.ambientFactor = property.properties.at(index).value<double>();
// Detected just for BLender AO vs lightmap
} else if (property.properties.at(0) == "Shininess") {
material.shininess = property.properties.at(index).value<double>();
@ -1128,8 +1131,10 @@ FBXGeometry* FBXReader::extractFBXGeometry(const QVariantHash& mapping, const QS
emissiveTextures.insert(getID(connection.properties, 2), getID(connection.properties, 1));
} else if (type.contains("tex_emissive_map")) {
emissiveTextures.insert(getID(connection.properties, 2), getID(connection.properties, 1));
} else if (type.contains("ambient")) {
} else if (type.contains("ambientcolor")) {
ambientTextures.insert(getID(connection.properties, 2), getID(connection.properties, 1));
} else if (type.contains("ambientfactor")) {
ambientFactorTextures.insert(getID(connection.properties, 2), getID(connection.properties, 1));
} else if (type.contains("tex_ao_map")) {
occlusionTextures.insert(getID(connection.properties, 2), getID(connection.properties, 1));
} else if (type == "lcl rotation") {

View file

@ -151,6 +151,7 @@ public:
float metallic{ 0.0f };
float roughness{ 1.0f };
float emissiveIntensity{ 1.0f };
float ambientFactor{ 1.0f };
QString materialID;
QString name;
@ -437,6 +438,7 @@ public:
QHash<QString, QString> shininessTextures;
QHash<QString, QString> emissiveTextures;
QHash<QString, QString> ambientTextures;
QHash<QString, QString> ambientFactorTextures;
QHash<QString, QString> occlusionTextures;
QHash<QString, FBXMaterial> _fbxMaterials;

View file

@ -186,6 +186,14 @@ void FBXReader::consolidateFBXMaterials() {
FBXTexture occlusionTexture;
QString occlusionTextureID = occlusionTextures.value(material.materialID);
if (occlusionTextureID.isNull()) {
// 2nd chance
// For blender we use the ambient factor texture as AOMap ONLY if the ambientFactor value is > 0.0
if (material.ambientFactor > 0.0f) {
occlusionTextureID = ambientFactorTextures.value(material.materialID);
}
}
if (!occlusionTextureID.isNull()) {
occlusionTexture = getTexture(occlusionTextureID);
detectDifferentUVs |= (occlusionTexture.texcoordSet != 0) || (!emissiveTexture.transform.isIdentity());
@ -198,6 +206,14 @@ void FBXReader::consolidateFBXMaterials() {
FBXTexture ambientTexture;
QString ambientTextureID = ambientTextures.value(material.materialID);
if (ambientTextureID.isNull()) {
// 2nd chance
// For blender we use the ambient factor texture as Lightmap ONLY if the ambientFactor value is set to 0
if (material.ambientFactor == 0.0f) {
ambientTextureID = ambientFactorTextures.value(material.materialID);
}
}
if (_loadLightmaps && !ambientTextureID.isNull()) {
ambientTexture = getTexture(ambientTextureID);
detectDifferentUVs |= (ambientTexture.texcoordSet != 0) || (!ambientTexture.transform.isIdentity());

View file

@ -418,6 +418,8 @@ model::TextureMapPointer NetworkMaterial::fetchTextureMap(const QUrl& baseUrl, c
auto map = std::make_shared<model::TextureMap>();
map->setTextureSource(texture->_textureSource);
map->setTextureTransform(fbxTexture.transform);
return map;
}
@ -427,6 +429,7 @@ model::TextureMapPointer NetworkMaterial::fetchTextureMap(const QUrl& url, Textu
auto map = std::make_shared<model::TextureMap>();
map->setTextureSource(texture->_textureSource);
return map;
}
@ -475,6 +478,7 @@ NetworkMaterial::NetworkMaterial(const FBXMaterial& material, const QUrl& textur
if (!material.occlusionTexture.filename.isEmpty()) {
auto map = fetchTextureMap(textureBaseUrl, material.occlusionTexture, NetworkTexture::OCCLUSION_TEXTURE, MapChannel::OCCLUSION_MAP);
map->setTextureTransform(material.occlusionTexture.transform);
setTextureMap(MapChannel::OCCLUSION_MAP, map);
}

View file

@ -122,6 +122,10 @@ void Material::setTextureMap(MapChannel channel, const TextureMapPointer& textur
_texMapArrayBuffer.edit<TexMapArraySchema>()._texcoordTransforms[0] = (textureMap ? textureMap->getTextureTransform().getMatrix() : glm::mat4());
}
if (channel == MaterialKey::OCCLUSION_MAP) {
_texMapArrayBuffer.edit<TexMapArraySchema>()._texcoordTransforms[1] = (textureMap ? textureMap->getTextureTransform().getMatrix() : glm::mat4());
}
if (channel == MaterialKey::LIGHTMAP_MAP) {
// update the texcoord1 with lightmap
_texMapArrayBuffer.edit<TexMapArraySchema>()._texcoordTransforms[1] = (textureMap ? textureMap->getTextureTransform().getMatrix() : glm::mat4());

View file

@ -14,6 +14,7 @@
#include <assert.h>
#include <stdint.h>
#include <atomic>
#include <btBulletDynamicsCommon.h>
#include <BulletDynamics/Character/btCharacterControllerInterface.h>
@ -105,8 +106,9 @@ public:
void setLocalBoundingBox(const glm::vec3& corner, const glm::vec3& scale);
bool isEnabled() const { return _enabled; } // thread-safe
void setEnabled(bool enabled);
bool isEnabled() const { return _enabled && _dynamicsWorld; }
bool isEnabledAndReady() const { return _enabled && _dynamicsWorld; }
bool getRigidBodyLocation(glm::vec3& avatarRigidBodyPosition, glm::quat& avatarRigidBodyRotation);
@ -167,7 +169,7 @@ protected:
btQuaternion _followAngularDisplacement;
btVector3 _linearAcceleration;
bool _enabled;
std::atomic_bool _enabled;
State _state;
bool _isPushingUp;

View file

@ -83,7 +83,7 @@ static const std::string DEFAULT_NORMAL_SHADER {
static const std::string DEFAULT_OCCLUSION_SHADER{
"vec4 getFragmentColor() {"
" DeferredFragment frag = unpackDeferredFragmentNoPosition(uv);"
" return vec4(vec3(frag.obscurance), 1.0);"
" return vec4(vec3(pow(frag.obscurance, 1.0 / 2.2)), 1.0);"
" }"
};

View file

@ -90,7 +90,7 @@ float fetchOcclusionMap(vec2 uv) {
<@endfunc@>
<@func fetchMaterialTextures(matKey, texcoord0, albedo, roughness, normal, metallic, emissive, occlusion)@>
<@func fetchMaterialTexturesCoord0(matKey, texcoord0, albedo, roughness, normal, metallic, emissive)@>
<@if albedo@>
vec4 <$albedo$> = (((<$matKey$> & (ALBEDO_MAP_BIT | OPACITY_MASK_MAP_BIT | OPACITY_TRANSLUCENT_MAP_BIT)) != 0) ? fetchAlbedoMap(<$texcoord0$>) : vec4(1.0));
<@endif@>
@ -106,12 +106,19 @@ float fetchOcclusionMap(vec2 uv) {
<@if emissive@>
vec3 <$emissive$> = (((<$matKey$> & EMISSIVE_MAP_BIT) != 0) ? fetchEmissiveMap(<$texcoord0$>) : vec3(0.0));
<@endif@>
<@endfunc@>
<@func fetchMaterialTexturesCoord1(matKey, texcoord1, occlusion, lightmapVal)@>
<@if occlusion@>
float <$occlusion$> = (((<$matKey$> & OCCLUSION_MAP_BIT) != 0) ? fetchOcclusionMap(<$texcoord0$>) : 1.0);
float <$occlusion$> = (((<$matKey$> & OCCLUSION_MAP_BIT) != 0) ? fetchOcclusionMap(<$texcoord1$>) : 1.0);
<@endif@>
<@if lightmapVal@>
vec3 <$lightmapVal$> = fetchLightmapMap(<$texcoord1$>);
<@endif@>
<@endfunc@>
<@func declareMaterialLightmap()@>
<$declareMaterialTexMapArrayBuffer()$>
@ -123,11 +130,6 @@ vec3 fetchLightmapMap(vec2 uv) {
}
<@endfunc@>
<@func fetchMaterialLightmap(texcoord1, lightmapVal)@>
vec3 <$lightmapVal$> = fetchLightmapMap(<$texcoord1$>);
<@endfunc@>
<@func tangentToViewSpace(fetchedNormal, interpolatedNormal, interpolatedTangent, normal)@>
{
vec3 normalizedNormal = normalize(<$interpolatedNormal$>.xyz);

View file

@ -22,12 +22,14 @@ in vec4 _position;
in vec3 _normal;
in vec3 _color;
in vec2 _texCoord0;
in vec2 _texCoord1;
void main(void) {
Material mat = getMaterial();
int matKey = getMaterialKey(mat);
<$fetchMaterialTextures(matKey, _texCoord0, albedoTex, roughnessTex, _SCRIBE_NULL, _SCRIBE_NULL, emissiveTex, occlusionTex)$>
<$fetchMaterialTexturesCoord0(matKey, _texCoord0, albedoTex, roughnessTex, _SCRIBE_NULL, _SCRIBE_NULL, emissiveTex)$>
<$fetchMaterialTexturesCoord1(matKey, _texCoord1, occlusionTex)$>
float opacity = 1.0;
<$evalMaterialOpacity(albedoTex.a, opacity, matKey, opacity)$>;

View file

@ -22,6 +22,7 @@
out vec3 _color;
out float _alpha;
out vec2 _texCoord0;
out vec2 _texCoord1;
out vec4 _position;
out vec3 _normal;
@ -31,6 +32,7 @@ void main(void) {
TexMapArray texMapArray = getTexMapArray();
<$evalTexMapArrayTexcoord0(texMapArray, inTexCoord0, _texCoord0)$>
<$evalTexMapArrayTexcoord1(texMapArray, inTexCoord0, _texCoord1)$>
// standard transform
TransformCamera cam = getTransformCamera();

View file

@ -29,8 +29,8 @@ in vec3 _color;
void main(void) {
Material mat = getMaterial();
int matKey = getMaterialKey(mat);
<$fetchMaterialTextures(matKey, _texCoord0, albedo, roughness)$>
<$fetchMaterialLightmap(_texCoord1, lightmapVal)$>
<$fetchMaterialTexturesCoord0(matKey, _texCoord0, albedo, roughness)$>
<$fetchMaterialTexturesCoord1(matKey, _texCoord1, _SCRIBE_NULL, lightmapVal)$>
packDeferredFragmentLightmap(

View file

@ -30,8 +30,8 @@ in vec3 _color;
void main(void) {
Material mat = getMaterial();
int matKey = getMaterialKey(mat);
<$fetchMaterialTextures(matKey, _texCoord0, albedo, roughness, normalTexel)$>
<$fetchMaterialLightmap(_texCoord1, lightmapVal)$>
<$fetchMaterialTexturesCoord0(matKey, _texCoord0, albedo, roughness, normalTexel)$>
<$fetchMaterialTexturesCoord1(matKey, _texCoord1, _SCRIBE_NULL, lightmapVal)$>
vec3 viewNormal;
<$tangentToViewSpace(normalTexel, _normal, _tangent, viewNormal)$>

View file

@ -30,8 +30,8 @@ in vec3 _color;
void main(void) {
Material mat = getMaterial();
int matKey = getMaterialKey(mat);
<$fetchMaterialTextures(matKey, _texCoord0, albedo, roughness, normalTexel, metallicTex)$>
<$fetchMaterialLightmap(_texCoord1, lightmapVal)$>
<$fetchMaterialTexturesCoord0(matKey, _texCoord0, albedo, roughness, normalTexel, metallicTex)$>
<$fetchMaterialTexturesCoord1(matKey, _texCoord1, _SCRIBE_NULL, lightmapVal)$>
vec3 viewNormal;
<$tangentToViewSpace(normalTexel, _normal, _tangent, viewNormal)$>

View file

@ -29,8 +29,8 @@ in vec3 _color;
void main(void) {
Material mat = getMaterial();
int matKey = getMaterialKey(mat);
<$fetchMaterialTextures(matKey, _texCoord0, albedo, roughness, _SCRIBE_NULL, metallicTex)$>
<$fetchMaterialLightmap(_texCoord1, lightmapVal)$>
<$fetchMaterialTexturesCoord0(matKey, _texCoord0, albedo, roughness, _SCRIBE_NULL, metallicTex)$>
<$fetchMaterialTexturesCoord1(matKey, _texCoord1, _SCRIBE_NULL, lightmapVal)$>
packDeferredFragmentLightmap(
normalize(_normal),

View file

@ -21,6 +21,7 @@
in vec4 _position;
in vec2 _texCoord0;
in vec2 _texCoord1;
in vec3 _normal;
in vec3 _tangent;
in vec3 _color;
@ -28,7 +29,8 @@ in vec3 _color;
void main(void) {
Material mat = getMaterial();
int matKey = getMaterialKey(mat);
<$fetchMaterialTextures(matKey, _texCoord0, albedoTex, roughnessTex, normalTex, _SCRIBE_NULL, emissiveTex, occlusionTex)$>
<$fetchMaterialTexturesCoord0(matKey, _texCoord0, albedoTex, roughnessTex, normalTex, _SCRIBE_NULL, emissiveTex)$>
<$fetchMaterialTexturesCoord1(matKey, _texCoord1, occlusionTex)$>
float opacity = 1.0;
<$evalMaterialOpacity(albedoTex.a, opacity, matKey, opacity)$>;

View file

@ -22,6 +22,7 @@
out vec4 _position;
out vec2 _texCoord0;
out vec2 _texCoord1;
out vec3 _normal;
out vec3 _tangent;
out vec3 _color;
@ -34,6 +35,7 @@ void main(void) {
TexMapArray texMapArray = getTexMapArray();
<$evalTexMapArrayTexcoord0(texMapArray, inTexCoord0, _texCoord0)$>
<$evalTexMapArrayTexcoord1(texMapArray, inTexCoord0, _texCoord1)$>
// standard transform
TransformCamera cam = getTransformCamera();

View file

@ -21,6 +21,7 @@
in vec4 _position;
in vec2 _texCoord0;
in vec2 _texCoord1;
in vec3 _normal;
in vec3 _tangent;
in vec3 _color;
@ -28,7 +29,8 @@ in vec3 _color;
void main(void) {
Material mat = getMaterial();
int matKey = getMaterialKey(mat);
<$fetchMaterialTextures(matKey, _texCoord0, albedoTex, roughnessTex, normalTex, metallicTex, emissiveTex, occlusionTex)$>
<$fetchMaterialTexturesCoord0(matKey, _texCoord0, albedoTex, roughnessTex, normalTex, metallicTex, emissiveTex)$>
<$fetchMaterialTexturesCoord1(matKey, _texCoord1, occlusionTex)$>
float opacity = 1.0;
<$evalMaterialOpacity(albedoTex.a, opacity, matKey, opacity)&>;

View file

@ -21,6 +21,7 @@
in vec4 _position;
in vec2 _texCoord0;
in vec2 _texCoord1;
in vec3 _normal;
in vec3 _color;
@ -28,7 +29,8 @@ in vec3 _color;
void main(void) {
Material mat = getMaterial();
int matKey = getMaterialKey(mat);
<$fetchMaterialTextures(matKey, _texCoord0, albedoTex, roughnessTex, _SCRIBE_NULL, metallicTex, emissiveTex, occlusionTex)$>
<$fetchMaterialTexturesCoord0(matKey, _texCoord0, albedoTex, roughnessTex, _SCRIBE_NULL, metallicTex, emissiveTex)$>
<$fetchMaterialTexturesCoord1(matKey, _texCoord1, occlusionTex)$>
float opacity = 1.0;
<$evalMaterialOpacity(albedoTex.a, opacity, matKey, opacity)$>;

View file

@ -25,6 +25,7 @@
<$declareMaterialTextures(ALBEDO, ROUGHNESS, _SCRIBE_NULL, _SCRIBE_NULL, EMISSIVE, OCCLUSION)$>
in vec2 _texCoord0;
in vec2 _texCoord1;
in vec4 _position;
in vec3 _normal;
in vec3 _color;
@ -35,7 +36,8 @@ out vec4 _fragColor;
void main(void) {
Material mat = getMaterial();
int matKey = getMaterialKey(mat);
<$fetchMaterialTextures(matKey, _texCoord0, albedoTex, roughnessTex, _SCRIBE_NULL, _SCRIBE_NULL, emissiveTex, occlusionTex)$>
<$fetchMaterialTexturesCoord0(matKey, _texCoord0, albedoTex, roughnessTex, _SCRIBE_NULL, _SCRIBE_NULL, emissiveTex)$>
<$fetchMaterialTexturesCoord1(matKey, _texCoord1, occlusionTex)$>
float opacity = getMaterialOpacity(mat) * _alpha;
<$evalMaterialOpacity(albedoTex.a, opacity, matKey, opacity)$>;
@ -61,7 +63,7 @@ void main(void) {
_fragColor = vec4(evalGlobalLightingAlphaBlended(
cam._viewInverse,
1.0,
1.0,
occlusionTex,
fragPosition,
fragNormal,
albedo,

View file

@ -26,7 +26,7 @@ out vec4 _fragColor;
void main(void) {
Material mat = getMaterial();
int matKey = getMaterialKey(mat);
<$fetchMaterialTextures(matKey, _texCoord0, albedoTex, _SCRIBE_NULL, _SCRIBE_NULL, _SCRIBE_NULL, _SCRIBE_NULL, _SCRIBE_NULL)$>
<$fetchMaterialTexturesCoord0(matKey, _texCoord0, albedoTex)$>
float opacity = getMaterialOpacity(mat) * _alpha;
<$evalMaterialOpacity(albedoTex.a, opacity, matKey, opacity)$>;

View file

@ -16,7 +16,7 @@
<@include model/Material.slh@>
<@include MaterialTextures.slh@>
<$declareMaterialTextures(ALBEDO, _SCRIBE_NULL, _SCRIBE_NULL, _SCRIBE_NULL, _SCRIBE_NULL, _SCRIBE_NULL)$>
<$declareMaterialTextures(ALBEDO)$>
in vec2 _texCoord0;
in vec3 _normal;
@ -27,7 +27,7 @@ void main(void) {
Material mat = getMaterial();
int matKey = getMaterialKey(mat);
<$fetchMaterialTextures(matKey, _texCoord0, albedoTex, _SCRIBE_NULL, _SCRIBE_NULL, _SCRIBE_NULL, _SCRIBE_NULL, _SCRIBE_NULL)$>
<$fetchMaterialTexturesCoord0(matKey, _texCoord0, albedoTex)$>
float opacity = 1.0;
<$evalMaterialOpacity(albedoTex.a, opacity, matKey, opacity)$>;

View file

@ -24,6 +24,7 @@
out vec4 _position;
out vec2 _texCoord0;
out vec2 _texCoord1;
out vec3 _normal;
out vec3 _color;
out float _alpha;
@ -40,6 +41,7 @@ void main(void) {
TexMapArray texMapArray = getTexMapArray();
<$evalTexMapArrayTexcoord0(texMapArray, inTexCoord0, _texCoord0)$>
<$evalTexMapArrayTexcoord1(texMapArray, inTexCoord0, _texCoord1)$>
// standard transform
TransformCamera cam = getTransformCamera();

View file

@ -24,6 +24,7 @@
out vec4 _position;
out vec2 _texCoord0;
out vec2 _texCoord1;
out vec3 _normal;
out vec3 _tangent;
out vec3 _color;
@ -42,6 +43,7 @@ void main(void) {
TexMapArray texMapArray = getTexMapArray();
<$evalTexMapArrayTexcoord0(texMapArray, inTexCoord0, _texCoord0)$>
<$evalTexMapArrayTexcoord1(texMapArray, inTexCoord0, _texCoord1)$>
interpolatedNormal = vec4(normalize(interpolatedNormal.xyz), 0.0);
interpolatedTangent = vec4(normalize(interpolatedTangent.xyz), 0.0);

View file

@ -0,0 +1,181 @@
//
// CPUDetect.h
// libraries/shared/src
//
// Created by Ken Cooke on 6/6/16.
// Copyright 2016 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_CPUDetect_h
#define hifi_CPUDetect_h
//
// Lightweight functions to detect SSE/AVX/AVX2 support
//
#if defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || defined(__x86_64__)
#define ARCH_X86
#endif
#define MASK_SSE3 (1 << 0) // SSE3
#define MASK_SSSE3 (1 << 9) // SSSE3
#define MASK_SSE41 (1 << 19) // SSE4.1
#define MASK_SSE42 ((1 << 20) | (1 << 23)) // SSE4.2 and POPCNT
#define MASK_AVX ((1 << 27) | (1 << 28)) // OSXSAVE and AVX
#define MASK_AVX2 (1 << 5) // AVX2
#if defined(ARCH_X86) && defined(_MSC_VER)
#include <intrin.h>
static inline bool cpuSupportsSSE3() {
int info[4];
__cpuidex(info, 0x1, 0);
return ((info[2] & MASK_SSE3) == MASK_SSE3);
}
static inline bool cpuSupportsSSSE3() {
int info[4];
__cpuidex(info, 0x1, 0);
return ((info[2] & MASK_SSSE3) == MASK_SSSE3);
}
static inline bool cpuSupportsSSE41() {
int info[4];
__cpuidex(info, 0x1, 0);
return ((info[2] & MASK_SSE41) == MASK_SSE41);
}
static inline bool cpuSupportsSSE42() {
int info[4];
__cpuidex(info, 0x1, 0);
return ((info[2] & MASK_SSE42) == MASK_SSE42);
}
static inline bool cpuSupportsAVX() {
int info[4];
__cpuidex(info, 0x1, 0);
bool result = false;
if ((info[2] & MASK_AVX) == MASK_AVX) {
// verify OS support for YMM state
if ((_xgetbv(_XCR_XFEATURE_ENABLED_MASK) & 0x6) == 0x6) {
result = true;
}
}
return result;
}
static inline bool cpuSupportsAVX2() {
int info[4];
bool result = false;
if (cpuSupportsAVX()) {
__cpuidex(info, 0x7, 0);
if ((info[1] & MASK_AVX2) == MASK_AVX2) {
result = true;
}
}
return result;
}
#elif defined(ARCH_X86) && defined(__GNUC__)
#include <cpuid.h>
static inline bool cpuSupportsSSE3() {
unsigned int eax, ebx, ecx, edx;
return __get_cpuid(0x1, &eax, &ebx, &ecx, &edx) && ((ecx & MASK_SSE3) == MASK_SSE3);
}
static inline bool cpuSupportsSSSE3() {
unsigned int eax, ebx, ecx, edx;
return __get_cpuid(0x1, &eax, &ebx, &ecx, &edx) && ((ecx & MASK_SSSE3) == MASK_SSSE3);
}
static inline bool cpuSupportsSSE41() {
unsigned int eax, ebx, ecx, edx;
return __get_cpuid(0x1, &eax, &ebx, &ecx, &edx) && ((ecx & MASK_SSE41) == MASK_SSE41);
}
static inline bool cpuSupportsSSE42() {
unsigned int eax, ebx, ecx, edx;
return __get_cpuid(0x1, &eax, &ebx, &ecx, &edx) && ((ecx & MASK_SSE42) == MASK_SSE42);
}
static inline bool cpuSupportsAVX() {
unsigned int eax, ebx, ecx, edx;
bool result = false;
if (__get_cpuid(0x1, &eax, &ebx, &ecx, &edx) && ((ecx & MASK_AVX) == MASK_AVX)) {
// verify OS support for YMM state
__asm__("xgetbv" : "=a"(eax), "=d"(edx) : "c"(0));
if ((eax & 0x6) == 0x6) {
result = true;
}
}
return result;
}
static inline bool cpuSupportsAVX2() {
unsigned int eax, ebx, ecx, edx;
bool result = false;
if (cpuSupportsAVX()) {
if (__get_cpuid(0x7, &eax, &ebx, &ecx, &edx) && ((ebx & MASK_AVX2) == MASK_AVX2)) {
result = true;
}
}
return result;
}
#else
static inline bool cpuSupportsSSE3() {
return false;
}
static inline bool cpuSupportsSSSE3() {
return false;
}
static inline bool cpuSupportsSSE41() {
return false;
}
static inline bool cpuSupportsSSE42() {
return false;
}
static inline bool cpuSupportsAVX() {
return false;
}
static inline bool cpuSupportsAVX2() {
return false;
}
#endif
#endif // hifi_CPUDetect_h

View file

@ -12,9 +12,10 @@
#include <stdint.h>
#include <QQueue>
#include <QMutex>
#include <QWaitCondition>
#include <QtCore/QElapsedTimer>
#include <QtCore/QMutex>
#include <QtCore/QQueue>
#include <QtCore/QWaitCondition>
#include "GenericThread.h"
#include "NumericalConstants.h"
@ -35,6 +36,25 @@ public:
_hasItems.wakeAll();
}
void waitIdle(uint32_t maxWaitMs = UINT32_MAX) {
QElapsedTimer timer;
timer.start();
// FIXME this will work as long as the thread doing the wait
// is the only thread which can add work to the queue.
// It would be better if instead we had a queue empty condition to wait on
// that would ensure that we get woken as soon as we're idle the very
// first time the queue was empty.
while (timer.elapsed() < maxWaitMs) {
lock();
if (!_items.size()) {
unlock();
return;
}
unlock();
}
}
protected:
virtual void queueItemInternal(const T& t) {
_items.push_back(t);
@ -44,6 +64,7 @@ protected:
return MSECS_PER_SECOND;
}
virtual bool process() {
lock();
if (!_items.size()) {

View file

@ -21,9 +21,16 @@ Joystick::Joystick(SDL_JoystickID instanceId, SDL_GameController* sdlGameControl
InputDevice("GamePad"),
_sdlGameController(sdlGameController),
_sdlJoystick(SDL_GameControllerGetJoystick(_sdlGameController)),
_sdlHaptic(SDL_HapticOpenFromJoystick(_sdlJoystick)),
_instanceId(instanceId)
{
if (!_sdlHaptic) {
qDebug() << "SDL Haptic Open Failure: " << QString(SDL_GetError());
} else {
if (SDL_HapticRumbleInit(_sdlHaptic) != 0) {
qDebug() << "SDL Haptic Rumble Init Failure: " << QString(SDL_GetError());
}
}
}
Joystick::~Joystick() {
@ -31,6 +38,9 @@ Joystick::~Joystick() {
}
void Joystick::closeJoystick() {
if (_sdlHaptic) {
SDL_HapticClose(_sdlHaptic);
}
SDL_GameControllerClose(_sdlGameController);
}
@ -62,55 +72,64 @@ void Joystick::handleButtonEvent(const SDL_ControllerButtonEvent& event) {
}
}
bool Joystick::triggerHapticPulse(float strength, float duration, controller::Hand hand) {
if (SDL_HapticRumblePlay(_sdlHaptic, strength, duration) != 0) {
return false;
}
return true;
}
controller::Input::NamedVector Joystick::getAvailableInputs() const {
using namespace controller;
static const Input::NamedVector availableInputs{
makePair(A, "A"),
makePair(B, "B"),
makePair(X, "X"),
makePair(Y, "Y"),
// DPad
makePair(DU, "DU"),
makePair(DD, "DD"),
makePair(DL, "DL"),
makePair(DR, "DR"),
// Bumpers
makePair(LB, "LB"),
makePair(RB, "RB"),
// Stick press
makePair(LS, "LS"),
makePair(RS, "RS"),
// Center buttons
makePair(START, "Start"),
makePair(BACK, "Back"),
// Analog sticks
makePair(LX, "LX"),
makePair(LY, "LY"),
makePair(RX, "RX"),
makePair(RY, "RY"),
// Triggers
makePair(LT, "LT"),
makePair(RT, "RT"),
if (_availableInputs.length() == 0) {
_availableInputs = {
makePair(A, "A"),
makePair(B, "B"),
makePair(X, "X"),
makePair(Y, "Y"),
// DPad
makePair(DU, "DU"),
makePair(DD, "DD"),
makePair(DL, "DL"),
makePair(DR, "DR"),
// Bumpers
makePair(LB, "LB"),
makePair(RB, "RB"),
// Stick press
makePair(LS, "LS"),
makePair(RS, "RS"),
// Center buttons
makePair(START, "Start"),
makePair(BACK, "Back"),
// Analog sticks
makePair(LX, "LX"),
makePair(LY, "LY"),
makePair(RX, "RX"),
makePair(RY, "RY"),
// Aliases, PlayStation style names
makePair(LB, "L1"),
makePair(RB, "R1"),
makePair(LT, "L2"),
makePair(RT, "R2"),
makePair(LS, "L3"),
makePair(RS, "R3"),
makePair(BACK, "Select"),
makePair(A, "Cross"),
makePair(B, "Circle"),
makePair(X, "Square"),
makePair(Y, "Triangle"),
makePair(DU, "Up"),
makePair(DD, "Down"),
makePair(DL, "Left"),
makePair(DR, "Right"),
};
return availableInputs;
// Triggers
makePair(LT, "LT"),
makePair(RT, "RT"),
// Aliases, PlayStation style names
makePair(LB, "L1"),
makePair(RB, "R1"),
makePair(LT, "L2"),
makePair(RT, "R2"),
makePair(LS, "L3"),
makePair(RS, "R3"),
makePair(BACK, "Select"),
makePair(A, "Cross"),
makePair(B, "Circle"),
makePair(X, "Square"),
makePair(Y, "Triangle"),
makePair(DU, "Up"),
makePair(DD, "Down"),
makePair(DL, "Left"),
makePair(DR, "Right"),
};
}
return _availableInputs;
}
QString Joystick::getDefaultMappingConfig() const {

View file

@ -36,6 +36,8 @@ public:
virtual QString getDefaultMappingConfig() const override;
virtual void update(float deltaTime, const controller::InputCalibrationData& inputCalibrationData) override;
virtual void focusOutEvent() override;
bool triggerHapticPulse(float strength, float duration, controller::Hand hand) override;
Joystick() : InputDevice("GamePad") {}
~Joystick();
@ -52,7 +54,10 @@ public:
private:
SDL_GameController* _sdlGameController;
SDL_Joystick* _sdlJoystick;
SDL_Haptic* _sdlHaptic;
SDL_JoystickID _instanceId;
mutable controller::Input::NamedVector _availableInputs;
};
#endif // hifi_Joystick_h

View file

@ -49,7 +49,7 @@ SDL_JoystickID SDL2Manager::getInstanceId(SDL_GameController* controller) {
}
void SDL2Manager::init() {
bool initSuccess = (SDL_Init(SDL_INIT_GAMECONTROLLER) == 0);
bool initSuccess = (SDL_Init(SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC) == 0);
if (initSuccess) {
int joystickCount = SDL_NumJoysticks();

View file

@ -105,6 +105,12 @@ void OculusControllerManager::pluginFocusOutEvent() {
}
}
void OculusControllerManager::stopHapticPulse(bool leftHand) {
if (_touch) {
_touch->stopHapticPulse(leftHand);
}
}
using namespace controller;
static const std::vector<std::pair<ovrButton, StandardButtonChannel>> BUTTON_MAP { {
@ -120,14 +126,14 @@ static const std::vector<std::pair<ovrButton, StandardButtonChannel>> BUTTON_MAP
{ ovrButton_B, B },
{ ovrButton_LThumb, LS },
{ ovrButton_RThumb, RS },
{ ovrButton_LShoulder, LB },
{ ovrButton_RShoulder, RB },
//{ ovrButton_LShoulder, LB },
//{ ovrButton_RShoulder, RB },
} };
static const std::vector<std::pair<ovrTouch, StandardButtonChannel>> TOUCH_MAP { {
{ ovrTouch_X, LEFT_SECONDARY_THUMB_TOUCH },
{ ovrTouch_X, LEFT_PRIMARY_THUMB_TOUCH },
{ ovrTouch_Y, LEFT_SECONDARY_THUMB_TOUCH },
{ ovrTouch_A, RIGHT_SECONDARY_THUMB_TOUCH },
{ ovrTouch_A, RIGHT_PRIMARY_THUMB_TOUCH },
{ ovrTouch_B, RIGHT_SECONDARY_THUMB_TOUCH },
{ ovrTouch_LIndexTrigger, LEFT_PRIMARY_INDEX_TOUCH },
{ ovrTouch_RIndexTrigger, RIGHT_PRIMARY_INDEX_TOUCH },
@ -183,6 +189,8 @@ void OculusControllerManager::TouchDevice::update(float deltaTime, const control
++numTrackedControllers;
if (REQUIRED_HAND_STATUS == (tracking.HandStatusFlags[hand] & REQUIRED_HAND_STATUS)) {
handlePose(deltaTime, inputCalibrationData, hand, tracking.HandPoses[hand]);
} else {
_poseStateMap[hand == ovrHand_Left ? controller::LEFT_HAND : controller::RIGHT_HAND].valid = false;
}
});
using namespace controller;
@ -191,12 +199,12 @@ void OculusControllerManager::TouchDevice::update(float deltaTime, const control
_axisStateMap[LX] = inputState.Thumbstick[ovrHand_Left].x;
_axisStateMap[LY] = inputState.Thumbstick[ovrHand_Left].y;
_axisStateMap[LT] = inputState.IndexTrigger[ovrHand_Left];
_axisStateMap[LG] = inputState.HandTrigger[ovrHand_Left];
_axisStateMap[LEFT_GRIP] = inputState.HandTrigger[ovrHand_Left];
_axisStateMap[RX] = inputState.Thumbstick[ovrHand_Right].x;
_axisStateMap[RY] = inputState.Thumbstick[ovrHand_Right].y;
_axisStateMap[RT] = inputState.IndexTrigger[ovrHand_Right];
_axisStateMap[RG] = inputState.HandTrigger[ovrHand_Right];
_axisStateMap[RIGHT_GRIP] = inputState.HandTrigger[ovrHand_Right];
// Buttons
for (const auto& pair : BUTTON_MAP) {
@ -210,6 +218,21 @@ void OculusControllerManager::TouchDevice::update(float deltaTime, const control
_buttonPressedMap.insert(pair.second);
}
}
// Haptics
{
Locker locker(_lock);
if (_leftHapticDuration > 0.0f) {
_leftHapticDuration -= deltaTime * 1000.0f; // milliseconds
} else {
stopHapticPulse(true);
}
if (_rightHapticDuration > 0.0f) {
_rightHapticDuration -= deltaTime * 1000.0f; // milliseconds
} else {
stopHapticPulse(false);
}
}
}
void OculusControllerManager::TouchDevice::focusOutEvent() {
@ -220,38 +243,177 @@ void OculusControllerManager::TouchDevice::focusOutEvent() {
void OculusControllerManager::TouchDevice::handlePose(float deltaTime,
const controller::InputCalibrationData& inputCalibrationData, ovrHandType hand,
const ovrPoseStatef& handPose) {
// When the sensor-to-world rotation is identity the coordinate axes look like this:
//
// user
// forward
// -z
// |
// y| user
// y o----x right
// o-----x user
// | up
// |
// z
//
// Rift
// From ABOVE the hand canonical axes looks like this:
//
// | | | | y | | | |
// | | | | | | | | |
// | | | | |
// |left | / x---- + \ |right|
// | _/ z \_ |
// | | | |
// | | | |
//
// So when the user is in Rift space facing the -zAxis with hands outstretched and palms down
// the rotation to align the Touch axes with those of the hands is:
//
// touchToHand = halfTurnAboutY * quaterTurnAboutX
// Due to how the Touch controllers fit into the palm there is an offset that is different for each hand.
// You can think of this offset as the inverse of the measured rotation when the hands are posed, such that
// the combination (measurement * offset) is identity at this orientation.
//
// Qoffset = glm::inverse(deltaRotation when hand is posed fingers forward, palm down)
//
// An approximate offset for the Touch can be obtained by inspection:
//
// Qoffset = glm::inverse(glm::angleAxis(sign * PI/2.0f, zAxis) * glm::angleAxis(PI/4.0f, xAxis))
//
// So the full equation is:
//
// Q = combinedMeasurement * touchToHand
//
// Q = (deltaQ * QOffset) * (yFlip * quarterTurnAboutX)
//
// Q = (deltaQ * inverse(deltaQForAlignedHand)) * (yFlip * quarterTurnAboutX)
auto poseId = hand == ovrHand_Left ? controller::LEFT_HAND : controller::RIGHT_HAND;
auto& pose = _poseStateMap[poseId];
static const glm::quat yFlip = glm::angleAxis(PI, Vectors::UNIT_Y);
static const glm::quat quarterX = glm::angleAxis(PI_OVER_TWO, Vectors::UNIT_X);
static const glm::quat touchToHand = yFlip * quarterX;
static const glm::quat leftQuarterZ = glm::angleAxis(-PI_OVER_TWO, Vectors::UNIT_Z);
static const glm::quat rightQuarterZ = glm::angleAxis(PI_OVER_TWO, Vectors::UNIT_Z);
static const glm::quat eighthX = glm::angleAxis(PI / 4.0f, Vectors::UNIT_X);
static const glm::quat leftRotationOffset = glm::inverse(leftQuarterZ * eighthX) * touchToHand;
static const glm::quat rightRotationOffset = glm::inverse(rightQuarterZ * eighthX) * touchToHand;
static const float CONTROLLER_LENGTH_OFFSET = 0.0762f; // three inches
static const glm::vec3 CONTROLLER_OFFSET = glm::vec3(CONTROLLER_LENGTH_OFFSET / 2.0f,
CONTROLLER_LENGTH_OFFSET / 2.0f,
CONTROLLER_LENGTH_OFFSET * 2.0f);
static const glm::vec3 leftTranslationOffset = glm::vec3(-1.0f, 1.0f, 1.0f) * CONTROLLER_OFFSET;
static const glm::vec3 rightTranslationOffset = CONTROLLER_OFFSET;
auto translationOffset = (hand == ovrHand_Left ? leftTranslationOffset : rightTranslationOffset);
auto rotationOffset = (hand == ovrHand_Left ? leftRotationOffset : rightRotationOffset);
glm::quat rotation = toGlm(handPose.ThePose.Orientation);
pose.translation = toGlm(handPose.ThePose.Position);
pose.rotation = toGlm(handPose.ThePose.Orientation);
pose.translation += rotation * translationOffset;
pose.rotation = rotation * rotationOffset;
pose.angularVelocity = toGlm(handPose.AngularVelocity);
pose.velocity = toGlm(handPose.LinearVelocity);
pose.valid = true;
// transform into avatar frame
glm::mat4 controllerToAvatar = glm::inverse(inputCalibrationData.avatarMat) * inputCalibrationData.sensorToWorldMat;
pose = pose.transform(controllerToAvatar);
}
bool OculusControllerManager::TouchDevice::triggerHapticPulse(float strength, float duration, controller::Hand hand) {
Locker locker(_lock);
bool toReturn = true;
if (hand == controller::BOTH || hand == controller::LEFT) {
if (strength == 0.0f) {
_leftHapticStrength = 0.0f;
_leftHapticDuration = 0.0f;
} else {
_leftHapticStrength = (duration > _leftHapticDuration) ? strength : _leftHapticStrength;
if (ovr_SetControllerVibration(_parent._session, ovrControllerType_LTouch, 1.0f, _leftHapticStrength) != ovrSuccess) {
toReturn = false;
}
_leftHapticDuration = std::max(duration, _leftHapticDuration);
}
}
if (hand == controller::BOTH || hand == controller::RIGHT) {
if (strength == 0.0f) {
_rightHapticStrength = 0.0f;
_rightHapticDuration = 0.0f;
} else {
_rightHapticStrength = (duration > _rightHapticDuration) ? strength : _rightHapticStrength;
if (ovr_SetControllerVibration(_parent._session, ovrControllerType_RTouch, 1.0f, _rightHapticStrength) != ovrSuccess) {
toReturn = false;
}
_rightHapticDuration = std::max(duration, _rightHapticDuration);
}
}
return toReturn;
}
void OculusControllerManager::TouchDevice::stopHapticPulse(bool leftHand) {
auto handType = (leftHand ? ovrControllerType_LTouch : ovrControllerType_RTouch);
ovr_SetControllerVibration(_parent._session, handType, 0.0f, 0.0f);
}
controller::Input::NamedVector OculusControllerManager::TouchDevice::getAvailableInputs() const {
using namespace controller;
QVector<Input::NamedPair> availableInputs{
// Trackpad analogs
// buttons
makePair(A, "A"),
makePair(B, "B"),
makePair(X, "X"),
makePair(Y, "Y"),
// trackpad analogs
makePair(LX, "LX"),
makePair(LY, "LY"),
makePair(RX, "RX"),
makePair(RY, "RY"),
// trigger analogs
// triggers
makePair(LT, "LT"),
makePair(RT, "RT"),
makePair(LB, "LB"),
makePair(RB, "RB"),
// trigger buttons
//makePair(LB, "LB"),
//makePair(RB, "RB"),
// side grip triggers
makePair(LEFT_GRIP, "LeftGrip"),
makePair(RIGHT_GRIP, "RightGrip"),
// joystick buttons
makePair(LS, "LS"),
makePair(RS, "RS"),
makePair(LEFT_HAND, "LeftHand"),
makePair(RIGHT_HAND, "RightHand"),
makePair(LEFT_PRIMARY_THUMB, "LeftPrimaryThumb"),
makePair(LEFT_SECONDARY_THUMB, "LeftSecondaryThumb"),
makePair(RIGHT_PRIMARY_THUMB, "RightPrimaryThumb"),
makePair(RIGHT_SECONDARY_THUMB, "RightSecondaryThumb"),
makePair(LEFT_PRIMARY_THUMB_TOUCH, "LeftPrimaryThumbTouch"),
makePair(LEFT_SECONDARY_THUMB_TOUCH, "LeftSecondaryThumbTouch"),
makePair(RIGHT_PRIMARY_THUMB_TOUCH, "RightPrimaryThumbTouch"),
makePair(RIGHT_SECONDARY_THUMB_TOUCH, "RightSecondaryThumbTouch"),
makePair(LEFT_PRIMARY_INDEX_TOUCH, "LeftPrimaryIndexTouch"),
makePair(RIGHT_PRIMARY_INDEX_TOUCH, "RightPrimaryIndexTouch"),
makePair(LS_TOUCH, "LSTouch"),
makePair(RS_TOUCH, "RSTouch"),
makePair(LEFT_THUMB_UP, "LeftThumbUp"),
makePair(RIGHT_THUMB_UP, "RightThumbUp"),
makePair(LEFT_INDEX_POINT, "LeftIndexPoint"),
makePair(RIGHT_INDEX_POINT, "RightIndexPoint"),
makePair(BACK, "LeftApplicationMenu"),
makePair(START, "RightApplicationMenu"),
};
return availableInputs;
}

View file

@ -32,6 +32,9 @@ public:
void pluginFocusOutEvent() override;
void pluginUpdate(float deltaTime, const controller::InputCalibrationData& inputCalibrationData) override;
private slots:
void stopHapticPulse(bool leftHand);
private:
class OculusInputDevice : public controller::InputDevice {
public:
@ -64,9 +67,24 @@ private:
void update(float deltaTime, const controller::InputCalibrationData& inputCalibrationData) override;
void focusOutEvent() override;
bool triggerHapticPulse(float strength, float duration, controller::Hand hand) override;
private:
void stopHapticPulse(bool leftHand);
void handlePose(float deltaTime, const controller::InputCalibrationData& inputCalibrationData, ovrHandType hand, const ovrPoseStatef& handPose);
int _trackedControllers { 0 };
// perform an action when the TouchDevice mutex is acquired.
using Locker = std::unique_lock<std::recursive_mutex>;
template <typename F>
void withLock(F&& f) { Locker locker(_lock); f(); }
float _leftHapticDuration { 0.0f };
float _leftHapticStrength { 0.0f };
float _rightHapticDuration { 0.0f };
float _rightHapticStrength { 0.0f };
mutable std::recursive_mutex _lock;
friend class OculusControllerManager;
};

View file

@ -126,7 +126,6 @@ bool ViveControllerManager::activate() {
auto userInputMapper = DependencyManager::get<controller::UserInputMapper>();
userInputMapper->registerDevice(_inputDevice);
_registeredWithInputMapper = true;
return true;
}
@ -253,6 +252,17 @@ void ViveControllerManager::InputDevice::update(float deltaTime, const controlle
handleHandController(deltaTime, leftHandDeviceIndex, inputCalibrationData, true);
handleHandController(deltaTime, rightHandDeviceIndex, inputCalibrationData, false);
// handle haptics
{
Locker locker(_lock);
if (_leftHapticDuration > 0.0f) {
hapticsHelper(deltaTime, true);
}
if (_rightHapticDuration > 0.0f) {
hapticsHelper(deltaTime, false);
}
}
int numTrackedControllers = 0;
if (leftHandDeviceIndex != vr::k_unTrackedDeviceIndexInvalid) {
numTrackedControllers++;
@ -354,7 +364,7 @@ void ViveControllerManager::InputDevice::handleButtonEvent(float deltaTime, uint
if (button == vr::k_EButton_ApplicationMenu) {
_buttonPressedMap.insert(isLeftHand ? LEFT_APP_MENU : RIGHT_APP_MENU);
} else if (button == vr::k_EButton_Grip) {
_buttonPressedMap.insert(isLeftHand ? LEFT_GRIP : RIGHT_GRIP);
_axisStateMap[isLeftHand ? LEFT_GRIP : RIGHT_GRIP] = 1.0f;
} else if (button == vr::k_EButton_SteamVR_Trigger) {
_buttonPressedMap.insert(isLeftHand ? LT : RT);
} else if (button == vr::k_EButton_SteamVR_Touchpad) {
@ -454,6 +464,55 @@ void ViveControllerManager::InputDevice::handlePoseEvent(float deltaTime, const
_poseStateMap[isLeftHand ? controller::LEFT_HAND : controller::RIGHT_HAND] = avatarPose.transform(controllerToAvatar);
}
bool ViveControllerManager::InputDevice::triggerHapticPulse(float strength, float duration, controller::Hand hand) {
Locker locker(_lock);
if (hand == controller::BOTH || hand == controller::LEFT) {
if (strength == 0.0f) {
_leftHapticStrength = 0.0f;
_leftHapticDuration = 0.0f;
} else {
_leftHapticStrength = (duration > _leftHapticDuration) ? strength : _leftHapticStrength;
_leftHapticDuration = std::max(duration, _leftHapticDuration);
}
}
if (hand == controller::BOTH || hand == controller::RIGHT) {
if (strength == 0.0f) {
_rightHapticStrength = 0.0f;
_rightHapticDuration = 0.0f;
} else {
_rightHapticStrength = (duration > _rightHapticDuration) ? strength : _rightHapticStrength;
_rightHapticDuration = std::max(duration, _rightHapticDuration);
}
}
return true;
}
void ViveControllerManager::InputDevice::hapticsHelper(float deltaTime, bool leftHand) {
auto handRole = leftHand ? vr::TrackedControllerRole_LeftHand : vr::TrackedControllerRole_RightHand;
auto deviceIndex = _system->GetTrackedDeviceIndexForControllerRole(handRole);
if (_system->IsTrackedDeviceConnected(deviceIndex) &&
_system->GetTrackedDeviceClass(deviceIndex) == vr::TrackedDeviceClass_Controller &&
_trackedDevicePose[deviceIndex].bPoseIsValid) {
float strength = leftHand ? _leftHapticStrength : _rightHapticStrength;
float duration = leftHand ? _leftHapticDuration : _rightHapticDuration;
// Vive Controllers only support duration up to 4 ms, which is short enough that any variation feels more like strength
const float MAX_HAPTIC_TIME = 3999.0f; // in microseconds
float hapticTime = strength * MAX_HAPTIC_TIME;
if (hapticTime < duration * 1000.0f) {
_system->TriggerHapticPulse(deviceIndex, 0, hapticTime);
}
float remainingHapticTime = duration - (hapticTime / 1000.0f + deltaTime * 1000.0f); // in milliseconds
if (leftHand) {
_leftHapticDuration = remainingHapticTime;
} else {
_rightHapticDuration = remainingHapticTime;
}
}
}
controller::Input::NamedVector ViveControllerManager::InputDevice::getAvailableInputs() const {
using namespace controller;
QVector<Input::NamedPair> availableInputs{

View file

@ -56,6 +56,9 @@ private:
void update(float deltaTime, const controller::InputCalibrationData& inputCalibrationData) override;
void focusOutEvent() override;
bool triggerHapticPulse(float strength, float duration, controller::Hand hand) override;
void hapticsHelper(float deltaTime, bool leftHand);
void handleHandController(float deltaTime, uint32_t deviceIndex, const controller::InputCalibrationData& inputCalibrationData, bool isLeftHand);
void handleButtonEvent(float deltaTime, uint32_t button, bool pressed, bool touched, bool isLeftHand);
void handleAxisEvent(float deltaTime, uint32_t axis, float x, float y, bool isLeftHand);
@ -90,8 +93,19 @@ private:
FilteredStick _filteredLeftStick;
FilteredStick _filteredRightStick;
// perform an action when the InputDevice mutex is acquired.
using Locker = std::unique_lock<std::recursive_mutex>;
template <typename F>
void withLock(F&& f) { Locker locker(_lock); f(); }
int _trackedControllers { 0 };
vr::IVRSystem*& _system;
float _leftHapticStrength { 0.0f };
float _leftHapticDuration { 0.0f };
float _rightHapticStrength { 0.0f };
float _rightHapticDuration { 0.0f };
mutable std::recursive_mutex _lock;
friend class ViveControllerManager;
};

View file

@ -33,7 +33,7 @@ Column {
"Roughness",
"Metallic",
"Emissive",
"Shaded/Lightmapped/Unlit",
"Unlit",
"Occlusion",
"Lightmap",
"Lighting",

View file

@ -22,7 +22,7 @@ var MINIMUM_DROP_DISTANCE_FROM_JOINT = 0.8;
var ATTACHED_ENTITY_SEARCH_DISTANCE = 10.0;
var ATTACHED_ENTITIES_SETTINGS_KEY = "ATTACHED_ENTITIES";
var DRESSING_ROOM_DISTANCE = 2.0;
var SHOW_TOOL_BAR = true;
var SHOW_TOOL_BAR = false;
// tool bar
@ -71,12 +71,11 @@ Script.scriptEnding.connect(scriptEnding);
// attached entites
function AttachedEntitiesManager() {
var clothingLocked = true;
var clothingLocked = false;
this.subscribeToMessages = function() {
Messages.subscribe('Hifi-Object-Manipulation');
@ -87,10 +86,6 @@ function AttachedEntitiesManager() {
if (channel !== 'Hifi-Object-Manipulation') {
return;
}
// if (sender !== MyAvatar.sessionUUID) {
// print('wearablesManager got message from wrong sender');
// return;
// }
var parsedMessage = null;
@ -106,7 +101,7 @@ function AttachedEntitiesManager() {
// ignore
} else if (parsedMessage.action === 'release') {
manager.handleEntityRelease(parsedMessage.grabbedEntity, parsedMessage.joint)
// manager.saveAttachedEntities();
// manager.saveAttachedEntities();
} else if (parsedMessage.action === 'equip') {
// manager.saveAttachedEntities();
} else {
@ -117,11 +112,6 @@ function AttachedEntitiesManager() {
this.handleEntityRelease = function(grabbedEntity, releasedFromJoint) {
// if this is still equipped, just rewrite the position information.
var grabData = getEntityCustomData('grabKey', grabbedEntity, {});
// if ("refCount" in grabData && grabData.refCount > 0) {
// // for adjusting things in your other hand
// manager.updateRelativeOffsets(grabbedEntity);
// return;
// }
var allowedJoints = getEntityCustomData('wearable', grabbedEntity, DEFAULT_WEARABLE_DATA).joints;
@ -156,7 +146,8 @@ function AttachedEntitiesManager() {
var wearProps = Entities.getEntityProperties(grabbedEntity);
wearProps.parentID = MyAvatar.sessionUUID;
wearProps.parentJointIndex = bestJointIndex;
delete wearProps.localPosition;
delete wearProps.localRotation;
var updatePresets = false;
if (bestJointOffset && bestJointOffset.constructor === Array) {
if (!clothingLocked || bestJointOffset.length < 2) {
@ -170,21 +161,23 @@ function AttachedEntitiesManager() {
}
Entities.deleteEntity(grabbedEntity);
grabbedEntity = Entities.addEntity(wearProps, true);
//the true boolean here after add entity adds it as an 'avatar entity', which can travel with you from server to server.
var newEntity = Entities.addEntity(wearProps, true);
if (updatePresets) {
this.updateRelativeOffsets(grabbedEntity);
this.updateRelativeOffsets(newEntity);
}
} else if (props.parentID != NULL_UUID) {
// drop the entity and set it to have no parent (not on the avatar), unless it's being equipped in a hand.
if (props.parentID === MyAvatar.sessionUUID &&
(props.parentJointIndex == MyAvatar.getJointIndex("RightHand") ||
props.parentJointIndex == MyAvatar.getJointIndex("LeftHand"))) {
props.parentJointIndex == MyAvatar.getJointIndex("LeftHand"))) {
// this is equipped on a hand -- don't clear the parent.
} else {
var wearProps = Entities.getEntityProperties(grabbedEntity);
wearProps.parentID = NULL_UUID;
wearProps.parentJointIndex = -1;
delete wearProps.id;
delete wearProps.created;
delete wearProps.age;
@ -198,7 +191,6 @@ function AttachedEntitiesManager() {
delete wearProps.owningAvatarID;
delete wearProps.localPosition;
delete wearProps.localRotation;
Entities.deleteEntity(grabbedEntity);
Entities.addEntity(wearProps);
}
@ -220,17 +212,6 @@ function AttachedEntitiesManager() {
return false;
}
this.toggleLocked = function() {
print("toggleLocked");
if (clothingLocked) {
clothingLocked = false;
toolBar.setImageURL(Script.resolvePath("assets/images/unlock.svg"), lockButton);
} else {
clothingLocked = true;
toolBar.setImageURL(Script.resolvePath("assets/images/lock.svg"), lockButton);
}
}
// this.saveAttachedEntities = function() {
// print("--- saving attached entities ---");
// saveData = [];
@ -246,27 +227,27 @@ function AttachedEntitiesManager() {
// Settings.setValue(ATTACHED_ENTITIES_SETTINGS_KEY, JSON.stringify(saveData));
// }
this.scrubProperties = function(props) {
var toScrub = ["queryAACube", "position", "rotation",
"created", "ageAsText", "naturalDimensions",
"naturalPosition", "velocity", "acceleration",
"angularVelocity", "boundingBox"];
toScrub.forEach(function(propertyName) {
delete props[propertyName];
});
// if the userData has a grabKey, clear old state
if ("userData" in props) {
try {
parsedUserData = JSON.parse(props.userData);
if ("grabKey" in parsedUserData) {
parsedUserData.grabKey.refCount = 0;
delete parsedUserData.grabKey["avatarId"];
props["userData"] = JSON.stringify(parsedUserData);
}
} catch (e) {
}
}
}
// this.scrubProperties = function(props) {
// var toScrub = ["queryAACube", "position", "rotation",
// "created", "ageAsText", "naturalDimensions",
// "naturalPosition", "velocity", "acceleration",
// "angularVelocity", "boundingBox"];
// toScrub.forEach(function(propertyName) {
// delete props[propertyName];
// });
// // if the userData has a grabKey, clear old state
// if ("userData" in props) {
// try {
// parsedUserData = JSON.parse(props.userData);
// if ("grabKey" in parsedUserData) {
// parsedUserData.grabKey.refCount = 0;
// delete parsedUserData.grabKey["avatarId"];
// props["userData"] = JSON.stringify(parsedUserData);
// }
// } catch (e) {
// }
// }
// }
// this.loadAttachedEntities = function(grabbedEntity) {
// print("--- loading attached entities ---");
@ -302,4 +283,4 @@ function AttachedEntitiesManager() {
}
var manager = new AttachedEntitiesManager();
manager.subscribeToMessages();
manager.subscribeToMessages();

View file

@ -265,9 +265,11 @@ eventMapping.from(Controller.Standard.RightSecondaryThumb).peek().to(goActive);
eventMapping.from(Controller.Standard.LT).peek().to(goActive);
eventMapping.from(Controller.Standard.LB).peek().to(goActive);
eventMapping.from(Controller.Standard.LS).peek().to(goActive);
eventMapping.from(Controller.Standard.LeftGrip).peek().to(goActive);
eventMapping.from(Controller.Standard.RT).peek().to(goActive);
eventMapping.from(Controller.Standard.RB).peek().to(goActive);
eventMapping.from(Controller.Standard.RS).peek().to(goActive);
eventMapping.from(Controller.Standard.RightGrip).peek().to(goActive);
eventMapping.from(Controller.Standard.Back).peek().to(goActive);
eventMapping.from(Controller.Standard.Start).peek().to(goActive);
Controller.enableMapping(eventMappingName);

View file

@ -330,7 +330,7 @@ function MyController(hand) {
this.triggerValue = 0; // rolling average of trigger value
this.rawTriggerValue = 0;
this.rawBumperValue = 0;
this.rawSecondaryValue = 0;
this.rawThumbValue = 0;
//for visualizations
@ -568,10 +568,10 @@ function MyController(hand) {
var searchSphereLocation = Vec3.sum(distantPickRay.origin,
Vec3.multiply(distantPickRay.direction, this.searchSphereDistance));
this.searchSphereOn(searchSphereLocation, SEARCH_SPHERE_SIZE * this.searchSphereDistance,
(this.triggerSmoothedGrab() || this.bumperSqueezed()) ? INTERSECT_COLOR : NO_INTERSECT_COLOR);
(this.triggerSmoothedGrab() || this.secondarySqueezed()) ? INTERSECT_COLOR : NO_INTERSECT_COLOR);
if ((USE_OVERLAY_LINES_FOR_SEARCHING === true) && PICK_WITH_HAND_RAY) {
this.overlayLineOn(handPosition, searchSphereLocation,
(this.triggerSmoothedGrab() || this.bumperSqueezed()) ? INTERSECT_COLOR : NO_INTERSECT_COLOR);
(this.triggerSmoothedGrab() || this.secondarySqueezed()) ? INTERSECT_COLOR : NO_INTERSECT_COLOR);
}
}
@ -818,8 +818,8 @@ function MyController(hand) {
_this.rawTriggerValue = value;
};
this.bumperPress = function(value) {
_this.rawBumperValue = value;
this.secondaryPress = function(value) {
_this.rawSecondaryValue = value;
};
this.updateSmoothedTrigger = function() {
@ -841,20 +841,20 @@ function MyController(hand) {
return this.triggerValue < TRIGGER_OFF_VALUE;
};
this.bumperSqueezed = function() {
return _this.rawBumperValue > BUMPER_ON_VALUE;
this.secondarySqueezed = function() {
return _this.rawSecondaryValue > BUMPER_ON_VALUE;
};
this.bumperReleased = function() {
return _this.rawBumperValue < BUMPER_ON_VALUE;
this.secondaryReleased = function() {
return _this.rawSecondaryValue < BUMPER_ON_VALUE;
};
// this.triggerOrBumperSqueezed = function() {
// return triggerSmoothedSqueezed() || bumperSqueezed();
// this.triggerOrsecondarySqueezed = function() {
// return triggerSmoothedSqueezed() || secondarySqueezed();
// }
// this.triggerAndBumperReleased = function() {
// return triggerSmoothedReleased() && bumperReleased();
// this.triggerAndSecondaryReleased = function() {
// return triggerSmoothedReleased() && secondaryReleased();
// }
this.thumbPress = function(value) {
@ -870,13 +870,13 @@ function MyController(hand) {
};
this.off = function() {
if (this.triggerSmoothedSqueezed() || this.bumperSqueezed()) {
if (this.triggerSmoothedSqueezed() || this.secondarySqueezed()) {
this.lastPickTime = 0;
var controllerHandInput = (this.hand === RIGHT_HAND) ? Controller.Standard.RightHand : Controller.Standard.LeftHand;
this.startingHandRotation = Controller.getPoseValue(controllerHandInput).rotation;
if (this.triggerSmoothedSqueezed()) {
this.setState(STATE_SEARCHING);
} else if (this.bumperSqueezed()) {
} else if (this.secondarySqueezed()) {
this.setState(STATE_HOLD_SEARCHING);
}
}
@ -944,7 +944,7 @@ function MyController(hand) {
return;
}
if (this.state == STATE_HOLD_SEARCHING && this.bumperReleased()) {
if (this.state == STATE_HOLD_SEARCHING && this.secondaryReleased()) {
this.setState(STATE_RELEASE);
return;
}
@ -1108,7 +1108,7 @@ function MyController(hand) {
grabbableData = grabbableDataForCandidate;
}
}
if ((this.grabbedEntity !== null) && (this.triggerSmoothedGrab() || this.bumperSqueezed())) {
if ((this.grabbedEntity !== null) && (this.triggerSmoothedGrab() || this.secondarySqueezed())) {
// We are squeezing enough to grab, and we've found an entity that we'll try to do something with.
var near = (nearPickedCandidateEntities.indexOf(this.grabbedEntity) >= 0) || minDistance <= NEAR_PICK_MAX_DISTANCE;
var isPhysical = propsArePhysical(props);
@ -1274,7 +1274,7 @@ function MyController(hand) {
};
this.continueDistanceHolding = function() {
if (this.triggerSmoothedReleased() && this.bumperReleased()) {
if (this.triggerSmoothedReleased() && this.secondaryReleased()) {
this.setState(STATE_RELEASE);
this.callEntityMethodOnGrabbed("releaseGrab");
return;
@ -1498,7 +1498,7 @@ function MyController(hand) {
this.callEntityMethodOnGrabbed("releaseGrab");
return;
}
if (this.state == STATE_HOLD && this.bumperReleased()) {
if (this.state == STATE_HOLD && this.secondaryReleased()) {
this.setState(STATE_RELEASE);
this.callEntityMethodOnGrabbed("releaseGrab");
return;
@ -1612,7 +1612,7 @@ function MyController(hand) {
this.callEntityMethodOnGrabbed("releaseGrab");
return;
}
if (this.state == STATE_CONTINUE_HOLD && this.bumperReleased()) {
if (this.state == STATE_CONTINUE_HOLD && this.secondaryReleased()) {
this.setState(STATE_RELEASE);
this.callEntityMethodOnGrabbed("releaseEquip");
return;
@ -1741,7 +1741,7 @@ function MyController(hand) {
};
this.nearTrigger = function() {
if (this.triggerSmoothedReleased() && this.bumperReleased()) {
if (this.triggerSmoothedReleased() && this.secondaryReleased()) {
this.setState(STATE_RELEASE);
this.callEntityMethodOnGrabbed("stopNearTrigger");
return;
@ -1751,7 +1751,7 @@ function MyController(hand) {
};
this.farTrigger = function() {
if (this.triggerSmoothedReleased() && this.bumperReleased()) {
if (this.triggerSmoothedReleased() && this.secondaryReleased()) {
this.setState(STATE_RELEASE);
this.callEntityMethodOnGrabbed("stopFarTrigger");
return;
@ -1761,7 +1761,7 @@ function MyController(hand) {
};
this.continueNearTrigger = function() {
if (this.triggerSmoothedReleased() && this.bumperReleased()) {
if (this.triggerSmoothedReleased() && this.secondaryReleased()) {
this.setState(STATE_RELEASE);
this.callEntityMethodOnGrabbed("stopNearTrigger");
return;
@ -1770,7 +1770,7 @@ function MyController(hand) {
};
this.continueFarTrigger = function() {
if (this.triggerSmoothedReleased() && this.bumperReleased()) {
if (this.triggerSmoothedReleased() && this.secondaryReleased()) {
this.setState(STATE_RELEASE);
this.callEntityMethodOnGrabbed("stopFarTrigger");
return;
@ -2050,8 +2050,10 @@ var mapping = Controller.newMapping(MAPPING_NAME);
mapping.from([Controller.Standard.RT]).peek().to(rightController.triggerPress);
mapping.from([Controller.Standard.LT]).peek().to(leftController.triggerPress);
mapping.from([Controller.Standard.RB]).peek().to(rightController.bumperPress);
mapping.from([Controller.Standard.LB]).peek().to(leftController.bumperPress);
mapping.from([Controller.Standard.RB]).peek().to(rightController.secondaryPress);
mapping.from([Controller.Standard.LB]).peek().to(leftController.secondaryPress);
mapping.from([Controller.Standard.LeftGrip]).peek().to(leftController.secondaryPress);
mapping.from([Controller.Standard.RightGrip]).peek().to(rightController.secondaryPress);
mapping.from([Controller.Standard.LeftPrimaryThumb]).peek().to(leftController.thumbPress);
mapping.from([Controller.Standard.RightPrimaryThumb]).peek().to(rightController.thumbPress);

View file

@ -0,0 +1,231 @@
{
"Entities": [
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"created": "2016-05-09T19:37:13Z",
"dimensions": {
"x": 0.029999999329447746,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{5692ed0d-52ae-4bd9-8ef6-13a3d28dbcec}",
"modelURL": "atp:/kineticObjects/blocks/planky_yellow.fbx",
"name": "home_model_blocky_block",
"parentID": "{8c29606d-b071-4793-a5d5-26453bb12bf4}",
"position": {
"x": 0.076191246509552002,
"y": -0.0050119552761316299,
"z": -4.275888204574585e-05
},
"queryAACube": {
"scale": 0.77012991905212402,
"x": 1104.9146728515625,
"y": 460.09011840820312,
"z": -69.708526611328125
},
"rotation": {
"w": -3.1195580959320068e-05,
"x": -0.99968332052230835,
"y": 0.019217833876609802,
"z": 0.0013828873634338379
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"created": "2016-05-09T19:28:29Z",
"dimensions": {
"x": 0.029999999329447746,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{41fdce7a-5c15-4335-a7d4-e6e42c419edb}",
"modelURL": "atp:/kineticObjects/blocks/planky_yellow.fbx",
"name": "home_model_block",
"parentID": "{8c29606d-b071-4793-a5d5-26453bb12bf4}",
"position": {
"x": 0.31622248888015747,
"y": -0.076068185269832611,
"z": -0.00023670494556427002
},
"queryAACube": {
"scale": 0.77012991905212402,
"x": 1104.552734375,
"y": 460.09014892578125,
"z": -69.711776733398438
},
"rotation": {
"w": 0.9812014102935791,
"x": 2.8990209102630615e-05,
"y": 0.00053216516971588135,
"z": -0.19223560392856598
},
"shapeType": "box",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"created": "2016-05-09T19:30:40Z",
"dimensions": {
"x": 0.029999999329447746,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{376ea748-6b7b-4ac4-9194-b0f118ac39dd}",
"modelURL": "atp:/kineticObjects/blocks/planky_yellow.fbx",
"name": "home_model_blocky_block",
"parentID": "{8c29606d-b071-4793-a5d5-26453bb12bf4}",
"position": {
"x": -0.22965218126773834,
"y": 0.0041047781705856323,
"z": 0.00015974044799804688
},
"queryAACube": {
"scale": 0.77012991905212402,
"x": 1105.10009765625,
"y": 460.09011840820312,
"z": -69.742721557617188
},
"rotation": {
"w": -7.3388218879699707e-06,
"x": -0.99162417650222778,
"y": 0.1281534731388092,
"z": 0.00039628148078918457
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"created": "2016-05-09T21:28:38Z",
"dimensions": {
"x": 0.029999999329447746,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{d1359425-9129-4827-b881-e4802703a0ca}",
"modelURL": "atp:/kineticObjects/blocks/planky_yellow.fbx",
"name": "home_model_blocky_block",
"parentID": "{8c29606d-b071-4793-a5d5-26453bb12bf4}",
"position": {
"x": 0.23440317809581757,
"y": -0.035929545760154724,
"z": -0.00016139447689056396
},
"queryAACube": {
"scale": 0.77012991905212402,
"x": 1104.6361083984375,
"y": 460.09011840820312,
"z": -69.792564392089844
},
"rotation": {
"w": 0.986641526222229,
"x": -0.00016996264457702637,
"y": -0.00021627545356750488,
"z": -0.16198150813579559
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"created": "2016-05-09T19:32:51Z",
"dimensions": {
"x": 0.029999999329447746,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{11b3c61c-abe3-48ac-9033-3f88d3efee00}",
"modelURL": "atp:/kineticObjects/blocks/planky_yellow.fbx",
"name": "home_model_blocky_block",
"parentID": "{8c29606d-b071-4793-a5d5-26453bb12bf4}",
"position": {
"x": -0.15134727954864502,
"y": 0.00060278922319412231,
"z": 0.00011575222015380859
},
"queryAACube": {
"scale": 0.77012991905212402,
"x": 1104.79541015625,
"y": 460.090087890625,
"z": -69.902366638183594
},
"rotation": {
"w": -0.00098252296447753906,
"x": -0.030791401863098145,
"y": 0.99939167499542236,
"z": 0.0002511441707611084
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"created": "2016-05-09T19:32:51Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{15c3aeae-1166-4cff-aa53-d732f20a1203}",
"modelURL": "atp:/kineticObjects/blocks/planky_red.fbx",
"name": "home_model_blocky_block",
"parentID": "{8c29606d-b071-4793-a5d5-26453bb12bf4}",
"position": {
"x": -0.35397925972938538,
"y": 0.020401254296302795,
"z": 0.00025978684425354004
},
"queryAACube": {
"scale": 0.82158386707305908,
"x": 1105.195068359375,
"y": 460.06436157226562,
"z": -69.863059997558594
},
"rotation": {
"w": 0.68755638599395752,
"x": -0.00055142492055892944,
"y": 0.00033529102802276611,
"z": -0.72594141960144043
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"angularDamping": 0,
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"created": "2016-05-09T19:30:40Z",
"dimensions": {
"x": 0.029999999329447746,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{8c29606d-b071-4793-a5d5-26453bb12bf4}",
"modelURL": "atp:/kineticObjects/blocks/planky_yellow.fbx",
"name": "home_model_blocky_block",
"queryAACube": {
"scale": 0.25670996308326721,
"x": -0.12835498154163361,
"y": -0.12835498154163361,
"z": -0.12835498154163361
},
"rotation": {
"w": 0.097722500562667847,
"x": 0.097280360758304596,
"y": 0.70029336214065552,
"z": -0.70041131973266602
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
}
],
"Version": 57
}

View file

@ -0,0 +1,286 @@
// this script creates a pile of playable blocks and displays a target arrangement when you trigger it
var BLOCK_RED = {
url: 'atp:/kineticObjects/blocks/planky_red.fbx',
dimensions: {
"x": 0.10000000149011612,
"y": 0.05000000074505806,
"z": 0.25
}
};
var BLOCK_BLUE = {
url: 'atp:/kineticObjects/blocks/planky_blue.fbx',
dimensions: {
"x": 0.05000000074505806,
"y": 0.05000000074505806,
"z": 0.25
},
};
var BLOCK_YELLOW = {
url: 'atp:/kineticObjects/blocks/planky_yellow.fbx',
dimensions: {
"x": 0.029999999329447746,
"y": 0.05000000074505806,
"z": 0.25
}
};
var BLOCK_GREEN = {
url: 'atp:/kineticObjects/blocks/planky_green.fbx',
dimensions: {
"x": 0.10000000149011612,
"y": 0.10000000149011612,
"z": 0.25
},
};
var BLOCK_NATURAL = {
url: "atp:/kineticObjects/blocks/planky_natural.fbx",
dimensions: {
"x": 0.05,
"y": 0.05,
"z": 0.05
}
};
var blocks = [
BLOCK_RED, BLOCK_BLUE, BLOCK_YELLOW, BLOCK_GREEN, BLOCK_NATURAL
];
var arrangements = [{
name: 'greenhenge',
blocks: [BLOCK_GREEN, BLOCK_GREEN, BLOCK_YELLOW, BLOCK_YELLOW],
target: "atp:/blocky/newblocks1.json"
}, {
name: 'tallstuff',
blocks: [BLOCK_RED, BLOCK_RED, BLOCK_RED],
target: "atp:/blocky/newblocks2.json"
}, {
name: 'ostrich',
blocks: [BLOCK_RED, BLOCK_RED, BLOCK_GREEN, BLOCK_YELLOW, BLOCK_NATURAL],
target: "atp:/blocky/newblocks5.json"
}, {
name: 'fourppl',
blocks: [BLOCK_BLUE, BLOCK_BLUE, BLOCK_BLUE, BLOCK_BLUE, BLOCK_NATURAL, BLOCK_NATURAL, BLOCK_NATURAL, BLOCK_NATURAL],
target: "atp:/blocky/newblocks3.json"
}, {
name: 'frogguy',
blocks: [BLOCK_GREEN, BLOCK_GREEN, BLOCK_GREEN, BLOCK_YELLOW, BLOCK_RED, BLOCK_RED, BLOCK_NATURAL, BLOCK_NATURAL],
target: "atp:/blocky/newblocks4.json"
}, {
name: 'dominoes',
blocks: [BLOCK_RED, BLOCK_YELLOW, BLOCK_YELLOW, BLOCK_YELLOW, BLOCK_YELLOW, BLOCK_YELLOW, BLOCK_YELLOW],
target: "atp:/blocky/arrangement6B.json"
}]
var PLAYABLE_BLOCKS_POSITION = {
x: 1097.6,
y: 460.5,
z: -66.22
};
var TARGET_BLOCKS_POSITION = {
x: 1096.82,
y: 460.5,
z: -67.689
};
//#debug
(function() {
print('BLOCK ENTITY SCRIPT')
var _this;
function Blocky() {
_this = this;
}
Blocky.prototype = {
busy: false,
debug: false,
playableBlocks: [],
targetBlocks: [],
preload: function(entityID) {
print('BLOCKY preload')
this.entityID = entityID;
Script.update.connect(_this.update);
},
createTargetBlocks: function(arrangement) {
var created = [];
print('BLOCKY create target blocks')
var created = [];
var success = Clipboard.importEntities(arrangement.target);
if (success === true) {
created = Clipboard.pasteEntities(TARGET_BLOCKS_POSITION)
print('created ' + created);
}
this.targetBlocks = created;
print('BLOCKY TARGET BLOCKS:: ' + this.targetBlocks);
},
createPlayableBlocks: function(arrangement) {
print('BLOCKY creating playable blocks' + arrangement.blocks.length);
arrangement.blocks.forEach(function(block) {
print('BLOCKY in a block loop')
var blockProps = {
name: "home_model_blocky_block",
type: 'Model',
collisionSoundURL: "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
dynamic: true,
collisionless: false,
gravity: {
x: 0,
y: -9.8,
z: 0
},
userData: JSON.stringify({
grabbableKey: {
grabbable: true
},
hifiHomeKey: {
reset: true
}
}),
dimensions: block.dimensions,
modelURL: block.url,
shapeType: 'box',
velocity: {
x: 0,
y: -0.01,
z: 0,
},
position: PLAYABLE_BLOCKS_POSITION
}
var newBlock = Entities.addEntity(blockProps);
print('BLOCKY made a playable block' + newBlock)
_this.playableBlocks.push(newBlock);
print('BLOCKY pushing it into playable blocks');
})
print('BLOCKY after going through playable arrangement')
},
startNearTrigger: function() {
print('BLOCKY got a near trigger');
this.advanceRound();
},
advanceRound: function() {
print('BLOCKY advance round');
this.busy = true;
this.cleanup();
var arrangement = arrangements[Math.floor(Math.random() * arrangements.length)];
this.createTargetBlocks(arrangement);
if (this.debug === true) {
this.debugCreatePlayableBlocks();
} else {
this.createPlayableBlocks(arrangement);
}
Script.setTimeout(function() {
_this.busy = false;
}, 1000)
},
findBlocks: function() {
var found = [];
var results = Entities.findEntities(MyAvatar.position, 10);
results.forEach(function(result) {
var properties = Entities.getEntityProperties(result);
print('got result props')
if (properties.name.indexOf('blocky_block') > -1) {
found.push(result);
}
});
return found;
},
cleanup: function() {
print('BLOCKY cleanup');
var blocks = this.findBlocks();
print('BLOCKY cleanup2' + blocks.length)
blocks.forEach(function(block) {
Entities.deleteEntity(block);
})
print('BLOCKY after find and delete')
this.targetBlocks.forEach(function(block) {
Entities.deleteEntity(block);
});
this.playableBlocks.forEach(function(block) {
Entities.deleteEntity(block);
});
this.targetBlocks = [];
this.playableBlocks = [];
},
debugCreatePlayableBlocks: function() {
print('BLOCKY debug create');
var howMany = 10;
var i;
for (i = 0; i < howMany; i++) {
var block = blocks[Math.floor(Math.random() * blocks.length)];
var blockProps = {
name: "home_model_blocky_block",
type: 'Model',
collisionSoundURL: "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
dynamic: false,
collisionless: true,
userData: JSON.stringify({
grabbableKey: {
grabbable: true
},
hifiHomeKey: {
reset: true
}
}),
dimensions: block.dimensions,
modelURL: block.url,
shapeType: 'box',
velocity: {
x: 0,
y: -0.01,
z: 0,
},
position: PLAYABLE_BLOCKS_POSITION
}
this.playableBlocks.push(Entities.addEntity(blockProps));
}
},
unload: function() {
this.cleanup();
Script.update.disconnect(_this.update);
},
clickReleaseOnEntity: function() {
print('BLOCKY click')
this.startNearTrigger();
},
update: function() {
if (_this.busy === true) {
return;
}
var BEAM_TRIGGER_THRESHOLD = 0.075;
var BEAM_POSITION = {
x: 1098.4424,
y: 460.3090,
z: -66.2190
};
var leftHandPosition = MyAvatar.getLeftPalmPosition();
var rightHandPosition = MyAvatar.getRightPalmPosition();
var rightDistance = Vec3.distance(leftHandPosition, BEAM_POSITION)
var leftDistance = Vec3.distance(rightHandPosition, BEAM_POSITION)
if (rightDistance < BEAM_TRIGGER_THRESHOLD || leftDistance < BEAM_TRIGGER_THRESHOLD) {
_this.startNearTrigger();
}
}
}
return new Blocky();
})

View file

@ -0,0 +1,136 @@
{
"Entities": [
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:35:13Z",
"dimensions": {
"x": 0.029999999329447746,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{aad3b1c3-6478-46dd-a985-800d0e38c8e7}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_yellow.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.069580078125,
"y": 0.153778076171875,
"z": 0.04181671142578125
},
"queryAACube": {
"scale": 0.25670996308326721,
"x": -0.058774903416633606,
"y": 0.025423094630241394,
"z": -0.086538270115852356
},
"rotation": {
"w": 0.95882409811019897,
"x": -1.896415778901428e-05,
"y": 0.28400072455406189,
"z": -1.0296697837475222e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:30:51Z",
"dimensions": {
"x": 0.029999999329447746,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{f5714678-d436-4353-b0c8-2d73599dda3a}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_yellow.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.0181884765625,
"y": 0.153778076171875,
"z": 0.0773468017578125
},
"queryAACube": {
"scale": 0.25670996308326721,
"x": -0.11016650497913361,
"y": 0.025423094630241394,
"z": -0.051008179783821106
},
"rotation": {
"w": 0.95882409811019897,
"x": -1.896415778901428e-05,
"y": 0.28400072455406189,
"z": -1.0296697837475222e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:30:51Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.10000000149011612,
"z": 0.25
},
"id": "{0cf93a58-18d2-4c69-9c1b-33d6d1e647b8}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_green.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.078857421875,
"y": 0.002899169921875,
"z": 0.11455535888671875
},
"queryAACube": {
"scale": 0.28722813725471497,
"x": -0.064756646752357483,
"y": -0.14071489870548248,
"z": -0.029058709740638733
},
"rotation": {
"w": 0.33741602301597595,
"x": -0.33740735054016113,
"y": 0.62139773368835449,
"z": 0.62142699956893921
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:33:02Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.10000000149011612,
"z": 0.25
},
"id": "{7f8791fb-e236-4280-b9d4-4ee6d1663e2a}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_green.fbx",
"name": "home_model_blocky_block",
"queryAACube": {
"scale": 0.28722813725471497,
"x": -0.14361406862735748,
"y": -0.14361406862735748,
"z": -0.14361406862735748
},
"rotation": {
"w": 0.68138498067855835,
"x": -0.68140000104904175,
"y": 0.18894240260124207,
"z": 0.1889689564704895
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
}
],
"Version": 57
}

View file

@ -0,0 +1,107 @@
{
"Entities": [
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:37:24Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{2454f490-787c-491b-9b7e-c0e098af86e8}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_red.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0,
"y": 0.504150390625,
"z": 0
},
"queryAACube": {
"scale": 0.27386128902435303,
"x": -0.13693064451217651,
"y": 0.36721974611282349,
"z": -0.13693064451217651
},
"rotation": {
"w": 0.70711755752563477,
"x": 0.70709598064422607,
"y": 0,
"z": -2.1579186068265699e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:37:24Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{5bf66e29-a3b6-4171-8470-6e0462d51dd3}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_red.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0,
"y": 0,
"z": 0.00112152099609375
},
"queryAACube": {
"scale": 0.27386128902435303,
"x": -0.13693064451217651,
"y": -0.13693064451217651,
"z": -0.13580912351608276
},
"rotation": {
"w": 0.70711755752563477,
"x": 0.70709598064422607,
"y": 0,
"z": -2.1579186068265699e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:39:35Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{2cf52537-9f88-41eb-86d6-14a5ff218fb6}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_red.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0,
"y": 0.253204345703125,
"z": 0
},
"queryAACube": {
"scale": 0.27386128902435303,
"x": -0.13693064451217651,
"y": 0.11627370119094849,
"z": -0.13693064451217651
},
"rotation": {
"w": 0.70711755752563477,
"x": 0.70709598064422607,
"y": 0,
"z": -2.1579186068265699e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
}
],
"Version": 57
}

View file

@ -0,0 +1,277 @@
{
"Entities": [
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:41:47Z",
"dimensions": {
"x": 0.05000000074505806,
"y": 0.05000000074505806,
"z": 0.05000000074505806
},
"id": "{806e18fc-1ffd-4d7a-a405-52f1ad6cc164}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_natural.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.1412353515625,
"y": 0.150634765625,
"z": 0.19216156005859375
},
"queryAACube": {
"scale": 0.086602538824081421,
"x": 0.09793408215045929,
"y": 0.10733349621295929,
"z": 0.14886029064655304
},
"rotation": {
"w": 0.96592974662780762,
"x": -1.8688122509047389e-05,
"y": 0.25880429148674011,
"z": -1.0789593034132849e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:41:47Z",
"dimensions": {
"x": 0.05000000074505806,
"y": 0.05000000074505806,
"z": 0.05000000074505806
},
"id": "{3c99f577-fc38-4f5b-8b7b-2dc36b742ff9}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_natural.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.078369140625,
"y": 0.150634765625,
"z": 0.10829925537109375
},
"queryAACube": {
"scale": 0.086602538824081421,
"x": 0.03506787121295929,
"y": 0.10733349621295929,
"z": 0.06499798595905304
},
"rotation": {
"w": 0.96592974662780762,
"x": -1.8688122509047389e-05,
"y": 0.25880429148674011,
"z": -1.0789593034132849e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:41:47Z",
"dimensions": {
"x": 0.05000000074505806,
"y": 0.05000000074505806,
"z": 0.05000000074505806
},
"id": "{3aa37e21-48ff-4d41-be0b-d47a67e004cc}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_natural.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.2056884765625,
"y": 0.150634765625,
"z": 0.2870941162109375
},
"queryAACube": {
"scale": 0.086602538824081421,
"x": 0.16238720715045929,
"y": 0.10733349621295929,
"z": 0.24379284679889679
},
"rotation": {
"w": 0.96592974662780762,
"x": -1.8688122509047389e-05,
"y": 0.25880429148674011,
"z": -1.0789593034132849e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:39:35Z",
"dimensions": {
"x": 0.05000000074505806,
"y": 0.05000000074505806,
"z": 0.05000000074505806
},
"id": "{a34966c4-0f1c-4103-8857-f998559318e7}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_natural.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0,
"y": 0.150634765625,
"z": 0
},
"queryAACube": {
"scale": 0.086602538824081421,
"x": -0.04330126941204071,
"y": 0.10733349621295929,
"z": -0.04330126941204071
},
"rotation": {
"w": 0.96592974662780762,
"x": -1.8688122509047389e-05,
"y": 0.25880429148674011,
"z": -1.0789593034132849e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:41:47Z",
"dimensions": {
"x": 0.05000000074505806,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{96336167-827c-48ec-b641-ee462fb2abdc}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_blue.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.2088623046875,
"y": 0,
"z": 0.28765869140625
},
"queryAACube": {
"scale": 0.25980761647224426,
"x": 0.078958496451377869,
"y": -0.12990380823612213,
"z": 0.15775488317012787
},
"rotation": {
"w": 0.68138498067855835,
"x": -0.68140000104904175,
"y": 0.18894240260124207,
"z": 0.1889689564704895
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:39:35Z",
"dimensions": {
"x": 0.05000000074505806,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{17b1be58-b3d6-4b27-856e-f74b8ba34309}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_blue.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.001953125,
"y": 0,
"z": 0.00205230712890625
},
"queryAACube": {
"scale": 0.25980761647224426,
"x": -0.12795068323612213,
"y": -0.12990380823612213,
"z": -0.12785150110721588
},
"rotation": {
"w": 0.68138498067855835,
"x": -0.68140000104904175,
"y": 0.18894240260124207,
"z": 0.1889689564704895
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:41:47Z",
"dimensions": {
"x": 0.05000000074505806,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{161eefc7-ba39-4301-913f-edb4f7d9236e}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_blue.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.0777587890625,
"y": 0,
"z": 0.10608673095703125
},
"queryAACube": {
"scale": 0.25980761647224426,
"x": -0.052145019173622131,
"y": -0.12990380823612213,
"z": -0.023817077279090881
},
"rotation": {
"w": 0.68138498067855835,
"x": -0.68140000104904175,
"y": 0.18894240260124207,
"z": 0.1889689564704895
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:41:47Z",
"dimensions": {
"x": 0.05000000074505806,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{ea1eebe2-fef3-4587-9f87-f7812359ec8b}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_blue.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.152099609375,
"y": 0,
"z": 0.1891937255859375
},
"queryAACube": {
"scale": 0.25980761647224426,
"x": 0.022195801138877869,
"y": -0.12990380823612213,
"z": 0.059289917349815369
},
"rotation": {
"w": 0.68138498067855835,
"x": -0.68140000104904175,
"y": 0.18894240260124207,
"z": 0.1889689564704895
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
}
],
"Version": 57
}

View file

@ -0,0 +1,277 @@
{
"Entities": [
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:52:42Z",
"dimensions": {
"x": 0.05000000074505806,
"y": 0.05000000074505806,
"z": 0.05000000074505806
},
"id": "{df9f2e81-c7c3-45b3-9459-0dc1647e3ac8}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_natural.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.1153564453125,
"y": 0.3056640625,
"z": 0.19878387451171875
},
"queryAACube": {
"scale": 0.086602538824081421,
"x": 0.07205517590045929,
"y": 0.2623627781867981,
"z": 0.15548260509967804
},
"rotation": {
"w": 0.87880980968475342,
"x": -6.1288210417842492e-06,
"y": -0.4771721363067627,
"z": -2.0690549717983231e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:48:20Z",
"dimensions": {
"x": 0.05000000074505806,
"y": 0.05000000074505806,
"z": 0.05000000074505806
},
"id": "{00f70709-d22b-4e50-98b6-c49783a1ca2d}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_natural.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.0565185546875,
"y": 0.3056640625,
"z": 0.0875244140625
},
"queryAACube": {
"scale": 0.086602538824081421,
"x": 0.01321728527545929,
"y": 0.2623627781867981,
"z": 0.04422314465045929
},
"rotation": {
"w": 0.87880980968475342,
"x": -6.1288210417842492e-06,
"y": -0.4771721363067627,
"z": -2.0690549717983231e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:48:20Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{925922c7-c8da-4862-8695-9e823cde5f43}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_red.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.165771484375,
"y": 0.1016845703125,
"z": 0.3075103759765625
},
"queryAACube": {
"scale": 0.27386128902435303,
"x": 0.028840839862823486,
"y": -0.035246074199676514,
"z": 0.17057973146438599
},
"rotation": {
"w": 0.76051729917526245,
"x": 0.5797961950302124,
"y": 0.20168730616569519,
"z": -0.21159422397613525
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:48:20Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{9754d1bd-30f0-473c-87fa-159902f3ae54}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_red.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0,
"y": 0.1016845703125,
"z": 0
},
"queryAACube": {
"scale": 0.27386128902435303,
"x": -0.13693064451217651,
"y": -0.035246074199676514,
"z": -0.13693064451217651
},
"rotation": {
"w": -0.24484673142433167,
"x": -0.2088056355714798,
"y": 0.70473498106002808,
"z": -0.63229680061340332
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:48:20Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.10000000149011612,
"z": 0.25
},
"id": "{d2cd5cb1-cc1c-48b5-a190-b25279ca46aa}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_green.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.0667724609375,
"y": 0.18121337890625,
"z": 0.155120849609375
},
"queryAACube": {
"scale": 0.28722813725471497,
"x": -0.076841607689857483,
"y": 0.037599310278892517,
"z": 0.011506780982017517
},
"rotation": {
"w": 0.9612659215927124,
"x": -1.8873581211664714e-05,
"y": 0.27562269568443298,
"z": -1.0461797501193359e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:48:20Z",
"dimensions": {
"x": 0.029999999329447746,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{168a3f35-29f3-4a5c-92e5-868ce8476052}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_yellow.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.08154296875,
"y": 0.256256103515625,
"z": 0.1437225341796875
},
"queryAACube": {
"scale": 0.25670996308326721,
"x": -0.046812012791633606,
"y": 0.12790112197399139,
"z": 0.015367552638053894
},
"rotation": {
"w": 0.96592974662780762,
"x": -1.8688122509047389e-05,
"y": 0.25880429148674011,
"z": -1.0789593034132849e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:48:20Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.10000000149011612,
"z": 0.25
},
"id": "{8df113eb-303f-461a-914b-1ff86083af28}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_green.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.0667724609375,
"y": 0.093353271484375,
"z": 0.155120849609375
},
"queryAACube": {
"scale": 0.28722813725471497,
"x": -0.076841607689857483,
"y": -0.050260797142982483,
"z": 0.011506780982017517
},
"rotation": {
"w": 0.9612659215927124,
"x": -1.8873581211664714e-05,
"y": 0.27562269568443298,
"z": -1.0461797501193359e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T22:48:20Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.10000000149011612,
"z": 0.25
},
"id": "{6126fb1e-5702-4ea5-9840-fc93534a284c}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_green.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.0667724609375,
"y": 0,
"z": 0.155120849609375
},
"queryAACube": {
"scale": 0.28722813725471497,
"x": -0.076841607689857483,
"y": -0.14361406862735748,
"z": 0.011506780982017517
},
"rotation": {
"w": 0.9612659215927124,
"x": -1.8873581211664714e-05,
"y": 0.27562269568443298,
"z": -1.0461797501193359e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
}
],
"Version": 57
}

View file

@ -0,0 +1,175 @@
{
"Entities": [
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T23:42:57Z",
"dimensions": {
"x": 0.029999999329447746,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{f89e9217-6048-4ad8-a9fa-80404931864c}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_yellow.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.0689697265625,
"y": 0.336700439453125,
"z": 0.02086639404296875
},
"queryAACube": {
"scale": 0.25670996308326721,
"x": -0.059385254979133606,
"y": 0.20834545791149139,
"z": -0.10748858749866486
},
"rotation": {
"w": 0.66232722997665405,
"x": 0.66232722997665405,
"y": 0.24763399362564087,
"z": -0.24763399362564087
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T23:42:57Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.10000000149011612,
"z": 0.25
},
"id": "{e065e9c3-b722-4ad3-bbd4-3f12efb530f5}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_green.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.0335693359375,
"y": 0.179962158203125,
"z": 0.0505828857421875
},
"queryAACube": {
"scale": 0.28722813725471497,
"x": -0.11004473268985748,
"y": 0.036348089575767517,
"z": -0.093031182885169983
},
"rotation": {
"w": 0.88294041156768799,
"x": -6.3091447373153642e-06,
"y": -0.46948501467704773,
"z": -2.0636278350139037e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T23:42:57Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{f1367c6c-744a-4ee2-9a6f-ffe89fe67e7e}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_red.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0,
"y": 0,
"z": 0.03073883056640625
},
"queryAACube": {
"scale": 0.27386128902435303,
"x": -0.13693064451217651,
"y": -0.13693064451217651,
"z": -0.10619181394577026
},
"rotation": {
"w": 0.67456501722335815,
"x": 0.67456501722335815,
"y": 0.21204251050949097,
"z": -0.21204251050949097
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T23:42:57Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.05000000074505806,
"z": 0.25
},
"id": "{73c2bd96-e77d-4ba2-908b-1ee8ca7c814c}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_red.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.02685546875,
"y": 0,
"z": 0.0877532958984375
},
"queryAACube": {
"scale": 0.27386128902435303,
"x": -0.11007517576217651,
"y": -0.13693064451217651,
"z": -0.049177348613739014
},
"rotation": {
"w": 0.67456501722335815,
"x": 0.67456501722335815,
"y": 0.21204251050949097,
"z": -0.21204251050949097
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
},
{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionless": 1,
"created": "2016-05-23T23:42:57Z",
"dimensions": {
"x": 0.05000000074505806,
"y": 0.05000000074505806,
"z": 0.05000000074505806
},
"id": "{28fd21e4-2138-4ca1-875b-1d35cbefa6b8}",
"ignoreForCollisions": 1,
"modelURL": "atp:/kineticObjects/blocks/planky_natural.fbx",
"name": "home_model_blocky_block",
"position": {
"x": 0.0506591796875,
"y": 0.485748291015625,
"z": 0
},
"queryAACube": {
"scale": 0.086602538824081421,
"x": 0.0073579102754592896,
"y": 0.4424470067024231,
"z": -0.04330126941204071
},
"rotation": {
"w": 1,
"x": -1.52587890625e-05,
"y": -1.52587890625e-05,
"z": -1.52587890625e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"hifiHomeKey\":{\"reset\":true}}"
}
],
"Version": 57
}

View file

@ -0,0 +1,27 @@
//
//
// Created by The Content Team 4/10/216
// Copyright 2016 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 blockyPath = 'atp:/blocky/wrapper.js';
Script.include(blockyPath);
var center = Vec3.sum(Vec3.sum(MyAvatar.position, {
x: 0,
y: 0.5,
z: 0
}), Vec3.multiply(1, Quat.getFront(Camera.getOrientation())));
var blocky = new BlockyGame(center, {
x: 0,
y: 0,
z: 0
});
Script.scriptEnding.connect(function() {
blocky.cleanup()
})

View file

@ -0,0 +1,51 @@
// createPingPongGun.js
//
// Script Type: Entity Spawner
// Created by James B. Pollack on 9/30/2015
// Copyright 2015 High Fidelity, Inc.
//
// This script creates a gun that shoots ping pong balls when you pull the trigger on a hand controller.
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
BlockyGame = function(spawnPosition, spawnRotation) {
var scriptURL = "atp:/blocky/blocky.js";
var blockyProps = {
type: 'Model',
modelURL:'atp:/blocky/swiper.fbx',
name: 'home_box_blocky_resetter',
dimensions: {
x: 0.2543,
y: 0.3269,
z: 0.4154
},
rotation:Quat.fromPitchYawRollDegrees(-9.5165,-147.3687,16.6577),
script: scriptURL,
userData: JSON.stringify({
"grabbableKey": {
"wantsTrigger": true
},
'hifiHomeKey': {
'reset': true
}
}),
dynamic: false,
position: spawnPosition
};
var blocky = Entities.addEntity(blockyProps);
function cleanup() {
print('BLOCKY CLEANUP!')
Entities.deleteEntity(blocky);
}
this.cleanup = cleanup;
print('HOME CREATED BLOCKY GAME BLOCK 1')
}

View file

@ -0,0 +1,60 @@
(function() {
var _this;
HoverBall = function() {
_this = this;
}
var MIN_DISTANCE_THRESHOLD = 0.075;
var CENTER_POINT_LOCATION = {
x: 0,
y: 0,
z: 0
};
HoverBall.prototype = {
preload: function(entityID) {
this.entityID = entityID;
},
unload: function() {
},
startDistanceGrab: function() {
},
continueDistantGrab: function() {
var position = Entities.getEntityProperties(_this.entityID).position;
var distanceFromCenterPoint = Vec3.distance(position, CENTER_POINT_LOCATION);
if (distanceFromCenterPoint < MIN_DISTANCE_THRESHOLD) {
_this.turnOnGlow();
} else {
_this.turnOffGlow();
}
},
releaseGrab: function() {
_this.turnOffGlow();
},
turnOnGlow: function() {
},
turnOffGlow: function() {
},
findHoverContainer: function() {
var position = Entities.getEntityProperties(_this.entityID).position;
var results = Entities.findEntities(position, 3);
results.forEach(function(item) {
var props = Entities.getEntityProperties(item);
if (props.name.indexOf('hoverGame_container') > -1) {
return item
}
})
},
}
return new HoverBall();
})

View file

@ -0,0 +1,28 @@
(function() {
HoverContainer = function() {
}
HoverContainer.prototype = {
preload: function(entityID) {
this.entityID = entityID;
var data = {
action: 'add',
id: this.entityID
};
Messages.sendLocalMessage('Hifi-Hand-RayPick-Blacklist', JSON.stringify(data))
},
unload: function() {
var data = {
action: 'remove',
id: this.entityID
};
Messages.sendLocalMessage('Hifi-Hand-RayPick-Blacklist', JSON.stringify(data))
}
}
return new HoverContainer();
})

View file

@ -0,0 +1,80 @@
// createPingPongGun.js
//
// Script Type: Entity Spawner
// Created by James B. Pollack on 9/30/2015
// Copyright 2015 High Fidelity, Inc.
//
// This script creates a gun that shoots ping pong balls when you pull the trigger on a hand controller.
// 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:1098.4813,y:461.6781,z:-71.3820}
// var dimensions = {x:1.0233,y:3.1541,z:0.8684}
HoverGame = function(spawnPosition, spawnRotation) {
var scriptURL = "atp:/hoverGame/hoverInner.js";
var hoverContainerProps = {
type: 'Model',
modelURL: 'atp:/hoverGame/hover.fbx',
name: 'home_model_hoverGame_container',
dimensions: {x:1.0233,y:3.1541,z:0.8684},
compoundShapeURL: 'atp:/hoverGame/hoverHull.obj',
rotation: spawnRotation,
script: scriptURL,
userData: JSON.stringify({
"grabbableKey": {
"grabbable":false
},
'hifiHomeKey': {
'reset': true
}
}),
dynamic: false,
position: spawnPosition
};
var hoverBall = {
type: 'Sphere',
name: 'home_model_hoverGame_sphere',
dimensions: {
x: 0.25,
y: 0.25,
z: 0.25,
},
compoundShapeURL: 'atp:/hoverGame/hoverHull.obj',
rotation: spawnRotation,
script: scriptURL,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
dynamic: true,
gravity:{
x:0,
y:-9.8,
z:0
},
position: spawnPosition,
userData:JSON.stringify({
grabKey:{
shouldCollideWith:'static'
}
})
};
var hoverContainer = Entities.addEntity(hoverContainerProps);
var hoverBall = Entities.addEntity(hoverContainerProps);
function cleanup() {
print('HOVER GAME CLEANUP!')
Entities.deleteEntity(hoverInner);
}
this.cleanup = cleanup;
print('HOME CREATED HOVER GAME')
}

View file

@ -0,0 +1,37 @@
{
"Entities": [{
"name": "home_model_bench",
"collisionsWillMove": 1,
"compoundShapeURL": "atp:/kineticObjects/bench/Bench.obj",
"created": "2016-05-17T19:27:31Z",
"dimensions": {
"x": 2.3647537231445312,
"y": 0.51260757446289062,
"z": 0.49234861135482788
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -5,
"z": 0
},
"id": "{733c3f02-a98a-4876-91dc-320a26a07090}",
"modelURL": "atp:/kineticObjects/bench/Bench.fbx",
"queryAACube": {
"scale": 2.4692578315734863,
"x": -1.2346289157867432,
"y": -1.2346289157867432,
"z": -1.2346289157867432
},
"rotation": {
"w": 0.88613712787628174,
"x": -0.0015716552734375,
"y": -0.46337074041366577,
"z": -1.52587890625e-05
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}],
"Version": 57
}

View file

@ -1,778 +0,0 @@
{
"Entities": [{
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionsWillMove": 1,
"created": "2016-03-23T21:29:36Z",
"dimensions": {
"x": 0.05000000074505806,
"y": 0.05000000074505806,
"z": 0.05000000074505806
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"velocity": {
"x": 0,
"y": -0.1,
"z": 0
},
"id": "{5371218c-e05b-49da-ac70-81f1f76c55ea}",
"modelURL": "atp:/kineticObjects/blocks/planky_natural.fbx",
"name": "home_model_block",
"position": {
"x": 0.69732666015625,
"y": 0.1600341796875,
"z": 0.28265380859375
},
"queryAACube": {
"scale": 0.086602538824081421,
"x": 0.6540253758430481,
"y": 0.11673291027545929,
"z": 0.23935253918170929
},
"rotation": {
"w": 0.996917724609375,
"x": -0.0001678466796875,
"y": 0.078294038772583008,
"z": -0.0003204345703125
},
"shapeType": "box",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}, {
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionsWillMove": 1,
"created": "2016-03-23T21:29:36Z",
"dimensions": {
"x": 0.05000000074505806,
"y": 0.05000000074505806,
"z": 0.05000000074505806
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"velocity": {
"x": 0,
"y": -0.1,
"z": 0
},
"id": "{ccc1198a-a501-48b8-959a-68297258aea7}",
"modelURL": "atp:/kineticObjects/blocks/planky_natural.fbx",
"name": "home_model_block",
"position": {
"x": 0.47344970703125,
"y": 0.06005859375,
"z": 0.30706787109375
},
"queryAACube": {
"scale": 0.086602538824081421,
"x": 0.4301484227180481,
"y": 0.01675732433795929,
"z": 0.2637665867805481
},
"rotation": {
"w": 0.70644688606262207,
"x": 0.70638585090637207,
"y": -0.030960559844970703,
"z": 0.031174182891845703
},
"shapeType": "box",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}, {
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionsWillMove": 1,
"created": "2016-03-23T21:29:36Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.05000000074505806,
"z": 0.25
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"velocity": {
"x": 0,
"y": -0.1,
"z": 0
},
"id": "{3aaf5dd5-16d8-4852-880d-8256de68de19}",
"modelURL": "atp:/kineticObjects/blocks/planky_red.fbx",
"name": "home_model_block",
"position": {
"x": 0.2613525390625,
"y": 0.01007080078125,
"z": 0.359466552734375
},
"queryAACube": {
"scale": 0.27386128902435303,
"x": 0.12442189455032349,
"y": -0.12685984373092651,
"z": 0.22253590822219849
},
"rotation": {
"w": -4.57763671875e-05,
"x": 0.35637450218200684,
"y": -4.57763671875e-05,
"z": 0.93432521820068359
},
"shapeType": "box",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}, {
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionsWillMove": 1,
"created": "2016-03-23T21:29:36Z",
"dimensions": {
"x": 0.029999999329447746,
"y": 0.05000000074505806,
"z": 0.25
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"velocity": {
"x": 0,
"y": -0.1,
"z": 0
},
"id": "{0474a29f-c45b-4d42-ae95-0c0bd1e6c501}",
"modelURL": "atp:/kineticObjects/blocks/planky_yellow.fbx",
"name": "home_model_block",
"position": {
"x": 0.30487060546875,
"y": 0.01007080078125,
"z": 0.188262939453125
},
"queryAACube": {
"scale": 0.25670996308326721,
"x": 0.17651562392711639,
"y": -0.11828418076038361,
"z": 0.059907957911491394
},
"rotation": {
"w": 0.99496448040008545,
"x": 1.52587890625e-05,
"y": 0.10020601749420166,
"z": 0.0002288818359375
},
"shapeType": "box",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}, {
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionsWillMove": 1,
"created": "2016-03-23T21:29:36Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.10000000149011612,
"z": 0.25
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"velocity": {
"x": 0,
"y": -0.1,
"z": 0
},
"id": "{53e06851-8346-45ac-bdb5-0a74c99b5bd5}",
"modelURL": "atp:/kineticObjects/blocks/planky_green.fbx",
"name": "home_model_block",
"position": {
"x": 0.40277099609375,
"y": 0.035064697265625,
"z": 0.254364013671875
},
"queryAACube": {
"scale": 0.28722813725471497,
"x": 0.25915694236755371,
"y": -0.10854937136173248,
"z": 0.11074994504451752
},
"rotation": {
"w": 0.70650792121887207,
"x": -0.031143665313720703,
"y": -0.031143665313720703,
"z": 0.70632481575012207
},
"shapeType": "box",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}, {
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionsWillMove": 1,
"created": "2016-03-23T21:29:36Z",
"dimensions": {
"x": 0.029999999329447746,
"y": 0.05000000074505806,
"z": 0.25
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"velocity": {
"x": 0,
"y": -0.1,
"z": 0
},
"id": "{38bcb70d-e384-4b60-878a-e34d4830f045}",
"modelURL": "atp:/kineticObjects/blocks/planky_yellow.fbx",
"name": "home_model_block",
"position": {
"x": 0.54962158203125,
"y": 0.010040283203125,
"z": 0.294647216796875
},
"queryAACube": {
"scale": 0.25670996308326721,
"x": 0.42126661539077759,
"y": -0.11831469833850861,
"z": 0.16629223525524139
},
"rotation": {
"w": 0.999969482421875,
"x": -7.62939453125e-05,
"y": -0.0037384629249572754,
"z": 0.0001068115234375
},
"shapeType": "box",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}, {
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionsWillMove": 1,
"created": "2016-03-23T21:29:36Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.05000000074505806,
"z": 0.25
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"velocity": {
"x": 0,
"y": -0.1,
"z": 0
},
"id": "{fa8f8bbc-5bd0-4121-985d-75ce2f68eba1}",
"modelURL": "atp:/kineticObjects/blocks/planky_red.fbx",
"name": "home_model_block",
"position": {
"x": 0.52001953125,
"y": 0.01007080078125,
"z": 0
},
"queryAACube": {
"scale": 0.27386128902435303,
"x": 0.38308888673782349,
"y": -0.12685984373092651,
"z": -0.13693064451217651
},
"rotation": {
"w": 0.9861142635345459,
"x": -7.62939453125e-05,
"y": -0.16603344678878784,
"z": -7.62939453125e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}, {
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionsWillMove": 1,
"created": "2016-03-23T21:29:36Z",
"dimensions": {
"x": 0.029999999329447746,
"y": 0.05000000074505806,
"z": 0.25
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"velocity": {
"x": 0,
"y": -0.1,
"z": 0
},
"id": "{d4b8582b-b707-453c-89c6-65e358da5cd7}",
"modelURL": "atp:/kineticObjects/blocks/planky_yellow.fbx",
"name": "home_model_block",
"position": {
"x": 0.66876220703125,
"y": 0,
"z": 0.012939453125
},
"queryAACube": {
"scale": 0.25670996308326721,
"x": 0.54040724039077759,
"y": -0.12835498154163361,
"z": -0.11541552841663361
},
"rotation": {
"w": 0.70589756965637207,
"x": 0.036270737648010254,
"y": -0.036331713199615479,
"z": -0.70647746324539185
},
"shapeType": "box",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}, {
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionsWillMove": 1,
"created": "2016-03-23T21:29:36Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.05000000074505806,
"z": 0.25
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"velocity": {
"x": 0,
"y": -0.1,
"z": 0
},
"id": "{3b5b53fb-7ee5-44eb-9b81-8de8a525c433}",
"modelURL": "atp:/kineticObjects/blocks/planky_red.fbx",
"name": "home_model_block",
"position": {
"x": 0.83819580078125,
"y": 0.135040283203125,
"z": 0.261627197265625
},
"queryAACube": {
"scale": 0.27386128902435303,
"x": 0.70126515626907349,
"y": -0.0018903613090515137,
"z": 0.12469655275344849
},
"rotation": {
"w": 0.69332420825958252,
"x": 0.13832306861877441,
"y": -0.13841456174850464,
"z": -0.69353783130645752
},
"shapeType": "box",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}, {
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionsWillMove": 1,
"created": "2016-03-23T21:29:36Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.10000000149011612,
"z": 0.25
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"velocity": {
"x": 0,
"y": -0.1,
"z": 0
},
"id": "{0d1f27e9-7e74-4263-9428-8c8f7aac94a6}",
"modelURL": "atp:/kineticObjects/blocks/planky_green.fbx",
"name": "home_model_block",
"position": {
"x": 0.61773681640625,
"y": 0.0350341796875,
"z": 0.265533447265625
},
"queryAACube": {
"scale": 0.28722813725471497,
"x": 0.47412276268005371,
"y": -0.10857988893985748,
"z": 0.12191937863826752
},
"rotation": {
"w": 0.9998779296875,
"x": -4.57763671875e-05,
"y": -0.014206171035766602,
"z": 1.52587890625e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}, {
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionsWillMove": 1,
"created": "2016-03-23T21:29:36Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.10000000149011612,
"z": 0.25
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"velocity": {
"x": 0,
"y": -0.1,
"z": 0
},
"id": "{79ea518f-aac3-45ff-b22d-6d295b3c9e87}",
"modelURL": "atp:/kineticObjects/blocks/planky_green.fbx",
"name": "home_model_block",
"position": {
"x": 0.7188720703125,
"y": 0.08502197265625,
"z": 0.26397705078125
},
"queryAACube": {
"scale": 0.28722813725471497,
"x": 0.57525801658630371,
"y": -0.058592095971107483,
"z": 0.12036298215389252
},
"rotation": {
"w": 0.99993896484375,
"x": -4.57763671875e-05,
"y": -0.0099946856498718262,
"z": -0.0001068115234375
},
"shapeType": "box",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}, {
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionsWillMove": 1,
"created": "2016-03-23T21:29:36Z",
"dimensions": {
"x": 0.05000000074505806,
"y": 0.05000000074505806,
"z": 0.25
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"velocity": {
"x": 0,
"y": -0.1,
"z": 0
},
"id": "{ff470ff9-c889-4893-a25f-80895bff0e9a}",
"modelURL": "atp:/kineticObjects/blocks/planky_blue.fbx",
"name": "home_model_block",
"position": {
"x": 0.74981689453125,
"y": 0.010040283203125,
"z": 0.258575439453125
},
"queryAACube": {
"scale": 0.25980761647224426,
"x": 0.61991310119628906,
"y": -0.11986352503299713,
"z": 0.12867163121700287
},
"rotation": {
"w": 0.99993896484375,
"x": -4.57763671875e-05,
"y": -0.010666072368621826,
"z": -0.0003814697265625
},
"shapeType": "box",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}, {
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionsWillMove": 1,
"created": "2016-03-23T21:29:36Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.10000000149011612,
"z": 0.25
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"velocity": {
"x": 0,
"y": -0.1,
"z": 0
},
"id": "{b5319f85-603d-436b-8bbe-fc9f798ca738}",
"modelURL": "atp:/kineticObjects/blocks/planky_green.fbx",
"name": "home_model_block",
"position": {
"x": 0.8824462890625,
"y": 0.0350341796875,
"z": 0.281097412109375
},
"queryAACube": {
"scale": 0.28722813725471497,
"x": 0.73883223533630371,
"y": -0.10857988893985748,
"z": 0.13748334348201752
},
"rotation": {
"w": 0.999847412109375,
"x": -4.57763671875e-05,
"y": -0.016922235488891602,
"z": 1.52587890625e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}, {
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionsWillMove": 1,
"created": "2016-03-23T21:29:36Z",
"dimensions": {
"x": 0.05000000074505806,
"y": 0.05000000074505806,
"z": 0.25
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"velocity": {
"x": 0,
"y": -0.1,
"z": 0
},
"id": "{944a4616-8dac-4d6a-a92b-49fa98514416}",
"modelURL": "atp:/kineticObjects/blocks/planky_blue.fbx",
"name": "home_model_block",
"position": {
"x": 0.963623046875,
"y": 0.010009765625,
"z": 0.25885009765625
},
"queryAACube": {
"scale": 0.25980761647224426,
"x": 0.83371925354003906,
"y": -0.11989404261112213,
"z": 0.12894628942012787
},
"rotation": {
"w": 0.999847412109375,
"x": -4.57763671875e-05,
"y": -0.017379999160766602,
"z": 1.52587890625e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}, {
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionsWillMove": 1,
"created": "2016-03-23T21:29:36Z",
"dimensions": {
"x": 0.05000000074505806,
"y": 0.05000000074505806,
"z": 0.25
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"velocity": {
"x": 0,
"y": -0.1,
"z": 0
},
"id": "{ea6a1038-7047-4a1e-bdbd-076d6e41508c}",
"modelURL": "atp:/kineticObjects/blocks/planky_blue.fbx",
"name": "home_model_block",
"position": {
"x": 0.49188232421875,
"y": 0.010040283203125,
"z": 0.27752685546875
},
"queryAACube": {
"scale": 0.25980761647224426,
"x": 0.36197853088378906,
"y": -0.11986352503299713,
"z": 0.14762304723262787
},
"rotation": {
"w": 0.99798583984375,
"x": -4.57763671875e-05,
"y": -0.063248634338378906,
"z": 4.57763671875e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}, {
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionsWillMove": 1,
"created": "2016-03-23T21:29:36Z",
"dimensions": {
"x": 0.05000000074505806,
"y": 0.05000000074505806,
"z": 0.05000000074505806
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"velocity": {
"x": 0,
"y": -0.1,
"z": 0
},
"id": "{ff65f5dd-2d53-4127-86da-05156a42946d}",
"modelURL": "atp:/kineticObjects/blocks/planky_natural.fbx",
"name": "home_model_block",
"position": {
"x": 0,
"y": 0.010101318359375,
"z": 0.353302001953125
},
"queryAACube": {
"scale": 0.086602538824081421,
"x": -0.04330126941204071,
"y": -0.03319995105266571,
"z": 0.3100007176399231
},
"rotation": {
"w": 0.55049967765808105,
"x": 0.44353401660919189,
"y": -0.44359505176544189,
"z": -0.55083543062210083
},
"shapeType": "box",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}, {
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionsWillMove": 1,
"created": "2016-03-23T21:29:36Z",
"dimensions": {
"x": 0.10000000149011612,
"y": 0.05000000074505806,
"z": 0.25
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"velocity": {
"x": 0,
"y": -0.1,
"z": 0
},
"id": "{3a9acd14-f754-4c70-b294-9f622c000785}",
"modelURL": "atp:/kineticObjects/blocks/planky_red.fbx",
"name": "home_model_block",
"position": {
"x": 0.88006591796875,
"y": 0.010040283203125,
"z": 0.05718994140625
},
"queryAACube": {
"scale": 0.27386128902435303,
"x": 0.74313527345657349,
"y": -0.12689036130905151,
"z": -0.079740703105926514
},
"rotation": {
"w": 0.86965739727020264,
"x": -4.57763671875e-05,
"y": -0.4936751127243042,
"z": -4.57763671875e-05
},
"shapeType": "box",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}, {
"collisionSoundURL": "atp:/kineticObjects/blocks/ToyWoodBlock.L.wav",
"collisionsWillMove": 1,
"created": "2016-03-23T21:29:36Z",
"dimensions": {
"x": 0.05000000074505806,
"y": 0.05000000074505806,
"z": 0.05000000074505806
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"velocity": {
"x": 0,
"y": -0.1,
"z": 0
},
"id": "{bb014301-247b-44d0-8b09-b830fea4439e}",
"modelURL": "atp:/kineticObjects/blocks/planky_natural.fbx",
"name": "home_model_block",
"position": {
"x": 0.80487060546875,
"y": 0.010040283203125,
"z": 0.19500732421875
},
"queryAACube": {
"scale": 0.086602538824081421,
"x": 0.7615693211555481,
"y": -0.03326098620891571,
"z": 0.15170605480670929
},
"rotation": {
"w": 0.70440220832824707,
"x": 0.060776710510253906,
"y": -0.060868263244628906,
"z": -0.70455479621887207
},
"shapeType": "box",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}],
"Version": 57
}

View file

@ -1,37 +0,0 @@
{
"Entities": [{
"collisionsWillMove": 1,
"compoundShapeURL": "atp:/kineticObjects/blueChair/Comfy_Chair_Blue_hull.obj",
"created": "2016-03-29T17:37:52Z",
"dimensions": {
"x": 1.1764,
"y": 1.4557,
"z": 1.2657
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"id": "{51a44c3a-ec4a-4c79-8034-aeb5c45660b5}",
"modelURL": "atp:/kineticObjects/blueChair/Comfy_Chair_Blue.fbx",
"name": "home_model_comfyChair",
"queryAACube": {
"scale": 1.9147497415542603,
"x": -0.95737487077713013,
"y": -0.95737487077713013,
"z": -0.95737487077713013
},
"rotation": {
"w": 0.46746015548706055,
"x": -0.0017547607421875,
"y": 0.88400089740753174,
"z": 0.0024261474609375
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}],
"Version": 57
}

View file

@ -0,0 +1,554 @@
{
"Entities": [{
"name": "home_model_dressing_room_bricabrac",
"collisionsWillMove": 1,
"compoundShapeURL": "atp:/kineticObjects/skully/skullyhull.obj",
"created": "2016-05-16T19:34:28Z",
"dimensions": {
"x": 0.19080814719200134,
"y": 0.20009028911590576,
"z": 0.21198928356170654
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -6,
"z": 0
},
"id": "{cef37b0a-bb3d-4549-a645-f3a934f82148}",
"modelURL": "atp:/kineticObjects/skully/skully.fbx",
"position": {
"x": 0.254150390625,
"y": 0.4500732421875,
"z": 0.26517486572265625
},
"queryAACube": {
"scale": 0.34840109944343567,
"x": 0.079949840903282166,
"y": 0.27587270736694336,
"z": 0.090974316000938416
},
"rotation": {
"w": 0.11515986919403076,
"x": -0.087693572044372559,
"y": 0.88818192481994629,
"z": -0.43608760833740234
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true},\"wearable\":{\"joints\":{\"head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"Head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"hair\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"neck\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}]}}}"
}, {
"name": "home_model_dressing_room_bricabrac",
"collisionsWillMove": 1,
"compoundShapeURL": "atp:/dressingRoom/trump.obj",
"created": "2016-05-18T00:02:46Z",
"dimensions": {
"x": 0.25387090444564819,
"y": 0.28642392158508301,
"z": 0.31468403339385986
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -5,
"z": 0
},
"id": "{6483a752-5ba0-4a02-bee5-3290781dfef8}",
"modelURL": "atp:/dressingRoom/trump.fbx",
"position": {
"x": 0.3887939453125,
"y": 0.879974365234375,
"z": 0.2674407958984375
},
"queryAACube": {
"scale": 0.49549484252929688,
"x": 0.14104652404785156,
"y": 0.63222694396972656,
"z": 0.019693374633789062
},
"rotation": {
"w": 0.58565652370452881,
"x": -0.039444565773010254,
"y": 0.73434042930603027,
"z": -0.34084075689315796
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true},\"wearable\":{\"joints\":{\"head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"Head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"hair\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"neck\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}]}}}"
}, {
"name": "home_model_dressing_room_bricabrac",
"collisionsWillMove": 1,
"compoundShapeURL": "atp:/dressingRoom/dreads.obj",
"created": "2016-05-18T00:02:46Z",
"dimensions": {
"x": 0.30918264389038086,
"y": 0.31221473217010498,
"z": 0.29840445518493652
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -5,
"z": 0
},
"id": "{2f2fb50b-35f0-4818-9cfa-e29f7aeb7a1f}",
"modelURL": "atp:/dressingRoom/dreads.fbx",
"position": {
"x": 0.5389404296875,
"y": 0.52008056640625,
"z": 0.09856414794921875
},
"queryAACube": {
"scale": 0.53114700317382812,
"x": 0.27336692810058594,
"y": 0.25450706481933594,
"z": -0.16700935363769531
},
"rotation": {
"w": 0.85949492454528809,
"x": 0.051773905754089355,
"y": -0.41289389133453369,
"z": 0.29680323600769043
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true},\"wearable\":{\"joints\":{\"head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"Head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"hair\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"neck\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}]}}}"
}, {
"name": "home_model_dressing_room_bricabrac",
"collidesWith": "static,dynamic,kinematic,otherAvatar,",
"collisionMask": 23,
"collisionsWillMove": 1,
"compoundShapeURL": "atp:/kineticObjects/tophat/tophat.obj",
"created": "2016-05-16T16:59:22Z",
"dimensions": {
"x": 0.38495281338691711,
"y": 0.26857495307922363,
"z": 0.39648750424385071
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -5,
"z": 0
},
"id": "{8cff801b-cb50-47d2-a1e8-4f7ee245d2ee}",
"modelURL": "atp:/kineticObjects/tophat/tophat.fbx",
"position": {
"x": 0,
"y": 0.541900634765625,
"z": 0.4959869384765625
},
"queryAACube": {
"scale": 0.61442941427230835,
"x": -0.30721470713615417,
"y": 0.23468592762947083,
"z": 0.18877223134040833
},
"rotation": {
"w": 0.92727553844451904,
"x": -0.18382543325424194,
"y": 0.32610058784484863,
"z": 0.0003204345703125
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true},\"wearable\":{\"joints\":{\"head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"Head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"hair\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"neck\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}]}}}"
}, {
"name": "home_model_dressing_room_bricabrac",
"collidesWith": "static,dynamic,kinematic,otherAvatar,",
"collisionMask": 23,
"collisionsWillMove": 1,
"compoundShapeURL": "atp:/kineticObjects/hair/m2.obj",
"created": "2016-05-16T17:12:28Z",
"dimensions": {
"x": 0.094467177987098694,
"y": 0.079604864120483398,
"z": 0.029766213148832321
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -5,
"z": 0
},
"id": "{0805851a-4ef1-4075-b4b3-5692ca7d6352}",
"modelURL": "atp:/kineticObjects/hair/m3.fbx",
"position": {
"x": 0.0111083984375,
"y": 0.00689697265625,
"z": 0.45806884765625
},
"queryAACube": {
"scale": 0.12707087397575378,
"x": -0.052427038550376892,
"y": -0.056638464331626892,
"z": 0.39453339576721191
},
"rotation": {
"w": 0.84777605533599854,
"x": 0.43642330169677734,
"y": 0.26695656776428223,
"z": -0.13978791236877441
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true},\"wearable\":{\"joints\":{\"head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"Head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"hair\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"neck\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}]}}}"
}, {
"name": "home_model_dressing_room_bricabrac",
"collisionsWillMove": 1,
"compoundShapeURL": "atp:/dressingRoom/rectangleFrames.obj",
"created": "2016-05-18T15:50:52Z",
"dimensions": {
"x": 0.18497957289218903,
"y": 0.048084259033203125,
"z": 0.14581345021724701
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -5,
"z": 0
},
"id": "{692df470-2a76-4d5b-971b-257291ff67f7}",
"modelURL": "atp:/dressingRoom/rectangleFrames.fbx",
"name": "rectangleFrames.fbx",
"position": {
"x": 0.3701171875,
"y": 0.062652587890625,
"z": 0.35735321044921875
},
"queryAACube": {
"scale": 0.24039779603481293,
"x": 0.24991828203201294,
"y": -0.057546310126781464,
"z": 0.23715430498123169
},
"rotation": {
"w": -0.084428191184997559,
"x": -0.10658425092697144,
"y": 0.9651484489440918,
"z": -0.2235599160194397
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true},\"wearable\":{\"joints\":{\"head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"Head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"hair\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"neck\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}]}}}"
}, {
"name": "home_model_dressing_room_bricabrac",
"collidesWith": "static,dynamic,kinematic,otherAvatar,",
"collisionMask": 23,
"collisionsWillMove": 1,
"compoundShapeURL": "atp:/kineticObjects/hair/b3.obj",
"created": "2016-05-16T17:10:17Z",
"dimensions": {
"x": 0.19054701924324036,
"y": 0.16880631446838379,
"z": 0.11410932987928391
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -5,
"z": 0
},
"id": "{32926ddc-7c3b-49ca-97da-56e69af211af}",
"modelURL": "atp:/kineticObjects/hair/b3.fbx",
"position": {
"x": 0.75,
"y": 0.0643310546875,
"z": 0
},
"queryAACube": {
"scale": 0.27897074818611145,
"x": 0.61051464080810547,
"y": -0.075154319405555725,
"z": -0.13948537409305573
},
"rotation": {
"w": -0.26207369565963745,
"x": 0.055374979972839355,
"y": 0.93298232555389404,
"z": 0.24034488201141357
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true},\"wearable\":{\"joints\":{\"head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"Head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"hair\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"neck\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}]}}}"
}, {
"name": "home_model_dressing_room_bricabrac",
"collidesWith": "static,dynamic,kinematic,otherAvatar,",
"collisionMask": 23,
"collisionsWillMove": 1,
"compoundShapeURL": "atp:/kineticObjects/hair/b1.obj",
"created": "2016-05-16T17:05:55Z",
"dimensions": {
"x": 0.18918535113334656,
"y": 0.15465652942657471,
"z": 0.11267256736755371
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -5,
"z": 0
},
"id": "{c412654f-9feb-489d-91f9-6f4eb369afe7}",
"modelURL": "atp:/kineticObjects/hair/b1.fbx",
"position": {
"x": 0.55712890625,
"y": 0.0443115234375,
"z": 0.0774078369140625
},
"queryAACube": {
"scale": 0.2690814733505249,
"x": 0.42258816957473755,
"y": -0.090229213237762451,
"z": -0.057132899761199951
},
"rotation": {
"w": -0.26680397987365723,
"x": 0.16276800632476807,
"y": 0.81954681873321533,
"z": 0.4802471399307251
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true},\"wearable\":{\"joints\":{\"head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"Head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"hair\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"neck\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}]}}}"
}, {
"name": "home_model_dressing_room_bricabrac",
"collidesWith": "static,dynamic,kinematic,otherAvatar,",
"collisionMask": 23,
"collisionsWillMove": 1,
"compoundShapeURL": "atp:/kineticObjects/hair/m3.obj",
"created": "2016-05-16T17:12:28Z",
"dimensions": {
"x": 0.15590831637382507,
"y": 0.057838320732116699,
"z": 0.033922493457794189
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -5,
"z": 0
},
"id": "{c2df6722-e970-4c36-bf42-b117e2bc13c4}",
"modelURL": "atp:/kineticObjects/hair/m3.fbx",
"position": {
"x": 0.1549072265625,
"y": 0.006439208984375,
"z": 0.34037017822265625
},
"queryAACube": {
"scale": 0.16971567273139954,
"x": 0.070049390196800232,
"y": -0.078418627381324768,
"z": 0.25551235675811768
},
"rotation": {
"w": -0.2230105996131897,
"x": 0.19484245777130127,
"y": 0.73751425743103027,
"z": 0.60689711570739746
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true},\"wearable\":{\"joints\":{\"head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"Head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"hair\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"neck\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}]}}}"
}, {
"name": "home_model_dressing_room_bricabrac",
"collisionsWillMove": 1,
"compoundShapeURL": "atp:/dressingRoom/Elvis.obj",
"created": "2016-05-17T23:58:24Z",
"dimensions": {
"x": 0.22462925314903259,
"y": 0.32056856155395508,
"z": 0.32186508178710938
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -5,
"z": 0
},
"id": "{5fe0d835-e52b-432b-8ffe-2e7467613974}",
"modelURL": "atp:/dressingRoom/Elvis.fbx",
"position": {
"x": 0.6776123046875,
"y": 0.89739990234375,
"z": 0.036468505859375
},
"queryAACube": {
"scale": 0.50677376985549927,
"x": 0.42422541975975037,
"y": 0.64401304721832275,
"z": -0.21691837906837463
},
"rotation": {
"w": 0.76330208778381348,
"x": 0.26140224933624268,
"y": -0.43398183584213257,
"z": 0.40090024471282959
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true},\"wearable\":{\"joints\":{\"head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"Head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"hair\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"neck\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}]}}}"
}, {
"name": "home_model_dressing_room_bricabrac",
"collisionsWillMove": 1,
"compoundShapeURL": "atp:/dressingRoom/roundFrames.obj",
"created": "2016-05-18T15:55:14Z",
"dimensions": {
"x": 0.18497957289218903,
"y": 0.061892151832580566,
"z": 0.14581345021724701
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -5,
"z": 0
},
"id": "{2706fd7c-9f99-4e11-aebe-4c7274d29d69}",
"modelURL": "atp:/dressingRoom/roundFrames.fbx",
"name": "roundFrames.fbx",
"position": {
"x": 0.1690673828125,
"y": 0.08319091796875,
"z": 0.50496673583984375
},
"queryAACube": {
"scale": 0.24353571236133575,
"x": 0.047299526631832123,
"y": -0.038576938211917877,
"z": 0.38319888710975647
},
"rotation": {
"w": -0.27809566259384155,
"x": -0.059800088405609131,
"y": 0.93838405609130859,
"z": -0.19615471363067627
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true},\"wearable\":{\"joints\":{\"head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"Head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"hair\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"neck\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}]}}}"
}, {
"name": "home_model_dressing_room_bricabrac",
"collidesWith": "static,dynamic,kinematic,otherAvatar,",
"collisionMask": 23,
"collisionsWillMove": 1,
"compoundShapeURL": "atp:/kineticObjects/hair/m1.obj",
"created": "2016-05-16T17:10:17Z",
"dimensions": {
"x": 0.10473950952291489,
"y": 0.044521570205688477,
"z": 0.032888296991586685
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -5,
"z": 0
},
"id": "{448c53c2-bf1e-44f5-b28f-06da33a4145d}",
"modelURL": "atp:/kineticObjects/hair/m1.fbx",
"position": {
"x": 0.29052734375,
"y": 0,
"z": 0.254638671875
},
"queryAACube": {
"scale": 0.11846592277288437,
"x": 0.23129437863826752,
"y": -0.059232961386442184,
"z": 0.19540570676326752
},
"rotation": {
"w": -0.24409854412078857,
"x": -0.17210650444030762,
"y": 0.76794075965881348,
"z": -0.56667429208755493
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true},\"wearable\":{\"joints\":{\"head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"Head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"hair\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"neck\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}]}}}"
}, {
"name": "home_model_dressing_room_bricabrac",
"collidesWith": "static,dynamic,kinematic,otherAvatar,",
"collisionMask": 23,
"collisionsWillMove": 1,
"compoundShapeURL": "atp:/kineticObjects/hair/b2.obj",
"created": "2016-05-16T17:05:55Z",
"dimensions": {
"x": 0.12604480981826782,
"y": 0.090894937515258789,
"z": 0.069697588682174683
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -5,
"z": 0
},
"id": "{33d3ba77-d2c9-4a5f-ba1c-f6f731d05221}",
"modelURL": "atp:/kineticObjects/hair/b3.fbx",
"position": {
"x": 0.4130859375,
"y": 0.030181884765625,
"z": 0.182342529296875
},
"queryAACube": {
"scale": 0.1703142374753952,
"x": 0.3279288113117218,
"y": -0.054975233972072601,
"z": 0.097185410559177399
},
"rotation": {
"w": -0.2856946587562561,
"x": 0.17711150646209717,
"y": 0.86263823509216309,
"z": 0.37792015075683594
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}, {
"name": "home_model_dressing_room_bricabrac",
"collidesWith": "static,dynamic,kinematic,otherAvatar,",
"collisionMask": 23,
"collisionsWillMove": 1,
"compoundShapeURL": "atp:/kineticObjects/snapback/snapback.obj",
"created": "2016-05-16T17:01:33Z",
"dimensions": {
"x": 0.19942393898963928,
"y": 0.12862896919250488,
"z": 0.30034130811691284
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -5,
"z": 0
},
"id": "{26e895b7-4a83-45fe-a3e9-5b6ba5f5717e}",
"modelURL": "atp:/kineticObjects/snapback/snapback.fbx",
"position": {
"x": 0.7891845703125,
"y": 0.492218017578125,
"z": 0.0359649658203125
},
"queryAACube": {
"scale": 0.38277959823608398,
"x": 0.59779477119445801,
"y": 0.30082821846008301,
"z": -0.15542483329772949
},
"rotation": {
"w": -0.31783014535903931,
"x": -0.04985123872756958,
"y": 0.92556643486022949,
"z": -0.19945067167282104
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true},\"wearable\":{\"joints\":{\"head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"Head\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"hair\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}],\"neck\":[{\"x\":0,\"y\":0,\"z\":0},{\"w\":0,\"x\":0,\"y\":0,\"z\":0}]}}}"
}],
"Version": 57
}

View file

@ -0,0 +1,39 @@
{
"Entities": [{
"name": "home_model_umbrella",
"collidesWith": "static,dynamic,kinematic,otherAvatar,",
"collisionMask": 23,
"collisionsWillMove": 1,
"compoundShapeURL": "atp:/kineticObjects/umbrella/umbrellaopen_ch.obj",
"created": "2016-05-16T22:48:54Z",
"dimensions": {
"x": 1.2649545669555664,
"y": 1.0218980312347412,
"z": 1.2649545669555664
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -5,
"z": 0
},
"id": "{59f5cc21-c6e8-4deb-a1e2-0364e82fe062}",
"modelURL": "atp:/kineticObjects/umbrella/umbrella_open.fbx",
"queryAACube": {
"scale": 2.0602173805236816,
"x": -1.0301086902618408,
"y": -1.0301086902618408,
"z": -1.0301086902618408
},
"rotation": {
"w": 0.66066992282867432,
"x": -0.2207522988319397,
"y": 0.64501416683197021,
"z": -0.31422901153564453
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}],
"Version": 57
}

View file

@ -1,24 +1,23 @@
print('HOME KINETIC INCLUDING WRAPPER')
var BOOKS_URL = "atp:/kineticObjects/books.json"
var UPPER_BOOKSHELF_URL = "atp:/kineticObjects/upperBookShelf.json"
var LOWER_BOOKSHELF_URL = "atp:/kineticObjects/lowerBookShelf.json"
print('HOME KINETIC INCLUDING WRAPPER');
var BOOKS_URL = "atp:/kineticObjects/books.json";
var UPPER_BOOKSHELF_URL = "atp:/kineticObjects/upperBookShelf.json";
var LOWER_BOOKSHELF_URL = "atp:/kineticObjects/lowerBookShelf.json";
var CHAIR_URL = 'atp:/kineticObjects/deskChair.json';
var BLUE_CHAIR_URL = 'atp:/kineticObjects/blueChair.json';
var FRUIT_BOWL_URL = "atp:/kineticObjects/fruit.json"
var LIVING_ROOM_LAMP_URL = "atp:/kineticObjects/deskLamp.json"
var LIVING_ROOM_LAMP_URL = "atp:/kineticObjects/deskLamp.json";
var TRASHCAN_URL = "atp:/kineticObjects/trashcan.json"
var BLOCKS_URL = "atp:/kineticObjects/blocks.json";
var PLAYA_POSTER_URL = "atp:/kineticObjects/postersPlaya.json"
var CELL_POSTER_URL = "atp:/kineticObjects/postersCell.json"
var STUFF_ON_SHELVES_URL = "atp:/kineticObjects/stuff_on_shelves.json"
var JUNK_URL = "atp:/kineticObjects/junk.json"
var PLAYA_POSTER_URL = "atp:/kineticObjects/postersPlaya.json";
var CELL_POSTER_URL = "atp:/kineticObjects/postersCell.json";
var STUFF_ON_SHELVES_URL = "atp:/kineticObjects/stuff_on_shelves.json";
var JUNK_URL = "atp:/kineticObjects/junk.json";
var BRICABRAC_URL = "atp:/kineticObjects/dressingRoomBricabrac.json";
var BENCH_URL = "atp:/kineticObjects/bench.json";
var UMBRELLA_URL = "atp:/kineticObjects/umbrella.json";
FruitBowl = function(spawnLocation, spawnRotation) {
print('CREATE FRUIT BOWL')
print('CREATE FRUIT BOWL');
var created = [];
function create() {
@ -42,7 +41,7 @@ FruitBowl = function(spawnLocation, spawnRotation) {
}
LivingRoomLamp = function(spawnLocation, spawnRotation) {
print('CREATE LIVING ROOM LAMP')
print('CREATE LIVING ROOM LAMP');
var created = [];
function create() {
@ -65,7 +64,7 @@ LivingRoomLamp = function(spawnLocation, spawnRotation) {
}
UpperBookShelf = function(spawnLocation, spawnRotation) {
print('CREATE UPPER SHELF')
print('CREATE UPPER SHELF');
var created = [];
function create() {
@ -89,7 +88,7 @@ UpperBookShelf = function(spawnLocation, spawnRotation) {
LowerBookShelf = function(spawnLocation, spawnRotation) {
print('CREATE LOWER SHELF')
print('CREATE LOWER SHELF');
var created = [];
function create() {
@ -112,7 +111,7 @@ LowerBookShelf = function(spawnLocation, spawnRotation) {
}
Chair = function(spawnLocation, spawnRotation) {
print('CREATE CHAIR')
print('CREATE CHAIR');
var created = [];
function create() {
@ -134,32 +133,8 @@ Chair = function(spawnLocation, spawnRotation) {
this.cleanup = cleanup;
}
BlueChair = function(spawnLocation, spawnRotation) {
print('CREATE BLUE CHAIR')
var created = [];
function create() {
var success = Clipboard.importEntities(BLUE_CHAIR_URL);
if (success === true) {
created = Clipboard.pasteEntities(spawnLocation)
print('created ' + created);
}
};
function cleanup() {
created.forEach(function(obj) {
Entities.deleteEntity(obj);
})
};
create();
this.cleanup = cleanup;
}
Trashcan = function(spawnLocation, spawnRotation) {
print('CREATE TRASHCAN')
print('CREATE TRASHCAN');
var created = [];
function create() {
@ -183,7 +158,7 @@ Trashcan = function(spawnLocation, spawnRotation) {
}
Books = function(spawnLocation, spawnRotation) {
print('CREATE BOOKS')
print('CREATE BOOKS');
var created = [];
function create() {
@ -206,7 +181,7 @@ Books = function(spawnLocation, spawnRotation) {
}
Blocks = function(spawnLocation, spawnRotation) {
print('EBL CREATE BLOCKS')
print('EBL CREATE BLOCKS');
var created = [];
function create() {
@ -230,7 +205,7 @@ Blocks = function(spawnLocation, spawnRotation) {
}
PosterCell = function(spawnLocation, spawnRotation) {
print('CREATE CELL POSTER')
print('CREATE CELL POSTER');
var created = [];
function create() {
@ -253,7 +228,7 @@ PosterCell = function(spawnLocation, spawnRotation) {
}
PosterPlaya = function(spawnLocation, spawnRotation) {
print('CREATE PLAYA POSTER')
print('CREATE PLAYA POSTER');
var created = [];
function create() {
@ -276,9 +251,10 @@ PosterPlaya = function(spawnLocation, spawnRotation) {
}
StuffOnShelves = function(spawnLocation, spawnRotation) {
print('CREATE STUFF ON SHELVES')
print('CREATE STUFF ON SHELVES');
var created = [];
function create() {
var success = Clipboard.importEntities(STUFF_ON_SHELVES_URL);
if (success === true) {
@ -293,17 +269,115 @@ StuffOnShelves = function(spawnLocation, spawnRotation) {
})
};
create();
this.cleanup = cleanup;
}
HomeJunk = function(spawnLocation, spawnRotation) {
print('HOME CREATE JUNK');
var created = [];
function addVelocityDown() {
print('HOME ADDING DOWN VELOCITY TO SHELF ITEMS')
created.forEach(function(obj) {
Entities.editEntity(obj, {
velocity: {
x: 0,
y: -0.1,
z: 0
}
});
})
}
function create() {
var success = Clipboard.importEntities(JUNK_URL);
if (success === true) {
created = Clipboard.pasteEntities(spawnLocation)
print('created ' + created);
addVelocityDown();
}
};
function cleanup() {
created.forEach(function(obj) {
Entities.deleteEntity(obj);
})
};
create();
this.cleanup = cleanup;
}
// Bricabrac = function(spawnLocation, spawnRotation) {
// print('HOME CREATE BRICABRAC');
// var created = [];
// function addVelocityDown() {
// print('HOME ADDING DOWN VELOCITY TO DRESSING ROOM ITEMS')
// created.forEach(function(obj) {
// Entities.editEntity(obj, {
// velocity: {
// x: 0,
// y: -0.1,
// z: 0
// }
// });
// })
// }
// function create() {
// var success = Clipboard.importEntities(BRICABRAC_URL);
// if (success === true) {
// created = Clipboard.pasteEntities(spawnLocation)
// print('created ' + created);
// addVelocityDown();
// }
// };
// function cleanup() {
// created.forEach(function(obj) {
// Entities.deleteEntity(obj);
// })
// };
// create();
// this.cleanup = cleanup;
// }
Bench = function(spawnLocation, spawnRotation) {
print('HOME CREATE BENCH');
var created = [];
function create() {
var success = Clipboard.importEntities(BENCH_URL);
if (success === true) {
created = Clipboard.pasteEntities(spawnLocation)
print('created ' + created);
}
};
function cleanup() {
created.forEach(function(obj) {
Entities.deleteEntity(obj);
})
};
create();
this.cleanup = cleanup;
}
HomeJunk = function(spawnLocation, spawnRotation) {
print('HOME CREATE JUNK')
Umbrella = function(spawnLocation, spawnRotation) {
print('HOME CREATE Umbrella');
var created = [];
function create() {
var success = Clipboard.importEntities(JUNK_URL);
var success = Clipboard.importEntities(UMBRELLA_URL);
if (success === true) {
created = Clipboard.pasteEntities(spawnLocation)
print('created ' + created);

View file

@ -0,0 +1,76 @@
//
// Copyright 2016 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() {
var _this = this;
_this.COLLISION_COOLDOWN_TIME = 5000;
var startPosition = {
x: 1100.6343,
y: 460.5366,
z: -65.2142
};
var startRotation = Quat.fromPitchYawRollDegrees(3.1471, -170.4121, -0.0060)
_this.preload = function(entityID) {
//set our id so other methods can get it.
_this.entityID = entityID;
//variables we will use to keep track of when to reset the cow
_this.timeSinceLastCollision = 0;
_this.shouldUntip = true;
}
_this.collisionWithEntity = function(myID, otherID, collisionInfo) {
//we dont actually use any of the parameters above, since we don't really care what we collided with, or the details of the collision.
//5 seconds after a collision, upright the target. protect from multiple collisions in a short timespan with the 'shouldUntip' variable
if (_this.shouldUntip) {
//in Hifi, preface setTimeout with Script.setTimeout
Script.setTimeout(function() {
_this.untip();
_this.shouldUntip = true;
}, _this.COLLISION_COOLDOWN_TIME);
}
_this.shouldUntip = false;
}
_this.untip = function() {
var props = Entities.getEntityProperties(this.entityID);
var rotation = Quat.safeEulerAngles(props.rotation)
if (rotation.x > 3 || rotation.x < -3 || rotation.z > 3 || rotation.z < -3) {
print('home target - too much pitch or roll, fix it');
//we zero out the velocity and angular velocity
Entities.editEntity(_this.entityID, {
position: startPosition,
rotation: startRotation,
velocity: {
x: 0,
y: 0,
z: 0
},
angularVelocity: {
x: 0,
y: 0,
z: 0
}
});
}
}
});

View file

@ -43,6 +43,8 @@
var transformerPath = Script.resolvePath("atp:/dressingRoom/wrapper.js");
var blockyPath = Script.resolvePath("atp:/blocky/wrapper.js");
Script.include(utilsPath);
Script.include(kineticPath);
@ -53,6 +55,7 @@
Script.include(cuckooClockPath);
Script.include(pingPongGunPath);
Script.include(transformerPath);
Script.include(blockyPath);
var TRANSFORMER_URL_ROBOT = 'atp:/dressingRoom/simple_robot.fbx';
@ -60,7 +63,7 @@
var TRANSFORMER_URL_WILL = 'atp:/dressingRoom/will_T.fbx';
var TRANSFORMER_URL_STYLIZED_FEMALE = 'atp:/dressingRoom/stylized_female.fbx';
var TRANSFORMER_URL_STYLIZED_FEMALE = 'atp:/dressingRoom/ArtemisJacketOn.fbx';
var TRANSFORMER_URL_PRISCILLA = 'atp:/dressingRoom/priscilla.fbx';
@ -199,6 +202,8 @@
_this.createKineticEntities();
_this.createScriptedEntities();
_this.setupDressingRoom();
_this.createMilkPailBalls();
_this.createTarget();
}, 750);
}
},
@ -338,18 +343,18 @@
z: -0.0013
});
var blocky = new BlockyGame({
x: 1098.4424,
y: 460.3090,
z: -66.2190
})
print('HOME after creating scripted entities')
},
createKineticEntities: function() {
var blocks = new Blocks({
x: 1097.1383,
y: 460.3790,
z: -66.4895
});
var fruitBowl = new FruitBowl({
x: 1105.3185,
y: 460.3221,
@ -380,12 +385,6 @@
z: -79.8097
});
var blueChair = new BlueChair({
x: 1100.4821,
y: 459.9147,
z: -75.9071
});
var stuffOnShelves = new StuffOnShelves({
x: 1105.9432,
@ -422,6 +421,25 @@
y: 461,
z: -73.3
});
// var dressingRoomBricabrac = new Bricabrac({
// x: 1106.8,
// y: 460.3909,
// z: -72.6
// });
var bench = new Bench({
x: 1100.1210,
y: 459.4552,
z: -75.4537
});
var umbrella = new Umbrella({
x: 1097.5510,
y: 459.5230,
z: -84.3897
});
print('HOME after creating kinetic entities');
},
@ -510,6 +528,100 @@
var dais = Entities.addEntity(daisProperties);
},
createTarget: function() {
var targetProperties = {
type: 'Model',
modelURL: 'atp:/pingPongGun/Target.fbx',
shapeType: 'Compound',
compoundShapeURL: 'atp:/pingPongGun/Target.obj',
dimensions: {
x: 0.4937,
y: 0.6816,
z: 0.0778
},
rotation: Quat.fromPitchYawRollDegrees(3.1471, -170.4121, -0.0060),
gravity: {
x: 0,
y: -9.8,
z: 0
},
velocity: {
x: 0,
y: -0.1,
z: 0
},
position: {
x: 1100.6343,
y: 460.5366,
z: -65.2142
},
userData: JSON.stringify({
grabbableKey: {
grabbable: true
},
hifiHomeKey: {
reset: true
}
}),
script: 'atp:/pingPongGun/target.js',
density: 100,
dynamic: true
}
var target = Entities.addEntity(targetProperties);
},
createMilkPailBalls: function() {
var locations = [{
x: 1099.0795,
y: 459.4186,
z: -70.8603
}, {
x: 1099.2826,
y: 459.4186,
z: -70.9094
}, {
x: 1099.5012,
y: 459.4186,
z: -71.1000
}];
var ballProperties = {
type: 'Model',
modelURL: 'atp:/static_objects/StarBall.fbx',
shapeType: 'Sphere',
dimensions: {
x: 0.1646,
y: 0.1646,
z: 0.1646
},
gravity: {
x: 0,
y: -9.8,
z: 0
},
velocity: {
x: 0,
y: -0.1,
z: 0
},
userData: JSON.stringify({
grabbableKey: {
grabbable: true
},
hifiHomeKey: {
reset: true
}
}),
dynamic: true
};
locations.forEach(function(location) {
ballProperties.position = location;
var ball = Entities.addEntity(ballProperties);
});
print('HOME made milk pail balls')
},
createTransformers: function() {
var firstDollPosition = {
x: 1107.6,

View file

@ -147,6 +147,16 @@
setEntityCustomData('home-switch', _this.entityID, {
state: 'on'
});
Entities.editEntity(this.entityID, {
"animation": {
"currentFrame": 1,
"firstFrame": 1,
"hold": 1,
"lastFrame": 2,
"url": "atp:/switches/lightswitch.fbx"
},
});
} else {
glowLights.forEach(function(glowLight) {
@ -161,9 +171,18 @@
setEntityCustomData('home-switch', this.entityID, {
state: 'off'
});
Entities.editEntity(this.entityID, {
"animation": {
"currentFrame": 3,
"firstFrame": 3,
"hold": 1,
"lastFrame": 4,
"url": "atp:/switches/lightswitch.fbx"
},
});
}
this.flipSwitch();
Audio.playSound(this.switchSound, {
volume: 0.5,
position: this.position
@ -171,20 +190,7 @@
},
flipSwitch: function() {
var rotation = Entities.getEntityProperties(this.entityID, "rotation").rotation;
var axis = {
x: 0,
y: 1,
z: 0
};
var dQ = Quat.angleAxis(180, axis);
rotation = Quat.multiply(rotation, dQ);
Entities.editEntity(this.entityID, {
rotation: rotation
});
},
preload: function(entityID) {
this.entityID = entityID;

View file

@ -11,7 +11,7 @@
(function() {
var FAN_SOUND_ENTITY_NAME ="home_sfx_ceiling_fan"
var FAN_SOUND_ENTITY_NAME = "home_sfx_ceiling_fan"
var SEARCH_RADIUS = 100;
var _this;
var utilitiesScript = Script.resolvePath('../utils.js');
@ -74,16 +74,16 @@
if (!_this.fanSoundEntity) {
return;
}
print('HOME FAN OFF 2')
print('HOME FAN OFF 2')
var soundUserData = getEntityCustomData("soundKey", _this.fanSoundEntity);
if (!soundUserData) {
print("NO SOUND USER DATA! RETURNING.");
return;
}
print('HOME FAN OFF 3')
print('HOME FAN OFF 3')
soundUserData.volume = 0.0;
setEntityCustomData("soundKey", _this.fanSoundEntity, soundUserData);
print('HOME FAN OFF 4')
print('HOME FAN OFF 4')
},
findFan: function() {
@ -105,7 +105,7 @@
var fan = null;
print('HOME LOOKING FOR A FAN')
print('HOME TOTAL ENTITIES:: ' +entities.length)
print('HOME TOTAL ENTITIES:: ' + entities.length)
entities.forEach(function(entity) {
var props = Entities.getEntityProperties(entity);
if (props.name === FAN_SOUND_ENTITY_NAME) {
@ -129,10 +129,22 @@
if (this._switch.state === 'off') {
this.fanRotationOn();
this.fanSoundOn();
setEntityCustomData('home-switch', this.entityID, {
state: 'on'
});
Entities.editEntity(this.entityID, {
"animation": {
"currentFrame": 1,
"firstFrame": 1,
"hold": 1,
"lastFrame": 2,
"url": "atp:/switches/fanswitch.fbx"
},
})
} else {
this.fanRotationOff();
this.fanSoundOff();
@ -140,9 +152,20 @@
setEntityCustomData('home-switch', this.entityID, {
state: 'off'
});
Entities.editEntity(this.entityID, {
"animation": {
"currentFrame": 3,
"firstFrame": 3,
"hold": 1,
"lastFrame": 4,
"url": "atp:/switches/fanswitch.fbx"
},
})
}
this.flipSwitch();
Audio.playSound(this.switchSound, {
volume: 0.5,
position: this.position
@ -150,21 +173,6 @@
},
flipSwitch: function() {
var rotation = Entities.getEntityProperties(this.entityID, "rotation").rotation;
var axis = {
x: 0,
y: 1,
z: 0
};
var dQ = Quat.angleAxis(180, axis);
rotation = Quat.multiply(rotation, dQ);
Entities.editEntity(this.entityID, {
rotation: rotation
});
},
preload: function(entityID) {
this.entityID = entityID;
setEntityCustomData('grabbableKey', this.entityID, {

View file

@ -39,7 +39,7 @@
"Metal-brushed-light.jpg": "atp:/models/Lights-Living-Room-2.fbx/Lights-Living-Room-2.fbm/Metal-brushed-light.jpg",
"Tex.CeilingLight.Emit": "atp:/models/Lights-Living-Room-2.fbx/Lights-Living-Room-2.fbm/CielingLight-On-Diffuse.jpg",
"TexCeilingLight.Diffuse": "atp:/models/Lights-Living-Room-2.fbx/Lights-Living-Room-2.fbm/CielingLight-Base.jpg"
}
};
Entities.editEntity(glowDisc, {
textures: JSON.stringify(data)
@ -51,7 +51,7 @@
"Metal-brushed-light.jpg": "atp:/models/Lights-Living-Room-2.fbx/Lights-Living-Room-2.fbm/Metal-brushed-light.jpg",
"Tex.CeilingLight.Emit": "",
"TexCeilingLight.Diffuse": "atp:/models/Lights-Living-Room-2.fbx/Lights-Living-Room-2.fbm/CielingLight-Base.jpg"
}
};
Entities.editEntity(glowDisc, {
textures: JSON.stringify(data)
@ -143,6 +143,16 @@
state: 'on'
});
Entities.editEntity(this.entityID, {
"animation": {
"currentFrame": 1,
"firstFrame": 1,
"hold": 1,
"lastFrame": 2,
"url": "atp:/switches/lightswitch.fbx"
},
});
} else {
glowLights.forEach(function(glowLight) {
_this.glowLightOff(glowLight);
@ -156,9 +166,18 @@
setEntityCustomData('home-switch', this.entityID, {
state: 'off'
});
Entities.editEntity(this.entityID, {
"animation": {
"currentFrame": 3,
"firstFrame": 3,
"hold": 1,
"lastFrame": 4,
"url": "atp:/switches/lightswitch.fbx"
},
});
}
this.flipSwitch();
Audio.playSound(this.switchSound, {
volume: 0.5,
position: this.position
@ -166,21 +185,6 @@
},
flipSwitch: function() {
var rotation = Entities.getEntityProperties(this.entityID, "rotation").rotation;
var axis = {
x: 0,
y: 1,
z: 0
};
var dQ = Quat.angleAxis(180, axis);
rotation = Quat.multiply(rotation, dQ);
Entities.editEntity(this.entityID, {
rotation: rotation
});
},
preload: function(entityID) {
this.entityID = entityID;
setEntityCustomData('grabbableKey', this.entityID, {

View file

@ -0,0 +1,65 @@
down sparkle
{
"color": {
"red": "#",
"green": "c",
"blue": "f"
},
"isEmitting": 1,
"maxParticles": 1000,
"lifespan": 2,
"emitRate": 10,
"emitSpeed": 0.1,
"speedSpread": 0.6,
"emitOrientation": {
"x": 0.8,
"y": 0,
"z": 0,
"w": 0.7071068286895752
},
"emitDimensions": {
"x": 0,
"y": 0,
"z": 0
},
"polarStart": 0,
"polarFinish": 0,
"azimuthStart": -3.1415927410125732,
"azimuthFinish": 3.1415927410125732,
"emitAcceleration": {
"x": 0,
"y": -1,
"z": 0
},
"accelerationSpread": {
"x": 0,
"y": 1,
"z": 0
},
"particleRadius": 0.02500000037252903,
"radiusSpread": 0,
"radiusStart": 0.079,
"radiusFinish": 0.053,
"colorSpread": {
"red": "#",
"green": "e",
"blue": "8"
},
"colorStart": {
"red": 255,
"green": 255,
"blue": 255
},
"colorFinish": {
"red": "#",
"green": "d",
"blue": "4"
},
"alpha": 1,
"alphaSpread": 0,
"alphaStart": 1,
"alphaFinish": 0,
"emitterShouldTrail": 1,
"textures": "atp:/teleport/sparkle1.png"
}

View file

@ -0,0 +1,63 @@
{
"Entities": [
{
"accelerationSpread": {
"x": 0,
"y": 1,
"z": 0
},
"color": {
"blue": 207,
"green": 207,
"red": 207
},
"colorFinish": {
"blue": 207,
"green": 207,
"red": 207
},
"colorSpread": {
"blue": 125,
"green": 125,
"red": 232
},
"colorStart": {
"blue": 207,
"green": 207,
"red": 207
},
"created": "2016-05-23T20:41:38Z",
"dimensions": {
"x": 2.6566545963287354,
"y": 2.6566545963287354,
"z": 2.6566545963287354
},
"emitAcceleration": {
"x": 0,
"y": -1,
"z": 0
},
"emitOrientation": {
"w": 0.66226339340209961,
"x": 0.74927115440368652,
"y": -1.5258940038620494e-05,
"z": -1.5258940038620494e-05
},
"emitRate": 10,
"emitSpeed": 0.10000000149011612,
"id": "{e700e0a1-026a-4ebd-8609-6068b32df14e}",
"lifespan": 2,
"name": "home_particle_teleport_sparkle_down",
"queryAACube": {
"scale": 4.6014609336853027,
"x": -2.3007304668426514,
"y": -2.3007304668426514,
"z": -2.3007304668426514
},
"speedSpread": 0.60000002384185791,
"textures": "atp:/teleport/sparkle1.png",
"type": "ParticleEffect"
}
],
"Version": 57
}

View file

@ -0,0 +1,63 @@
{
"color": {
"red": 255,
"green": 255,
"blue": 255
},
"isEmitting": 1,
"maxParticles": 210,
"lifespan": 3.6,
"emitRate": 11,
"emitSpeed": 0.5,
"speedSpread": 0.8,
"emitOrientation": {
"x": -1,
"y": -0.0000152587890625,
"z": -0.0000152587890625,
"w": 1
},
"emitDimensions": {
"x": 0,
"y": 0,
"z": 0
},
"polarStart": 0,
"polarFinish": 0,
"azimuthStart": -3.1415927410125732,
"azimuthFinish": 3.1415927410125732,
"emitAcceleration": {
"x": 0,
"y": 0.2,
"z": 0
},
"accelerationSpread": {
"x": 0,
"y": 0.30000000000000004,
"z": 0
},
"particleRadius": 0.02500000037252903,
"radiusSpread": 0,
"radiusStart": 0.013,
"radiusFinish": 0.014,
"colorSpread": {
"red": 0,
"green": 0,
"blue": 0
},
"colorStart": {
"red": 255,
"green": 255,
"blue": 255
},
"colorFinish": {
"red": 255,
"green": 255,
"blue": 255
},
"alpha": 1,
"alphaSpread": 0,
"alphaStart": 1,
"alphaFinish": 0,
"emitterShouldTrail": 0,
"textures": "atp:/teleport/sparkle2.png"
}

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