modifications to hook shared classes to iOS

This commit is contained in:
Stephen Birarda 2013-07-24 13:05:02 -07:00
parent 7134d13001
commit f8e7e1de66
15 changed files with 23 additions and 16 deletions

View file

@ -35,7 +35,7 @@ Pod::Spec.new do |s|
# s.exclude_files = 'Classes/Exclude' # s.exclude_files = 'Classes/Exclude'
s.subspec "shared" do |sp| s.subspec "shared" do |sp|
sp.source_files = "libraries/shared/src" sp.source_files = 'libraries/shared/src', 'libraries/shared/moc_*'
sp.exclude_files = "libraries/shared/src/UrlReader.*" sp.exclude_files = "libraries/shared/src/UrlReader.*"
sp.dependency 'glm' sp.dependency 'glm'
sp.xcconfig = { 'CLANG_CXX_LIBRARY' => "libc++" } sp.xcconfig = { 'CLANG_CXX_LIBRARY' => "libc++" }
@ -47,9 +47,12 @@ Pod::Spec.new do |s|
end end
s.subspec "avatars" do |sp| s.subspec "avatars" do |sp|
sp.source_files = "libraries/avatar/src" sp.source_files = 'libraries/avatars/src', 'libraries/avatars/moc_*'
sp.dependency 'glm' sp.dependency 'glm'
end end
s.xcconfig = { 'HEADER_SEARCH_PATHS' => '${PODS_ROOT}/../../qt5-device/qtbase/include' }
s.libraries = 'libQtCoreCombined', 'libQt5Network', 'libQt5Script'
# A list of file patterns which select the header files that should be # A list of file patterns which select the header files that should be
# made available to the application. If the pattern is a directory then the # made available to the application. If the pattern is a directory then the

View file

@ -31,7 +31,7 @@ void Agent::run(QUrl scriptURL) {
AvatarData *someObject = new AvatarData; AvatarData *someObject = new AvatarData;
QScriptValue objectValue = engine.newObject(); QScriptValue objectValue = engine.newQObject(someObject);
engine.globalObject().setProperty("AvatarData", objectValue); engine.globalObject().setProperty("AvatarData", objectValue);
qDebug() << "Execution of script:" << engine.evaluate(scriptString).toString(); qDebug() << "Execution of script:" << engine.evaluate(scriptString).toString();

View file

@ -14,7 +14,7 @@
#include <PacketHeaders.h> #include <PacketHeaders.h>
#include "AvatarData.h" #include "AvatarData.h"
#include <VoxelConstants.h> //#include <VoxelConstants.h>
using namespace std; using namespace std;
@ -277,7 +277,8 @@ int AvatarData::parseData(unsigned char* sourceBuffer, int numBytes) {
} }
glm::vec3 AvatarData::calculateCameraDirection() const { glm::vec3 AvatarData::calculateCameraDirection() const {
glm::vec3 direction = glm::vec3(_cameraOrientation * glm::vec4(IDENTITY_FRONT, 0.0f)); // glm::vec3 direction = glm::vec3(_cameraOrientation * glm::vec4(IDENTITY_FRONT, 0.0f));
glm::vec3 direction;
return direction; return direction;
} }

View file

@ -106,6 +106,9 @@ public:
void setHeadData(HeadData* headData) { _headData = headData; } void setHeadData(HeadData* headData) { _headData = headData; }
void setHandData(HandData* handData) { _handData = handData; } void setHandData(HandData* handData) { _handData = handData; }
public slots:
void setPosition(float x, float y, float z) { _position = glm::vec3(x, y, z); }
protected: protected:
glm::vec3 _position; glm::vec3 _position;
glm::vec3 _handPosition; glm::vec3 _handPosition;

View file

@ -13,7 +13,7 @@
#include <vector> #include <vector>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtx/quaternion.hpp> #include <glm/gtc/quaternion.hpp>
class AvatarData; class AvatarData;
class FingerData; class FingerData;

View file

@ -21,7 +21,7 @@
#include "SharedUtil.h" #include "SharedUtil.h"
#include "UDPSocket.h" #include "UDPSocket.h"
#include <QDebug> #include <QtCore/QDebug>
int unpackNodeId(unsigned char* packedData, uint16_t* nodeId) { int unpackNodeId(unsigned char* packedData, uint16_t* nodeId) {
memcpy(nodeId, packedData, sizeof(uint16_t)); memcpy(nodeId, packedData, sizeof(uint16_t));

View file

@ -18,7 +18,7 @@
#include <sys/socket.h> #include <sys/socket.h>
#endif #endif
#include <QDebug> #include <QtCore/QDebug>
#include "NodeData.h" #include "NodeData.h"
#include "SimpleMovingAverage.h" #include "SimpleMovingAverage.h"

View file

@ -11,7 +11,7 @@
#include <cstdlib> #include <cstdlib>
#include <cstdio> #include <cstdio>
#include <QDebug> #include <QtCore/QDebug>
#include "NodeList.h" #include "NodeList.h"
#include "NodeTypes.h" #include "NodeTypes.h"

View file

@ -14,7 +14,7 @@
#include <iterator> #include <iterator>
#include <unistd.h> #include <unistd.h>
#include <QSettings> #include <QtCore/QSettings>
#include "Node.h" #include "Node.h"
#include "NodeTypes.h" #include "NodeTypes.h"

View file

@ -11,7 +11,7 @@
#include <cmath> #include <cmath>
#include <cstring> #include <cstring>
#include <QDebug> #include <QtCore/QDebug>
#include "SharedUtil.h" #include "SharedUtil.h"
#include "OctalCode.h" #include "OctalCode.h"

View file

@ -8,7 +8,7 @@
#include <stdio.h> #include <stdio.h>
#include <QDebug> #include <QtCore/QDebug>
#include "PacketHeaders.h" #include "PacketHeaders.h"

View file

@ -14,7 +14,7 @@
#include <map> #include <map>
#include <string> #include <string>
#include <QDebug> #include <QtCore/QDebug>
#include "PerfStat.h" #include "PerfStat.h"

View file

@ -20,7 +20,7 @@
#include <CoreFoundation/CoreFoundation.h> #include <CoreFoundation/CoreFoundation.h>
#endif #endif
#include <QDebug> #include <QtCore/QDebug>
#include "OctalCode.h" #include "OctalCode.h"
#include "PacketHeaders.h" #include "PacketHeaders.h"

View file

@ -13,7 +13,7 @@
#include <stdint.h> #include <stdint.h>
#include <unistd.h> #include <unistd.h>
#include <QDebug> #include <QtCore/QDebug>
#ifdef _WIN32 #ifdef _WIN32
#include "Systime.h" #include "Systime.h"

View file

@ -20,7 +20,7 @@
#include <unistd.h> #include <unistd.h>
#endif #endif
#include <QDebug> #include <QtCore/QDebug>
#include "UDPSocket.h" #include "UDPSocket.h"