From 04e0ada27148a14725deed2393da94723e0209dd Mon Sep 17 00:00:00 2001 From: Kearwood Gilbert Date: Sat, 5 Aug 2023 21:14:53 -0700 Subject: [PATCH] Moved hydra to its own namespace --- hydra | 2 +- kraken/KRAmbientZone.cpp | 2 + kraken/KRAmbientZone.h | 4 +- kraken/KRAudioManager.cpp | 1 + kraken/KRAudioManager.h | 30 +++--- kraken/KRAudioSource.cpp | 2 + kraken/KRBone.cpp | 2 + kraken/KRBone.h | 8 +- kraken/KRCamera.cpp | 1 + kraken/KRCamera.h | 6 +- kraken/KRCollider.cpp | 2 + kraken/KRCollider.h | 8 +- kraken/KRDevice.cpp | 1 + kraken/KRDevice.h | 6 +- kraken/KRDirectionalLight.cpp | 2 + kraken/KRDirectionalLight.h | 6 +- kraken/KRHelpers.cpp | 2 + kraken/KRHelpers.h | 4 +- kraken/KRLODGroup.cpp | 2 + kraken/KRLODGroup.h | 6 +- kraken/KRLight.cpp | 2 + kraken/KRLight.h | 6 +- kraken/KRMaterial.cpp | 1 + kraken/KRMaterial.h | 48 +++++----- kraken/KRMaterialManager.cpp | 2 +- kraken/KRMesh.cpp | 1 + kraken/KRMesh.h | 52 +++++----- kraken/KRMeshCube.cpp | 1 + kraken/KRMeshManager.h | 6 +- kraken/KRMeshQuad.cpp | 1 + kraken/KRMeshSphere.cpp | 1 + kraken/KRModel.cpp | 2 + kraken/KRModel.h | 14 +-- kraken/KRNode.cpp | 2 + kraken/KRNode.h | 136 +++++++++++++-------------- kraken/KROctree.cpp | 2 + kraken/KROctree.h | 6 +- kraken/KROctreeNode.cpp | 2 + kraken/KROctreeNode.h | 16 ++-- kraken/KRParticleSystem.h | 2 +- kraken/KRParticleSystemNewtonian.cpp | 2 + kraken/KRParticleSystemNewtonian.h | 2 +- kraken/KRPipeline.cpp | 2 + kraken/KRPipeline.h | 14 +-- kraken/KRPointLight.cpp | 2 + kraken/KRPointLight.h | 2 +- kraken/KRRenderPass.cpp | 2 + kraken/KRRenderPass.h | 2 +- kraken/KRRenderSettings.cpp | 2 + kraken/KRRenderSettings.h | 12 +-- kraken/KRResource+obj.cpp | 1 + kraken/KRReverbZone.cpp | 2 + kraken/KRReverbZone.h | 4 +- kraken/KRScene.cpp | 1 + kraken/KRScene.h | 12 +-- kraken/KRSpotLight.cpp | 2 + kraken/KRSpotLight.h | 2 +- kraken/KRSprite.cpp | 2 + kraken/KRSprite.h | 2 +- kraken/KRSurface.cpp | 2 + kraken/KRSurface.h | 2 +- kraken/KRTexture.cpp | 2 +- kraken/KRTexture.h | 2 +- kraken/KRTexture2D.h | 2 +- kraken/KRTextureCube.cpp | 1 + kraken/KRTextureKTX.cpp | 4 +- kraken/KRTextureKTX.h | 2 +- kraken/KRTextureKTX2.cpp | 1 + kraken/KRTextureKTX2.h | 2 +- kraken/KRTexturePVR.cpp | 1 + kraken/KRTexturePVR.h | 2 +- kraken/KRTextureTGA.cpp | 2 + kraken/KRTextureTGA.h | 4 +- kraken/KRViewport.cpp | 2 + kraken/KRViewport.h | 48 +++++----- kraken/public/kraken.h | 38 ++++---- 76 files changed, 324 insertions(+), 263 deletions(-) diff --git a/hydra b/hydra index 6cb2c06..9c1de3d 160000 --- a/hydra +++ b/hydra @@ -1 +1 @@ -Subproject commit 6cb2c06beaccc83dc6496c213bff2b9b98163404 +Subproject commit 9c1de3d017ff4a5d8db274aca833b4071aa9d814 diff --git a/kraken/KRAmbientZone.cpp b/kraken/KRAmbientZone.cpp index c4306b8..56eaf6c 100755 --- a/kraken/KRAmbientZone.cpp +++ b/kraken/KRAmbientZone.cpp @@ -32,6 +32,8 @@ #include "KRAmbientZone.h" #include "KRContext.h" +using namespace hydra; + /* static */ void KRAmbientZone::InitNodeInfo(KrNodeInfo* nodeInfo) { diff --git a/kraken/KRAmbientZone.h b/kraken/KRAmbientZone.h index ef32b57..06da2d8 100755 --- a/kraken/KRAmbientZone.h +++ b/kraken/KRAmbientZone.h @@ -60,9 +60,9 @@ public: float getAmbientGain(); void setAmbientGain(float ambient_gain); - virtual AABB getBounds(); + virtual hydra::AABB getBounds(); - float getContainment(const Vector3& pos); + float getContainment(const hydra::Vector3& pos); private: std::string m_zone; diff --git a/kraken/KRAudioManager.cpp b/kraken/KRAudioManager.cpp index f70f269..581fad7 100755 --- a/kraken/KRAudioManager.cpp +++ b/kraken/KRAudioManager.cpp @@ -39,6 +39,7 @@ #include "KRDSP.h" using namespace mimir; +using namespace hydra; KRAudioManager::KRAudioManager(KRContext& context) : KRResourceManager(context) diff --git a/kraken/KRAudioManager.h b/kraken/KRAudioManager.h index ad47dce..06b79f7 100755 --- a/kraken/KRAudioManager.h +++ b/kraken/KRAudioManager.h @@ -113,11 +113,11 @@ public: // Listener position and orientation KRScene* getListenerScene(); void setListenerScene(KRScene* scene); - void setListenerOrientation(const Vector3& position, const Vector3& forward, const Vector3& up); - void setListenerOrientationFromModelMatrix(const Matrix4& modelMatrix); - Vector3& getListenerForward(); - Vector3& getListenerPosition(); - Vector3& getListenerUp(); + void setListenerOrientation(const hydra::Vector3& position, const hydra::Vector3& forward, const hydra::Vector3& up); + void setListenerOrientationFromModelMatrix(const hydra::Matrix4& modelMatrix); + hydra::Vector3& getListenerForward(); + hydra::Vector3& getListenerPosition(); + hydra::Vector3& getListenerUp(); // Global audio gain / attenuation @@ -174,9 +174,9 @@ private: float m_global_ambient_gain; float m_global_gain; - Vector3 m_listener_position; - Vector3 m_listener_forward; - Vector3 m_listener_up; + hydra::Vector3 m_listener_position; + hydra::Vector3 m_listener_forward; + hydra::Vector3 m_listener_up; unordered_map m_sounds; @@ -231,14 +231,14 @@ private: void renderReverbImpulseResponse(int impulse_response_offset, int frame_count_log2); void renderLimiter(); - std::vector m_hrtf_sample_locations; + std::vector m_hrtf_sample_locations; float* m_hrtf_data; - unordered_map m_hrtf_spectral[2]; + unordered_map m_hrtf_spectral[2]; - Vector2 getNearestHRTFSample(const Vector2& dir); - void getHRTFMix(const Vector2& dir, Vector2& hrtf1, Vector2& hrtf2, Vector2& hrtf3, Vector2& hrtf4, float& mix1, float& mix2, float& mix3, float& mix4); - KRAudioSample* getHRTFSample(const Vector2& hrtf_dir); - KRDSP::SplitComplex getHRTFSpectral(const Vector2& hrtf_dir, const int channel); + hydra::Vector2 getNearestHRTFSample(const hydra::Vector2& dir); + void getHRTFMix(const hydra::Vector2& dir, hydra::Vector2& hrtf1, hydra::Vector2& hrtf2, hydra::Vector2& hrtf3, hydra::Vector2& hrtf4, float& mix1, float& mix2, float& mix3, float& mix4); + KRAudioSample* getHRTFSample(const hydra::Vector2& hrtf_dir); + KRDSP::SplitComplex getHRTFSpectral(const hydra::Vector2& hrtf_dir, const int channel); unordered_map m_ambient_zone_weights; float m_ambient_zone_total_weight = 0.0f; // For normalizing zone weights @@ -252,7 +252,7 @@ private: #endif - unordered_multimap > > m_mapped_sources, m_prev_mapped_sources; + unordered_multimap > > m_mapped_sources, m_prev_mapped_sources; bool m_anticlick_block; bool m_high_quality_hrtf; // If true, 4 HRTF samples will be interpolated; if false, the nearest HRTF sample will be used without interpolation }; diff --git a/kraken/KRAudioSource.cpp b/kraken/KRAudioSource.cpp index d63c118..49edf46 100755 --- a/kraken/KRAudioSource.cpp +++ b/kraken/KRAudioSource.cpp @@ -35,6 +35,8 @@ #include "KRAudioSample.h" #include "KRAudioBuffer.h" +using namespace hydra; + /* static */ void KRAudioSource::InitNodeInfo(KrNodeInfo* nodeInfo) { diff --git a/kraken/KRBone.cpp b/kraken/KRBone.cpp index 7344bb2..7f8678b 100755 --- a/kraken/KRBone.cpp +++ b/kraken/KRBone.cpp @@ -32,6 +32,8 @@ #include "KRBone.h" #include "KRContext.h" +using namespace hydra; + /* static */ void KRBone::InitNodeInfo(KrNodeInfo* nodeInfo) { diff --git a/kraken/KRBone.h b/kraken/KRBone.h index af09f24..2fbcb66 100755 --- a/kraken/KRBone.h +++ b/kraken/KRBone.h @@ -47,12 +47,12 @@ public: virtual std::string getElementName(); virtual tinyxml2::XMLElement* saveXML(tinyxml2::XMLNode* parent); virtual void loadXML(tinyxml2::XMLElement* e); - virtual AABB getBounds(); + virtual hydra::AABB getBounds(); void render(RenderInfo& ri); - void setBindPose(const Matrix4& pose); - const Matrix4& getBindPose(); + void setBindPose(const hydra::Matrix4& pose); + const hydra::Matrix4& getBindPose(); private: - Matrix4 m_bind_pose; + hydra::Matrix4 m_bind_pose; }; diff --git a/kraken/KRCamera.cpp b/kraken/KRCamera.cpp index be8df58..b36b782 100755 --- a/kraken/KRCamera.cpp +++ b/kraken/KRCamera.cpp @@ -36,6 +36,7 @@ #include "KRPipeline.h" using namespace mimir; +using namespace hydra; /* static */ void KRCamera::InitNodeInfo(KrNodeInfo* nodeInfo) diff --git a/kraken/KRCamera.h b/kraken/KRCamera.h index 9460841..90502cb 100755 --- a/kraken/KRCamera.h +++ b/kraken/KRCamera.h @@ -72,8 +72,8 @@ public: void flushSkybox(); // this will delete the skybox and cause the camera to reload a new skybox based on the settings - void setFadeColor(const Vector4& fade_color); - Vector4 getFadeColor(); + void setFadeColor(const hydra::Vector4& fade_color); + hydra::Vector4 getFadeColor(); void setSkyBox(const std::string& skyBox); const std::string getSkyBox() const; @@ -100,7 +100,7 @@ private: float m_particlesAbsoluteTime; - Vector4 m_fade_color; + hydra::Vector4 m_fade_color; typedef struct { diff --git a/kraken/KRCollider.cpp b/kraken/KRCollider.cpp index 85981dc..19eb83d 100755 --- a/kraken/KRCollider.cpp +++ b/kraken/KRCollider.cpp @@ -34,6 +34,8 @@ #include "KRContext.h" #include "KRMesh.h" +using namespace hydra; + /* static */ void KRCollider::InitNodeInfo(KrNodeInfo* nodeInfo) { diff --git a/kraken/KRCollider.h b/kraken/KRCollider.h index c861b36..e4e64ab 100755 --- a/kraken/KRCollider.h +++ b/kraken/KRCollider.h @@ -59,11 +59,11 @@ public: virtual std::string getElementName(); virtual tinyxml2::XMLElement* saveXML(tinyxml2::XMLNode* parent); virtual void loadXML(tinyxml2::XMLElement* e); - virtual AABB getBounds(); + virtual hydra::AABB getBounds(); - bool lineCast(const Vector3& v0, const Vector3& v1, HitInfo& hitinfo, unsigned int layer_mask); - bool rayCast(const Vector3& v0, const Vector3& v1, HitInfo& hitinfo, unsigned int layer_mask); - bool sphereCast(const Vector3& v0, const Vector3& v1, float radius, HitInfo& hitinfo, unsigned int layer_mask); + bool lineCast(const hydra::Vector3& v0, const hydra::Vector3& v1, hydra::HitInfo& hitinfo, unsigned int layer_mask); + bool rayCast(const hydra::Vector3& v0, const hydra::Vector3& v1, hydra::HitInfo& hitinfo, unsigned int layer_mask); + bool sphereCast(const hydra::Vector3& v0, const hydra::Vector3& v1, float radius, hydra::HitInfo& hitinfo, unsigned int layer_mask); unsigned int getLayerMask(); void setLayerMask(unsigned int layer_mask); diff --git a/kraken/KRDevice.cpp b/kraken/KRDevice.cpp index 28cc8cb..919eb04 100644 --- a/kraken/KRDevice.cpp +++ b/kraken/KRDevice.cpp @@ -33,6 +33,7 @@ #include "KRDeviceManager.h" using namespace mimir; +using namespace hydra; KRDevice::KRDevice(KRContext& context, const VkPhysicalDevice& device) : KRContextObject(context) diff --git a/kraken/KRDevice.h b/kraken/KRDevice.h index 9096bd6..a7d551f 100644 --- a/kraken/KRDevice.h +++ b/kraken/KRDevice.h @@ -72,9 +72,9 @@ public: void streamStart(); void streamUpload(mimir::Block& data, VkBuffer destination); - void streamUpload(mimir::Block& data, VkImage destination, size_t offset, size_t size, Vector3i dimensions, uint32_t baseMipLevel, uint32_t levelCount); + void streamUpload(mimir::Block& data, VkImage destination, size_t offset, size_t size, hydra::Vector3i dimensions, uint32_t baseMipLevel, uint32_t levelCount); void streamUpload(void* data, size_t size, VkBuffer destination); - void streamUpload(void* data, size_t size, Vector3i dimensions, VkImage destination); + void streamUpload(void* data, size_t size, hydra::Vector3i dimensions, VkImage destination); void streamEnd(); void graphicsUpload(VkCommandBuffer& commandBuffer, mimir::Block& data, VkBuffer destination); @@ -141,5 +141,5 @@ private: #endif // KRENGINE_DEBUG_GPU_LABELS ); bool initDescriptorPool(); - void streamUploadImpl(size_t size, Vector3i dimensions, VkImage destination, uint32_t baseMipLevel, uint32_t levelCount); + void streamUploadImpl(size_t size, hydra::Vector3i dimensions, VkImage destination, uint32_t baseMipLevel, uint32_t levelCount); }; diff --git a/kraken/KRDirectionalLight.cpp b/kraken/KRDirectionalLight.cpp index 18a78e2..6d18c7e 100755 --- a/kraken/KRDirectionalLight.cpp +++ b/kraken/KRDirectionalLight.cpp @@ -36,6 +36,8 @@ #include "KRContext.h" #include "assert.h" +using namespace hydra; + /* static */ void KRDirectionalLight::InitNodeInfo(KrNodeInfo* nodeInfo) { diff --git a/kraken/KRDirectionalLight.h b/kraken/KRDirectionalLight.h index d111b64..23a112a 100755 --- a/kraken/KRDirectionalLight.h +++ b/kraken/KRDirectionalLight.h @@ -43,11 +43,11 @@ public: virtual ~KRDirectionalLight(); virtual std::string getElementName(); - Vector3 getLocalLightDirection(); - Vector3 getWorldLightDirection(); + hydra::Vector3 getLocalLightDirection(); + hydra::Vector3 getWorldLightDirection(); virtual void render(RenderInfo& ri); - virtual AABB getBounds(); + virtual hydra::AABB getBounds(); protected: diff --git a/kraken/KRHelpers.cpp b/kraken/KRHelpers.cpp index c7a195b..3d9c581 100644 --- a/kraken/KRHelpers.cpp +++ b/kraken/KRHelpers.cpp @@ -33,6 +33,8 @@ #include "KRHelpers.h" +using namespace hydra; + namespace kraken { void setXMLAttribute(const std::string& base_name, tinyxml2::XMLElement* e, const Vector3& value, const Vector3& default_value) diff --git a/kraken/KRHelpers.h b/kraken/KRHelpers.h index 42aaf7f..f11d0b0 100644 --- a/kraken/KRHelpers.h +++ b/kraken/KRHelpers.h @@ -47,7 +47,7 @@ float const PI = 3.141592653589793f; float const D2R = PI * 2 / 360; namespace kraken { -void setXMLAttribute(const std::string& base_name, ::tinyxml2::XMLElement* e, const Vector3& value, const Vector3& default_value); -const Vector3 getXMLAttribute(const std::string& base_name, ::tinyxml2::XMLElement* e, const Vector3& default_value); +void setXMLAttribute(const std::string& base_name, ::tinyxml2::XMLElement* e, const hydra::Vector3& value, const hydra::Vector3& default_value); +const hydra::Vector3 getXMLAttribute(const std::string& base_name, ::tinyxml2::XMLElement* e, const hydra::Vector3& default_value); } // namespace kraken diff --git a/kraken/KRLODGroup.cpp b/kraken/KRLODGroup.cpp index 4cfe110..ddbcd9c 100755 --- a/kraken/KRLODGroup.cpp +++ b/kraken/KRLODGroup.cpp @@ -33,6 +33,8 @@ #include "KRLODSet.h" #include "KRContext.h" +using namespace hydra; + /* static */ void KRLODGroup::InitNodeInfo(KrNodeInfo* nodeInfo) { diff --git a/kraken/KRLODGroup.h b/kraken/KRLODGroup.h index f24c65f..139b2e9 100755 --- a/kraken/KRLODGroup.h +++ b/kraken/KRLODGroup.h @@ -49,8 +49,8 @@ public: void setMinDistance(float min_distance); void setMaxDistance(float max_distance); - const AABB& getReference() const; - void setReference(const AABB& reference); + const hydra::AABB& getReference() const; + void setReference(const hydra::AABB& reference); void setUseWorldUnits(bool use_world_units); bool getUseWorldUnits() const; @@ -59,6 +59,6 @@ public: private: float m_min_distance; float m_max_distance; - AABB m_reference; // Point of reference, used for distance calculation. Usually set to the bounding box center + hydra::AABB m_reference; // Point of reference, used for distance calculation. Usually set to the bounding box center bool m_use_world_units; }; diff --git a/kraken/KRLight.cpp b/kraken/KRLight.cpp index 4e43dca..4c89662 100755 --- a/kraken/KRLight.cpp +++ b/kraken/KRLight.cpp @@ -43,6 +43,8 @@ #include "KRSpotLight.h" #include "KRPointLight.h" +using namespace hydra; + /* static */ void KRLight::InitNodeInfo(KrNodeInfo* nodeInfo) { diff --git a/kraken/KRLight.h b/kraken/KRLight.h index a99d2b0..e155ddc 100755 --- a/kraken/KRLight.h +++ b/kraken/KRLight.h @@ -56,8 +56,8 @@ public: float getIntensity(); void setDecayStart(float decayStart); float getDecayStart(); - const Vector3& getColor(); - void setColor(const Vector3& color); + const hydra::Vector3& getColor(); + void setColor(const hydra::Vector3& color); void setFlareTexture(std::string flare_texture); void setFlareSize(float flare_size); @@ -76,7 +76,7 @@ protected: float m_intensity; float m_decayStart; - Vector3 m_color; + hydra::Vector3 m_color; std::string m_flareTexture; KRTexture* m_pFlareTexture; diff --git a/kraken/KRMaterial.cpp b/kraken/KRMaterial.cpp index 37ccdf0..0e4feac 100755 --- a/kraken/KRMaterial.cpp +++ b/kraken/KRMaterial.cpp @@ -37,6 +37,7 @@ #include "KRContext.h" using namespace mimir; +using namespace hydra; KRMaterial::KRMaterial(KRContext& context, const char* szName) : KRResource(context, szName) { diff --git a/kraken/KRMaterial.h b/kraken/KRMaterial.h index afbe14c..1477049 100755 --- a/kraken/KRMaterial.h +++ b/kraken/KRMaterial.h @@ -68,16 +68,16 @@ public: virtual bool save(mimir::Block& data); - void setAmbientMap(std::string texture_name, Vector2 texture_scale, Vector2 texture_offset); - void setDiffuseMap(std::string texture_name, Vector2 texture_scale, Vector2 texture_offset); - void setSpecularMap(std::string texture_name, Vector2 texture_scale, Vector2 texture_offset); - void setReflectionMap(std::string texture_name, Vector2 texture_scale, Vector2 texture_offset); + void setAmbientMap(std::string texture_name, hydra::Vector2 texture_scale, hydra::Vector2 texture_offset); + void setDiffuseMap(std::string texture_name, hydra::Vector2 texture_scale, hydra::Vector2 texture_offset); + void setSpecularMap(std::string texture_name, hydra::Vector2 texture_scale, hydra::Vector2 texture_offset); + void setReflectionMap(std::string texture_name, hydra::Vector2 texture_scale, hydra::Vector2 texture_offset); void setReflectionCube(std::string texture_name); - void setNormalMap(std::string texture_name, Vector2 texture_scale, Vector2 texture_offset); - void setAmbient(const Vector3& c); - void setDiffuse(const Vector3& c); - void setSpecular(const Vector3& c); - void setReflection(const Vector3& c); + void setNormalMap(std::string texture_name, hydra::Vector2 texture_scale, hydra::Vector2 texture_offset); + void setAmbient(const hydra::Vector3& c); + void setDiffuse(const hydra::Vector3& c); + void setSpecular(const hydra::Vector3& c); + void setReflection(const hydra::Vector3& c); void setTransparency(float a); void setShininess(float s); void setAlphaMode(alpha_mode_type blend_mode); @@ -87,7 +87,7 @@ public: bool isTransparent(); const std::string& getName() const; - void bind(const KRNode::RenderInfo& ri, ModelFormat modelFormat, __uint32_t vertexAttributes, CullMode cullMode, const std::vector& bones, const std::vector& bind_poses, const Matrix4& matModel, KRTexture* pLightMap, const Vector3& rim_color, float rim_power, float lod_coverage = 0.0f); + void bind(const KRNode::RenderInfo& ri, ModelFormat modelFormat, __uint32_t vertexAttributes, CullMode cullMode, const std::vector& bones, const std::vector& bind_poses, const hydra::Matrix4& matModel, KRTexture* pLightMap, const hydra::Vector3& rim_color, float rim_power, float lod_coverage = 0.0f); bool needsVertexTangents(); @@ -110,21 +110,21 @@ private: std::string m_reflectionCube; std::string m_normalMap; - Vector2 m_ambientMapScale; - Vector2 m_ambientMapOffset; - Vector2 m_diffuseMapScale; - Vector2 m_diffuseMapOffset; - Vector2 m_specularMapScale; - Vector2 m_specularMapOffset; - Vector2 m_reflectionMapScale; - Vector2 m_reflectionMapOffset; - Vector2 m_normalMapScale; - Vector2 m_normalMapOffset; + hydra::Vector2 m_ambientMapScale; + hydra::Vector2 m_ambientMapOffset; + hydra::Vector2 m_diffuseMapScale; + hydra::Vector2 m_diffuseMapOffset; + hydra::Vector2 m_specularMapScale; + hydra::Vector2 m_specularMapOffset; + hydra::Vector2 m_reflectionMapScale; + hydra::Vector2 m_reflectionMapOffset; + hydra::Vector2 m_normalMapScale; + hydra::Vector2 m_normalMapOffset; - Vector3 m_ambientColor; // Ambient rgb - Vector3 m_diffuseColor; // Diffuse rgb - Vector3 m_specularColor; // Specular rgb - Vector3 m_reflectionColor; // Reflection rgb + hydra::Vector3 m_ambientColor; // Ambient rgb + hydra::Vector3 m_diffuseColor; // Diffuse rgb + hydra::Vector3 m_specularColor; // Specular rgb + hydra::Vector3 m_reflectionColor; // Reflection rgb //float m_ka_r, m_ka_g, m_ka_b; // Ambient rgb //float m_kd_r, m_kd_g, m_kd_b; // Diffuse rgb diff --git a/kraken/KRMaterialManager.cpp b/kraken/KRMaterialManager.cpp index d90fdd3..37d71f3 100755 --- a/kraken/KRMaterialManager.cpp +++ b/kraken/KRMaterialManager.cpp @@ -33,7 +33,7 @@ #include "KRMaterialManager.h" using namespace mimir; - +using namespace hydra; KRMaterialManager::KRMaterialManager(KRContext& context, KRTextureManager* pTextureManager, KRPipelineManager* pPipelineManager) : KRResourceManager(context) { diff --git a/kraken/KRMesh.cpp b/kraken/KRMesh.cpp index b171dce..395a133 100755 --- a/kraken/KRMesh.cpp +++ b/kraken/KRMesh.cpp @@ -40,6 +40,7 @@ #include "../3rdparty/forsyth/forsyth.h" using namespace mimir; +using namespace hydra; KRMesh::KRMesh(KRContext& context, std::string name) : KRResource(context, name) { diff --git a/kraken/KRMesh.h b/kraken/KRMesh.h index 62d107a..8f440f0 100755 --- a/kraken/KRMesh.h +++ b/kraken/KRMesh.h @@ -102,23 +102,23 @@ public: typedef struct { ModelFormat format; - std::vector vertices; + std::vector vertices; std::vector<__uint16_t> vertex_indexes; std::vector > vertex_index_bases; - std::vector uva; - std::vector uvb; - std::vector normals; - std::vector tangents; + std::vector uva; + std::vector uvb; + std::vector normals; + std::vector tangents; std::vector submesh_starts; std::vector submesh_lengths; std::vector material_names; std::vector bone_names; std::vector > bone_indexes; - std::vector bone_bind_poses; + std::vector bone_bind_poses; std::vector > bone_weights; } mesh_info; - void render(const KRNode::RenderInfo& ri, const std::string& object_name, const Matrix4& matModel, KRTexture* pLightMap, const std::vector& bones, const Vector3& rim_color, float rim_power, float lod_coverage = 0.0f); + void render(const KRNode::RenderInfo& ri, const std::string& object_name, const hydra::Matrix4& matModel, KRTexture* pLightMap, const std::vector& bones, const hydra::Vector3& rim_color, float rim_power, float lod_coverage = 0.0f); std::string m_lodBaseName; @@ -138,8 +138,8 @@ public: float getMaxDimension(); - Vector3 getMinPoint() const; - Vector3 getMaxPoint() const; + hydra::Vector3 getMinPoint() const; + hydra::Vector3 getMaxPoint() const; class Submesh { @@ -202,19 +202,19 @@ public: __uint32_t getVertexAttributes() const; int getTriangleVertexIndex(int submesh, int index) const; - Vector3 getVertexPosition(int index) const; - Vector3 getVertexNormal(int index) const; - Vector3 getVertexTangent(int index) const; - Vector2 getVertexUVA(int index) const; - Vector2 getVertexUVB(int index) const; + hydra::Vector3 getVertexPosition(int index) const; + hydra::Vector3 getVertexNormal(int index) const; + hydra::Vector3 getVertexTangent(int index) const; + hydra::Vector2 getVertexUVA(int index) const; + hydra::Vector2 getVertexUVB(int index) const; int getBoneIndex(int index, int weight_index) const; float getBoneWeight(int index, int weight_index) const; - void setVertexPosition(int index, const Vector3& v); - void setVertexNormal(int index, const Vector3& v); - void setVertexTangent(int index, const Vector3& v); - void setVertexUVA(int index, const Vector2& v); - void setVertexUVB(int index, const Vector2& v); + void setVertexPosition(int index, const hydra::Vector3& v); + void setVertexNormal(int index, const hydra::Vector3& v); + void setVertexTangent(int index, const hydra::Vector3& v); + void setVertexUVA(int index, const hydra::Vector2& v); + void setVertexUVB(int index, const hydra::Vector2& v); void setBoneIndex(int index, int weight_index, int bone_index); void setBoneWeight(int index, int weight_index, float bone_weight); @@ -224,14 +224,14 @@ public: int getBoneCount(); char* getBoneName(int bone_index); - Matrix4 getBoneBindPose(int bone_index); + hydra::Matrix4 getBoneBindPose(int bone_index); ModelFormat getModelFormat() const; - bool lineCast(const Vector3& v0, const Vector3& v1, HitInfo& hitinfo) const; - bool rayCast(const Vector3& v0, const Vector3& dir, HitInfo& hitinfo) const; - bool sphereCast(const Matrix4& model_to_world, const Vector3& v0, const Vector3& v1, float radius, HitInfo& hitinfo) const; + bool lineCast(const hydra::Vector3& v0, const hydra::Vector3& v1, hydra::HitInfo& hitinfo) const; + bool rayCast(const hydra::Vector3& v0, const hydra::Vector3& dir, hydra::HitInfo& hitinfo) const; + bool sphereCast(const hydra::Matrix4& model_to_world, const hydra::Vector3& v0, const hydra::Vector3& v1, float radius, hydra::HitInfo& hitinfo) const; static int GetLODCoverage(const std::string& name); @@ -247,8 +247,8 @@ private: void getMaterials(); void renderSubmesh(VkCommandBuffer& commandBuffer, int iSubmesh, KRNode::RenderPass renderPass, const std::string& object_name, const std::string& material_name, float lodCoverage); - static bool rayCast(const Vector3& start, const Vector3& dir, const Triangle3& tri, const Vector3& tri_n0, const Vector3& tri_n1, const Vector3& tri_n2, HitInfo& hitinfo); - static bool sphereCast(const Matrix4& model_to_world, const Vector3& v0, const Vector3& v1, float radius, const Triangle3& tri, HitInfo& hitinfo); + static bool rayCast(const hydra::Vector3& start, const hydra::Vector3& dir, const hydra::Triangle3& tri, const hydra::Vector3& tri_n0, const hydra::Vector3& tri_n1, const hydra::Vector3& tri_n2, hydra::HitInfo& hitinfo); + static bool sphereCast(const hydra::Matrix4& model_to_world, const hydra::Vector3& v0, const hydra::Vector3& v1, float radius, const hydra::Triangle3& tri, hydra::HitInfo& hitinfo); int m_lodCoverage; // This LOD level is activated when the bounding box of the model will cover less than this percent of the screen (100 = highest detail model) vector m_materials; @@ -257,7 +257,7 @@ private: bool m_hasTransparency; - Vector3 m_minPoint, m_maxPoint; + hydra::Vector3 m_minPoint, m_maxPoint; diff --git a/kraken/KRMeshCube.cpp b/kraken/KRMeshCube.cpp index 2455ff9..d839ec5 100755 --- a/kraken/KRMeshCube.cpp +++ b/kraken/KRMeshCube.cpp @@ -31,6 +31,7 @@ #include "KRMeshCube.h" +using namespace hydra; KRMeshCube::KRMeshCube(KRContext& context) : KRMesh(context, "__cube") { diff --git a/kraken/KRMeshManager.h b/kraken/KRMeshManager.h index 24e8165..68c19c4 100755 --- a/kraken/KRMeshManager.h +++ b/kraken/KRMeshManager.h @@ -176,13 +176,13 @@ public: typedef struct { - Vector3 vertex; - Vector2 uva; + hydra::Vector3 vertex; + hydra::Vector2 uva; } RandomParticleVertexData; typedef struct { - Vector3 vertex; + hydra::Vector3 vertex; } VolumetricLightingVertexData; long getMemoryTransferedThisFrame(); diff --git a/kraken/KRMeshQuad.cpp b/kraken/KRMeshQuad.cpp index 5ab620a..bc7aff6 100755 --- a/kraken/KRMeshQuad.cpp +++ b/kraken/KRMeshQuad.cpp @@ -31,6 +31,7 @@ #include "KRMeshQuad.h" +using namespace hydra; KRMeshQuad::KRMeshQuad(KRContext& context) : KRMesh(context, "__quad") { diff --git a/kraken/KRMeshSphere.cpp b/kraken/KRMeshSphere.cpp index 9d4d198..0d8a086 100755 --- a/kraken/KRMeshSphere.cpp +++ b/kraken/KRMeshSphere.cpp @@ -31,6 +31,7 @@ #include "KRMeshSphere.h" +using namespace hydra; KRMeshSphere::KRMeshSphere(KRContext& context) : KRMesh(context, "__sphere") { diff --git a/kraken/KRModel.cpp b/kraken/KRModel.cpp index 6edd7d3..240dcb4 100755 --- a/kraken/KRModel.cpp +++ b/kraken/KRModel.cpp @@ -36,6 +36,8 @@ #include "KRMesh.h" #include "KRNode.h" +using namespace hydra; + /* static */ void KRModel::InitNodeInfo(KrNodeInfo* nodeInfo) { diff --git a/kraken/KRModel.h b/kraken/KRModel.h index abb7228..db09136 100755 --- a/kraken/KRModel.h +++ b/kraken/KRModel.h @@ -50,7 +50,7 @@ public: static void InitNodeInfo(KrNodeInfo* nodeInfo); KRModel(KRScene& scene, std::string name); - 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, Vector3 rim_color = Vector3::Zero(), float rim_power = 0.0f); + 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, hydra::Vector3 rim_color = hydra::Vector3::Zero(), float rim_power = 0.0f); virtual ~KRModel(); virtual std::string getElementName(); @@ -58,11 +58,11 @@ public: virtual void render(KRNode::RenderInfo& ri); - virtual AABB getBounds(); + virtual hydra::AABB getBounds(); - void setRimColor(const Vector3& rim_color); + void setRimColor(const hydra::Vector3& rim_color); void setRimPower(float rim_power); - Vector3 getRimColor(); + hydra::Vector3 getRimColor(); float getRimPower(); void setLightMap(const std::string& name); @@ -87,10 +87,10 @@ private: bool m_faces_camera; - Matrix4 m_boundsCachedMat; - AABB m_boundsCached; + hydra::Matrix4 m_boundsCachedMat; + hydra::AABB m_boundsCached; - Vector3 m_rim_color; + hydra::Vector3 m_rim_color; float m_rim_power; }; diff --git a/kraken/KRNode.cpp b/kraken/KRNode.cpp index ca4ebcf..7e08d60 100755 --- a/kraken/KRNode.cpp +++ b/kraken/KRNode.cpp @@ -31,6 +31,8 @@ #include "KREngine-common.h" +using namespace hydra; + #include "KRNode.h" #include "KRLODGroup.h" #include "KRLODSet.h" diff --git a/kraken/KRNode.h b/kraken/KRNode.h index 04e5957..ca038a8 100755 --- a/kraken/KRNode.h +++ b/kraken/KRNode.h @@ -38,7 +38,7 @@ using namespace kraken; -namespace kraken { +namespace hydra { class Matrix4; class AABB; } // namespace kraken @@ -128,62 +128,62 @@ public: void insertAfter(KRNode* child); KRNode* getParent(); - void setLocalTranslation(const Vector3& v, bool set_original = false); - void setLocalScale(const Vector3& v, bool set_original = false); - void setLocalRotation(const Vector3& v, bool set_original = false); + void setLocalTranslation(const hydra::Vector3& v, bool set_original = false); + void setLocalScale(const hydra::Vector3& v, bool set_original = false); + void setLocalRotation(const hydra::Vector3& v, bool set_original = false); - void setRotationOffset(const Vector3& v, bool set_original = false); - void setScalingOffset(const Vector3& v, bool set_original = false); - void setRotationPivot(const Vector3& v, bool set_original = false); - void setScalingPivot(const Vector3& v, bool set_original = false); - void setPreRotation(const Vector3& v, bool set_original = false); - void setPostRotation(const Vector3& v, bool set_original = false); + void setRotationOffset(const hydra::Vector3& v, bool set_original = false); + void setScalingOffset(const hydra::Vector3& v, bool set_original = false); + void setRotationPivot(const hydra::Vector3& v, bool set_original = false); + void setScalingPivot(const hydra::Vector3& v, bool set_original = false); + void setPreRotation(const hydra::Vector3& v, bool set_original = false); + void setPostRotation(const hydra::Vector3& v, bool set_original = false); - const Vector3& getRotationOffset(); - const Vector3& getScalingOffset(); - const Vector3& getRotationPivot(); - const Vector3& getScalingPivot(); - const Vector3& getPreRotation(); - const Vector3& getPostRotation(); + const hydra::Vector3& getRotationOffset(); + const hydra::Vector3& getScalingOffset(); + const hydra::Vector3& getRotationPivot(); + const hydra::Vector3& getScalingPivot(); + const hydra::Vector3& getPreRotation(); + const hydra::Vector3& getPostRotation(); - const Vector3& getInitialRotationOffset(); - const Vector3& getInitialScalingOffset(); - const Vector3& getInitialRotationPivot(); - const Vector3& getInitialScalingPivot(); - const Vector3& getInitialPreRotation(); - const Vector3& getInitialPostRotation(); + const hydra::Vector3& getInitialRotationOffset(); + const hydra::Vector3& getInitialScalingOffset(); + const hydra::Vector3& getInitialRotationPivot(); + const hydra::Vector3& getInitialScalingPivot(); + const hydra::Vector3& getInitialPreRotation(); + const hydra::Vector3& getInitialPostRotation(); - const Vector3& getLocalTranslation(); - const Vector3& getLocalScale(); - const Vector3& getLocalRotation(); + const hydra::Vector3& getLocalTranslation(); + const hydra::Vector3& getLocalScale(); + const hydra::Vector3& getLocalRotation(); - const Vector3& getInitialLocalTranslation(); - const Vector3& getInitialLocalScale(); - const Vector3& getInitialLocalRotation(); + const hydra::Vector3& getInitialLocalTranslation(); + const hydra::Vector3& getInitialLocalScale(); + const hydra::Vector3& getInitialLocalRotation(); - const Vector3 getWorldTranslation(); - const Vector3 getWorldScale(); - const Quaternion getWorldRotation(); + const hydra::Vector3 getWorldTranslation(); + const hydra::Vector3 getWorldScale(); + const hydra::Quaternion getWorldRotation(); - const Quaternion getBindPoseWorldRotation(); - const Quaternion getActivePoseWorldRotation(); + const hydra::Quaternion getBindPoseWorldRotation(); + const hydra::Quaternion getActivePoseWorldRotation(); - const Vector3 localToWorld(const Vector3& local_point); - const Vector3 worldToLocal(const Vector3& world_point); + const hydra::Vector3 localToWorld(const hydra::Vector3& local_point); + const hydra::Vector3 worldToLocal(const hydra::Vector3& world_point); - void setWorldTranslation(const Vector3& v); - void setWorldScale(const Vector3& v); - void setWorldRotation(const Vector3& v); + void setWorldTranslation(const hydra::Vector3& v); + void setWorldScale(const hydra::Vector3& v); + void setWorldRotation(const hydra::Vector3& v); - virtual AABB getBounds(); + virtual hydra::AABB getBounds(); void invalidateBounds() const; - const Matrix4& getModelMatrix(); - const Matrix4& getInverseModelMatrix(); - const Matrix4& getBindPoseMatrix(); - const Matrix4& getActivePoseMatrix(); - const Matrix4& getInverseBindPoseMatrix(); + const hydra::Matrix4& getModelMatrix(); + const hydra::Matrix4& getInverseModelMatrix(); + const hydra::Matrix4& getBindPoseMatrix(); + const hydra::Matrix4& getActivePoseMatrix(); + const hydra::Matrix4& getInverseBindPoseMatrix(); enum node_attribute_type { @@ -250,27 +250,27 @@ public: KRNode* m_lastChildNode; protected: - Vector3 m_localTranslation; - Vector3 m_localScale; - Vector3 m_localRotation; + hydra::Vector3 m_localTranslation; + hydra::Vector3 m_localScale; + hydra::Vector3 m_localRotation; - Vector3 m_rotationOffset; - Vector3 m_scalingOffset; - Vector3 m_rotationPivot; - Vector3 m_scalingPivot; - Vector3 m_preRotation; - Vector3 m_postRotation; + hydra::Vector3 m_rotationOffset; + hydra::Vector3 m_scalingOffset; + hydra::Vector3 m_rotationPivot; + hydra::Vector3 m_scalingPivot; + hydra::Vector3 m_preRotation; + hydra::Vector3 m_postRotation; - Vector3 m_initialLocalTranslation; - Vector3 m_initialLocalScale; - Vector3 m_initialLocalRotation; + hydra::Vector3 m_initialLocalTranslation; + hydra::Vector3 m_initialLocalScale; + hydra::Vector3 m_initialLocalRotation; - Vector3 m_initialRotationOffset; - Vector3 m_initialScalingOffset; - Vector3 m_initialRotationPivot; - Vector3 m_initialScalingPivot; - Vector3 m_initialPreRotation; - Vector3 m_initialPostRotation; + hydra::Vector3 m_initialRotationOffset; + hydra::Vector3 m_initialScalingOffset; + hydra::Vector3 m_initialRotationPivot; + hydra::Vector3 m_initialScalingPivot; + hydra::Vector3 m_initialPreRotation; + hydra::Vector3 m_initialPostRotation; LodVisibility m_lod_visible; @@ -281,18 +281,18 @@ private: long m_lastRenderFrame; void invalidateModelMatrix(); void invalidateBindPoseMatrix(); - Matrix4 m_modelMatrix; - Matrix4 m_inverseModelMatrix; - Matrix4 m_bindPoseMatrix; - Matrix4 m_activePoseMatrix; - Matrix4 m_inverseBindPoseMatrix; + hydra::Matrix4 m_modelMatrix; + hydra::Matrix4 m_inverseModelMatrix; + hydra::Matrix4 m_bindPoseMatrix; + hydra::Matrix4 m_activePoseMatrix; + hydra::Matrix4 m_inverseBindPoseMatrix; bool m_modelMatrixValid; bool m_inverseModelMatrixValid; bool m_bindPoseMatrixValid; bool m_activePoseMatrixValid; bool m_inverseBindPoseMatrixValid; - mutable AABB m_bounds; + mutable hydra::AABB m_bounds; mutable bool m_boundsValid; std::string m_name; diff --git a/kraken/KROctree.cpp b/kraken/KROctree.cpp index 4cfc24c..ec0726d 100755 --- a/kraken/KROctree.cpp +++ b/kraken/KROctree.cpp @@ -34,6 +34,8 @@ #include "KRNode.h" #include "KRCollider.h" +using namespace hydra; + KROctree::KROctree() { m_pRootNode = NULL; diff --git a/kraken/KROctree.h b/kraken/KROctree.h index 6ecd478..7d68f07 100755 --- a/kraken/KROctree.h +++ b/kraken/KROctree.h @@ -49,9 +49,9 @@ public: KROctreeNode* getRootNode(); std::set& getOuterSceneNodes(); - bool lineCast(const Vector3& v0, const Vector3& v1, HitInfo& hitinfo, unsigned int layer_mask); - bool rayCast(const Vector3& v0, const Vector3& dir, HitInfo& hitinfo, unsigned int layer_mask); - bool sphereCast(const Vector3& v0, const Vector3& v1, float radius, HitInfo& hitinfo, unsigned int layer_mask); + bool lineCast(const hydra::Vector3& v0, const hydra::Vector3& v1, hydra::HitInfo& hitinfo, unsigned int layer_mask); + bool rayCast(const hydra::Vector3& v0, const hydra::Vector3& dir, hydra::HitInfo& hitinfo, unsigned int layer_mask); + bool sphereCast(const hydra::Vector3& v0, const hydra::Vector3& v1, float radius, hydra::HitInfo& hitinfo, unsigned int layer_mask); private: KROctreeNode* m_pRootNode; diff --git a/kraken/KROctreeNode.cpp b/kraken/KROctreeNode.cpp index 8f52fb5..5d79b1b 100755 --- a/kraken/KROctreeNode.cpp +++ b/kraken/KROctreeNode.cpp @@ -33,6 +33,8 @@ #include "KRNode.h" #include "KRCollider.h" +using namespace hydra; + KROctreeNode::KROctreeNode(KROctreeNode* parent, const AABB& bounds) : m_bounds(bounds) { m_parent = parent; diff --git a/kraken/KROctreeNode.h b/kraken/KROctreeNode.h index 5fb217d..db71cf9 100755 --- a/kraken/KROctreeNode.h +++ b/kraken/KROctreeNode.h @@ -39,8 +39,8 @@ class KRNode; class KROctreeNode { public: - KROctreeNode(KROctreeNode* parent, const AABB& bounds); - KROctreeNode(KROctreeNode* parent, const AABB& bounds, int iChild, KROctreeNode* pChild); + KROctreeNode(KROctreeNode* parent, const hydra::AABB& bounds); + KROctreeNode(KROctreeNode* parent, const hydra::AABB& bounds, int iChild, KROctreeNode* pChild); ~KROctreeNode(); KROctreeNode** getChildren(); @@ -50,12 +50,12 @@ public: void remove(KRNode* pNode); void update(KRNode* pNode); - AABB getBounds(); + hydra::AABB getBounds(); KROctreeNode* getParent(); void setChildNode(int iChild, KROctreeNode* pChild); int getChildIndex(KRNode* pNode); - AABB getChildBounds(int iChild); + hydra::AABB getChildBounds(int iChild); void trim(); bool isEmpty() const; @@ -70,13 +70,13 @@ public: bool m_occlusionTested; bool m_activeQuery; - bool lineCast(const Vector3& v0, const Vector3& v1, HitInfo& hitinfo, unsigned int layer_mask); - bool rayCast(const Vector3& v0, const Vector3& dir, HitInfo& hitinfo, unsigned int layer_mask); - bool sphereCast(const Vector3& v0, const Vector3& v1, float radius, HitInfo& hitinfo, unsigned int layer_mask); + bool lineCast(const hydra::Vector3& v0, const hydra::Vector3& v1, hydra::HitInfo& hitinfo, unsigned int layer_mask); + bool rayCast(const hydra::Vector3& v0, const hydra::Vector3& dir, hydra::HitInfo& hitinfo, unsigned int layer_mask); + bool sphereCast(const hydra::Vector3& v0, const hydra::Vector3& v1, float radius, hydra::HitInfo& hitinfo, unsigned int layer_mask); private: - AABB m_bounds; + hydra::AABB m_bounds; KROctreeNode* m_parent; KROctreeNode* m_children[8]; diff --git a/kraken/KRParticleSystem.h b/kraken/KRParticleSystem.h index 057311b..fe27b0b 100755 --- a/kraken/KRParticleSystem.h +++ b/kraken/KRParticleSystem.h @@ -42,7 +42,7 @@ public: virtual void loadXML(tinyxml2::XMLElement* e); virtual tinyxml2::XMLElement* saveXML(tinyxml2::XMLNode* parent); - virtual AABB getBounds() = 0; + virtual hydra::AABB getBounds() = 0; virtual void render(RenderInfo& ri) = 0; diff --git a/kraken/KRParticleSystemNewtonian.cpp b/kraken/KRParticleSystemNewtonian.cpp index 38250fb..ef13dde 100755 --- a/kraken/KRParticleSystemNewtonian.cpp +++ b/kraken/KRParticleSystemNewtonian.cpp @@ -35,6 +35,8 @@ #include "KRTexture.h" #include "KRContext.h" +using namespace hydra; + KRParticleSystemNewtonian::KRParticleSystemNewtonian(KRScene& scene, std::string name) : KRParticleSystem(scene, name) { m_particlesAbsoluteTime = 0.0f; diff --git a/kraken/KRParticleSystemNewtonian.h b/kraken/KRParticleSystemNewtonian.h index e75cf0b..093696a 100755 --- a/kraken/KRParticleSystemNewtonian.h +++ b/kraken/KRParticleSystemNewtonian.h @@ -44,7 +44,7 @@ public: virtual tinyxml2::XMLElement* saveXML(tinyxml2::XMLNode* parent); - virtual AABB getBounds(); + virtual hydra::AABB getBounds(); virtual void render(RenderInfo& ri); diff --git a/kraken/KRPipeline.cpp b/kraken/KRPipeline.cpp index 8660a68..52bea58 100644 --- a/kraken/KRPipeline.cpp +++ b/kraken/KRPipeline.cpp @@ -38,6 +38,8 @@ #include "KRContext.h" #include "KRRenderPass.h" +using namespace hydra; + const char* KRPipeline::KRENGINE_PUSH_CONSTANT_NAMES[] = { "material_ambient", // PushConstant::material_ambient diff --git a/kraken/KRPipeline.h b/kraken/KRPipeline.h index 118d218..4bb790c 100644 --- a/kraken/KRPipeline.h +++ b/kraken/KRPipeline.h @@ -214,11 +214,11 @@ class KRPipeline : public KRContextObject { public: - KRPipeline(KRContext& context, KrDeviceHandle deviceHandle, KRRenderPass& renderPass, Vector2i viewport_size, Vector2i scissor_size, const PipelineInfo& info, const char* szKey, const std::vector& shaders, uint32_t vertexAttributes, ModelFormat modelFormat); + KRPipeline(KRContext& context, KrDeviceHandle deviceHandle, KRRenderPass& renderPass, hydra::Vector2i viewport_size, hydra::Vector2i scissor_size, const PipelineInfo& info, const char* szKey, const std::vector& shaders, uint32_t vertexAttributes, ModelFormat modelFormat); virtual ~KRPipeline(); const char* getKey() const; - bool bind(VkCommandBuffer& commandBuffer, KRCamera& camera, const KRViewport& viewport, const Matrix4& matModel, const std::vector* point_lights, const std::vector* directional_lights, const std::vector* spot_lights, const KRNode::RenderPass& renderPass); + bool bind(VkCommandBuffer& commandBuffer, KRCamera& camera, const KRViewport& viewport, const hydra::Matrix4& matModel, const std::vector* point_lights, const std::vector* directional_lights, const std::vector* spot_lights, const KRNode::RenderPass& renderPass); enum class PushConstant : uint8_t { @@ -297,11 +297,11 @@ public: bool hasPushConstant(PushConstant location) const; void setPushConstant(PushConstant location, float value); void setPushConstant(PushConstant location, int value); - void setPushConstant(PushConstant location, const Vector2& value); - void setPushConstant(PushConstant location, const Vector3& value); - void setPushConstant(PushConstant location, const Vector4& value); - void setPushConstant(PushConstant location, const Matrix4& value); - void setPushConstant(PushConstant location, const Matrix4* value, const size_t count); + void setPushConstant(PushConstant location, const hydra::Vector2& value); + void setPushConstant(PushConstant location, const hydra::Vector3& value); + void setPushConstant(PushConstant location, const hydra::Vector4& value); + void setPushConstant(PushConstant location, const hydra::Matrix4& value); + void setPushConstant(PushConstant location, const hydra::Matrix4* value, const size_t count); void setImageBinding(const std::string& name, KRTexture* texture, KRSampler* sampler); diff --git a/kraken/KRPointLight.cpp b/kraken/KRPointLight.cpp index 538e86f..586ddba 100755 --- a/kraken/KRPointLight.cpp +++ b/kraken/KRPointLight.cpp @@ -35,6 +35,8 @@ #include "KRCamera.h" #include "KRContext.h" +using namespace hydra; + /* static */ void KRPointLight::InitNodeInfo(KrNodeInfo* nodeInfo) { diff --git a/kraken/KRPointLight.h b/kraken/KRPointLight.h index 94d77ff..31c3e61 100755 --- a/kraken/KRPointLight.h +++ b/kraken/KRPointLight.h @@ -41,7 +41,7 @@ public: virtual ~KRPointLight(); virtual std::string getElementName(); - virtual AABB getBounds(); + virtual hydra::AABB getBounds(); virtual void render(RenderInfo& ri); diff --git a/kraken/KRRenderPass.cpp b/kraken/KRRenderPass.cpp index a61fd64..7ceb80c 100644 --- a/kraken/KRRenderPass.cpp +++ b/kraken/KRRenderPass.cpp @@ -33,6 +33,8 @@ #include "KRSurface.h" #include "KRSwapchain.h" +using namespace hydra; + KRRenderPass::KRRenderPass(KRContext& context) : KRContextObject(context) , m_renderPass(VK_NULL_HANDLE) diff --git a/kraken/KRRenderPass.h b/kraken/KRRenderPass.h index 193b58e..f2a7ca1 100644 --- a/kraken/KRRenderPass.h +++ b/kraken/KRRenderPass.h @@ -51,7 +51,7 @@ public: void create(KRDevice& device, VkFormat swapChainImageFormat, VkFormat depthImageFormat, const RenderPassInfo& info); void destroy(KRDevice& device); - void begin(VkCommandBuffer& commandBuffer, KRSurface& surface, const Vector4& clearColor); + void begin(VkCommandBuffer& commandBuffer, KRSurface& surface, const hydra::Vector4& clearColor); void end(VkCommandBuffer& commandBuffer); // private: diff --git a/kraken/KRRenderSettings.cpp b/kraken/KRRenderSettings.cpp index 7ddfe52..da23d37 100755 --- a/kraken/KRRenderSettings.cpp +++ b/kraken/KRRenderSettings.cpp @@ -31,6 +31,8 @@ #include "KRRenderSettings.h" +using namespace hydra; + KRRenderSettings::KRRenderSettings() { siren_enable = true; diff --git a/kraken/KRRenderSettings.h b/kraken/KRRenderSettings.h index 15d232a..6a6f6a3 100755 --- a/kraken/KRRenderSettings.h +++ b/kraken/KRRenderSettings.h @@ -42,8 +42,8 @@ public: // Overload assignment operator KRRenderSettings& operator=(const KRRenderSettings& s); - const Vector2& getViewportSize(); - void setViewportSize(const Vector2& size); + const hydra::Vector2& getViewportSize(); + void setViewportSize(const hydra::Vector2& size); float getPerspectiveNearZ(); float getPerspectiveFarZ(); @@ -68,8 +68,8 @@ public: bool bEnableDiffuse; bool bEnableSpecular; bool bEnableDeferredLighting; - Vector3 light_intensity; - Vector3 ambient_intensity; + hydra::Vector3 light_intensity; + hydra::Vector3 ambient_intensity; float perspective_fov; int dof_quality; @@ -84,7 +84,7 @@ public: float vignette_radius; float vignette_falloff; - Vector2 m_viewportSize; + hydra::Vector2 m_viewportSize; int m_cShadowBuffers; @@ -99,7 +99,7 @@ public: float fog_near; float fog_far; float fog_density; - Vector3 fog_color; + hydra::Vector3 fog_color; int fog_type; // 0 = no fog, 1 = linear, 2 = exponential, 3 = exponential squared float dust_particle_intensity; diff --git a/kraken/KRResource+obj.cpp b/kraken/KRResource+obj.cpp index 17918a3..38fc488 100755 --- a/kraken/KRResource+obj.cpp +++ b/kraken/KRResource+obj.cpp @@ -37,6 +37,7 @@ #include "mimir.h" using namespace mimir; +using namespace hydra; KRMesh* KRResource::LoadObj(KRContext& context, const std::string& path) { diff --git a/kraken/KRReverbZone.cpp b/kraken/KRReverbZone.cpp index cad91d8..6e727cf 100755 --- a/kraken/KRReverbZone.cpp +++ b/kraken/KRReverbZone.cpp @@ -32,6 +32,8 @@ #include "KRReverbZone.h" #include "KRContext.h" +using namespace hydra; + /* static */ void KRReverbZone::InitNodeInfo(KrNodeInfo* nodeInfo) { diff --git a/kraken/KRReverbZone.h b/kraken/KRReverbZone.h index 24d871b..c093fbe 100755 --- a/kraken/KRReverbZone.h +++ b/kraken/KRReverbZone.h @@ -60,9 +60,9 @@ public: float getReverbGain(); void setReverbGain(float reverb_gain); - virtual AABB getBounds(); + virtual hydra::AABB getBounds(); - float getContainment(const Vector3& pos); + float getContainment(const hydra::Vector3& pos); private: std::string m_zone; diff --git a/kraken/KRScene.cpp b/kraken/KRScene.cpp index 99196c4..8fa6414 100755 --- a/kraken/KRScene.cpp +++ b/kraken/KRScene.cpp @@ -41,6 +41,7 @@ #include "KRAudioManager.h" using namespace mimir; +using namespace hydra; const long KRENGINE_OCCLUSION_TEST_EXPIRY = 10; diff --git a/kraken/KRScene.h b/kraken/KRScene.h index abe3dbd..25e88ec 100755 --- a/kraken/KRScene.h +++ b/kraken/KRScene.h @@ -66,13 +66,13 @@ public: kraken_stream_level getStreamLevel(); - bool lineCast(const Vector3& v0, const Vector3& v1, HitInfo& hitinfo, unsigned int layer_mask); - bool rayCast(const Vector3& v0, const Vector3& dir, HitInfo& hitinfo, unsigned int layer_mask); - bool sphereCast(const Vector3& v0, const Vector3& v1, float radius, HitInfo& hitinfo, unsigned int layer_mask); + bool lineCast(const hydra::Vector3& v0, const hydra::Vector3& v1, hydra::HitInfo& hitinfo, unsigned int layer_mask); + bool rayCast(const hydra::Vector3& v0, const hydra::Vector3& dir, hydra::HitInfo& hitinfo, unsigned int layer_mask); + bool sphereCast(const hydra::Vector3& v0, const hydra::Vector3& v1, float radius, hydra::HitInfo& hitinfo, unsigned int layer_mask); void renderFrame(VkCommandBuffer& commandBuffer, KRSurface& surface, float deltaTime); - void render(VkCommandBuffer& commandBuffer, KRSurface& surface, KRCamera* pCamera, unordered_map& visibleBounds, const KRViewport& viewport, KRNode::RenderPass renderPass, bool new_frame); - void render(KRNode::RenderInfo& ri, KROctreeNode* pOctreeNode, unordered_map& visibleBounds, std::vector& remainingOctrees, std::vector& remainingOctreesTestResults, std::vector& remainingOctreesTestResultsOnly, bool bOcclusionResultsPass, bool bOcclusionTestResultsOnly); + void render(VkCommandBuffer& commandBuffer, KRSurface& surface, KRCamera* pCamera, unordered_map& visibleBounds, const KRViewport& viewport, KRNode::RenderPass renderPass, bool new_frame); + void render(KRNode::RenderInfo& ri, KROctreeNode* pOctreeNode, unordered_map& visibleBounds, std::vector& remainingOctrees, std::vector& remainingOctreesTestResults, std::vector& remainingOctreesTestResultsOnly, bool bOcclusionResultsPass, bool bOcclusionTestResultsOnly); void updateOctree(const KRViewport& viewport); void buildOctreeForTheFirstTime(); @@ -84,7 +84,7 @@ public: void physicsUpdate(float deltaTime); void addDefaultLights(); - AABB getRootOctreeBounds(); + hydra::AABB getRootOctreeBounds(); std::set& getAmbientZones(); std::set& getReverbZones(); diff --git a/kraken/KRSpotLight.cpp b/kraken/KRSpotLight.cpp index c5fb9f9..f59330a 100755 --- a/kraken/KRSpotLight.cpp +++ b/kraken/KRSpotLight.cpp @@ -32,6 +32,8 @@ #include "KREngine-common.h" #include "KRSpotLight.h" +using namespace hydra; + /* static */ void KRSpotLight::InitNodeInfo(KrNodeInfo* nodeInfo) { diff --git a/kraken/KRSpotLight.h b/kraken/KRSpotLight.h index db76d03..72b6239 100755 --- a/kraken/KRSpotLight.h +++ b/kraken/KRSpotLight.h @@ -44,7 +44,7 @@ public: virtual std::string getElementName(); virtual tinyxml2::XMLElement* saveXML(tinyxml2::XMLNode* parent); virtual void loadXML(tinyxml2::XMLElement* e); - virtual AABB getBounds(); + virtual hydra::AABB getBounds(); float getInnerAngle(); float getOuterAngle(); diff --git a/kraken/KRSprite.cpp b/kraken/KRSprite.cpp index 6cf4c82..7516add 100755 --- a/kraken/KRSprite.cpp +++ b/kraken/KRSprite.cpp @@ -43,6 +43,8 @@ #include "KRSpotLight.h" #include "KRPointLight.h" +using namespace hydra; + /* static */ void KRSprite::InitNodeInfo(KrNodeInfo* nodeInfo) { diff --git a/kraken/KRSprite.h b/kraken/KRSprite.h index 52da3c1..365774e 100755 --- a/kraken/KRSprite.h +++ b/kraken/KRSprite.h @@ -53,7 +53,7 @@ public: virtual void render(RenderInfo& ri); - virtual AABB getBounds(); + virtual hydra::AABB getBounds(); protected: diff --git a/kraken/KRSurface.cpp b/kraken/KRSurface.cpp index 80627a5..b0c8280 100644 --- a/kraken/KRSurface.cpp +++ b/kraken/KRSurface.cpp @@ -33,6 +33,8 @@ #include "KRSwapchain.h" #include "KRRenderPass.h" +using namespace hydra; + #ifdef WIN32 KRSurface::KRSurface(KRContext& context, KrSurfaceHandle handle, HWND hWnd) #else diff --git a/kraken/KRSurface.h b/kraken/KRSurface.h index 23c90cc..4fc153a 100644 --- a/kraken/KRSurface.h +++ b/kraken/KRSurface.h @@ -50,7 +50,7 @@ public: void destroy(); uint32_t getWidth() const; uint32_t getHeight() const; - Vector2i getDimensions() const; + hydra::Vector2i getDimensions() const; VkFormat getDepthFormat() const; KRSurface(const KRSurface&) = delete; diff --git a/kraken/KRTexture.cpp b/kraken/KRTexture.cpp index 53cb4d2..a4f2030 100755 --- a/kraken/KRTexture.cpp +++ b/kraken/KRTexture.cpp @@ -280,7 +280,7 @@ VkImage KRTexture::getImage(KrDeviceHandle device) return VK_NULL_HANDLE; } -bool KRTexture::allocate(KRDevice& device, Vector2i dimensions, VkImageCreateFlags imageCreateFlags, VkMemoryPropertyFlags properties, VkImage* image, VmaAllocation* allocation +bool KRTexture::allocate(KRDevice& device, hydra::Vector2i dimensions, VkImageCreateFlags imageCreateFlags, VkMemoryPropertyFlags properties, VkImage* image, VmaAllocation* allocation #if KRENGINE_DEBUG_GPU_LABELS , const char* debug_label #endif diff --git a/kraken/KRTexture.h b/kraken/KRTexture.h index 998abb7..e3996b3 100755 --- a/kraken/KRTexture.h +++ b/kraken/KRTexture.h @@ -128,7 +128,7 @@ protected: float m_last_frame_max_lod_coverage; texture_usage_t m_last_frame_usage; - bool allocate(KRDevice& device, Vector2i dimensions, VkImageCreateFlags imageCreateFlags, VkMemoryPropertyFlags properties, VkImage* image, VmaAllocation* allocation + bool allocate(KRDevice& device, hydra::Vector2i dimensions, VkImageCreateFlags imageCreateFlags, VkMemoryPropertyFlags properties, VkImage* image, VmaAllocation* allocation #if KRENGINE_DEBUG_GPU_LABELS , const char* debug_label #endif diff --git a/kraken/KRTexture2D.h b/kraken/KRTexture2D.h index 11f91cc..9d39fd4 100755 --- a/kraken/KRTexture2D.h +++ b/kraken/KRTexture2D.h @@ -49,7 +49,7 @@ public: virtual bool save(mimir::Block& data); virtual bool uploadTexture(KRDevice& device, VkImage& image, int lod_max_dim, int& current_lod_max_dim, bool premultiply_alpha = false) = 0; - virtual Vector2i getDimensions() const = 0; + virtual hydra::Vector2i getDimensions() const = 0; protected: mimir::Block* m_pData; diff --git a/kraken/KRTextureCube.cpp b/kraken/KRTextureCube.cpp index 459ed2b..206ae40 100755 --- a/kraken/KRTextureCube.cpp +++ b/kraken/KRTextureCube.cpp @@ -34,6 +34,7 @@ #include "KRContext.h" using namespace mimir; +using namespace hydra; KRTextureCube::KRTextureCube(KRContext& context, std::string name) : KRTexture(context, name) { diff --git a/kraken/KRTextureKTX.cpp b/kraken/KRTextureKTX.cpp index 784305c..c51738f 100755 --- a/kraken/KRTextureKTX.cpp +++ b/kraken/KRTextureKTX.cpp @@ -34,6 +34,8 @@ #include "KREngine-common.h" +using namespace hydra; + __uint8_t _KTXFileIdentifier[12] = { 0xAB, 0x4B, 0x54, 0x58, 0x20, 0x31, 0x31, 0xBB, 0x0D, 0x0A, 0x1A, 0x0A }; @@ -127,7 +129,7 @@ KRTextureKTX::~KRTextureKTX() Vector2i KRTextureKTX::getDimensions() const { - return Vector2i::Create(Vector2i::Create(m_header.pixelWidth, m_header.pixelHeight)); + return hydra::Vector2i::Create(Vector2i::Create(m_header.pixelWidth, m_header.pixelHeight)); } int KRTextureKTX::getFaceCount() const diff --git a/kraken/KRTextureKTX.h b/kraken/KRTextureKTX.h index d7f30ec..0374e11 100755 --- a/kraken/KRTextureKTX.h +++ b/kraken/KRTextureKTX.h @@ -46,7 +46,7 @@ public: bool uploadTexture(KRDevice& device, VkImage& image, int lod_max_dim, int& current_lod_max_dim, bool premultiply_alpha = false) override; virtual long getMemRequiredForSize(int max_dim); - virtual Vector2i getDimensions() const override; + virtual hydra::Vector2i getDimensions() const override; virtual int getFaceCount() const override; virtual VkFormat getFormat() const override; diff --git a/kraken/KRTextureKTX2.cpp b/kraken/KRTextureKTX2.cpp index a476108..cb8ea4e 100644 --- a/kraken/KRTextureKTX2.cpp +++ b/kraken/KRTextureKTX2.cpp @@ -35,6 +35,7 @@ #include "KREngine-common.h" using namespace mimir; +using namespace hydra; __uint8_t _KTX2FileIdentifier[12] = { 0xAB, 0x4B, 0x54, 0x58, 0x20, 0x32, 0x30, 0xBB, 0x0D, 0x0A, 0x1A, 0x0A diff --git a/kraken/KRTextureKTX2.h b/kraken/KRTextureKTX2.h index 0f93ee6..b72d907 100644 --- a/kraken/KRTextureKTX2.h +++ b/kraken/KRTextureKTX2.h @@ -43,7 +43,7 @@ public: bool uploadTexture(KRDevice& device, VkImage& image, int lod_max_dim, int& current_lod_max_dim, bool premultiply_alpha = false) override; virtual long getMemRequiredForSize(int max_dim); - virtual Vector2i getDimensions() const override; + virtual hydra::Vector2i getDimensions() const override; virtual int getFaceCount() const override; virtual VkFormat getFormat() const override; diff --git a/kraken/KRTexturePVR.cpp b/kraken/KRTexturePVR.cpp index 03cc40f..7f72f29 100755 --- a/kraken/KRTexturePVR.cpp +++ b/kraken/KRTexturePVR.cpp @@ -35,6 +35,7 @@ #include "KREngine-common.h" using namespace mimir; +using namespace hydra; #define PVR_TEXTURE_FLAG_TYPE_MASK 0xff diff --git a/kraken/KRTexturePVR.h b/kraken/KRTexturePVR.h index 5061876..ba0f889 100755 --- a/kraken/KRTexturePVR.h +++ b/kraken/KRTexturePVR.h @@ -43,7 +43,7 @@ public: bool uploadTexture(KRDevice& device, VkImage& image, int lod_max_dim, int& current_lod_max_dim, bool premultiply_alpha = false) override; virtual long getMemRequiredForSize(int max_dim); - virtual Vector2i getDimensions() const override; + virtual hydra::Vector2i getDimensions() const override; virtual VkFormat getFormat() const override; virtual int getFaceCount() const override; diff --git a/kraken/KRTextureTGA.cpp b/kraken/KRTextureTGA.cpp index d001893..ef4652c 100755 --- a/kraken/KRTextureTGA.cpp +++ b/kraken/KRTextureTGA.cpp @@ -33,6 +33,8 @@ #include "KRContext.h" #include "KRTextureKTX2.h" +using namespace hydra; + #if defined(_WIN32) || defined(_WIN64) #pragma pack(1) typedef struct diff --git a/kraken/KRTextureTGA.h b/kraken/KRTextureTGA.h index e978e05..1f60500 100755 --- a/kraken/KRTextureTGA.h +++ b/kraken/KRTextureTGA.h @@ -49,10 +49,10 @@ public: #endif virtual long getMemRequiredForSize(int max_dim); - virtual Vector2i getDimensions() const override; + virtual hydra::Vector2i getDimensions() const override; virtual VkFormat getFormat() const override; virtual int getFaceCount() const override; private: long m_imageSize; - Vector2i m_dimensions; + hydra::Vector2i m_dimensions; }; diff --git a/kraken/KRViewport.cpp b/kraken/KRViewport.cpp index e8a5e11..5d4d1ef 100755 --- a/kraken/KRViewport.cpp +++ b/kraken/KRViewport.cpp @@ -34,6 +34,8 @@ #include "KRViewport.h" +using namespace hydra; + KRViewport::KRViewport() { m_size = Vector2::One(); diff --git a/kraken/KRViewport.h b/kraken/KRViewport.h index 573ba8d..be9c575 100755 --- a/kraken/KRViewport.h +++ b/kraken/KRViewport.h @@ -41,54 +41,54 @@ class KRViewport { public: KRViewport(); - KRViewport(const Vector2& size, const Matrix4& matView, const Matrix4& matProjection); + KRViewport(const hydra::Vector2& size, const hydra::Matrix4& matView, const hydra::Matrix4& matProjection); ~KRViewport(); - const Vector2& getSize() const; - const Matrix4& getViewMatrix() const; - const Matrix4& getProjectionMatrix() const; - const Matrix4& getViewProjectionMatrix() const; - const Matrix4& getInverseViewMatrix() const; - const Matrix4& getInverseProjectionMatrix() const; - const Vector3& getCameraDirection() const; - const Vector3& getCameraPosition() const; + const hydra::Vector2& getSize() const; + const hydra::Matrix4& getViewMatrix() const; + const hydra::Matrix4& getProjectionMatrix() const; + const hydra::Matrix4& getViewProjectionMatrix() const; + const hydra::Matrix4& getInverseViewMatrix() const; + const hydra::Matrix4& getInverseProjectionMatrix() const; + const hydra::Vector3& getCameraDirection() const; + const hydra::Vector3& getCameraPosition() const; const int* getFrontToBackOrder() const; const int* getBackToFrontOrder() const; - void setSize(const Vector2& size); - void setViewMatrix(const Matrix4& matView); - void setProjectionMatrix(const Matrix4& matProjection); + void setSize(const hydra::Vector2& size); + void setViewMatrix(const hydra::Matrix4& matView); + void setProjectionMatrix(const hydra::Matrix4& matProjection); float getLODBias() const; void setLODBias(float lod_bias); // Overload assignment operator KRViewport& operator=(const KRViewport& v); - unordered_map& getVisibleBounds(); + unordered_map& getVisibleBounds(); const std::set& getVisibleLights(); void setVisibleLights(const std::set visibleLights); - bool visible(const AABB& b) const; - float coverage(const AABB& b) const; + bool visible(const hydra::AABB& b) const; + float coverage(const hydra::AABB& b) const; private: - Vector2 m_size; - Matrix4 m_matView; - Matrix4 m_matProjection; + hydra::Vector2 m_size; + hydra::Matrix4 m_matView; + hydra::Matrix4 m_matProjection; float m_lodBias; // Derived values - Matrix4 m_matViewProjection; - Matrix4 m_matInverseView; - Matrix4 m_matInverseProjection; - Vector3 m_cameraDirection; - Vector3 m_cameraPosition; + hydra::Matrix4 m_matViewProjection; + hydra::Matrix4 m_matInverseView; + hydra::Matrix4 m_matInverseProjection; + hydra::Vector3 m_cameraDirection; + hydra::Vector3 m_cameraPosition; int m_frontToBackOrder[8]; int m_backToFrontOrder[8]; void calculateDerivedValues(); - unordered_map m_visibleBounds; // AABB's that output fragments in the last frame + unordered_map m_visibleBounds; // AABB's that output fragments in the last frame }; diff --git a/kraken/public/kraken.h b/kraken/public/kraken.h index 91bbbe9..ab3b106 100644 --- a/kraken/public/kraken.h +++ b/kraken/public/kraken.h @@ -222,15 +222,15 @@ typedef struct { KrStructureType sType; const char* pName; - kraken::Vector3 translate; - kraken::Vector3 scale; - kraken::Vector3 rotate; - kraken::Vector3 pre_rotate; - kraken::Vector3 post_rotate; - kraken::Vector3 rotate_offset; - kraken::Vector3 scale_offset; - kraken::Vector3 rotate_pivot; - kraken::Vector3 scale_pivot; + hydra::Vector3 translate; + hydra::Vector3 scale; + hydra::Vector3 rotate; + hydra::Vector3 pre_rotate; + hydra::Vector3 post_rotate; + hydra::Vector3 rotate_offset; + hydra::Vector3 scale_offset; + hydra::Vector3 rotate_pivot; + hydra::Vector3 scale_pivot; union { struct @@ -254,13 +254,13 @@ typedef struct // KR_STRUCTURE_TYPE_NODE_LOD_GROUP float min_distance; float max_distance; - kraken::Vector3 reference_min; - kraken::Vector3 reference_max; + hydra::Vector3 reference_min; + hydra::Vector3 reference_max; bool use_world_units; } lod_group; struct { - kraken::Vector3 color; + hydra::Vector3 color; float intensity; float decay_start; float flare_size; @@ -301,7 +301,7 @@ typedef struct bool receives_shadow; bool faces_camera; float rim_power; - kraken::Vector3 rim_color; + hydra::Vector3 rim_color; KrResourceMapIndex mesh; KrResourceMapIndex light_map_texture; } model; @@ -412,9 +412,9 @@ typedef struct KrStructureType sType; KrResourceMapIndex sceneHandle; KrSceneNodeMapIndex nodeHandle; - kraken::Vector3 translate; - kraken::Vector3 scale; - kraken::Vector3 rotate; + hydra::Vector3 translate; + hydra::Vector3 scale; + hydra::Vector3 rotate; } KrSetNodeLocalTransformInfo; typedef struct @@ -422,9 +422,9 @@ typedef struct KrStructureType sType; KrResourceMapIndex sceneHandle; KrSceneNodeMapIndex nodeHandle; - kraken::Vector3 translate; - kraken::Vector3 scale; - kraken::Vector3 rotate; + hydra::Vector3 translate; + hydra::Vector3 scale; + hydra::Vector3 rotate; } KrSetNodeWorldTransformInfo; KrResult KrInitialize(const KrInitializeInfo* pInitializeInfo);