WIP organization of library
This commit is contained in:
@@ -6,10 +6,9 @@
|
|||||||
// Copyright (c) 2012 Kearwood Software. All rights reserved.
|
// Copyright (c) 2012 Kearwood Software. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "KRAABB.h"
|
#include "public/kraken.h"
|
||||||
#include "KRMat4.h"
|
|
||||||
#include "KRVector2.h"
|
|
||||||
#include "assert.h"
|
#include "assert.h"
|
||||||
|
#include "KRHelpers.h"
|
||||||
|
|
||||||
KRAABB::KRAABB()
|
KRAABB::KRAABB()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
#include "KRDataBlock.h"
|
#include "KRDataBlock.h"
|
||||||
#include "KRAudioBuffer.h"
|
#include "KRAudioBuffer.h"
|
||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
#include "KRVector2.h"
|
|
||||||
#include "KRCollider.h"
|
#include "KRCollider.h"
|
||||||
#include "KRDSP.h"
|
#include "KRDSP.h"
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,6 @@
|
|||||||
|
|
||||||
#include "KRContextObject.h"
|
#include "KRContextObject.h"
|
||||||
#include "KRDataBlock.h"
|
#include "KRDataBlock.h"
|
||||||
#include "KRMat4.h"
|
|
||||||
#include "KRAudioSource.h"
|
#include "KRAudioSource.h"
|
||||||
#include "KRDSP.h"
|
#include "KRDSP.h"
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include "KREngine-common.h"
|
#include "KREngine-common.h"
|
||||||
#include "KRVector2.h"
|
|
||||||
#include "KRCamera.h"
|
#include "KRCamera.h"
|
||||||
#include "KRStockGeometry.h"
|
#include "KRStockGeometry.h"
|
||||||
#include "KRDirectionalLight.h"
|
#include "KRDirectionalLight.h"
|
||||||
|
|||||||
@@ -34,9 +34,6 @@
|
|||||||
|
|
||||||
#include "KREngine-common.h"
|
#include "KREngine-common.h"
|
||||||
|
|
||||||
#include "KRMat4.h"
|
|
||||||
#include "KRVector2.h"
|
|
||||||
#include "KRAABB.h"
|
|
||||||
#include "KRShader.h"
|
#include "KRShader.h"
|
||||||
#include "KRContextObject.h"
|
#include "KRContextObject.h"
|
||||||
#include "KRTexture.h"
|
#include "KRTexture.h"
|
||||||
|
|||||||
@@ -33,7 +33,6 @@
|
|||||||
#include "KRCollider.h"
|
#include "KRCollider.h"
|
||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
#include "KRMesh.h"
|
#include "KRMesh.h"
|
||||||
#include "KRQuaternion.h"
|
|
||||||
|
|
||||||
|
|
||||||
KRCollider::KRCollider(KRScene &scene, std::string collider_name, std::string model_name, unsigned int layer_mask, float audio_occlusion) : KRNode(scene, collider_name) {
|
KRCollider::KRCollider(KRScene &scene, std::string collider_name, std::string model_name, unsigned int layer_mask, float audio_occlusion) : KRNode(scene, collider_name) {
|
||||||
|
|||||||
@@ -38,8 +38,6 @@
|
|||||||
#define KRAKEN_COLLIDER_AUDIO 2
|
#define KRAKEN_COLLIDER_AUDIO 2
|
||||||
|
|
||||||
#include "KRMesh.h"
|
#include "KRMesh.h"
|
||||||
#include "KRMat4.h"
|
|
||||||
#include "KRVector3.h"
|
|
||||||
#include "KRModel.h"
|
#include "KRModel.h"
|
||||||
#include "KRCamera.h"
|
#include "KRCamera.h"
|
||||||
#include "KRMeshManager.h"
|
#include "KRMeshManager.h"
|
||||||
|
|||||||
@@ -11,8 +11,6 @@
|
|||||||
#include "KRDirectionalLight.h"
|
#include "KRDirectionalLight.h"
|
||||||
#include "KRShader.h"
|
#include "KRShader.h"
|
||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
#include "KRMat4.h"
|
|
||||||
#include "KRQuaternion.h"
|
|
||||||
#include "assert.h"
|
#include "assert.h"
|
||||||
#include "KRStockGeometry.h"
|
#include "KRStockGeometry.h"
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
#define KREngine_KRDirectionalLight_h
|
#define KREngine_KRDirectionalLight_h
|
||||||
|
|
||||||
#include "KRLight.h"
|
#include "KRLight.h"
|
||||||
#include "KRMat4.h"
|
|
||||||
|
|
||||||
class KRDirectionalLight : public KRLight {
|
class KRDirectionalLight : public KRLight {
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,8 @@
|
|||||||
#ifndef KRENGINE_COMMON_H
|
#ifndef KRENGINE_COMMON_H
|
||||||
#define KRENGINE_COMMON_H
|
#define KRENGINE_COMMON_H
|
||||||
|
|
||||||
float const PI = 3.141592653589793f;
|
#include "public/kraken.h"
|
||||||
float const D2R = PI * 2 / 360;
|
#include "KRHelpers.h"
|
||||||
|
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@@ -224,20 +223,14 @@ fprintf(stderr, "Error at line number %d, in file %s. Returned %d for call %s\n"
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define KRMIN(x,y) ((x) < (y) ? (x) : (y))
|
|
||||||
#define KRMAX(x,y) ((x) > (y) ? (x) : (y))
|
|
||||||
#define KRCLAMP(x, min, max) (KRMAX(KRMIN(x, max), min))
|
|
||||||
#define KRALIGN(x) ((x + 3) & ~0x03)
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
STREAM_LEVEL_OUT,
|
STREAM_LEVEL_OUT,
|
||||||
STREAM_LEVEL_IN_LQ,
|
STREAM_LEVEL_IN_LQ,
|
||||||
STREAM_LEVEL_IN_HQ
|
STREAM_LEVEL_IN_HQ
|
||||||
} kraken_stream_level;
|
} kraken_stream_level;
|
||||||
|
|
||||||
#include "KRVector4.h"
|
|
||||||
#include "KRVector3.h"
|
|
||||||
#include "KRVector2.h"
|
|
||||||
#include "KRBehavior.h"
|
#include "KRBehavior.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
using namespace kraken;
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
// Copyright (c) 2013 Kearwood Software. All rights reserved.
|
// Copyright (c) 2013 Kearwood Software. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "KRFloat.h"
|
#include "public\kraken.h"
|
||||||
|
|
||||||
float KRFloat::SmoothStep(float a, float b, float t)
|
float kraken::SmoothStep(float a, float b, float t)
|
||||||
{
|
{
|
||||||
float d = (3.0 * t * t - 2.0 * t * t * t);
|
float d = (3.0 * t * t - 2.0 * t * t * t);
|
||||||
return a * (1.0f - d) + b * d;
|
return a * (1.0f - d) + b * d;
|
||||||
|
|||||||
@@ -32,7 +32,9 @@
|
|||||||
#ifndef KRHITINFO_H
|
#ifndef KRHITINFO_H
|
||||||
#define KRHITINFO_H
|
#define KRHITINFO_H
|
||||||
|
|
||||||
#include "KRVector3.h"
|
#include "public/kraken.h"
|
||||||
|
|
||||||
|
using namespace kraken;
|
||||||
|
|
||||||
class KRNode;
|
class KRNode;
|
||||||
|
|
||||||
@@ -51,7 +53,6 @@ public:
|
|||||||
|
|
||||||
KRHitInfo& operator =(const KRHitInfo& b);
|
KRHitInfo& operator =(const KRHitInfo& b);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
KRNode *m_node;
|
KRNode *m_node;
|
||||||
KRVector3 m_position;
|
KRVector3 m_position;
|
||||||
|
|||||||
@@ -11,8 +11,6 @@
|
|||||||
#include "KRLight.h"
|
#include "KRLight.h"
|
||||||
|
|
||||||
#include "KRNode.h"
|
#include "KRNode.h"
|
||||||
#include "KRMat4.h"
|
|
||||||
#include "KRVector3.h"
|
|
||||||
#include "KRCamera.h"
|
#include "KRCamera.h"
|
||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
|
|
||||||
|
|||||||
@@ -31,8 +31,7 @@
|
|||||||
|
|
||||||
#include "KREngine-common.h"
|
#include "KREngine-common.h"
|
||||||
|
|
||||||
#include "KRMat4.h"
|
#include "public/KRMat4.h"
|
||||||
#include "KRQuaternion.h"
|
|
||||||
|
|
||||||
KRMat4::KRMat4() {
|
KRMat4::KRMat4() {
|
||||||
// Default constructor - Initialize with an identity matrix
|
// Default constructor - Initialize with an identity matrix
|
||||||
@@ -418,11 +417,6 @@ KRMat4 KRMat4::Transpose(const KRMat4 &m)
|
|||||||
return matTranspose;
|
return matTranspose;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KRMat4::setUniform(GLint location) const
|
|
||||||
{
|
|
||||||
if(location != -1) GLDEBUG(glUniformMatrix4fv(location, 1, GL_FALSE, c));
|
|
||||||
}
|
|
||||||
|
|
||||||
KRMat4 KRMat4::Translation(const KRVector3 &v)
|
KRMat4 KRMat4::Translation(const KRVector3 &v)
|
||||||
{
|
{
|
||||||
KRMat4 m;
|
KRMat4 m;
|
||||||
|
|||||||
@@ -36,8 +36,6 @@
|
|||||||
#include "KRShader.h"
|
#include "KRShader.h"
|
||||||
#include "KRCamera.h"
|
#include "KRCamera.h"
|
||||||
#include "KRResource.h"
|
#include "KRResource.h"
|
||||||
#include "KRVector2.h"
|
|
||||||
#include "KRVector3.h"
|
|
||||||
#include "KRScene.h"
|
#include "KRScene.h"
|
||||||
#include "KRBone.h"
|
#include "KRBone.h"
|
||||||
|
|
||||||
|
|||||||
@@ -34,8 +34,6 @@
|
|||||||
|
|
||||||
#include "KRMesh.h"
|
#include "KRMesh.h"
|
||||||
|
|
||||||
#include "KRVector3.h"
|
|
||||||
#include "KRTriangle3.h"
|
|
||||||
#include "KRShader.h"
|
#include "KRShader.h"
|
||||||
#include "KRShaderManager.h"
|
#include "KRShaderManager.h"
|
||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
|
|||||||
@@ -30,14 +30,14 @@
|
|||||||
//
|
//
|
||||||
#include "KREngine-common.h"
|
#include "KREngine-common.h"
|
||||||
|
|
||||||
#include "KRVector2.h"
|
|
||||||
#include "KRMat4.h"
|
|
||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
#include "KRBone.h"
|
#include "KRBone.h"
|
||||||
#include "KRMeshManager.h"
|
#include "KRMeshManager.h"
|
||||||
|
|
||||||
#include "KREngine-common.h"
|
#include "KREngine-common.h"
|
||||||
|
|
||||||
|
using namespace kraken;
|
||||||
|
|
||||||
#define MAX_VBO_SIZE 65535
|
#define MAX_VBO_SIZE 65535
|
||||||
#define KRENGINE_MAX_BONE_WEIGHTS_PER_VERTEX 4
|
#define KRENGINE_MAX_BONE_WEIGHTS_PER_VERTEX 4
|
||||||
#define KRENGINE_MAX_NAME_LENGTH 256
|
#define KRENGINE_MAX_NAME_LENGTH 256
|
||||||
@@ -55,8 +55,6 @@
|
|||||||
|
|
||||||
class KRMaterial;
|
class KRMaterial;
|
||||||
class KRNode;
|
class KRNode;
|
||||||
class KRTriangle3;
|
|
||||||
|
|
||||||
|
|
||||||
class KRMesh : public KRResource {
|
class KRMesh : public KRResource {
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,6 @@
|
|||||||
#include "KRModel.h"
|
#include "KRModel.h"
|
||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
#include "KRMesh.h"
|
#include "KRMesh.h"
|
||||||
#include "KRQuaternion.h"
|
|
||||||
|
|
||||||
KRModel::KRModel(KRScene &scene, std::string instance_name, std::string model_name, std::string light_map, float lod_min_coverage, bool receives_shadow, bool faces_camera, KRVector3 rim_color, float rim_power) : KRNode(scene, instance_name) {
|
KRModel::KRModel(KRScene &scene, std::string instance_name, std::string model_name, std::string light_map, float lod_min_coverage, bool receives_shadow, bool faces_camera, KRVector3 rim_color, float rim_power) : KRNode(scene, instance_name) {
|
||||||
m_lightMap = light_map;
|
m_lightMap = light_map;
|
||||||
@@ -80,7 +79,7 @@ tinyxml2::XMLElement *KRModel::saveXML( tinyxml2::XMLNode *parent)
|
|||||||
e->SetAttribute("lod_min_coverage", m_min_lod_coverage);
|
e->SetAttribute("lod_min_coverage", m_min_lod_coverage);
|
||||||
e->SetAttribute("receives_shadow", m_receivesShadow ? "true" : "false");
|
e->SetAttribute("receives_shadow", m_receivesShadow ? "true" : "false");
|
||||||
e->SetAttribute("faces_camera", m_faces_camera ? "true" : "false");
|
e->SetAttribute("faces_camera", m_faces_camera ? "true" : "false");
|
||||||
m_rim_color.setXMLAttribute("rim_color", e, KRVector3::Zero());
|
kraken::setXMLAttribute("rim_color", e, m_rim_color, KRVector3::Zero());
|
||||||
e->SetAttribute("rim_power", m_rim_power);
|
e->SetAttribute("rim_power", m_rim_power);
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,16 +29,12 @@
|
|||||||
// or implied, of Kearwood Gilbert.
|
// or implied, of Kearwood Gilbert.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "KREngine-common.h"
|
#include "KREngine-common.h"
|
||||||
|
|
||||||
#ifndef KRMODEL_H
|
#ifndef KRMODEL_H
|
||||||
#define KRMODEL_H
|
#define KRMODEL_H
|
||||||
|
|
||||||
#include "KRMesh.h"
|
#include "KRMesh.h"
|
||||||
#include "KRMat4.h"
|
|
||||||
#include "KRVector3.h"
|
|
||||||
#include "KRModel.h"
|
#include "KRModel.h"
|
||||||
#include "KRCamera.h"
|
#include "KRCamera.h"
|
||||||
#include "KRMeshManager.h"
|
#include "KRMeshManager.h"
|
||||||
|
|||||||
@@ -18,8 +18,6 @@
|
|||||||
#include "KRCollider.h"
|
#include "KRCollider.h"
|
||||||
#include "KRParticleSystem.h"
|
#include "KRParticleSystem.h"
|
||||||
#include "KRParticleSystemNewtonian.h"
|
#include "KRParticleSystemNewtonian.h"
|
||||||
#include "KRAABB.h"
|
|
||||||
#include "KRQuaternion.h"
|
|
||||||
#include "KRBone.h"
|
#include "KRBone.h"
|
||||||
#include "KRLocator.h"
|
#include "KRLocator.h"
|
||||||
#include "KRAudioSource.h"
|
#include "KRAudioSource.h"
|
||||||
@@ -125,17 +123,15 @@ tinyxml2::XMLElement *KRNode::saveXML(tinyxml2::XMLNode *parent) {
|
|||||||
tinyxml2::XMLElement *e = doc->NewElement(getElementName().c_str());
|
tinyxml2::XMLElement *e = doc->NewElement(getElementName().c_str());
|
||||||
tinyxml2::XMLNode *n = parent->InsertEndChild(e);
|
tinyxml2::XMLNode *n = parent->InsertEndChild(e);
|
||||||
e->SetAttribute("name", m_name.c_str());
|
e->SetAttribute("name", m_name.c_str());
|
||||||
m_localTranslation.setXMLAttribute("translate", e, KRVector3::Zero());
|
kraken::setXMLAttribute("translate", e, m_localTranslation, KRVector3::Zero());
|
||||||
m_localScale.setXMLAttribute("scale", e, KRVector3::One());
|
kraken::setXMLAttribute("scale", e, m_localScale, KRVector3::One());
|
||||||
(m_localRotation * (180.0f / M_PI)).setXMLAttribute("rotate", e, KRVector3::Zero());
|
kraken::setXMLAttribute("rotate", e, (m_localRotation * (180.0f / M_PI)), KRVector3::Zero());
|
||||||
|
kraken::setXMLAttribute("rotate_offset", e, m_rotationOffset, KRVector3::Zero());
|
||||||
|
kraken::setXMLAttribute("scale_offset", e, m_scalingOffset, KRVector3::Zero());
|
||||||
m_rotationOffset.setXMLAttribute("rotate_offset", e, KRVector3::Zero());
|
kraken::setXMLAttribute("rotate_pivot", e, m_rotationPivot, KRVector3::Zero());
|
||||||
m_scalingOffset.setXMLAttribute("scale_offset", e, KRVector3::Zero());
|
kraken::setXMLAttribute("scale_pivot", e, m_scalingPivot, KRVector3::Zero());
|
||||||
m_rotationPivot.setXMLAttribute("rotate_pivot", e, KRVector3::Zero());
|
kraken::setXMLAttribute("pre_rotate", e, (m_preRotation * (180.0f / M_PI)), KRVector3::Zero());
|
||||||
m_scalingPivot.setXMLAttribute("scale_pivot", e, KRVector3::Zero());
|
kraken::setXMLAttribute("post_rotate", e, (m_postRotation * (180.0f / M_PI)), KRVector3::Zero());
|
||||||
(m_preRotation * (180.0f / M_PI)).setXMLAttribute("pre_rotate", e, KRVector3::Zero());
|
|
||||||
(m_postRotation * (180.0f / M_PI)).setXMLAttribute("post_rotate", e, KRVector3::Zero());
|
|
||||||
|
|
||||||
for(std::set<KRNode *>::iterator itr=m_childNodes.begin(); itr != m_childNodes.end(); ++itr) {
|
for(std::set<KRNode *>::iterator itr=m_childNodes.begin(); itr != m_childNodes.end(); ++itr) {
|
||||||
KRNode *child = (*itr);
|
KRNode *child = (*itr);
|
||||||
@@ -146,21 +142,19 @@ tinyxml2::XMLElement *KRNode::saveXML(tinyxml2::XMLNode *parent) {
|
|||||||
|
|
||||||
void KRNode::loadXML(tinyxml2::XMLElement *e) {
|
void KRNode::loadXML(tinyxml2::XMLElement *e) {
|
||||||
m_name = e->Attribute("name");
|
m_name = e->Attribute("name");
|
||||||
m_localTranslation.getXMLAttribute("translate", e, KRVector3::Zero());
|
m_localTranslation = kraken::getXMLAttribute("translate", e, KRVector3::Zero());
|
||||||
m_localScale.getXMLAttribute("scale", e, KRVector3::One());
|
m_localScale = kraken::getXMLAttribute("scale", e, KRVector3::One());
|
||||||
m_localRotation.getXMLAttribute("rotate", e, KRVector3::Zero());
|
m_localRotation = kraken::getXMLAttribute("rotate", e, KRVector3::Zero());
|
||||||
m_localRotation *= M_PI / 180.0f; // Convert degrees to radians
|
m_localRotation *= M_PI / 180.0f; // Convert degrees to radians
|
||||||
m_preRotation.getXMLAttribute("pre_rotate", e, KRVector3::Zero());
|
m_preRotation = kraken::getXMLAttribute("pre_rotate", e, KRVector3::Zero());
|
||||||
m_preRotation *= M_PI / 180.0f; // Convert degrees to radians
|
m_preRotation *= M_PI / 180.0f; // Convert degrees to radians
|
||||||
m_postRotation.getXMLAttribute("post_rotate", e, KRVector3::Zero());
|
m_postRotation = kraken::getXMLAttribute("post_rotate", e, KRVector3::Zero());
|
||||||
m_postRotation *= M_PI / 180.0f; // Convert degrees to radians
|
m_postRotation *= M_PI / 180.0f; // Convert degrees to radians
|
||||||
|
|
||||||
|
m_rotationOffset = kraken::getXMLAttribute("rotate_offset", e, KRVector3::Zero());
|
||||||
m_rotationOffset.getXMLAttribute("rotate_offset", e, KRVector3::Zero());
|
m_scalingOffset = kraken::getXMLAttribute("scale_offset", e, KRVector3::Zero());
|
||||||
m_scalingOffset.getXMLAttribute("scale_offset", e, KRVector3::Zero());
|
m_rotationPivot = kraken::getXMLAttribute("rotate_pivot", e, KRVector3::Zero());
|
||||||
m_rotationPivot.getXMLAttribute("rotate_pivot", e, KRVector3::Zero());
|
m_scalingPivot = kraken::getXMLAttribute("scale_pivot", e, KRVector3::Zero());
|
||||||
m_scalingPivot.getXMLAttribute("scale_pivot", e, KRVector3::Zero());
|
|
||||||
|
|
||||||
|
|
||||||
m_initialLocalTranslation = m_localTranslation;
|
m_initialLocalTranslation = m_localTranslation;
|
||||||
m_initialLocalScale = m_localScale;
|
m_initialLocalScale = m_localScale;
|
||||||
@@ -434,7 +428,7 @@ KRNode *KRNode::LoadXML(KRScene &scene, tinyxml2::XMLElement *e) {
|
|||||||
rim_power = 0.0f;
|
rim_power = 0.0f;
|
||||||
}
|
}
|
||||||
KRVector3 rim_color = KRVector3::Zero();
|
KRVector3 rim_color = KRVector3::Zero();
|
||||||
rim_color.getXMLAttribute("rim_color", e, KRVector3::Zero());
|
rim_color = kraken::getXMLAttribute("rim_color", e, KRVector3::Zero());
|
||||||
new_node = new KRModel(scene, szName, e->Attribute("mesh"), e->Attribute("light_map"), lod_min_coverage, receives_shadow, faces_camera, rim_color, rim_power);
|
new_node = new KRModel(scene, szName, e->Attribute("mesh"), e->Attribute("light_map"), lod_min_coverage, receives_shadow, faces_camera, rim_color, rim_power);
|
||||||
} else if(strcmp(szElementName, "collider") == 0) {
|
} else if(strcmp(szElementName, "collider") == 0) {
|
||||||
new_node = new KRCollider(scene, szName, e->Attribute("mesh"), 65535, 1.0f);
|
new_node = new KRCollider(scene, szName, e->Attribute("mesh"), 65535, 1.0f);
|
||||||
|
|||||||
@@ -10,20 +10,24 @@
|
|||||||
#define KRNODE_H
|
#define KRNODE_H
|
||||||
|
|
||||||
#include "KRResource.h"
|
#include "KRResource.h"
|
||||||
#include "KRVector3.h"
|
|
||||||
#include "KRViewport.h"
|
#include "KRViewport.h"
|
||||||
#include "KROctreeNode.h"
|
#include "KROctreeNode.h"
|
||||||
#include "KRBehavior.h"
|
#include "KRBehavior.h"
|
||||||
|
|
||||||
|
using namespace kraken;
|
||||||
|
|
||||||
|
namespace kraken {
|
||||||
|
class KRMat4;
|
||||||
|
class KRAABB;
|
||||||
|
} // namespace kraken
|
||||||
class KRCamera;
|
class KRCamera;
|
||||||
class KRShaderManager;
|
class KRShaderManager;
|
||||||
class KRMeshManager;
|
class KRMeshManager;
|
||||||
class KRMaterialManager;
|
class KRMaterialManager;
|
||||||
class KRMat4;
|
|
||||||
class KRTextureManager;
|
class KRTextureManager;
|
||||||
class KRContext;
|
class KRContext;
|
||||||
class KRScene;
|
class KRScene;
|
||||||
class KRAABB;
|
|
||||||
class KRNode;
|
class KRNode;
|
||||||
class KRPointLight;
|
class KRPointLight;
|
||||||
class KRSpotLight;
|
class KRSpotLight;
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
#include "KREngine-common.h"
|
#include "KREngine-common.h"
|
||||||
#include "KROctreeNode.h"
|
#include "KROctreeNode.h"
|
||||||
#include "KRMat4.h"
|
|
||||||
#include "KRHitInfo.h"
|
#include "KRHitInfo.h"
|
||||||
|
|
||||||
class KRNode;
|
class KRNode;
|
||||||
|
|||||||
@@ -10,8 +10,6 @@
|
|||||||
#define KROCTREENODE_H
|
#define KROCTREENODE_H
|
||||||
|
|
||||||
#include "KREngine-common.h"
|
#include "KREngine-common.h"
|
||||||
#include "KRVector3.h"
|
|
||||||
#include "KRAABB.h"
|
|
||||||
#include "KRHitInfo.h"
|
#include "KRHitInfo.h"
|
||||||
|
|
||||||
class KRNode;
|
class KRNode;
|
||||||
|
|||||||
@@ -6,8 +6,9 @@
|
|||||||
// Copyright (c) 2012 Kearwood Software. All rights reserved.
|
// Copyright (c) 2012 Kearwood Software. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "KREngine-common.h"
|
||||||
#include "KRParticleSystemNewtonian.h"
|
#include "KRParticleSystemNewtonian.h"
|
||||||
#include "KRAABB.h"
|
|
||||||
#include "KRTexture.h"
|
#include "KRTexture.h"
|
||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,6 @@
|
|||||||
#include "KREngine-common.h"
|
#include "KREngine-common.h"
|
||||||
|
|
||||||
#include "KRPointLight.h"
|
#include "KRPointLight.h"
|
||||||
#include "KRMat4.h"
|
|
||||||
#include "KRVector3.h"
|
|
||||||
#include "KRCamera.h"
|
#include "KRCamera.h"
|
||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
#include "KRStockGeometry.h"
|
#include "KRStockGeometry.h"
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
#define KRPOINTLIGHT_H
|
#define KRPOINTLIGHT_H
|
||||||
|
|
||||||
#include "KRLight.h"
|
#include "KRLight.h"
|
||||||
#include "KRMat4.h"
|
|
||||||
|
|
||||||
class KRPointLight : public KRLight {
|
class KRPointLight : public KRLight {
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,11 @@
|
|||||||
// or implied, of Kearwood Gilbert.
|
// or implied, of Kearwood Gilbert.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "KRQuaternion.h"
|
#include "public/kraken.h"
|
||||||
#include "KRVector3.h"
|
|
||||||
|
#include "KRHelpers.h"
|
||||||
|
|
||||||
|
namespace kraken {
|
||||||
|
|
||||||
KRQuaternion::KRQuaternion() {
|
KRQuaternion::KRQuaternion() {
|
||||||
m_val[0] = 1.0;
|
m_val[0] = 1.0;
|
||||||
@@ -358,3 +361,5 @@ KRQuaternion KRQuaternion::Slerp(const KRQuaternion &a, const KRQuaternion &b, f
|
|||||||
|
|
||||||
return (c * sin((1.0f - t) * halftheta) + b * sin(t * halftheta)) / sin(halftheta);
|
return (c * sin((1.0f - t) * halftheta) + b * sin(t * halftheta)) / sin(halftheta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace kraken
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
#include "KRSpotLight.h"
|
#include "KRSpotLight.h"
|
||||||
#include "KRNode.h"
|
#include "KRNode.h"
|
||||||
#include "KRScene.h"
|
#include "KRScene.h"
|
||||||
#include "KRQuaternion.h"
|
|
||||||
#include "KRBone.h"
|
#include "KRBone.h"
|
||||||
#include "KRLocator.h"
|
#include "KRLocator.h"
|
||||||
#include "KRBundle.h"
|
#include "KRBundle.h"
|
||||||
|
|||||||
@@ -30,8 +30,6 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include "KREngine-common.h"
|
#include "KREngine-common.h"
|
||||||
#include "KRVector3.h"
|
|
||||||
#include "KRMat4.h"
|
|
||||||
|
|
||||||
#include "KRLight.h"
|
#include "KRLight.h"
|
||||||
|
|
||||||
@@ -41,7 +39,6 @@
|
|||||||
#include "KRDirectionalLight.h"
|
#include "KRDirectionalLight.h"
|
||||||
#include "KRSpotLight.h"
|
#include "KRSpotLight.h"
|
||||||
#include "KRPointLight.h"
|
#include "KRPointLight.h"
|
||||||
#include "KRQuaternion.h"
|
|
||||||
#include "KRAudioManager.h"
|
#include "KRAudioManager.h"
|
||||||
|
|
||||||
const long KRENGINE_OCCLUSION_TEST_EXPIRY = 10;
|
const long KRENGINE_OCCLUSION_TEST_EXPIRY = 10;
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
#include "KREngine-common.h"
|
#include "KREngine-common.h"
|
||||||
|
|
||||||
#include "KRModel.h"
|
#include "KRModel.h"
|
||||||
#include "KRMat4.h"
|
|
||||||
#include "KRMesh.h"
|
#include "KRMesh.h"
|
||||||
#include "KRCamera.h"
|
#include "KRCamera.h"
|
||||||
#include "KRMeshManager.h"
|
#include "KRMeshManager.h"
|
||||||
|
|||||||
@@ -36,7 +36,6 @@
|
|||||||
|
|
||||||
#include "KREngine-common.h"
|
#include "KREngine-common.h"
|
||||||
#include "KRShader.h"
|
#include "KRShader.h"
|
||||||
#include "KRMat4.h"
|
|
||||||
#include "KRCamera.h"
|
#include "KRCamera.h"
|
||||||
#include "KRNode.h"
|
#include "KRNode.h"
|
||||||
#include "KRViewport.h"
|
#include "KRViewport.h"
|
||||||
|
|||||||
@@ -11,8 +11,6 @@
|
|||||||
#include "KRSprite.h"
|
#include "KRSprite.h"
|
||||||
|
|
||||||
#include "KRNode.h"
|
#include "KRNode.h"
|
||||||
#include "KRMat4.h"
|
|
||||||
#include "KRVector3.h"
|
|
||||||
#include "KRCamera.h"
|
#include "KRCamera.h"
|
||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
|
|
||||||
|
|||||||
@@ -6,21 +6,87 @@
|
|||||||
// Copyright (c) 2014 Kearwood Software. All rights reserved.
|
// Copyright (c) 2014 Kearwood Software. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "KRTriangle3.h"
|
#include "public/kraken.h"
|
||||||
#include "KRVector3.h"
|
|
||||||
|
using namespace kraken;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
bool _intersectSphere(const KRVector3 &start, const KRVector3 &dir, const KRVector3 &sphere_center, float sphere_radius, float &distance)
|
||||||
|
{
|
||||||
|
// dir must be normalized
|
||||||
|
|
||||||
|
// From: http://archive.gamedev.net/archive/reference/articles/article1026.html
|
||||||
|
|
||||||
|
// TODO - Move to another class?
|
||||||
|
KRVector3 Q = sphere_center - start;
|
||||||
|
float c = Q.magnitude();
|
||||||
|
float v = KRVector3::Dot(Q, dir);
|
||||||
|
float d = sphere_radius * sphere_radius - (c * c - v * v);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (d < 0.0) {
|
||||||
|
// No intersection
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return the distance to the [first] intersecting point
|
||||||
|
|
||||||
|
distance = v - sqrt(d);
|
||||||
|
if (distance < 0.0f) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool _sameSide(const KRVector3 &p1, const KRVector3 &p2, const KRVector3 &a, const KRVector3 &b)
|
||||||
|
{
|
||||||
|
// TODO - Move to KRVector3 class?
|
||||||
|
// From: http://stackoverflow.com/questions/995445/determine-if-a-3d-point-is-within-a-triangle
|
||||||
|
|
||||||
|
KRVector3 cp1 = KRVector3::Cross(b - a, p1 - a);
|
||||||
|
KRVector3 cp2 = KRVector3::Cross(b - a, p2 - a);
|
||||||
|
if (KRVector3::Dot(cp1, cp2) >= 0) return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
KRVector3 _closestPointOnLine(const KRVector3 &a, const KRVector3 &b, const KRVector3 &p)
|
||||||
|
{
|
||||||
|
// From: http://stackoverflow.com/questions/995445/determine-if-a-3d-point-is-within-a-triangle
|
||||||
|
|
||||||
|
// Determine t (the length of the vector from ‘a’ to ‘p’)
|
||||||
|
|
||||||
|
KRVector3 c = p - a;
|
||||||
|
KRVector3 V = KRVector3::Normalize(b - a);
|
||||||
|
float d = (a - b).magnitude();
|
||||||
|
float t = KRVector3::Dot(V, c);
|
||||||
|
|
||||||
|
// Check to see if ‘t’ is beyond the extents of the line segment
|
||||||
|
|
||||||
|
if (t < 0) return a;
|
||||||
|
if (t > d) return b;
|
||||||
|
|
||||||
|
// Return the point between ‘a’ and ‘b’
|
||||||
|
|
||||||
|
return a + V * t;
|
||||||
|
}
|
||||||
|
} // anonymous namespace
|
||||||
|
|
||||||
|
namespace kraken {
|
||||||
|
|
||||||
KRTriangle3::KRTriangle3(const KRVector3 &v1, const KRVector3 &v2, const KRVector3 &v3)
|
KRTriangle3::KRTriangle3(const KRVector3 &v1, const KRVector3 &v2, const KRVector3 &v3)
|
||||||
{
|
{
|
||||||
m_c[0] = v1;
|
vert[0] = v1;
|
||||||
m_c[1] = v2;
|
vert[1] = v2;
|
||||||
m_c[2] = v3;
|
vert[2] = v3;
|
||||||
}
|
}
|
||||||
|
|
||||||
KRTriangle3::KRTriangle3(const KRTriangle3 &tri)
|
KRTriangle3::KRTriangle3(const KRTriangle3 &tri)
|
||||||
{
|
{
|
||||||
m_c[0] = tri[0];
|
vert[0] = tri[0];
|
||||||
m_c[1] = tri[1];
|
vert[1] = tri[1];
|
||||||
m_c[3] = tri[3];
|
vert[3] = tri[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -31,31 +97,31 @@ KRTriangle3::~KRTriangle3()
|
|||||||
|
|
||||||
bool KRTriangle3::operator ==(const KRTriangle3& b) const
|
bool KRTriangle3::operator ==(const KRTriangle3& b) const
|
||||||
{
|
{
|
||||||
return m_c[0] == b[0] && m_c[1] == b[1] && m_c[2] == b[2];
|
return vert[0] == b[0] && vert[1] == b[1] && vert[2] == b[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool KRTriangle3::operator !=(const KRTriangle3& b) const
|
bool KRTriangle3::operator !=(const KRTriangle3& b) const
|
||||||
{
|
{
|
||||||
return m_c[0] != b[0] || m_c[1] != b[1] || m_c[2] != b[2];
|
return vert[0] != b[0] || vert[1] != b[1] || vert[2] != b[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
KRTriangle3& KRTriangle3::operator =(const KRTriangle3& b)
|
KRTriangle3& KRTriangle3::operator =(const KRTriangle3& b)
|
||||||
{
|
{
|
||||||
|
|
||||||
m_c[0] = b[0];
|
vert[0] = b[0];
|
||||||
m_c[1] = b[1];
|
vert[1] = b[1];
|
||||||
m_c[3] = b[3];
|
vert[3] = b[3];
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
KRVector3& KRTriangle3::operator[](unsigned i)
|
KRVector3& KRTriangle3::operator[](unsigned int i)
|
||||||
{
|
{
|
||||||
return m_c[i];
|
return vert[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
KRVector3 KRTriangle3::operator[](unsigned i) const
|
KRVector3 KRTriangle3::operator[](unsigned int i) const
|
||||||
{
|
{
|
||||||
return m_c[i];
|
return vert[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -68,13 +134,13 @@ bool KRTriangle3::rayCast(const KRVector3 &start, const KRVector3 &dir, KRVector
|
|||||||
float r, a, b; // params to calc ray-plane intersect
|
float r, a, b; // params to calc ray-plane intersect
|
||||||
|
|
||||||
// get triangle edge vectors and plane normal
|
// get triangle edge vectors and plane normal
|
||||||
u = m_c[1] - m_c[0];
|
u = vert[1] - vert[0];
|
||||||
v = m_c[2] - m_c[0];
|
v = vert[2] - vert[0];
|
||||||
n = KRVector3::Cross(u, v); // cross product
|
n = KRVector3::Cross(u, v); // cross product
|
||||||
if (n == KRVector3::Zero()) // triangle is degenerate
|
if (n == KRVector3::Zero()) // triangle is degenerate
|
||||||
return false; // do not deal with this case
|
return false; // do not deal with this case
|
||||||
|
|
||||||
w0 = start - m_c[0];
|
w0 = start - vert[0];
|
||||||
a = -KRVector3::Dot(n, w0);
|
a = -KRVector3::Dot(n, w0);
|
||||||
b = KRVector3::Dot(n,dir);
|
b = KRVector3::Dot(n,dir);
|
||||||
if (fabs(b) < SMALL_NUM) { // ray is parallel to triangle plane
|
if (fabs(b) < SMALL_NUM) { // ray is parallel to triangle plane
|
||||||
@@ -99,7 +165,7 @@ bool KRTriangle3::rayCast(const KRVector3 &start, const KRVector3 &dir, KRVector
|
|||||||
uu = KRVector3::Dot(u,u);
|
uu = KRVector3::Dot(u,u);
|
||||||
uv = KRVector3::Dot(u,v);
|
uv = KRVector3::Dot(u,v);
|
||||||
vv = KRVector3::Dot(v,v);
|
vv = KRVector3::Dot(v,v);
|
||||||
w = plane_hit_point - m_c[0];
|
w = plane_hit_point - vert[0];
|
||||||
wu = KRVector3::Dot(w,u);
|
wu = KRVector3::Dot(w,u);
|
||||||
wv = KRVector3::Dot(w,v);
|
wv = KRVector3::Dot(w,v);
|
||||||
D = uv * uv - uu * vv;
|
D = uv * uv - uu * vv;
|
||||||
@@ -120,78 +186,17 @@ bool KRTriangle3::rayCast(const KRVector3 &start, const KRVector3 &dir, KRVector
|
|||||||
|
|
||||||
KRVector3 KRTriangle3::calculateNormal() const
|
KRVector3 KRTriangle3::calculateNormal() const
|
||||||
{
|
{
|
||||||
KRVector3 v1 = m_c[1] - m_c[0];
|
KRVector3 v1 = vert[1] - vert[0];
|
||||||
KRVector3 v2 = m_c[2] - m_c[0];
|
KRVector3 v2 = vert[2] - vert[0];
|
||||||
|
|
||||||
return KRVector3::Normalize(KRVector3::Cross(v1, v2));
|
return KRVector3::Normalize(KRVector3::Cross(v1, v2));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _intersectSphere(const KRVector3 &start, const KRVector3 &dir, const KRVector3 &sphere_center, float sphere_radius, float &distance)
|
|
||||||
{
|
|
||||||
// dir must be normalized
|
|
||||||
|
|
||||||
// From: http://archive.gamedev.net/archive/reference/articles/article1026.html
|
|
||||||
|
|
||||||
// TODO - Move to another class?
|
|
||||||
KRVector3 Q = sphere_center - start;
|
|
||||||
float c = Q.magnitude();
|
|
||||||
float v = KRVector3::Dot(Q, dir);
|
|
||||||
float d = sphere_radius * sphere_radius - (c * c - v * v);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(d < 0.0) {
|
|
||||||
// No intersection
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return the distance to the [first] intersecting point
|
|
||||||
|
|
||||||
distance = v - sqrt(d);
|
|
||||||
if(distance < 0.0f) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
bool _sameSide(const KRVector3 &p1, const KRVector3 &p2, const KRVector3 &a, const KRVector3 &b)
|
|
||||||
{
|
|
||||||
// TODO - Move to KRVector3 class?
|
|
||||||
// From: http://stackoverflow.com/questions/995445/determine-if-a-3d-point-is-within-a-triangle
|
|
||||||
|
|
||||||
KRVector3 cp1 = KRVector3::Cross(b - a, p1 - a);
|
|
||||||
KRVector3 cp2 = KRVector3::Cross(b - a, p2 - a);
|
|
||||||
if(KRVector3::Dot(cp1, cp2) >= 0) return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
KRVector3 _closestPointOnLine(const KRVector3 &a, const KRVector3 &b, const KRVector3 &p)
|
|
||||||
{
|
|
||||||
// From: http://stackoverflow.com/questions/995445/determine-if-a-3d-point-is-within-a-triangle
|
|
||||||
|
|
||||||
// Determine t (the length of the vector from ‘a’ to ‘p’)
|
|
||||||
|
|
||||||
KRVector3 c = p - a;
|
|
||||||
KRVector3 V = KRVector3::Normalize(b - a);
|
|
||||||
float d = (a - b).magnitude();
|
|
||||||
float t = KRVector3::Dot(V, c);
|
|
||||||
|
|
||||||
// Check to see if ‘t’ is beyond the extents of the line segment
|
|
||||||
|
|
||||||
if (t < 0) return a;
|
|
||||||
if (t > d) return b;
|
|
||||||
|
|
||||||
// Return the point between ‘a’ and ‘b’
|
|
||||||
|
|
||||||
return a + V * t;
|
|
||||||
}
|
|
||||||
|
|
||||||
KRVector3 KRTriangle3::closestPointOnTriangle(const KRVector3 &p) const
|
KRVector3 KRTriangle3::closestPointOnTriangle(const KRVector3 &p) const
|
||||||
{
|
{
|
||||||
KRVector3 a = m_c[0];
|
KRVector3 a = vert[0];
|
||||||
KRVector3 b = m_c[1];
|
KRVector3 b = vert[1];
|
||||||
KRVector3 c = m_c[2];
|
KRVector3 c = vert[2];
|
||||||
|
|
||||||
KRVector3 Rab = _closestPointOnLine(a, b, p);
|
KRVector3 Rab = _closestPointOnLine(a, b, p);
|
||||||
KRVector3 Rbc = _closestPointOnLine(b, c, p);
|
KRVector3 Rbc = _closestPointOnLine(b, c, p);
|
||||||
@@ -218,7 +223,7 @@ bool KRTriangle3::sphereCast(const KRVector3 &start, const KRVector3 &dir, float
|
|||||||
|
|
||||||
KRVector3 tri_normal = calculateNormal();
|
KRVector3 tri_normal = calculateNormal();
|
||||||
|
|
||||||
float d = KRVector3::Dot(tri_normal, m_c[0]);
|
float d = KRVector3::Dot(tri_normal, vert[0]);
|
||||||
float e = KRVector3::Dot(tri_normal, start) - radius;
|
float e = KRVector3::Dot(tri_normal, start) - radius;
|
||||||
float cotangent_distance = e - d;
|
float cotangent_distance = e - d;
|
||||||
|
|
||||||
@@ -277,10 +282,10 @@ bool KRTriangle3::containsPoint(const KRVector3 &p) const
|
|||||||
// From: http://stackoverflow.com/questions/995445/determine-if-a-3d-point-is-within-a-triangle
|
// From: http://stackoverflow.com/questions/995445/determine-if-a-3d-point-is-within-a-triangle
|
||||||
|
|
||||||
const float SMALL_NUM = 0.00000001f; // anything that avoids division overflow
|
const float SMALL_NUM = 0.00000001f; // anything that avoids division overflow
|
||||||
// KRVector3 A = m_c[0], B = m_c[1], C = m_c[2];
|
// KRVector3 A = vert[0], B = vert[1], C = vert[2];
|
||||||
if (_sameSide(p, m_c[0], m_c[1], m_c[2]) && _sameSide(p, m_c[1], m_c[0], m_c[2]) && _sameSide(p, m_c[2], m_c[0], m_c[1])) {
|
if (_sameSide(p, vert[0], vert[1], vert[2]) && _sameSide(p, vert[1], vert[0], vert[2]) && _sameSide(p, vert[2], vert[0], vert[1])) {
|
||||||
KRVector3 vc1 = KRVector3::Cross(m_c[0] - m_c[1], m_c[0] - m_c[2]);
|
KRVector3 vc1 = KRVector3::Cross(vert[0] - vert[1], vert[0] - vert[2]);
|
||||||
if(fabs(KRVector3::Dot(m_c[0] - p, vc1)) <= SMALL_NUM) {
|
if(fabs(KRVector3::Dot(vert[0] - p, vc1)) <= SMALL_NUM) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -290,9 +295,9 @@ bool KRTriangle3::containsPoint(const KRVector3 &p) const
|
|||||||
|
|
||||||
// From: http://blogs.msdn.com/b/rezanour/archive/2011/08/07/barycentric-coordinates-and-point-in-triangle-tests.aspx
|
// From: http://blogs.msdn.com/b/rezanour/archive/2011/08/07/barycentric-coordinates-and-point-in-triangle-tests.aspx
|
||||||
|
|
||||||
KRVector3 A = m_c[0];
|
KRVector3 A = vert[0];
|
||||||
KRVector3 B = m_c[1];
|
KRVector3 B = vert[1];
|
||||||
KRVector3 C = m_c[2];
|
KRVector3 C = vert[2];
|
||||||
KRVector3 P = p;
|
KRVector3 P = p;
|
||||||
|
|
||||||
// Prepare our barycentric variables
|
// Prepare our barycentric variables
|
||||||
@@ -323,5 +328,4 @@ bool KRTriangle3::containsPoint(const KRVector3 &p) const
|
|||||||
return (r + t <= 1);
|
return (r + t <= 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace kraken
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
// Copyright (c) 2012 Kearwood Software. All rights reserved.
|
// Copyright (c) 2012 Kearwood Software. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "KREngine-common.h"
|
#include "public/kraken.h"
|
||||||
|
|
||||||
#include "KRVector2.h"
|
namespace kraken {
|
||||||
|
|
||||||
KRVector2::KRVector2() {
|
KRVector2::KRVector2() {
|
||||||
x = 0.0;
|
x = 0.0;
|
||||||
@@ -212,7 +212,4 @@ float KRVector2::Dot(const KRVector2 &v1, const KRVector2 &v2) {
|
|||||||
return v1.x * v2.x + v1.y * v2.y;
|
return v1.x * v2.x + v1.y * v2.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KRVector2::setUniform(GLint location) const
|
} // namepsace kraken
|
||||||
{
|
|
||||||
if(location != -1) GLDEBUG(glUniform2f(location, x, y));
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include "KREngine-common.h"
|
#include "KREngine-common.h"
|
||||||
#include "KRVector3.h"
|
#include "public/kraken.h"
|
||||||
|
|
||||||
const KRVector3 KRVECTOR3_ZERO(0.0f, 0.0f, 0.0f);
|
const KRVector3 KRVECTOR3_ZERO(0.0f, 0.0f, 0.0f);
|
||||||
|
|
||||||
@@ -412,35 +412,3 @@ bool KRVector3::operator <(const KRVector3& b) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void KRVector3::setUniform(GLint location) const
|
|
||||||
{
|
|
||||||
if(location != -1) GLDEBUG(glUniform3f(location, x, y, z));
|
|
||||||
}
|
|
||||||
|
|
||||||
void KRVector3::setXMLAttribute(const std::string &base_name, tinyxml2::XMLElement *e, const KRVector3 &default_value)
|
|
||||||
{
|
|
||||||
// TODO - Increase number of digits after the decimal in floating point format (6 -> 12?)
|
|
||||||
// FINDME, TODO - This needs optimization...
|
|
||||||
if(*this != default_value) {
|
|
||||||
e->SetAttribute((base_name + "_x").c_str(), x);
|
|
||||||
e->SetAttribute((base_name + "_y").c_str(), y);
|
|
||||||
e->SetAttribute((base_name + "_z").c_str(), z);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KRVector3::getXMLAttribute(const std::string &base_name, tinyxml2::XMLElement *e, const KRVector3 &default_value)
|
|
||||||
{
|
|
||||||
float new_x = 0.0f;
|
|
||||||
float new_y = 0.0f;
|
|
||||||
float new_z = 0.0f;
|
|
||||||
if(e->QueryFloatAttribute((base_name + "_x").c_str(), &new_x) == tinyxml2::XML_SUCCESS
|
|
||||||
&& e->QueryFloatAttribute((base_name + "_y").c_str(), &new_y) == tinyxml2::XML_SUCCESS
|
|
||||||
&& e->QueryFloatAttribute((base_name + "_z").c_str(), &new_z) == tinyxml2::XML_SUCCESS) {
|
|
||||||
x = new_x;
|
|
||||||
y = new_y;
|
|
||||||
z = new_z;
|
|
||||||
} else {
|
|
||||||
*this = default_value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -31,6 +31,8 @@
|
|||||||
|
|
||||||
#include "public/kraken.h"
|
#include "public/kraken.h"
|
||||||
|
|
||||||
|
namespace kraken {
|
||||||
|
|
||||||
const KRVector4 KRVECTOR4_ZERO(0.0f, 0.0f, 0.0f, 0.0f);
|
const KRVector4 KRVECTOR4_ZERO(0.0f, 0.0f, 0.0f, 0.0f);
|
||||||
|
|
||||||
//default constructor
|
//default constructor
|
||||||
@@ -297,3 +299,5 @@ bool KRVector4::operator <(const KRVector4& b) const
|
|||||||
if(w != b.w) return w < b.w;
|
if(w != b.w) return w < b.w;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace kraken
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
#include "KRVector2.h"
|
#include "KRVector2.h"
|
||||||
#include "KRVector3.h"
|
#include "KRVector3.h"
|
||||||
|
|
||||||
|
namespace kraken {
|
||||||
|
|
||||||
class KRMat4;
|
class KRMat4;
|
||||||
|
|
||||||
class KRAABB {
|
class KRAABB {
|
||||||
@@ -58,14 +60,16 @@ public:
|
|||||||
KRVector3 nearestPoint(const KRVector3 & v) const;
|
KRVector3 nearestPoint(const KRVector3 & v) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace kraken
|
||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
template<>
|
template<>
|
||||||
struct hash<KRAABB> {
|
struct hash<kraken::KRAABB> {
|
||||||
public:
|
public:
|
||||||
size_t operator()(const KRAABB &s) const
|
size_t operator()(const kraken::KRAABB &s) const
|
||||||
{
|
{
|
||||||
size_t h1 = hash<KRVector3>()(s.min);
|
size_t h1 = hash<kraken::KRVector3>()(s.min);
|
||||||
size_t h2 = hash<KRVector3>()(s.max);
|
size_t h2 = hash<kraken::KRVector3>()(s.max);
|
||||||
return h1 ^ ( h2 << 1 );
|
return h1 ^ ( h2 << 1 );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -32,8 +32,10 @@
|
|||||||
#ifndef KRFLOAT_H
|
#ifndef KRFLOAT_H
|
||||||
#define KRFLOAT_H
|
#define KRFLOAT_H
|
||||||
|
|
||||||
namespace KRFloat {
|
namespace kraken {
|
||||||
|
|
||||||
float SmoothStep(float a, float b, float t);
|
float SmoothStep(float a, float b, float t);
|
||||||
};
|
|
||||||
|
}; // namespace kraken
|
||||||
|
|
||||||
#endif /* defined(KRFLOAT_H) */
|
#endif /* defined(KRFLOAT_H) */
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
#ifndef KRMAT4_H
|
#ifndef KRMAT4_H
|
||||||
#define KRMAT4_H
|
#define KRMAT4_H
|
||||||
|
|
||||||
|
namespace kraken {
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
X_AXIS,
|
X_AXIS,
|
||||||
Y_AXIS,
|
Y_AXIS,
|
||||||
@@ -108,4 +110,6 @@ class KRMat4 {
|
|||||||
static KRMat4 Scaling(const KRVector3 &v);
|
static KRMat4 Scaling(const KRVector3 &v);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace kraken
|
||||||
|
|
||||||
#endif // KRMAT4_H
|
#endif // KRMAT4_H
|
||||||
15
kraken/KRQuaternion.h → kraken/public/KRQuaternion.h
Executable file → Normal file
15
kraken/KRQuaternion.h → kraken/public/KRQuaternion.h
Executable file → Normal file
@@ -32,10 +32,9 @@
|
|||||||
#ifndef KRQUATERNION_H
|
#ifndef KRQUATERNION_H
|
||||||
#define KRQUATERNION_H
|
#define KRQUATERNION_H
|
||||||
|
|
||||||
#include "KREngine-common.h"
|
#include "KRVector3.h"
|
||||||
#include "KRMat4.h"
|
|
||||||
|
|
||||||
class KRVector3;
|
namespace kraken {
|
||||||
|
|
||||||
class KRQuaternion {
|
class KRQuaternion {
|
||||||
public:
|
public:
|
||||||
@@ -47,13 +46,13 @@ public:
|
|||||||
~KRQuaternion();
|
~KRQuaternion();
|
||||||
|
|
||||||
KRQuaternion& operator =( const KRQuaternion& p );
|
KRQuaternion& operator =( const KRQuaternion& p );
|
||||||
KRQuaternion operator +(const KRQuaternion &v) const;
|
KRQuaternion operator +(const KRQuaternion &v) const;
|
||||||
KRQuaternion operator -(const KRQuaternion &v) const;
|
KRQuaternion operator -(const KRQuaternion &v) const;
|
||||||
KRQuaternion operator +() const;
|
KRQuaternion operator +() const;
|
||||||
KRQuaternion operator -() const;
|
KRQuaternion operator -() const;
|
||||||
|
|
||||||
KRQuaternion operator *(const KRQuaternion &v);
|
KRQuaternion operator *(const KRQuaternion &v);
|
||||||
KRQuaternion operator *(float num) const;
|
KRQuaternion operator *(float num) const;
|
||||||
KRQuaternion operator /(float num) const;
|
KRQuaternion operator /(float num) const;
|
||||||
|
|
||||||
KRQuaternion& operator +=(const KRQuaternion& v);
|
KRQuaternion& operator +=(const KRQuaternion& v);
|
||||||
@@ -86,4 +85,6 @@ private:
|
|||||||
float m_val[4];
|
float m_val[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
} // namespace kraken
|
||||||
|
|
||||||
|
#endif // KRQUATERNION_H
|
||||||
@@ -34,6 +34,8 @@
|
|||||||
|
|
||||||
#include "KRVector3.h"
|
#include "KRVector3.h"
|
||||||
|
|
||||||
|
namespace kraken {
|
||||||
|
|
||||||
class KRTriangle3
|
class KRTriangle3
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -58,4 +60,6 @@ public:
|
|||||||
KRVector3 closestPointOnTriangle(const KRVector3 &p) const;
|
KRVector3 closestPointOnTriangle(const KRVector3 &p) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace kraken
|
||||||
|
|
||||||
#endif // KRTRIANGLE3_H
|
#endif // KRTRIANGLE3_H
|
||||||
|
|||||||
@@ -34,6 +34,8 @@
|
|||||||
|
|
||||||
#include <functional> // for hash<>
|
#include <functional> // for hash<>
|
||||||
|
|
||||||
|
namespace kraken {
|
||||||
|
|
||||||
class KRVector2 {
|
class KRVector2 {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -95,18 +97,20 @@ public:
|
|||||||
static KRVector2 One();
|
static KRVector2 One();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace kraken
|
||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
template<>
|
template<>
|
||||||
struct hash<KRVector2> {
|
struct hash<kraken::KRVector2> {
|
||||||
public:
|
public:
|
||||||
size_t operator()(const KRVector2 &s) const
|
size_t operator()(const kraken::KRVector2 &s) const
|
||||||
{
|
{
|
||||||
size_t h1 = hash<float>()(s.x);
|
size_t h1 = hash<float>()(s.x);
|
||||||
size_t h2 = hash<float>()(s.y);
|
size_t h2 = hash<float>()(s.y);
|
||||||
return h1 ^ ( h2 << 1 );
|
return h1 ^ (h2 << 1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
|
#endif // KRVECTOR2_H
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -34,8 +34,9 @@
|
|||||||
|
|
||||||
#include <functional> // for hash<>
|
#include <functional> // for hash<>
|
||||||
|
|
||||||
class KRVector2;
|
#include "KRVector4.h"
|
||||||
class KRVector4;
|
|
||||||
|
namespace kraken {
|
||||||
|
|
||||||
class KRVector3 {
|
class KRVector3 {
|
||||||
|
|
||||||
@@ -125,18 +126,20 @@ public:
|
|||||||
static void OrthoNormalize(KRVector3 &normal, KRVector3 &tangent); // Gram-Schmidt Orthonormalization
|
static void OrthoNormalize(KRVector3 &normal, KRVector3 &tangent); // Gram-Schmidt Orthonormalization
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace kraken
|
||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
template<>
|
template<>
|
||||||
struct hash<KRVector3> {
|
struct hash<kraken::KRVector3> {
|
||||||
public:
|
public:
|
||||||
size_t operator()(const KRVector3 &s) const
|
size_t operator()(const kraken::KRVector3 &s) const
|
||||||
{
|
{
|
||||||
size_t h1 = hash<float>()(s.x);
|
size_t h1 = hash<float>()(s.x);
|
||||||
size_t h2 = hash<float>()(s.y);
|
size_t h2 = hash<float>()(s.y);
|
||||||
size_t h3 = hash<float>()(s.z);
|
size_t h3 = hash<float>()(s.z);
|
||||||
return h1 ^ ( h2 << 1 ) ^ (h3 << 2);
|
return h1 ^ (h2 << 1) ^ (h3 << 2);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
#endif // KRVECTOR3_H
|
#endif // KRVECTOR3_H
|
||||||
|
|||||||
@@ -34,6 +34,8 @@
|
|||||||
|
|
||||||
#include <functional> // for hash<>
|
#include <functional> // for hash<>
|
||||||
|
|
||||||
|
namespace kraken {
|
||||||
|
|
||||||
class KRVector3;
|
class KRVector3;
|
||||||
|
|
||||||
class KRVector4 {
|
class KRVector4 {
|
||||||
@@ -100,4 +102,21 @@ public:
|
|||||||
static void OrthoNormalize(KRVector4 &normal, KRVector4 &tangent); // Gram-Schmidt Orthonormalization
|
static void OrthoNormalize(KRVector4 &normal, KRVector4 &tangent); // Gram-Schmidt Orthonormalization
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace kraken
|
||||||
|
|
||||||
|
namespace std {
|
||||||
|
template<>
|
||||||
|
struct hash<kraken::KRVector4> {
|
||||||
|
public:
|
||||||
|
size_t operator()(const kraken::KRVector4 &s) const
|
||||||
|
{
|
||||||
|
size_t h1 = hash<float>()(s.x);
|
||||||
|
size_t h2 = hash<float>()(s.y);
|
||||||
|
size_t h3 = hash<float>()(s.z);
|
||||||
|
size_t h4 = hash<float>()(s.w);
|
||||||
|
return h1 ^ (h2 << 1) ^ (h3 << 2) ^ (h4 << 3);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
#endif // KRVECTOR4_H
|
#endif // KRVECTOR4_H
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include "KRVector3.h"
|
#include "KRVector3.h"
|
||||||
#include "KRVector4.h"
|
#include "KRVector4.h"
|
||||||
#include "KRMat4.h"
|
#include "KRMat4.h"
|
||||||
|
#include "KRQuaternion.h"
|
||||||
#include "KRAABB.h"
|
#include "KRAABB.h"
|
||||||
#include "KRTriangle3.h"
|
#include "KRTriangle3.h"
|
||||||
|
|
||||||
|
|||||||
@@ -73,11 +73,15 @@
|
|||||||
<TargetExt>.lib</TargetExt>
|
<TargetExt>.lib</TargetExt>
|
||||||
<OutDir>$(SolutionDir)\build\output\$(Platform)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\build\output\$(Platform)\$(Configuration)\</OutDir>
|
||||||
<IntDir>build\intermediate\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>build\intermediate\$(Platform)\$(Configuration)\</IntDir>
|
||||||
|
<IncludePath>C:\Program Files\Autodesk\FBX\FBX SDK\2018.1.1\include;$(IncludePath)</IncludePath>
|
||||||
|
<LibraryPath>C:\Program Files\Autodesk\FBX\FBX SDK\2018.1.1\lib\vs2015\x64\release;$(LibraryPath)</LibraryPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<TargetExt>.lib</TargetExt>
|
<TargetExt>.lib</TargetExt>
|
||||||
<OutDir>$(SolutionDir)\build\output\$(Platform)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\build\output\$(Platform)\$(Configuration)\</OutDir>
|
||||||
<IntDir>build\intermediate\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>build\intermediate\$(Platform)\$(Configuration)\</IntDir>
|
||||||
|
<IncludePath>C:\Program Files\Autodesk\FBX\FBX SDK\2018.1.1\include;$(IncludePath)</IncludePath>
|
||||||
|
<LibraryPath>C:\Program Files\Autodesk\FBX\FBX SDK\2018.1.1\lib\vs2015\x64\release;$(LibraryPath)</LibraryPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
@@ -146,6 +150,7 @@
|
|||||||
<ClCompile Include="..\kraken\KRDSP_slow.cpp" />
|
<ClCompile Include="..\kraken\KRDSP_slow.cpp" />
|
||||||
<ClCompile Include="..\kraken\KRDSP_vDSP.cpp" />
|
<ClCompile Include="..\kraken\KRDSP_vDSP.cpp" />
|
||||||
<ClCompile Include="..\kraken\KRFloat.cpp" />
|
<ClCompile Include="..\kraken\KRFloat.cpp" />
|
||||||
|
<ClCompile Include="..\kraken\KRHelpers.cpp" />
|
||||||
<ClCompile Include="..\kraken\KRHitInfo.cpp" />
|
<ClCompile Include="..\kraken\KRHitInfo.cpp" />
|
||||||
<ClCompile Include="..\kraken\KRLight.cpp" />
|
<ClCompile Include="..\kraken\KRLight.cpp" />
|
||||||
<ClCompile Include="..\kraken\KRLocator.cpp" />
|
<ClCompile Include="..\kraken\KRLocator.cpp" />
|
||||||
@@ -198,7 +203,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\3rdparty\forsyth\forsyth.h" />
|
<ClInclude Include="..\3rdparty\forsyth\forsyth.h" />
|
||||||
<ClInclude Include="..\3rdparty\tinyxml2\tinyxml2.h" />
|
<ClInclude Include="..\3rdparty\tinyxml2\tinyxml2.h" />
|
||||||
<ClInclude Include="..\kraken\KRAABB.h" />
|
|
||||||
<ClInclude Include="..\kraken\kraken.h" />
|
<ClInclude Include="..\kraken\kraken.h" />
|
||||||
<ClInclude Include="..\kraken\KRAmbientZone.h" />
|
<ClInclude Include="..\kraken\KRAmbientZone.h" />
|
||||||
<ClInclude Include="..\kraken\KRAnimation.h" />
|
<ClInclude Include="..\kraken\KRAnimation.h" />
|
||||||
@@ -224,13 +228,12 @@
|
|||||||
<ClInclude Include="..\kraken\KRDSP.h" />
|
<ClInclude Include="..\kraken\KRDSP.h" />
|
||||||
<ClInclude Include="..\kraken\KREngine-common.h" />
|
<ClInclude Include="..\kraken\KREngine-common.h" />
|
||||||
<ClInclude Include="..\kraken\KREngine.h" />
|
<ClInclude Include="..\kraken\KREngine.h" />
|
||||||
<ClInclude Include="..\kraken\KRFloat.h" />
|
<ClInclude Include="..\kraken\KRHelpers.h" />
|
||||||
<ClInclude Include="..\kraken\KRHitInfo.h" />
|
<ClInclude Include="..\kraken\KRHitInfo.h" />
|
||||||
<ClInclude Include="..\kraken\KRLight.h" />
|
<ClInclude Include="..\kraken\KRLight.h" />
|
||||||
<ClInclude Include="..\kraken\KRLocator.h" />
|
<ClInclude Include="..\kraken\KRLocator.h" />
|
||||||
<ClInclude Include="..\kraken\KRLODGroup.h" />
|
<ClInclude Include="..\kraken\KRLODGroup.h" />
|
||||||
<ClInclude Include="..\kraken\KRLODSet.h" />
|
<ClInclude Include="..\kraken\KRLODSet.h" />
|
||||||
<ClInclude Include="..\kraken\KRMat4.h" />
|
|
||||||
<ClInclude Include="..\kraken\KRMaterial.h" />
|
<ClInclude Include="..\kraken\KRMaterial.h" />
|
||||||
<ClInclude Include="..\kraken\KRMaterialManager.h" />
|
<ClInclude Include="..\kraken\KRMaterialManager.h" />
|
||||||
<ClInclude Include="..\kraken\KRMesh.h" />
|
<ClInclude Include="..\kraken\KRMesh.h" />
|
||||||
@@ -245,7 +248,6 @@
|
|||||||
<ClInclude Include="..\kraken\KRParticleSystem.h" />
|
<ClInclude Include="..\kraken\KRParticleSystem.h" />
|
||||||
<ClInclude Include="..\kraken\KRParticleSystemNewtonian.h" />
|
<ClInclude Include="..\kraken\KRParticleSystemNewtonian.h" />
|
||||||
<ClInclude Include="..\kraken\KRPointLight.h" />
|
<ClInclude Include="..\kraken\KRPointLight.h" />
|
||||||
<ClInclude Include="..\kraken\KRQuaternion.h" />
|
|
||||||
<ClInclude Include="..\kraken\KRRenderSettings.h" />
|
<ClInclude Include="..\kraken\KRRenderSettings.h" />
|
||||||
<ClInclude Include="..\kraken\KRResource+blend.h" />
|
<ClInclude Include="..\kraken\KRResource+blend.h" />
|
||||||
<ClInclude Include="..\kraken\KRResource.h" />
|
<ClInclude Include="..\kraken\KRResource.h" />
|
||||||
@@ -266,13 +268,18 @@
|
|||||||
<ClInclude Include="..\kraken\KRTextureManager.h" />
|
<ClInclude Include="..\kraken\KRTextureManager.h" />
|
||||||
<ClInclude Include="..\kraken\KRTexturePVR.h" />
|
<ClInclude Include="..\kraken\KRTexturePVR.h" />
|
||||||
<ClInclude Include="..\kraken\KRTextureTGA.h" />
|
<ClInclude Include="..\kraken\KRTextureTGA.h" />
|
||||||
<ClInclude Include="..\kraken\KRTriangle3.h" />
|
|
||||||
<ClInclude Include="..\kraken\KRUnknown.h" />
|
<ClInclude Include="..\kraken\KRUnknown.h" />
|
||||||
<ClInclude Include="..\kraken\KRUnknownManager.h" />
|
<ClInclude Include="..\kraken\KRUnknownManager.h" />
|
||||||
<ClInclude Include="..\kraken\KRVector2.h" />
|
|
||||||
<ClInclude Include="..\kraken\KRVector3.h" />
|
|
||||||
<ClInclude Include="..\kraken\KRVector4.h" />
|
|
||||||
<ClInclude Include="..\kraken\KRViewport.h" />
|
<ClInclude Include="..\kraken\KRViewport.h" />
|
||||||
|
<ClInclude Include="..\kraken\public\KRAABB.h" />
|
||||||
|
<ClInclude Include="..\kraken\public\kraken.h" />
|
||||||
|
<ClInclude Include="..\kraken\public\KRFloat.h" />
|
||||||
|
<ClInclude Include="..\kraken\public\KRMat4.h" />
|
||||||
|
<ClInclude Include="..\kraken\public\KRQuaternion.h" />
|
||||||
|
<ClInclude Include="..\kraken\public\KRTriangle3.h" />
|
||||||
|
<ClInclude Include="..\kraken\public\KRVector2.h" />
|
||||||
|
<ClInclude Include="..\kraken\public\KRVector3.h" />
|
||||||
|
<ClInclude Include="..\kraken\public\KRVector4.h" />
|
||||||
<ClInclude Include="3rdparty\glew\glew-1.13.0\include\GL\glew.h" />
|
<ClInclude Include="3rdparty\glew\glew-1.13.0\include\GL\glew.h" />
|
||||||
<ClInclude Include="3rdparty\glew\glew-1.13.0\include\GL\glxew.h" />
|
<ClInclude Include="3rdparty\glew\glew-1.13.0\include\GL\glxew.h" />
|
||||||
<ClInclude Include="3rdparty\glew\glew-1.13.0\include\GL\wglew.h" />
|
<ClInclude Include="3rdparty\glew\glew-1.13.0\include\GL\wglew.h" />
|
||||||
|
|||||||
@@ -16,12 +16,12 @@
|
|||||||
<Filter Include="Header Files\3rdparty">
|
<Filter Include="Header Files\3rdparty">
|
||||||
<UniqueIdentifier>{1ccb2d2f-3dba-4fa4-a77f-5aef119ca916}</UniqueIdentifier>
|
<UniqueIdentifier>{1ccb2d2f-3dba-4fa4-a77f-5aef119ca916}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Header Files\3rdparty\ffts">
|
|
||||||
<UniqueIdentifier>{218ed471-6978-45cb-9a64-c25d07ecdcc1}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Header Files\3rdparty\forsyth.h">
|
<Filter Include="Header Files\3rdparty\forsyth.h">
|
||||||
<UniqueIdentifier>{b1389da0-01b5-4d0b-bb62-bf912979a845}</UniqueIdentifier>
|
<UniqueIdentifier>{b1389da0-01b5-4d0b-bb62-bf912979a845}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="Header Files\public">
|
||||||
|
<UniqueIdentifier>{4ebfb66f-4752-486a-bfcf-8b438e8ad64b}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\3rdparty\tinyxml2\tinyxml2.cpp">
|
<ClCompile Include="..\3rdparty\tinyxml2\tinyxml2.cpp">
|
||||||
@@ -249,41 +249,20 @@
|
|||||||
<ClCompile Include="..\kraken\KRDSP_vDSP.cpp">
|
<ClCompile Include="..\kraken\KRDSP_vDSP.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\kraken\KRHelpers.cpp">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\3rdparty\tinyxml2\tinyxml2.h">
|
<ClInclude Include="..\3rdparty\tinyxml2\tinyxml2.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\kraken\KRVector2.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\kraken\KREngine-common.h">
|
<ClInclude Include="..\kraken\KREngine-common.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\kraken\KRVector3.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\kraken\KRVector4.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\kraken\KRMat4.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\kraken\KRFloat.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\kraken\KRTriangle3.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\kraken\KRAABB.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\kraken\KRViewport.h">
|
<ClInclude Include="..\kraken\KRViewport.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\kraken\KRQuaternion.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\kraken\KRDataBlock.h">
|
<ClInclude Include="..\kraken\KRDataBlock.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -491,5 +470,35 @@
|
|||||||
<ClInclude Include="..\kraken\KRDSP.h">
|
<ClInclude Include="..\kraken\KRDSP.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\kraken\KRHelpers.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\kraken\public\KRFloat.h">
|
||||||
|
<Filter>Header Files\public</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\kraken\public\KRMat4.h">
|
||||||
|
<Filter>Header Files\public</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\kraken\public\KRVector2.h">
|
||||||
|
<Filter>Header Files\public</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\kraken\public\KRVector3.h">
|
||||||
|
<Filter>Header Files\public</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\kraken\public\KRVector4.h">
|
||||||
|
<Filter>Header Files\public</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\kraken\public\kraken.h">
|
||||||
|
<Filter>Header Files\public</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\kraken\public\KRAABB.h">
|
||||||
|
<Filter>Header Files\public</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\kraken\public\KRTriangle3.h">
|
||||||
|
<Filter>Header Files\public</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\kraken\public\KRQuaternion.h">
|
||||||
|
<Filter>Header Files\public</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
Reference in New Issue
Block a user