Created target for KREngine to compile as a framework for OSX.
--HG-- extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%4014
This commit is contained in:
@@ -9,9 +9,7 @@
|
||||
/* Begin PBXBuildFile section */
|
||||
E404C89D136B8E2F00B6C99B /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E404C89C136B8E2F00B6C99B /* main.cpp */; };
|
||||
E404C8A6136B901400B6C99B /* KROBJPacker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E404C8A4136B901400B6C99B /* KROBJPacker.cpp */; };
|
||||
E404C8A9136B919F00B6C99B /* KRVector3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E404C8A7136B919F00B6C99B /* KRVector3.cpp */; };
|
||||
E4082874150175FA0095DDCD /* libfbxsdk-2012.2-static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4082873150175FA0095DDCD /* libfbxsdk-2012.2-static.a */; };
|
||||
E4082877150176300095DDCD /* libPVRTexLib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4082876150176300095DDCD /* libPVRTexLib.a */; };
|
||||
E4BBBBA11512A51200F43B5B /* krengine_osx.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4BBBBA01512A51200F43B5B /* krengine_osx.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
@@ -32,10 +30,7 @@
|
||||
E404C89E136B8E2F00B6C99B /* objpack.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = objpack.1; sourceTree = "<group>"; };
|
||||
E404C8A4136B901400B6C99B /* KROBJPacker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = KROBJPacker.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
|
||||
E404C8A5136B901400B6C99B /* KROBJPacker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = KROBJPacker.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
E404C8A7136B919F00B6C99B /* KRVector3.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = KRVector3.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
|
||||
E404C8A8136B919F00B6C99B /* KRVector3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = KRVector3.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
E4082873150175FA0095DDCD /* libfbxsdk-2012.2-static.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libfbxsdk-2012.2-static.a"; path = "../../../../../../../../Applications/Autodesk/FBXSDK20122/lib/gcc4/ub/libfbxsdk-2012.2-static.a"; sourceTree = "<group>"; };
|
||||
E4082876150176300095DDCD /* libPVRTexLib.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libPVRTexLib.a; path = "../../../../../../../../Applications/PVR SDK Package/Utilities/PVRTexLib/MacOS/libPVRTexLib.a"; sourceTree = "<group>"; };
|
||||
E4BBBBA01512A51200F43B5B /* krengine_osx.framework */ = {isa = PBXFileReference; lastKnownFileType = file; name = krengine_osx.framework; path = ../KREngine/build/Release/krengine_osx.framework; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -43,8 +38,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
E4082877150176300095DDCD /* libPVRTexLib.a in Frameworks */,
|
||||
E4082874150175FA0095DDCD /* libfbxsdk-2012.2-static.a in Frameworks */,
|
||||
E4BBBBA11512A51200F43B5B /* krengine_osx.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -54,9 +48,8 @@
|
||||
E404C88D136B8E2F00B6C99B = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4082876150176300095DDCD /* libPVRTexLib.a */,
|
||||
E4082873150175FA0095DDCD /* libfbxsdk-2012.2-static.a */,
|
||||
E404C89B136B8E2F00B6C99B /* objpack */,
|
||||
E4BBBBA51512A59E00F43B5B /* Frameworks */,
|
||||
E404C899136B8E2F00B6C99B /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
@@ -76,12 +69,18 @@
|
||||
E404C89E136B8E2F00B6C99B /* objpack.1 */,
|
||||
E404C8A4136B901400B6C99B /* KROBJPacker.cpp */,
|
||||
E404C8A5136B901400B6C99B /* KROBJPacker.h */,
|
||||
E404C8A7136B919F00B6C99B /* KRVector3.cpp */,
|
||||
E404C8A8136B919F00B6C99B /* KRVector3.h */,
|
||||
);
|
||||
path = objpack;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E4BBBBA51512A59E00F43B5B /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4BBBBA01512A51200F43B5B /* krengine_osx.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@@ -135,7 +134,6 @@
|
||||
files = (
|
||||
E404C89D136B8E2F00B6C99B /* main.cpp in Sources */,
|
||||
E404C8A6136B901400B6C99B /* KROBJPacker.cpp in Sources */,
|
||||
E404C8A9136B919F00B6C99B /* KRVector3.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -154,6 +152,7 @@
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = /Users/kearwood/Documents/dev/svn/sarofax/tools/krengine/trunk/KREngine/KREngine/Classes;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
@@ -169,6 +168,7 @@
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = /Users/kearwood/Documents/dev/svn/sarofax/tools/krengine/trunk/KREngine/KREngine/Classes;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
//
|
||||
// KRVector3.cpp
|
||||
// KREngine
|
||||
//
|
||||
// Copyright 2012 Kearwood Gilbert. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are
|
||||
// permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
// conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
// of conditions and the following disclaimer in the documentation and/or other materials
|
||||
// provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// The views and conclusions contained in the software and documentation are those of the
|
||||
// authors and should not be interpreted as representing official policies, either expressed
|
||||
// or implied, of Kearwood Gilbert.
|
||||
//
|
||||
|
||||
#include "KRVector3.h"
|
||||
|
||||
//default constructor
|
||||
Vector3::Vector3(float X = 0, float Y = 0, float Z = 0)
|
||||
{
|
||||
x = X;
|
||||
y = Y;
|
||||
z = Z;
|
||||
}
|
||||
|
||||
Vector3::~Vector3()
|
||||
{
|
||||
}
|
||||
|
||||
//calculate and return the magnitude of this vector
|
||||
float Vector3::GetMagnitude()
|
||||
{
|
||||
return sqrtf(x * x + y * y + z * z);
|
||||
}
|
||||
|
||||
//multiply this vector by a scalar
|
||||
Vector3 Vector3::operator*(float num) const
|
||||
{
|
||||
return Vector3(x * num, y * num, z * num);
|
||||
}
|
||||
|
||||
//pass in a vector, pass in a scalar, return the product
|
||||
/*
|
||||
Vector3 Vector3::operator*(float num, Vector3 const &vec)
|
||||
{
|
||||
return Vector3(vec.x * num, vec.y * num, vec.z * num);
|
||||
}
|
||||
*/
|
||||
|
||||
//add two vectors
|
||||
Vector3 Vector3::operator+(const Vector3 &vec) const
|
||||
{
|
||||
return Vector3(x + vec.x, y + vec.y, z + vec.z);
|
||||
}
|
||||
|
||||
//subtract two vectors
|
||||
Vector3 Vector3::operator-(const Vector3 &vec) const
|
||||
{
|
||||
return Vector3(x - vec.x, y - vec.y, z - vec.z);
|
||||
}
|
||||
|
||||
//normalize this vector
|
||||
void Vector3::normalize()
|
||||
{
|
||||
float magnitude = sqrtf(x * x + y * y + z * z);
|
||||
x /= magnitude;
|
||||
y /= magnitude;
|
||||
z /= magnitude;
|
||||
}
|
||||
|
||||
//calculate and return dot product
|
||||
float Vector3::dot(const Vector3 &vec) const
|
||||
{
|
||||
return x * vec.x + y * vec.y + z * vec.z;
|
||||
}
|
||||
|
||||
//calculate and return cross product
|
||||
Vector3 Vector3::cross(const Vector3 &vec) const
|
||||
{
|
||||
return Vector3(y * vec.z - z * vec.y,
|
||||
z * vec.x - x * vec.z,
|
||||
x * vec.y - y * vec.x);
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
//
|
||||
// KRVector3.h
|
||||
// KREngine
|
||||
//
|
||||
// Copyright 2012 Kearwood Gilbert. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are
|
||||
// permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
// conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
// of conditions and the following disclaimer in the documentation and/or other materials
|
||||
// provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// The views and conclusions contained in the software and documentation are those of the
|
||||
// authors and should not be interpreted as representing official policies, either expressed
|
||||
// or implied, of Kearwood Gilbert.
|
||||
//
|
||||
|
||||
#ifndef KRVECTOR3
|
||||
#define KRVECTOR3
|
||||
#include <math.h>
|
||||
|
||||
class Vector3
|
||||
{
|
||||
|
||||
public:
|
||||
float x, y, z;
|
||||
|
||||
//default constructor
|
||||
|
||||
Vector3(float X, float Y, float Z);
|
||||
~Vector3();
|
||||
|
||||
//calculate and return the magnitude of this vector
|
||||
float GetMagnitude();
|
||||
|
||||
//multiply this vector by a scalar
|
||||
Vector3 operator*(float num) const;
|
||||
|
||||
//pass in a vector, pass in a scalar, return the product
|
||||
//friend Vector3 operator*(float num, Vector3 const &vec);
|
||||
|
||||
//add two vectors
|
||||
Vector3 operator+(const Vector3 &vec) const;
|
||||
|
||||
//subtract two vectors
|
||||
Vector3 operator-(const Vector3 &vec) const;
|
||||
|
||||
//normalize this vector
|
||||
void normalize();
|
||||
|
||||
//calculate and return dot product
|
||||
float dot(const Vector3 &vec) const;
|
||||
|
||||
//calculate and return cross product
|
||||
Vector3 cross(const Vector3 &vec) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user