Moved hydra to its own namespace
This commit is contained in:
2
hydra
2
hydra
Submodule hydra updated: 6cb2c06bea...9c1de3d017
@@ -32,6 +32,8 @@
|
|||||||
#include "KRAmbientZone.h"
|
#include "KRAmbientZone.h"
|
||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
void KRAmbientZone::InitNodeInfo(KrNodeInfo* nodeInfo)
|
void KRAmbientZone::InitNodeInfo(KrNodeInfo* nodeInfo)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -60,9 +60,9 @@ public:
|
|||||||
float getAmbientGain();
|
float getAmbientGain();
|
||||||
void setAmbientGain(float ambient_gain);
|
void setAmbientGain(float ambient_gain);
|
||||||
|
|
||||||
virtual AABB getBounds();
|
virtual hydra::AABB getBounds();
|
||||||
|
|
||||||
float getContainment(const Vector3& pos);
|
float getContainment(const hydra::Vector3& pos);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string m_zone;
|
std::string m_zone;
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
#include "KRDSP.h"
|
#include "KRDSP.h"
|
||||||
|
|
||||||
using namespace mimir;
|
using namespace mimir;
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
KRAudioManager::KRAudioManager(KRContext& context)
|
KRAudioManager::KRAudioManager(KRContext& context)
|
||||||
: KRResourceManager(context)
|
: KRResourceManager(context)
|
||||||
|
|||||||
@@ -113,11 +113,11 @@ public:
|
|||||||
// Listener position and orientation
|
// Listener position and orientation
|
||||||
KRScene* getListenerScene();
|
KRScene* getListenerScene();
|
||||||
void setListenerScene(KRScene* scene);
|
void setListenerScene(KRScene* scene);
|
||||||
void setListenerOrientation(const Vector3& position, const Vector3& forward, const Vector3& up);
|
void setListenerOrientation(const hydra::Vector3& position, const hydra::Vector3& forward, const hydra::Vector3& up);
|
||||||
void setListenerOrientationFromModelMatrix(const Matrix4& modelMatrix);
|
void setListenerOrientationFromModelMatrix(const hydra::Matrix4& modelMatrix);
|
||||||
Vector3& getListenerForward();
|
hydra::Vector3& getListenerForward();
|
||||||
Vector3& getListenerPosition();
|
hydra::Vector3& getListenerPosition();
|
||||||
Vector3& getListenerUp();
|
hydra::Vector3& getListenerUp();
|
||||||
|
|
||||||
|
|
||||||
// Global audio gain / attenuation
|
// Global audio gain / attenuation
|
||||||
@@ -174,9 +174,9 @@ private:
|
|||||||
float m_global_ambient_gain;
|
float m_global_ambient_gain;
|
||||||
float m_global_gain;
|
float m_global_gain;
|
||||||
|
|
||||||
Vector3 m_listener_position;
|
hydra::Vector3 m_listener_position;
|
||||||
Vector3 m_listener_forward;
|
hydra::Vector3 m_listener_forward;
|
||||||
Vector3 m_listener_up;
|
hydra::Vector3 m_listener_up;
|
||||||
|
|
||||||
unordered_map<std::string, KRAudioSample*> m_sounds;
|
unordered_map<std::string, KRAudioSample*> m_sounds;
|
||||||
|
|
||||||
@@ -231,14 +231,14 @@ private:
|
|||||||
void renderReverbImpulseResponse(int impulse_response_offset, int frame_count_log2);
|
void renderReverbImpulseResponse(int impulse_response_offset, int frame_count_log2);
|
||||||
void renderLimiter();
|
void renderLimiter();
|
||||||
|
|
||||||
std::vector<Vector2> m_hrtf_sample_locations;
|
std::vector<hydra::Vector2> m_hrtf_sample_locations;
|
||||||
float* m_hrtf_data;
|
float* m_hrtf_data;
|
||||||
unordered_map<Vector2, KRDSP::SplitComplex> m_hrtf_spectral[2];
|
unordered_map<hydra::Vector2, KRDSP::SplitComplex> m_hrtf_spectral[2];
|
||||||
|
|
||||||
Vector2 getNearestHRTFSample(const Vector2& dir);
|
hydra::Vector2 getNearestHRTFSample(const hydra::Vector2& dir);
|
||||||
void getHRTFMix(const Vector2& dir, Vector2& hrtf1, Vector2& hrtf2, Vector2& hrtf3, Vector2& hrtf4, float& mix1, float& mix2, float& mix3, float& mix4);
|
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 Vector2& hrtf_dir);
|
KRAudioSample* getHRTFSample(const hydra::Vector2& hrtf_dir);
|
||||||
KRDSP::SplitComplex getHRTFSpectral(const Vector2& hrtf_dir, const int channel);
|
KRDSP::SplitComplex getHRTFSpectral(const hydra::Vector2& hrtf_dir, const int channel);
|
||||||
|
|
||||||
unordered_map<std::string, siren_ambient_zone_weight_info> m_ambient_zone_weights;
|
unordered_map<std::string, siren_ambient_zone_weight_info> m_ambient_zone_weights;
|
||||||
float m_ambient_zone_total_weight = 0.0f; // For normalizing zone weights
|
float m_ambient_zone_total_weight = 0.0f; // For normalizing zone weights
|
||||||
@@ -252,7 +252,7 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
unordered_multimap<Vector2, std::pair<KRAudioSource*, std::pair<float, float> > > m_mapped_sources, m_prev_mapped_sources;
|
unordered_multimap<hydra::Vector2, std::pair<KRAudioSource*, std::pair<float, float> > > m_mapped_sources, m_prev_mapped_sources;
|
||||||
bool m_anticlick_block;
|
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
|
bool m_high_quality_hrtf; // If true, 4 HRTF samples will be interpolated; if false, the nearest HRTF sample will be used without interpolation
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -35,6 +35,8 @@
|
|||||||
#include "KRAudioSample.h"
|
#include "KRAudioSample.h"
|
||||||
#include "KRAudioBuffer.h"
|
#include "KRAudioBuffer.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
void KRAudioSource::InitNodeInfo(KrNodeInfo* nodeInfo)
|
void KRAudioSource::InitNodeInfo(KrNodeInfo* nodeInfo)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,6 +32,8 @@
|
|||||||
#include "KRBone.h"
|
#include "KRBone.h"
|
||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
void KRBone::InitNodeInfo(KrNodeInfo* nodeInfo)
|
void KRBone::InitNodeInfo(KrNodeInfo* nodeInfo)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -47,12 +47,12 @@ public:
|
|||||||
virtual std::string getElementName();
|
virtual std::string getElementName();
|
||||||
virtual tinyxml2::XMLElement* saveXML(tinyxml2::XMLNode* parent);
|
virtual tinyxml2::XMLElement* saveXML(tinyxml2::XMLNode* parent);
|
||||||
virtual void loadXML(tinyxml2::XMLElement* e);
|
virtual void loadXML(tinyxml2::XMLElement* e);
|
||||||
virtual AABB getBounds();
|
virtual hydra::AABB getBounds();
|
||||||
|
|
||||||
void render(RenderInfo& ri);
|
void render(RenderInfo& ri);
|
||||||
|
|
||||||
void setBindPose(const Matrix4& pose);
|
void setBindPose(const hydra::Matrix4& pose);
|
||||||
const Matrix4& getBindPose();
|
const hydra::Matrix4& getBindPose();
|
||||||
private:
|
private:
|
||||||
Matrix4 m_bind_pose;
|
hydra::Matrix4 m_bind_pose;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
#include "KRPipeline.h"
|
#include "KRPipeline.h"
|
||||||
|
|
||||||
using namespace mimir;
|
using namespace mimir;
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
void KRCamera::InitNodeInfo(KrNodeInfo* nodeInfo)
|
void KRCamera::InitNodeInfo(KrNodeInfo* nodeInfo)
|
||||||
|
|||||||
@@ -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 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);
|
void setFadeColor(const hydra::Vector4& fade_color);
|
||||||
Vector4 getFadeColor();
|
hydra::Vector4 getFadeColor();
|
||||||
|
|
||||||
void setSkyBox(const std::string& skyBox);
|
void setSkyBox(const std::string& skyBox);
|
||||||
const std::string getSkyBox() const;
|
const std::string getSkyBox() const;
|
||||||
@@ -100,7 +100,7 @@ private:
|
|||||||
|
|
||||||
float m_particlesAbsoluteTime;
|
float m_particlesAbsoluteTime;
|
||||||
|
|
||||||
Vector4 m_fade_color;
|
hydra::Vector4 m_fade_color;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -34,6 +34,8 @@
|
|||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
#include "KRMesh.h"
|
#include "KRMesh.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
void KRCollider::InitNodeInfo(KrNodeInfo* nodeInfo)
|
void KRCollider::InitNodeInfo(KrNodeInfo* nodeInfo)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -59,11 +59,11 @@ public:
|
|||||||
virtual std::string getElementName();
|
virtual std::string getElementName();
|
||||||
virtual tinyxml2::XMLElement* saveXML(tinyxml2::XMLNode* parent);
|
virtual tinyxml2::XMLElement* saveXML(tinyxml2::XMLNode* parent);
|
||||||
virtual void loadXML(tinyxml2::XMLElement* e);
|
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 lineCast(const hydra::Vector3& v0, const hydra::Vector3& v1, hydra::HitInfo& hitinfo, unsigned int layer_mask);
|
||||||
bool rayCast(const Vector3& v0, const Vector3& v1, 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 Vector3& v0, const Vector3& v1, float radius, 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();
|
unsigned int getLayerMask();
|
||||||
void setLayerMask(unsigned int layer_mask);
|
void setLayerMask(unsigned int layer_mask);
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
#include "KRDeviceManager.h"
|
#include "KRDeviceManager.h"
|
||||||
|
|
||||||
using namespace mimir;
|
using namespace mimir;
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
KRDevice::KRDevice(KRContext& context, const VkPhysicalDevice& device)
|
KRDevice::KRDevice(KRContext& context, const VkPhysicalDevice& device)
|
||||||
: KRContextObject(context)
|
: KRContextObject(context)
|
||||||
|
|||||||
@@ -72,9 +72,9 @@ public:
|
|||||||
|
|
||||||
void streamStart();
|
void streamStart();
|
||||||
void streamUpload(mimir::Block& data, VkBuffer destination);
|
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, 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 streamEnd();
|
||||||
|
|
||||||
void graphicsUpload(VkCommandBuffer& commandBuffer, mimir::Block& data, VkBuffer destination);
|
void graphicsUpload(VkCommandBuffer& commandBuffer, mimir::Block& data, VkBuffer destination);
|
||||||
@@ -141,5 +141,5 @@ private:
|
|||||||
#endif // KRENGINE_DEBUG_GPU_LABELS
|
#endif // KRENGINE_DEBUG_GPU_LABELS
|
||||||
);
|
);
|
||||||
bool initDescriptorPool();
|
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);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
#include "assert.h"
|
#include "assert.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
void KRDirectionalLight::InitNodeInfo(KrNodeInfo* nodeInfo)
|
void KRDirectionalLight::InitNodeInfo(KrNodeInfo* nodeInfo)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -43,11 +43,11 @@ public:
|
|||||||
virtual ~KRDirectionalLight();
|
virtual ~KRDirectionalLight();
|
||||||
|
|
||||||
virtual std::string getElementName();
|
virtual std::string getElementName();
|
||||||
Vector3 getLocalLightDirection();
|
hydra::Vector3 getLocalLightDirection();
|
||||||
Vector3 getWorldLightDirection();
|
hydra::Vector3 getWorldLightDirection();
|
||||||
|
|
||||||
virtual void render(RenderInfo& ri);
|
virtual void render(RenderInfo& ri);
|
||||||
virtual AABB getBounds();
|
virtual hydra::AABB getBounds();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,8 @@
|
|||||||
|
|
||||||
#include "KRHelpers.h"
|
#include "KRHelpers.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
namespace kraken {
|
namespace kraken {
|
||||||
|
|
||||||
void setXMLAttribute(const std::string& base_name, tinyxml2::XMLElement* e, const Vector3& value, const Vector3& default_value)
|
void setXMLAttribute(const std::string& base_name, tinyxml2::XMLElement* e, const Vector3& value, const Vector3& default_value)
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ float const PI = 3.141592653589793f;
|
|||||||
float const D2R = PI * 2 / 360;
|
float const D2R = PI * 2 / 360;
|
||||||
|
|
||||||
namespace kraken {
|
namespace kraken {
|
||||||
void setXMLAttribute(const std::string& base_name, ::tinyxml2::XMLElement* e, const Vector3& value, const Vector3& default_value);
|
void setXMLAttribute(const std::string& base_name, ::tinyxml2::XMLElement* e, const hydra::Vector3& value, const hydra::Vector3& default_value);
|
||||||
const Vector3 getXMLAttribute(const std::string& base_name, ::tinyxml2::XMLElement* e, const Vector3& default_value);
|
const hydra::Vector3 getXMLAttribute(const std::string& base_name, ::tinyxml2::XMLElement* e, const hydra::Vector3& default_value);
|
||||||
} // namespace kraken
|
} // namespace kraken
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,8 @@
|
|||||||
#include "KRLODSet.h"
|
#include "KRLODSet.h"
|
||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
void KRLODGroup::InitNodeInfo(KrNodeInfo* nodeInfo)
|
void KRLODGroup::InitNodeInfo(KrNodeInfo* nodeInfo)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ public:
|
|||||||
void setMinDistance(float min_distance);
|
void setMinDistance(float min_distance);
|
||||||
void setMaxDistance(float max_distance);
|
void setMaxDistance(float max_distance);
|
||||||
|
|
||||||
const AABB& getReference() const;
|
const hydra::AABB& getReference() const;
|
||||||
void setReference(const AABB& reference);
|
void setReference(const hydra::AABB& reference);
|
||||||
void setUseWorldUnits(bool use_world_units);
|
void setUseWorldUnits(bool use_world_units);
|
||||||
bool getUseWorldUnits() const;
|
bool getUseWorldUnits() const;
|
||||||
|
|
||||||
@@ -59,6 +59,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
float m_min_distance;
|
float m_min_distance;
|
||||||
float m_max_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;
|
bool m_use_world_units;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -43,6 +43,8 @@
|
|||||||
#include "KRSpotLight.h"
|
#include "KRSpotLight.h"
|
||||||
#include "KRPointLight.h"
|
#include "KRPointLight.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
void KRLight::InitNodeInfo(KrNodeInfo* nodeInfo)
|
void KRLight::InitNodeInfo(KrNodeInfo* nodeInfo)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ public:
|
|||||||
float getIntensity();
|
float getIntensity();
|
||||||
void setDecayStart(float decayStart);
|
void setDecayStart(float decayStart);
|
||||||
float getDecayStart();
|
float getDecayStart();
|
||||||
const Vector3& getColor();
|
const hydra::Vector3& getColor();
|
||||||
void setColor(const Vector3& color);
|
void setColor(const hydra::Vector3& color);
|
||||||
|
|
||||||
void setFlareTexture(std::string flare_texture);
|
void setFlareTexture(std::string flare_texture);
|
||||||
void setFlareSize(float flare_size);
|
void setFlareSize(float flare_size);
|
||||||
@@ -76,7 +76,7 @@ protected:
|
|||||||
|
|
||||||
float m_intensity;
|
float m_intensity;
|
||||||
float m_decayStart;
|
float m_decayStart;
|
||||||
Vector3 m_color;
|
hydra::Vector3 m_color;
|
||||||
|
|
||||||
std::string m_flareTexture;
|
std::string m_flareTexture;
|
||||||
KRTexture* m_pFlareTexture;
|
KRTexture* m_pFlareTexture;
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
|
|
||||||
using namespace mimir;
|
using namespace mimir;
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
KRMaterial::KRMaterial(KRContext& context, const char* szName) : KRResource(context, szName)
|
KRMaterial::KRMaterial(KRContext& context, const char* szName) : KRResource(context, szName)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -68,16 +68,16 @@ public:
|
|||||||
virtual bool save(mimir::Block& data);
|
virtual bool save(mimir::Block& data);
|
||||||
|
|
||||||
|
|
||||||
void setAmbientMap(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, Vector2 texture_scale, Vector2 texture_offset);
|
void setDiffuseMap(std::string texture_name, hydra::Vector2 texture_scale, hydra::Vector2 texture_offset);
|
||||||
void setSpecularMap(std::string texture_name, Vector2 texture_scale, Vector2 texture_offset);
|
void setSpecularMap(std::string texture_name, hydra::Vector2 texture_scale, hydra::Vector2 texture_offset);
|
||||||
void setReflectionMap(std::string texture_name, Vector2 texture_scale, Vector2 texture_offset);
|
void setReflectionMap(std::string texture_name, hydra::Vector2 texture_scale, hydra::Vector2 texture_offset);
|
||||||
void setReflectionCube(std::string texture_name);
|
void setReflectionCube(std::string texture_name);
|
||||||
void setNormalMap(std::string texture_name, Vector2 texture_scale, Vector2 texture_offset);
|
void setNormalMap(std::string texture_name, hydra::Vector2 texture_scale, hydra::Vector2 texture_offset);
|
||||||
void setAmbient(const Vector3& c);
|
void setAmbient(const hydra::Vector3& c);
|
||||||
void setDiffuse(const Vector3& c);
|
void setDiffuse(const hydra::Vector3& c);
|
||||||
void setSpecular(const Vector3& c);
|
void setSpecular(const hydra::Vector3& c);
|
||||||
void setReflection(const Vector3& c);
|
void setReflection(const hydra::Vector3& c);
|
||||||
void setTransparency(float a);
|
void setTransparency(float a);
|
||||||
void setShininess(float s);
|
void setShininess(float s);
|
||||||
void setAlphaMode(alpha_mode_type blend_mode);
|
void setAlphaMode(alpha_mode_type blend_mode);
|
||||||
@@ -87,7 +87,7 @@ public:
|
|||||||
bool isTransparent();
|
bool isTransparent();
|
||||||
const std::string& getName() const;
|
const std::string& getName() const;
|
||||||
|
|
||||||
void bind(const KRNode::RenderInfo& ri, ModelFormat modelFormat, __uint32_t vertexAttributes, CullMode cullMode, const std::vector<KRBone*>& bones, const std::vector<Matrix4>& 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<KRBone*>& bones, const std::vector<hydra::Matrix4>& bind_poses, const hydra::Matrix4& matModel, KRTexture* pLightMap, const hydra::Vector3& rim_color, float rim_power, float lod_coverage = 0.0f);
|
||||||
|
|
||||||
bool needsVertexTangents();
|
bool needsVertexTangents();
|
||||||
|
|
||||||
@@ -110,21 +110,21 @@ private:
|
|||||||
std::string m_reflectionCube;
|
std::string m_reflectionCube;
|
||||||
std::string m_normalMap;
|
std::string m_normalMap;
|
||||||
|
|
||||||
Vector2 m_ambientMapScale;
|
hydra::Vector2 m_ambientMapScale;
|
||||||
Vector2 m_ambientMapOffset;
|
hydra::Vector2 m_ambientMapOffset;
|
||||||
Vector2 m_diffuseMapScale;
|
hydra::Vector2 m_diffuseMapScale;
|
||||||
Vector2 m_diffuseMapOffset;
|
hydra::Vector2 m_diffuseMapOffset;
|
||||||
Vector2 m_specularMapScale;
|
hydra::Vector2 m_specularMapScale;
|
||||||
Vector2 m_specularMapOffset;
|
hydra::Vector2 m_specularMapOffset;
|
||||||
Vector2 m_reflectionMapScale;
|
hydra::Vector2 m_reflectionMapScale;
|
||||||
Vector2 m_reflectionMapOffset;
|
hydra::Vector2 m_reflectionMapOffset;
|
||||||
Vector2 m_normalMapScale;
|
hydra::Vector2 m_normalMapScale;
|
||||||
Vector2 m_normalMapOffset;
|
hydra::Vector2 m_normalMapOffset;
|
||||||
|
|
||||||
Vector3 m_ambientColor; // Ambient rgb
|
hydra::Vector3 m_ambientColor; // Ambient rgb
|
||||||
Vector3 m_diffuseColor; // Diffuse rgb
|
hydra::Vector3 m_diffuseColor; // Diffuse rgb
|
||||||
Vector3 m_specularColor; // Specular rgb
|
hydra::Vector3 m_specularColor; // Specular rgb
|
||||||
Vector3 m_reflectionColor; // Reflection rgb
|
hydra::Vector3 m_reflectionColor; // Reflection rgb
|
||||||
|
|
||||||
//float m_ka_r, m_ka_g, m_ka_b; // Ambient 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
|
//float m_kd_r, m_kd_g, m_kd_b; // Diffuse rgb
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
#include "KRMaterialManager.h"
|
#include "KRMaterialManager.h"
|
||||||
|
|
||||||
using namespace mimir;
|
using namespace mimir;
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
KRMaterialManager::KRMaterialManager(KRContext& context, KRTextureManager* pTextureManager, KRPipelineManager* pPipelineManager) : KRResourceManager(context)
|
KRMaterialManager::KRMaterialManager(KRContext& context, KRTextureManager* pTextureManager, KRPipelineManager* pPipelineManager) : KRResourceManager(context)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
#include "../3rdparty/forsyth/forsyth.h"
|
#include "../3rdparty/forsyth/forsyth.h"
|
||||||
|
|
||||||
using namespace mimir;
|
using namespace mimir;
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
KRMesh::KRMesh(KRContext& context, std::string name) : KRResource(context, name)
|
KRMesh::KRMesh(KRContext& context, std::string name) : KRResource(context, name)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -102,23 +102,23 @@ public:
|
|||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
ModelFormat format;
|
ModelFormat format;
|
||||||
std::vector<Vector3> vertices;
|
std::vector<hydra::Vector3> vertices;
|
||||||
std::vector<__uint16_t> vertex_indexes;
|
std::vector<__uint16_t> vertex_indexes;
|
||||||
std::vector<std::pair<int, int> > vertex_index_bases;
|
std::vector<std::pair<int, int> > vertex_index_bases;
|
||||||
std::vector<Vector2> uva;
|
std::vector<hydra::Vector2> uva;
|
||||||
std::vector<Vector2> uvb;
|
std::vector<hydra::Vector2> uvb;
|
||||||
std::vector<Vector3> normals;
|
std::vector<hydra::Vector3> normals;
|
||||||
std::vector<Vector3> tangents;
|
std::vector<hydra::Vector3> tangents;
|
||||||
std::vector<int> submesh_starts;
|
std::vector<int> submesh_starts;
|
||||||
std::vector<int> submesh_lengths;
|
std::vector<int> submesh_lengths;
|
||||||
std::vector<std::string> material_names;
|
std::vector<std::string> material_names;
|
||||||
std::vector<std::string> bone_names;
|
std::vector<std::string> bone_names;
|
||||||
std::vector<std::vector<int> > bone_indexes;
|
std::vector<std::vector<int> > bone_indexes;
|
||||||
std::vector<Matrix4> bone_bind_poses;
|
std::vector<hydra::Matrix4> bone_bind_poses;
|
||||||
std::vector<std::vector<float> > bone_weights;
|
std::vector<std::vector<float> > bone_weights;
|
||||||
} mesh_info;
|
} mesh_info;
|
||||||
|
|
||||||
void render(const KRNode::RenderInfo& ri, const std::string& object_name, const Matrix4& matModel, KRTexture* pLightMap, const std::vector<KRBone*>& 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<KRBone*>& bones, const hydra::Vector3& rim_color, float rim_power, float lod_coverage = 0.0f);
|
||||||
|
|
||||||
std::string m_lodBaseName;
|
std::string m_lodBaseName;
|
||||||
|
|
||||||
@@ -138,8 +138,8 @@ public:
|
|||||||
|
|
||||||
float getMaxDimension();
|
float getMaxDimension();
|
||||||
|
|
||||||
Vector3 getMinPoint() const;
|
hydra::Vector3 getMinPoint() const;
|
||||||
Vector3 getMaxPoint() const;
|
hydra::Vector3 getMaxPoint() const;
|
||||||
|
|
||||||
class Submesh
|
class Submesh
|
||||||
{
|
{
|
||||||
@@ -202,19 +202,19 @@ public:
|
|||||||
__uint32_t getVertexAttributes() const;
|
__uint32_t getVertexAttributes() const;
|
||||||
|
|
||||||
int getTriangleVertexIndex(int submesh, int index) const;
|
int getTriangleVertexIndex(int submesh, int index) const;
|
||||||
Vector3 getVertexPosition(int index) const;
|
hydra::Vector3 getVertexPosition(int index) const;
|
||||||
Vector3 getVertexNormal(int index) const;
|
hydra::Vector3 getVertexNormal(int index) const;
|
||||||
Vector3 getVertexTangent(int index) const;
|
hydra::Vector3 getVertexTangent(int index) const;
|
||||||
Vector2 getVertexUVA(int index) const;
|
hydra::Vector2 getVertexUVA(int index) const;
|
||||||
Vector2 getVertexUVB(int index) const;
|
hydra::Vector2 getVertexUVB(int index) const;
|
||||||
int getBoneIndex(int index, int weight_index) const;
|
int getBoneIndex(int index, int weight_index) const;
|
||||||
float getBoneWeight(int index, int weight_index) const;
|
float getBoneWeight(int index, int weight_index) const;
|
||||||
|
|
||||||
void setVertexPosition(int index, const Vector3& v);
|
void setVertexPosition(int index, const hydra::Vector3& v);
|
||||||
void setVertexNormal(int index, const Vector3& v);
|
void setVertexNormal(int index, const hydra::Vector3& v);
|
||||||
void setVertexTangent(int index, const Vector3& v);
|
void setVertexTangent(int index, const hydra::Vector3& v);
|
||||||
void setVertexUVA(int index, const Vector2& v);
|
void setVertexUVA(int index, const hydra::Vector2& v);
|
||||||
void setVertexUVB(int index, const Vector2& v);
|
void setVertexUVB(int index, const hydra::Vector2& v);
|
||||||
void setBoneIndex(int index, int weight_index, int bone_index);
|
void setBoneIndex(int index, int weight_index, int bone_index);
|
||||||
void setBoneWeight(int index, int weight_index, float bone_weight);
|
void setBoneWeight(int index, int weight_index, float bone_weight);
|
||||||
|
|
||||||
@@ -224,14 +224,14 @@ public:
|
|||||||
|
|
||||||
int getBoneCount();
|
int getBoneCount();
|
||||||
char* getBoneName(int bone_index);
|
char* getBoneName(int bone_index);
|
||||||
Matrix4 getBoneBindPose(int bone_index);
|
hydra::Matrix4 getBoneBindPose(int bone_index);
|
||||||
|
|
||||||
|
|
||||||
ModelFormat getModelFormat() const;
|
ModelFormat getModelFormat() const;
|
||||||
|
|
||||||
bool lineCast(const Vector3& v0, const Vector3& v1, HitInfo& hitinfo) const;
|
bool lineCast(const hydra::Vector3& v0, const hydra::Vector3& v1, hydra::HitInfo& hitinfo) const;
|
||||||
bool rayCast(const Vector3& v0, const Vector3& dir, HitInfo& hitinfo) const;
|
bool rayCast(const hydra::Vector3& v0, const hydra::Vector3& dir, hydra::HitInfo& hitinfo) const;
|
||||||
bool sphereCast(const Matrix4& model_to_world, const Vector3& v0, const Vector3& v1, float radius, 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);
|
static int GetLODCoverage(const std::string& name);
|
||||||
|
|
||||||
@@ -247,8 +247,8 @@ private:
|
|||||||
void getMaterials();
|
void getMaterials();
|
||||||
void renderSubmesh(VkCommandBuffer& commandBuffer, int iSubmesh, KRNode::RenderPass renderPass, const std::string& object_name, const std::string& material_name, float lodCoverage);
|
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 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 Matrix4& model_to_world, const Vector3& v0, const Vector3& v1, float radius, const Triangle3& tri, 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)
|
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<KRMaterial*> m_materials;
|
vector<KRMaterial*> m_materials;
|
||||||
@@ -257,7 +257,7 @@ private:
|
|||||||
bool m_hasTransparency;
|
bool m_hasTransparency;
|
||||||
|
|
||||||
|
|
||||||
Vector3 m_minPoint, m_maxPoint;
|
hydra::Vector3 m_minPoint, m_maxPoint;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
#include "KRMeshCube.h"
|
#include "KRMeshCube.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
KRMeshCube::KRMeshCube(KRContext& context) : KRMesh(context, "__cube")
|
KRMeshCube::KRMeshCube(KRContext& context) : KRMesh(context, "__cube")
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -176,13 +176,13 @@ public:
|
|||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
Vector3 vertex;
|
hydra::Vector3 vertex;
|
||||||
Vector2 uva;
|
hydra::Vector2 uva;
|
||||||
} RandomParticleVertexData;
|
} RandomParticleVertexData;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
Vector3 vertex;
|
hydra::Vector3 vertex;
|
||||||
} VolumetricLightingVertexData;
|
} VolumetricLightingVertexData;
|
||||||
|
|
||||||
long getMemoryTransferedThisFrame();
|
long getMemoryTransferedThisFrame();
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
#include "KRMeshQuad.h"
|
#include "KRMeshQuad.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
KRMeshQuad::KRMeshQuad(KRContext& context) : KRMesh(context, "__quad")
|
KRMeshQuad::KRMeshQuad(KRContext& context) : KRMesh(context, "__quad")
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
#include "KRMeshSphere.h"
|
#include "KRMeshSphere.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
KRMeshSphere::KRMeshSphere(KRContext& context) : KRMesh(context, "__sphere")
|
KRMeshSphere::KRMeshSphere(KRContext& context) : KRMesh(context, "__sphere")
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
#include "KRMesh.h"
|
#include "KRMesh.h"
|
||||||
#include "KRNode.h"
|
#include "KRNode.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
void KRModel::InitNodeInfo(KrNodeInfo* nodeInfo)
|
void KRModel::InitNodeInfo(KrNodeInfo* nodeInfo)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public:
|
|||||||
static void InitNodeInfo(KrNodeInfo* nodeInfo);
|
static void InitNodeInfo(KrNodeInfo* nodeInfo);
|
||||||
|
|
||||||
KRModel(KRScene& scene, std::string name);
|
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 ~KRModel();
|
||||||
|
|
||||||
virtual std::string getElementName();
|
virtual std::string getElementName();
|
||||||
@@ -58,11 +58,11 @@ public:
|
|||||||
|
|
||||||
virtual void render(KRNode::RenderInfo& ri);
|
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);
|
void setRimPower(float rim_power);
|
||||||
Vector3 getRimColor();
|
hydra::Vector3 getRimColor();
|
||||||
float getRimPower();
|
float getRimPower();
|
||||||
|
|
||||||
void setLightMap(const std::string& name);
|
void setLightMap(const std::string& name);
|
||||||
@@ -87,10 +87,10 @@ private:
|
|||||||
bool m_faces_camera;
|
bool m_faces_camera;
|
||||||
|
|
||||||
|
|
||||||
Matrix4 m_boundsCachedMat;
|
hydra::Matrix4 m_boundsCachedMat;
|
||||||
AABB m_boundsCached;
|
hydra::AABB m_boundsCached;
|
||||||
|
|
||||||
|
|
||||||
Vector3 m_rim_color;
|
hydra::Vector3 m_rim_color;
|
||||||
float m_rim_power;
|
float m_rim_power;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -31,6 +31,8 @@
|
|||||||
|
|
||||||
#include "KREngine-common.h"
|
#include "KREngine-common.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
#include "KRNode.h"
|
#include "KRNode.h"
|
||||||
#include "KRLODGroup.h"
|
#include "KRLODGroup.h"
|
||||||
#include "KRLODSet.h"
|
#include "KRLODSet.h"
|
||||||
|
|||||||
136
kraken/KRNode.h
136
kraken/KRNode.h
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
using namespace kraken;
|
using namespace kraken;
|
||||||
|
|
||||||
namespace kraken {
|
namespace hydra {
|
||||||
class Matrix4;
|
class Matrix4;
|
||||||
class AABB;
|
class AABB;
|
||||||
} // namespace kraken
|
} // namespace kraken
|
||||||
@@ -128,62 +128,62 @@ public:
|
|||||||
void insertAfter(KRNode* child);
|
void insertAfter(KRNode* child);
|
||||||
KRNode* getParent();
|
KRNode* getParent();
|
||||||
|
|
||||||
void setLocalTranslation(const Vector3& v, bool set_original = false);
|
void setLocalTranslation(const hydra::Vector3& v, bool set_original = false);
|
||||||
void setLocalScale(const Vector3& v, bool set_original = false);
|
void setLocalScale(const hydra::Vector3& v, bool set_original = false);
|
||||||
void setLocalRotation(const 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 setRotationOffset(const hydra::Vector3& v, bool set_original = false);
|
||||||
void setScalingOffset(const Vector3& v, bool set_original = false);
|
void setScalingOffset(const hydra::Vector3& v, bool set_original = false);
|
||||||
void setRotationPivot(const Vector3& v, bool set_original = false);
|
void setRotationPivot(const hydra::Vector3& v, bool set_original = false);
|
||||||
void setScalingPivot(const Vector3& v, bool set_original = false);
|
void setScalingPivot(const hydra::Vector3& v, bool set_original = false);
|
||||||
void setPreRotation(const Vector3& v, bool set_original = false);
|
void setPreRotation(const hydra::Vector3& v, bool set_original = false);
|
||||||
void setPostRotation(const Vector3& v, bool set_original = false);
|
void setPostRotation(const hydra::Vector3& v, bool set_original = false);
|
||||||
|
|
||||||
const Vector3& getRotationOffset();
|
const hydra::Vector3& getRotationOffset();
|
||||||
const Vector3& getScalingOffset();
|
const hydra::Vector3& getScalingOffset();
|
||||||
const Vector3& getRotationPivot();
|
const hydra::Vector3& getRotationPivot();
|
||||||
const Vector3& getScalingPivot();
|
const hydra::Vector3& getScalingPivot();
|
||||||
const Vector3& getPreRotation();
|
const hydra::Vector3& getPreRotation();
|
||||||
const Vector3& getPostRotation();
|
const hydra::Vector3& getPostRotation();
|
||||||
|
|
||||||
const Vector3& getInitialRotationOffset();
|
const hydra::Vector3& getInitialRotationOffset();
|
||||||
const Vector3& getInitialScalingOffset();
|
const hydra::Vector3& getInitialScalingOffset();
|
||||||
const Vector3& getInitialRotationPivot();
|
const hydra::Vector3& getInitialRotationPivot();
|
||||||
const Vector3& getInitialScalingPivot();
|
const hydra::Vector3& getInitialScalingPivot();
|
||||||
const Vector3& getInitialPreRotation();
|
const hydra::Vector3& getInitialPreRotation();
|
||||||
const Vector3& getInitialPostRotation();
|
const hydra::Vector3& getInitialPostRotation();
|
||||||
|
|
||||||
|
|
||||||
const Vector3& getLocalTranslation();
|
const hydra::Vector3& getLocalTranslation();
|
||||||
const Vector3& getLocalScale();
|
const hydra::Vector3& getLocalScale();
|
||||||
const Vector3& getLocalRotation();
|
const hydra::Vector3& getLocalRotation();
|
||||||
|
|
||||||
const Vector3& getInitialLocalTranslation();
|
const hydra::Vector3& getInitialLocalTranslation();
|
||||||
const Vector3& getInitialLocalScale();
|
const hydra::Vector3& getInitialLocalScale();
|
||||||
const Vector3& getInitialLocalRotation();
|
const hydra::Vector3& getInitialLocalRotation();
|
||||||
|
|
||||||
const Vector3 getWorldTranslation();
|
const hydra::Vector3 getWorldTranslation();
|
||||||
const Vector3 getWorldScale();
|
const hydra::Vector3 getWorldScale();
|
||||||
const Quaternion getWorldRotation();
|
const hydra::Quaternion getWorldRotation();
|
||||||
|
|
||||||
const Quaternion getBindPoseWorldRotation();
|
const hydra::Quaternion getBindPoseWorldRotation();
|
||||||
const Quaternion getActivePoseWorldRotation();
|
const hydra::Quaternion getActivePoseWorldRotation();
|
||||||
|
|
||||||
const Vector3 localToWorld(const Vector3& local_point);
|
const hydra::Vector3 localToWorld(const hydra::Vector3& local_point);
|
||||||
const Vector3 worldToLocal(const Vector3& world_point);
|
const hydra::Vector3 worldToLocal(const hydra::Vector3& world_point);
|
||||||
|
|
||||||
void setWorldTranslation(const Vector3& v);
|
void setWorldTranslation(const hydra::Vector3& v);
|
||||||
void setWorldScale(const Vector3& v);
|
void setWorldScale(const hydra::Vector3& v);
|
||||||
void setWorldRotation(const Vector3& v);
|
void setWorldRotation(const hydra::Vector3& v);
|
||||||
|
|
||||||
virtual AABB getBounds();
|
virtual hydra::AABB getBounds();
|
||||||
void invalidateBounds() const;
|
void invalidateBounds() const;
|
||||||
const Matrix4& getModelMatrix();
|
const hydra::Matrix4& getModelMatrix();
|
||||||
const Matrix4& getInverseModelMatrix();
|
const hydra::Matrix4& getInverseModelMatrix();
|
||||||
const Matrix4& getBindPoseMatrix();
|
const hydra::Matrix4& getBindPoseMatrix();
|
||||||
const Matrix4& getActivePoseMatrix();
|
const hydra::Matrix4& getActivePoseMatrix();
|
||||||
const Matrix4& getInverseBindPoseMatrix();
|
const hydra::Matrix4& getInverseBindPoseMatrix();
|
||||||
|
|
||||||
enum node_attribute_type
|
enum node_attribute_type
|
||||||
{
|
{
|
||||||
@@ -250,27 +250,27 @@ public:
|
|||||||
KRNode* m_lastChildNode;
|
KRNode* m_lastChildNode;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Vector3 m_localTranslation;
|
hydra::Vector3 m_localTranslation;
|
||||||
Vector3 m_localScale;
|
hydra::Vector3 m_localScale;
|
||||||
Vector3 m_localRotation;
|
hydra::Vector3 m_localRotation;
|
||||||
|
|
||||||
Vector3 m_rotationOffset;
|
hydra::Vector3 m_rotationOffset;
|
||||||
Vector3 m_scalingOffset;
|
hydra::Vector3 m_scalingOffset;
|
||||||
Vector3 m_rotationPivot;
|
hydra::Vector3 m_rotationPivot;
|
||||||
Vector3 m_scalingPivot;
|
hydra::Vector3 m_scalingPivot;
|
||||||
Vector3 m_preRotation;
|
hydra::Vector3 m_preRotation;
|
||||||
Vector3 m_postRotation;
|
hydra::Vector3 m_postRotation;
|
||||||
|
|
||||||
Vector3 m_initialLocalTranslation;
|
hydra::Vector3 m_initialLocalTranslation;
|
||||||
Vector3 m_initialLocalScale;
|
hydra::Vector3 m_initialLocalScale;
|
||||||
Vector3 m_initialLocalRotation;
|
hydra::Vector3 m_initialLocalRotation;
|
||||||
|
|
||||||
Vector3 m_initialRotationOffset;
|
hydra::Vector3 m_initialRotationOffset;
|
||||||
Vector3 m_initialScalingOffset;
|
hydra::Vector3 m_initialScalingOffset;
|
||||||
Vector3 m_initialRotationPivot;
|
hydra::Vector3 m_initialRotationPivot;
|
||||||
Vector3 m_initialScalingPivot;
|
hydra::Vector3 m_initialScalingPivot;
|
||||||
Vector3 m_initialPreRotation;
|
hydra::Vector3 m_initialPreRotation;
|
||||||
Vector3 m_initialPostRotation;
|
hydra::Vector3 m_initialPostRotation;
|
||||||
|
|
||||||
LodVisibility m_lod_visible;
|
LodVisibility m_lod_visible;
|
||||||
|
|
||||||
@@ -281,18 +281,18 @@ private:
|
|||||||
long m_lastRenderFrame;
|
long m_lastRenderFrame;
|
||||||
void invalidateModelMatrix();
|
void invalidateModelMatrix();
|
||||||
void invalidateBindPoseMatrix();
|
void invalidateBindPoseMatrix();
|
||||||
Matrix4 m_modelMatrix;
|
hydra::Matrix4 m_modelMatrix;
|
||||||
Matrix4 m_inverseModelMatrix;
|
hydra::Matrix4 m_inverseModelMatrix;
|
||||||
Matrix4 m_bindPoseMatrix;
|
hydra::Matrix4 m_bindPoseMatrix;
|
||||||
Matrix4 m_activePoseMatrix;
|
hydra::Matrix4 m_activePoseMatrix;
|
||||||
Matrix4 m_inverseBindPoseMatrix;
|
hydra::Matrix4 m_inverseBindPoseMatrix;
|
||||||
bool m_modelMatrixValid;
|
bool m_modelMatrixValid;
|
||||||
bool m_inverseModelMatrixValid;
|
bool m_inverseModelMatrixValid;
|
||||||
bool m_bindPoseMatrixValid;
|
bool m_bindPoseMatrixValid;
|
||||||
bool m_activePoseMatrixValid;
|
bool m_activePoseMatrixValid;
|
||||||
bool m_inverseBindPoseMatrixValid;
|
bool m_inverseBindPoseMatrixValid;
|
||||||
|
|
||||||
mutable AABB m_bounds;
|
mutable hydra::AABB m_bounds;
|
||||||
mutable bool m_boundsValid;
|
mutable bool m_boundsValid;
|
||||||
|
|
||||||
std::string m_name;
|
std::string m_name;
|
||||||
|
|||||||
@@ -34,6 +34,8 @@
|
|||||||
#include "KRNode.h"
|
#include "KRNode.h"
|
||||||
#include "KRCollider.h"
|
#include "KRCollider.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
KROctree::KROctree()
|
KROctree::KROctree()
|
||||||
{
|
{
|
||||||
m_pRootNode = NULL;
|
m_pRootNode = NULL;
|
||||||
|
|||||||
@@ -49,9 +49,9 @@ public:
|
|||||||
KROctreeNode* getRootNode();
|
KROctreeNode* getRootNode();
|
||||||
std::set<KRNode*>& getOuterSceneNodes();
|
std::set<KRNode*>& getOuterSceneNodes();
|
||||||
|
|
||||||
bool lineCast(const Vector3& v0, const Vector3& v1, 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 Vector3& v0, const Vector3& dir, 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 Vector3& v0, const Vector3& v1, float radius, 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:
|
private:
|
||||||
KROctreeNode* m_pRootNode;
|
KROctreeNode* m_pRootNode;
|
||||||
|
|||||||
@@ -33,6 +33,8 @@
|
|||||||
#include "KRNode.h"
|
#include "KRNode.h"
|
||||||
#include "KRCollider.h"
|
#include "KRCollider.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
KROctreeNode::KROctreeNode(KROctreeNode* parent, const AABB& bounds) : m_bounds(bounds)
|
KROctreeNode::KROctreeNode(KROctreeNode* parent, const AABB& bounds) : m_bounds(bounds)
|
||||||
{
|
{
|
||||||
m_parent = parent;
|
m_parent = parent;
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ class KRNode;
|
|||||||
class KROctreeNode
|
class KROctreeNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
KROctreeNode(KROctreeNode* parent, const AABB& bounds);
|
KROctreeNode(KROctreeNode* parent, const hydra::AABB& bounds);
|
||||||
KROctreeNode(KROctreeNode* parent, const AABB& bounds, int iChild, KROctreeNode* pChild);
|
KROctreeNode(KROctreeNode* parent, const hydra::AABB& bounds, int iChild, KROctreeNode* pChild);
|
||||||
~KROctreeNode();
|
~KROctreeNode();
|
||||||
|
|
||||||
KROctreeNode** getChildren();
|
KROctreeNode** getChildren();
|
||||||
@@ -50,12 +50,12 @@ public:
|
|||||||
void remove(KRNode* pNode);
|
void remove(KRNode* pNode);
|
||||||
void update(KRNode* pNode);
|
void update(KRNode* pNode);
|
||||||
|
|
||||||
AABB getBounds();
|
hydra::AABB getBounds();
|
||||||
|
|
||||||
KROctreeNode* getParent();
|
KROctreeNode* getParent();
|
||||||
void setChildNode(int iChild, KROctreeNode* pChild);
|
void setChildNode(int iChild, KROctreeNode* pChild);
|
||||||
int getChildIndex(KRNode* pNode);
|
int getChildIndex(KRNode* pNode);
|
||||||
AABB getChildBounds(int iChild);
|
hydra::AABB getChildBounds(int iChild);
|
||||||
void trim();
|
void trim();
|
||||||
bool isEmpty() const;
|
bool isEmpty() const;
|
||||||
|
|
||||||
@@ -70,13 +70,13 @@ public:
|
|||||||
bool m_occlusionTested;
|
bool m_occlusionTested;
|
||||||
bool m_activeQuery;
|
bool m_activeQuery;
|
||||||
|
|
||||||
bool lineCast(const Vector3& v0, const Vector3& v1, 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 Vector3& v0, const Vector3& dir, 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 Vector3& v0, const Vector3& v1, float radius, 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:
|
private:
|
||||||
|
|
||||||
AABB m_bounds;
|
hydra::AABB m_bounds;
|
||||||
|
|
||||||
KROctreeNode* m_parent;
|
KROctreeNode* m_parent;
|
||||||
KROctreeNode* m_children[8];
|
KROctreeNode* m_children[8];
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public:
|
|||||||
virtual void loadXML(tinyxml2::XMLElement* e);
|
virtual void loadXML(tinyxml2::XMLElement* e);
|
||||||
virtual tinyxml2::XMLElement* saveXML(tinyxml2::XMLNode* parent);
|
virtual tinyxml2::XMLElement* saveXML(tinyxml2::XMLNode* parent);
|
||||||
|
|
||||||
virtual AABB getBounds() = 0;
|
virtual hydra::AABB getBounds() = 0;
|
||||||
|
|
||||||
virtual void render(RenderInfo& ri) = 0;
|
virtual void render(RenderInfo& ri) = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,8 @@
|
|||||||
#include "KRTexture.h"
|
#include "KRTexture.h"
|
||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
KRParticleSystemNewtonian::KRParticleSystemNewtonian(KRScene& scene, std::string name) : KRParticleSystem(scene, name)
|
KRParticleSystemNewtonian::KRParticleSystemNewtonian(KRScene& scene, std::string name) : KRParticleSystem(scene, name)
|
||||||
{
|
{
|
||||||
m_particlesAbsoluteTime = 0.0f;
|
m_particlesAbsoluteTime = 0.0f;
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public:
|
|||||||
virtual tinyxml2::XMLElement* saveXML(tinyxml2::XMLNode* parent);
|
virtual tinyxml2::XMLElement* saveXML(tinyxml2::XMLNode* parent);
|
||||||
|
|
||||||
|
|
||||||
virtual AABB getBounds();
|
virtual hydra::AABB getBounds();
|
||||||
|
|
||||||
virtual void render(RenderInfo& ri);
|
virtual void render(RenderInfo& ri);
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,8 @@
|
|||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
#include "KRRenderPass.h"
|
#include "KRRenderPass.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
|
|
||||||
const char* KRPipeline::KRENGINE_PUSH_CONSTANT_NAMES[] = {
|
const char* KRPipeline::KRENGINE_PUSH_CONSTANT_NAMES[] = {
|
||||||
"material_ambient", // PushConstant::material_ambient
|
"material_ambient", // PushConstant::material_ambient
|
||||||
|
|||||||
@@ -214,11 +214,11 @@ class KRPipeline : public KRContextObject
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
KRPipeline(KRContext& context, KrDeviceHandle deviceHandle, KRRenderPass& renderPass, Vector2i viewport_size, Vector2i scissor_size, const PipelineInfo& info, const char* szKey, const std::vector<KRShader*>& 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<KRShader*>& shaders, uint32_t vertexAttributes, ModelFormat modelFormat);
|
||||||
virtual ~KRPipeline();
|
virtual ~KRPipeline();
|
||||||
const char* getKey() const;
|
const char* getKey() const;
|
||||||
|
|
||||||
bool bind(VkCommandBuffer& commandBuffer, KRCamera& camera, const KRViewport& viewport, const Matrix4& matModel, const std::vector<KRPointLight*>* point_lights, const std::vector<KRDirectionalLight*>* directional_lights, const std::vector<KRSpotLight*>* spot_lights, const KRNode::RenderPass& renderPass);
|
bool bind(VkCommandBuffer& commandBuffer, KRCamera& camera, const KRViewport& viewport, const hydra::Matrix4& matModel, const std::vector<KRPointLight*>* point_lights, const std::vector<KRDirectionalLight*>* directional_lights, const std::vector<KRSpotLight*>* spot_lights, const KRNode::RenderPass& renderPass);
|
||||||
|
|
||||||
enum class PushConstant : uint8_t
|
enum class PushConstant : uint8_t
|
||||||
{
|
{
|
||||||
@@ -297,11 +297,11 @@ public:
|
|||||||
bool hasPushConstant(PushConstant location) const;
|
bool hasPushConstant(PushConstant location) const;
|
||||||
void setPushConstant(PushConstant location, float value);
|
void setPushConstant(PushConstant location, float value);
|
||||||
void setPushConstant(PushConstant location, int value);
|
void setPushConstant(PushConstant location, int value);
|
||||||
void setPushConstant(PushConstant location, const Vector2& value);
|
void setPushConstant(PushConstant location, const hydra::Vector2& value);
|
||||||
void setPushConstant(PushConstant location, const Vector3& value);
|
void setPushConstant(PushConstant location, const hydra::Vector3& value);
|
||||||
void setPushConstant(PushConstant location, const Vector4& value);
|
void setPushConstant(PushConstant location, const hydra::Vector4& value);
|
||||||
void setPushConstant(PushConstant location, const Matrix4& value);
|
void setPushConstant(PushConstant location, const hydra::Matrix4& value);
|
||||||
void setPushConstant(PushConstant location, const Matrix4* value, const size_t count);
|
void setPushConstant(PushConstant location, const hydra::Matrix4* value, const size_t count);
|
||||||
|
|
||||||
void setImageBinding(const std::string& name, KRTexture* texture, KRSampler* sampler);
|
void setImageBinding(const std::string& name, KRTexture* texture, KRSampler* sampler);
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,8 @@
|
|||||||
#include "KRCamera.h"
|
#include "KRCamera.h"
|
||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
void KRPointLight::InitNodeInfo(KrNodeInfo* nodeInfo)
|
void KRPointLight::InitNodeInfo(KrNodeInfo* nodeInfo)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public:
|
|||||||
virtual ~KRPointLight();
|
virtual ~KRPointLight();
|
||||||
|
|
||||||
virtual std::string getElementName();
|
virtual std::string getElementName();
|
||||||
virtual AABB getBounds();
|
virtual hydra::AABB getBounds();
|
||||||
|
|
||||||
virtual void render(RenderInfo& ri);
|
virtual void render(RenderInfo& ri);
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,8 @@
|
|||||||
#include "KRSurface.h"
|
#include "KRSurface.h"
|
||||||
#include "KRSwapchain.h"
|
#include "KRSwapchain.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
KRRenderPass::KRRenderPass(KRContext& context)
|
KRRenderPass::KRRenderPass(KRContext& context)
|
||||||
: KRContextObject(context)
|
: KRContextObject(context)
|
||||||
, m_renderPass(VK_NULL_HANDLE)
|
, m_renderPass(VK_NULL_HANDLE)
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ public:
|
|||||||
void create(KRDevice& device, VkFormat swapChainImageFormat, VkFormat depthImageFormat, const RenderPassInfo& info);
|
void create(KRDevice& device, VkFormat swapChainImageFormat, VkFormat depthImageFormat, const RenderPassInfo& info);
|
||||||
void destroy(KRDevice& device);
|
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);
|
void end(VkCommandBuffer& commandBuffer);
|
||||||
|
|
||||||
// private:
|
// private:
|
||||||
|
|||||||
@@ -31,6 +31,8 @@
|
|||||||
|
|
||||||
#include "KRRenderSettings.h"
|
#include "KRRenderSettings.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
KRRenderSettings::KRRenderSettings()
|
KRRenderSettings::KRRenderSettings()
|
||||||
{
|
{
|
||||||
siren_enable = true;
|
siren_enable = true;
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ public:
|
|||||||
// Overload assignment operator
|
// Overload assignment operator
|
||||||
KRRenderSettings& operator=(const KRRenderSettings& s);
|
KRRenderSettings& operator=(const KRRenderSettings& s);
|
||||||
|
|
||||||
const Vector2& getViewportSize();
|
const hydra::Vector2& getViewportSize();
|
||||||
void setViewportSize(const Vector2& size);
|
void setViewportSize(const hydra::Vector2& size);
|
||||||
|
|
||||||
float getPerspectiveNearZ();
|
float getPerspectiveNearZ();
|
||||||
float getPerspectiveFarZ();
|
float getPerspectiveFarZ();
|
||||||
@@ -68,8 +68,8 @@ public:
|
|||||||
bool bEnableDiffuse;
|
bool bEnableDiffuse;
|
||||||
bool bEnableSpecular;
|
bool bEnableSpecular;
|
||||||
bool bEnableDeferredLighting;
|
bool bEnableDeferredLighting;
|
||||||
Vector3 light_intensity;
|
hydra::Vector3 light_intensity;
|
||||||
Vector3 ambient_intensity;
|
hydra::Vector3 ambient_intensity;
|
||||||
float perspective_fov;
|
float perspective_fov;
|
||||||
|
|
||||||
int dof_quality;
|
int dof_quality;
|
||||||
@@ -84,7 +84,7 @@ public:
|
|||||||
float vignette_radius;
|
float vignette_radius;
|
||||||
float vignette_falloff;
|
float vignette_falloff;
|
||||||
|
|
||||||
Vector2 m_viewportSize;
|
hydra::Vector2 m_viewportSize;
|
||||||
|
|
||||||
int m_cShadowBuffers;
|
int m_cShadowBuffers;
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ public:
|
|||||||
float fog_near;
|
float fog_near;
|
||||||
float fog_far;
|
float fog_far;
|
||||||
float fog_density;
|
float fog_density;
|
||||||
Vector3 fog_color;
|
hydra::Vector3 fog_color;
|
||||||
int fog_type; // 0 = no fog, 1 = linear, 2 = exponential, 3 = exponential squared
|
int fog_type; // 0 = no fog, 1 = linear, 2 = exponential, 3 = exponential squared
|
||||||
|
|
||||||
float dust_particle_intensity;
|
float dust_particle_intensity;
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
#include "mimir.h"
|
#include "mimir.h"
|
||||||
|
|
||||||
using namespace mimir;
|
using namespace mimir;
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
KRMesh* KRResource::LoadObj(KRContext& context, const std::string& path)
|
KRMesh* KRResource::LoadObj(KRContext& context, const std::string& path)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,6 +32,8 @@
|
|||||||
#include "KRReverbZone.h"
|
#include "KRReverbZone.h"
|
||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
void KRReverbZone::InitNodeInfo(KrNodeInfo* nodeInfo)
|
void KRReverbZone::InitNodeInfo(KrNodeInfo* nodeInfo)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -60,9 +60,9 @@ public:
|
|||||||
float getReverbGain();
|
float getReverbGain();
|
||||||
void setReverbGain(float reverb_gain);
|
void setReverbGain(float reverb_gain);
|
||||||
|
|
||||||
virtual AABB getBounds();
|
virtual hydra::AABB getBounds();
|
||||||
|
|
||||||
float getContainment(const Vector3& pos);
|
float getContainment(const hydra::Vector3& pos);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string m_zone;
|
std::string m_zone;
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
#include "KRAudioManager.h"
|
#include "KRAudioManager.h"
|
||||||
|
|
||||||
using namespace mimir;
|
using namespace mimir;
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
const long KRENGINE_OCCLUSION_TEST_EXPIRY = 10;
|
const long KRENGINE_OCCLUSION_TEST_EXPIRY = 10;
|
||||||
|
|
||||||
|
|||||||
@@ -66,13 +66,13 @@ public:
|
|||||||
|
|
||||||
kraken_stream_level getStreamLevel();
|
kraken_stream_level getStreamLevel();
|
||||||
|
|
||||||
bool lineCast(const Vector3& v0, const Vector3& v1, 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 Vector3& v0, const Vector3& dir, 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 Vector3& v0, const Vector3& v1, float radius, 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 renderFrame(VkCommandBuffer& commandBuffer, KRSurface& surface, float deltaTime);
|
||||||
void render(VkCommandBuffer& commandBuffer, KRSurface& surface, KRCamera* pCamera, unordered_map<AABB, int>& visibleBounds, const KRViewport& viewport, KRNode::RenderPass renderPass, bool new_frame);
|
void render(VkCommandBuffer& commandBuffer, KRSurface& surface, KRCamera* pCamera, unordered_map<hydra::AABB, int>& visibleBounds, const KRViewport& viewport, KRNode::RenderPass renderPass, bool new_frame);
|
||||||
void render(KRNode::RenderInfo& ri, KROctreeNode* pOctreeNode, unordered_map<AABB, int>& visibleBounds, std::vector<KROctreeNode*>& remainingOctrees, std::vector<KROctreeNode*>& remainingOctreesTestResults, std::vector<KROctreeNode*>& remainingOctreesTestResultsOnly, bool bOcclusionResultsPass, bool bOcclusionTestResultsOnly);
|
void render(KRNode::RenderInfo& ri, KROctreeNode* pOctreeNode, unordered_map<hydra::AABB, int>& visibleBounds, std::vector<KROctreeNode*>& remainingOctrees, std::vector<KROctreeNode*>& remainingOctreesTestResults, std::vector<KROctreeNode*>& remainingOctreesTestResultsOnly, bool bOcclusionResultsPass, bool bOcclusionTestResultsOnly);
|
||||||
|
|
||||||
void updateOctree(const KRViewport& viewport);
|
void updateOctree(const KRViewport& viewport);
|
||||||
void buildOctreeForTheFirstTime();
|
void buildOctreeForTheFirstTime();
|
||||||
@@ -84,7 +84,7 @@ public:
|
|||||||
void physicsUpdate(float deltaTime);
|
void physicsUpdate(float deltaTime);
|
||||||
void addDefaultLights();
|
void addDefaultLights();
|
||||||
|
|
||||||
AABB getRootOctreeBounds();
|
hydra::AABB getRootOctreeBounds();
|
||||||
|
|
||||||
std::set<KRAmbientZone*>& getAmbientZones();
|
std::set<KRAmbientZone*>& getAmbientZones();
|
||||||
std::set<KRReverbZone*>& getReverbZones();
|
std::set<KRReverbZone*>& getReverbZones();
|
||||||
|
|||||||
@@ -32,6 +32,8 @@
|
|||||||
#include "KREngine-common.h"
|
#include "KREngine-common.h"
|
||||||
#include "KRSpotLight.h"
|
#include "KRSpotLight.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
void KRSpotLight::InitNodeInfo(KrNodeInfo* nodeInfo)
|
void KRSpotLight::InitNodeInfo(KrNodeInfo* nodeInfo)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public:
|
|||||||
virtual std::string getElementName();
|
virtual std::string getElementName();
|
||||||
virtual tinyxml2::XMLElement* saveXML(tinyxml2::XMLNode* parent);
|
virtual tinyxml2::XMLElement* saveXML(tinyxml2::XMLNode* parent);
|
||||||
virtual void loadXML(tinyxml2::XMLElement* e);
|
virtual void loadXML(tinyxml2::XMLElement* e);
|
||||||
virtual AABB getBounds();
|
virtual hydra::AABB getBounds();
|
||||||
|
|
||||||
float getInnerAngle();
|
float getInnerAngle();
|
||||||
float getOuterAngle();
|
float getOuterAngle();
|
||||||
|
|||||||
@@ -43,6 +43,8 @@
|
|||||||
#include "KRSpotLight.h"
|
#include "KRSpotLight.h"
|
||||||
#include "KRPointLight.h"
|
#include "KRPointLight.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
void KRSprite::InitNodeInfo(KrNodeInfo* nodeInfo)
|
void KRSprite::InitNodeInfo(KrNodeInfo* nodeInfo)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public:
|
|||||||
|
|
||||||
virtual void render(RenderInfo& ri);
|
virtual void render(RenderInfo& ri);
|
||||||
|
|
||||||
virtual AABB getBounds();
|
virtual hydra::AABB getBounds();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,8 @@
|
|||||||
#include "KRSwapchain.h"
|
#include "KRSwapchain.h"
|
||||||
#include "KRRenderPass.h"
|
#include "KRRenderPass.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
KRSurface::KRSurface(KRContext& context, KrSurfaceHandle handle, HWND hWnd)
|
KRSurface::KRSurface(KRContext& context, KrSurfaceHandle handle, HWND hWnd)
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public:
|
|||||||
void destroy();
|
void destroy();
|
||||||
uint32_t getWidth() const;
|
uint32_t getWidth() const;
|
||||||
uint32_t getHeight() const;
|
uint32_t getHeight() const;
|
||||||
Vector2i getDimensions() const;
|
hydra::Vector2i getDimensions() const;
|
||||||
VkFormat getDepthFormat() const;
|
VkFormat getDepthFormat() const;
|
||||||
|
|
||||||
KRSurface(const KRSurface&) = delete;
|
KRSurface(const KRSurface&) = delete;
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ VkImage KRTexture::getImage(KrDeviceHandle device)
|
|||||||
return VK_NULL_HANDLE;
|
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
|
#if KRENGINE_DEBUG_GPU_LABELS
|
||||||
, const char* debug_label
|
, const char* debug_label
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ protected:
|
|||||||
float m_last_frame_max_lod_coverage;
|
float m_last_frame_max_lod_coverage;
|
||||||
texture_usage_t m_last_frame_usage;
|
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
|
#if KRENGINE_DEBUG_GPU_LABELS
|
||||||
, const char* debug_label
|
, const char* debug_label
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public:
|
|||||||
virtual bool save(mimir::Block& data);
|
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 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:
|
protected:
|
||||||
mimir::Block* m_pData;
|
mimir::Block* m_pData;
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
|
|
||||||
using namespace mimir;
|
using namespace mimir;
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
KRTextureCube::KRTextureCube(KRContext& context, std::string name) : KRTexture(context, name)
|
KRTextureCube::KRTextureCube(KRContext& context, std::string name) : KRTexture(context, name)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -34,6 +34,8 @@
|
|||||||
|
|
||||||
#include "KREngine-common.h"
|
#include "KREngine-common.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
__uint8_t _KTXFileIdentifier[12] = {
|
__uint8_t _KTXFileIdentifier[12] = {
|
||||||
0xAB, 0x4B, 0x54, 0x58, 0x20, 0x31, 0x31, 0xBB, 0x0D, 0x0A, 0x1A, 0x0A
|
0xAB, 0x4B, 0x54, 0x58, 0x20, 0x31, 0x31, 0xBB, 0x0D, 0x0A, 0x1A, 0x0A
|
||||||
};
|
};
|
||||||
@@ -127,7 +129,7 @@ KRTextureKTX::~KRTextureKTX()
|
|||||||
|
|
||||||
Vector2i KRTextureKTX::getDimensions() const
|
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
|
int KRTextureKTX::getFaceCount() const
|
||||||
|
|||||||
@@ -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;
|
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 long getMemRequiredForSize(int max_dim);
|
||||||
virtual Vector2i getDimensions() const override;
|
virtual hydra::Vector2i getDimensions() const override;
|
||||||
virtual int getFaceCount() const override;
|
virtual int getFaceCount() const override;
|
||||||
virtual VkFormat getFormat() const override;
|
virtual VkFormat getFormat() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
#include "KREngine-common.h"
|
#include "KREngine-common.h"
|
||||||
|
|
||||||
using namespace mimir;
|
using namespace mimir;
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
__uint8_t _KTX2FileIdentifier[12] = {
|
__uint8_t _KTX2FileIdentifier[12] = {
|
||||||
0xAB, 0x4B, 0x54, 0x58, 0x20, 0x32, 0x30, 0xBB, 0x0D, 0x0A, 0x1A, 0x0A
|
0xAB, 0x4B, 0x54, 0x58, 0x20, 0x32, 0x30, 0xBB, 0x0D, 0x0A, 0x1A, 0x0A
|
||||||
|
|||||||
@@ -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;
|
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 long getMemRequiredForSize(int max_dim);
|
||||||
virtual Vector2i getDimensions() const override;
|
virtual hydra::Vector2i getDimensions() const override;
|
||||||
virtual int getFaceCount() const override;
|
virtual int getFaceCount() const override;
|
||||||
virtual VkFormat getFormat() const override;
|
virtual VkFormat getFormat() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
#include "KREngine-common.h"
|
#include "KREngine-common.h"
|
||||||
|
|
||||||
using namespace mimir;
|
using namespace mimir;
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
|
|
||||||
#define PVR_TEXTURE_FLAG_TYPE_MASK 0xff
|
#define PVR_TEXTURE_FLAG_TYPE_MASK 0xff
|
||||||
|
|||||||
@@ -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;
|
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 long getMemRequiredForSize(int max_dim);
|
||||||
virtual Vector2i getDimensions() const override;
|
virtual hydra::Vector2i getDimensions() const override;
|
||||||
virtual VkFormat getFormat() const override;
|
virtual VkFormat getFormat() const override;
|
||||||
virtual int getFaceCount() const override;
|
virtual int getFaceCount() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,8 @@
|
|||||||
#include "KRContext.h"
|
#include "KRContext.h"
|
||||||
#include "KRTextureKTX2.h"
|
#include "KRTextureKTX2.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual long getMemRequiredForSize(int max_dim);
|
virtual long getMemRequiredForSize(int max_dim);
|
||||||
virtual Vector2i getDimensions() const override;
|
virtual hydra::Vector2i getDimensions() const override;
|
||||||
virtual VkFormat getFormat() const override;
|
virtual VkFormat getFormat() const override;
|
||||||
virtual int getFaceCount() const override;
|
virtual int getFaceCount() const override;
|
||||||
private:
|
private:
|
||||||
long m_imageSize;
|
long m_imageSize;
|
||||||
Vector2i m_dimensions;
|
hydra::Vector2i m_dimensions;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -34,6 +34,8 @@
|
|||||||
|
|
||||||
#include "KRViewport.h"
|
#include "KRViewport.h"
|
||||||
|
|
||||||
|
using namespace hydra;
|
||||||
|
|
||||||
KRViewport::KRViewport()
|
KRViewport::KRViewport()
|
||||||
{
|
{
|
||||||
m_size = Vector2::One();
|
m_size = Vector2::One();
|
||||||
|
|||||||
@@ -41,54 +41,54 @@ class KRViewport
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
KRViewport();
|
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();
|
~KRViewport();
|
||||||
|
|
||||||
const Vector2& getSize() const;
|
const hydra::Vector2& getSize() const;
|
||||||
const Matrix4& getViewMatrix() const;
|
const hydra::Matrix4& getViewMatrix() const;
|
||||||
const Matrix4& getProjectionMatrix() const;
|
const hydra::Matrix4& getProjectionMatrix() const;
|
||||||
const Matrix4& getViewProjectionMatrix() const;
|
const hydra::Matrix4& getViewProjectionMatrix() const;
|
||||||
const Matrix4& getInverseViewMatrix() const;
|
const hydra::Matrix4& getInverseViewMatrix() const;
|
||||||
const Matrix4& getInverseProjectionMatrix() const;
|
const hydra::Matrix4& getInverseProjectionMatrix() const;
|
||||||
const Vector3& getCameraDirection() const;
|
const hydra::Vector3& getCameraDirection() const;
|
||||||
const Vector3& getCameraPosition() const;
|
const hydra::Vector3& getCameraPosition() const;
|
||||||
const int* getFrontToBackOrder() const;
|
const int* getFrontToBackOrder() const;
|
||||||
const int* getBackToFrontOrder() const;
|
const int* getBackToFrontOrder() const;
|
||||||
void setSize(const Vector2& size);
|
void setSize(const hydra::Vector2& size);
|
||||||
void setViewMatrix(const Matrix4& matView);
|
void setViewMatrix(const hydra::Matrix4& matView);
|
||||||
void setProjectionMatrix(const Matrix4& matProjection);
|
void setProjectionMatrix(const hydra::Matrix4& matProjection);
|
||||||
float getLODBias() const;
|
float getLODBias() const;
|
||||||
void setLODBias(float lod_bias);
|
void setLODBias(float lod_bias);
|
||||||
|
|
||||||
// Overload assignment operator
|
// Overload assignment operator
|
||||||
KRViewport& operator=(const KRViewport& v);
|
KRViewport& operator=(const KRViewport& v);
|
||||||
|
|
||||||
unordered_map<AABB, int>& getVisibleBounds();
|
unordered_map<hydra::AABB, int>& getVisibleBounds();
|
||||||
|
|
||||||
const std::set<KRLight*>& getVisibleLights();
|
const std::set<KRLight*>& getVisibleLights();
|
||||||
void setVisibleLights(const std::set<KRLight*> visibleLights);
|
void setVisibleLights(const std::set<KRLight*> visibleLights);
|
||||||
|
|
||||||
bool visible(const AABB& b) const;
|
bool visible(const hydra::AABB& b) const;
|
||||||
float coverage(const AABB& b) const;
|
float coverage(const hydra::AABB& b) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Vector2 m_size;
|
hydra::Vector2 m_size;
|
||||||
Matrix4 m_matView;
|
hydra::Matrix4 m_matView;
|
||||||
Matrix4 m_matProjection;
|
hydra::Matrix4 m_matProjection;
|
||||||
|
|
||||||
float m_lodBias;
|
float m_lodBias;
|
||||||
|
|
||||||
// Derived values
|
// Derived values
|
||||||
Matrix4 m_matViewProjection;
|
hydra::Matrix4 m_matViewProjection;
|
||||||
Matrix4 m_matInverseView;
|
hydra::Matrix4 m_matInverseView;
|
||||||
Matrix4 m_matInverseProjection;
|
hydra::Matrix4 m_matInverseProjection;
|
||||||
Vector3 m_cameraDirection;
|
hydra::Vector3 m_cameraDirection;
|
||||||
Vector3 m_cameraPosition;
|
hydra::Vector3 m_cameraPosition;
|
||||||
|
|
||||||
int m_frontToBackOrder[8];
|
int m_frontToBackOrder[8];
|
||||||
int m_backToFrontOrder[8];
|
int m_backToFrontOrder[8];
|
||||||
|
|
||||||
void calculateDerivedValues();
|
void calculateDerivedValues();
|
||||||
|
|
||||||
unordered_map<AABB, int> m_visibleBounds; // AABB's that output fragments in the last frame
|
unordered_map<hydra::AABB, int> m_visibleBounds; // AABB's that output fragments in the last frame
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -222,15 +222,15 @@ typedef struct
|
|||||||
{
|
{
|
||||||
KrStructureType sType;
|
KrStructureType sType;
|
||||||
const char* pName;
|
const char* pName;
|
||||||
kraken::Vector3 translate;
|
hydra::Vector3 translate;
|
||||||
kraken::Vector3 scale;
|
hydra::Vector3 scale;
|
||||||
kraken::Vector3 rotate;
|
hydra::Vector3 rotate;
|
||||||
kraken::Vector3 pre_rotate;
|
hydra::Vector3 pre_rotate;
|
||||||
kraken::Vector3 post_rotate;
|
hydra::Vector3 post_rotate;
|
||||||
kraken::Vector3 rotate_offset;
|
hydra::Vector3 rotate_offset;
|
||||||
kraken::Vector3 scale_offset;
|
hydra::Vector3 scale_offset;
|
||||||
kraken::Vector3 rotate_pivot;
|
hydra::Vector3 rotate_pivot;
|
||||||
kraken::Vector3 scale_pivot;
|
hydra::Vector3 scale_pivot;
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
@@ -254,13 +254,13 @@ typedef struct
|
|||||||
// KR_STRUCTURE_TYPE_NODE_LOD_GROUP
|
// KR_STRUCTURE_TYPE_NODE_LOD_GROUP
|
||||||
float min_distance;
|
float min_distance;
|
||||||
float max_distance;
|
float max_distance;
|
||||||
kraken::Vector3 reference_min;
|
hydra::Vector3 reference_min;
|
||||||
kraken::Vector3 reference_max;
|
hydra::Vector3 reference_max;
|
||||||
bool use_world_units;
|
bool use_world_units;
|
||||||
} lod_group;
|
} lod_group;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
kraken::Vector3 color;
|
hydra::Vector3 color;
|
||||||
float intensity;
|
float intensity;
|
||||||
float decay_start;
|
float decay_start;
|
||||||
float flare_size;
|
float flare_size;
|
||||||
@@ -301,7 +301,7 @@ typedef struct
|
|||||||
bool receives_shadow;
|
bool receives_shadow;
|
||||||
bool faces_camera;
|
bool faces_camera;
|
||||||
float rim_power;
|
float rim_power;
|
||||||
kraken::Vector3 rim_color;
|
hydra::Vector3 rim_color;
|
||||||
KrResourceMapIndex mesh;
|
KrResourceMapIndex mesh;
|
||||||
KrResourceMapIndex light_map_texture;
|
KrResourceMapIndex light_map_texture;
|
||||||
} model;
|
} model;
|
||||||
@@ -412,9 +412,9 @@ typedef struct
|
|||||||
KrStructureType sType;
|
KrStructureType sType;
|
||||||
KrResourceMapIndex sceneHandle;
|
KrResourceMapIndex sceneHandle;
|
||||||
KrSceneNodeMapIndex nodeHandle;
|
KrSceneNodeMapIndex nodeHandle;
|
||||||
kraken::Vector3 translate;
|
hydra::Vector3 translate;
|
||||||
kraken::Vector3 scale;
|
hydra::Vector3 scale;
|
||||||
kraken::Vector3 rotate;
|
hydra::Vector3 rotate;
|
||||||
} KrSetNodeLocalTransformInfo;
|
} KrSetNodeLocalTransformInfo;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
@@ -422,9 +422,9 @@ typedef struct
|
|||||||
KrStructureType sType;
|
KrStructureType sType;
|
||||||
KrResourceMapIndex sceneHandle;
|
KrResourceMapIndex sceneHandle;
|
||||||
KrSceneNodeMapIndex nodeHandle;
|
KrSceneNodeMapIndex nodeHandle;
|
||||||
kraken::Vector3 translate;
|
hydra::Vector3 translate;
|
||||||
kraken::Vector3 scale;
|
hydra::Vector3 scale;
|
||||||
kraken::Vector3 rotate;
|
hydra::Vector3 rotate;
|
||||||
} KrSetNodeWorldTransformInfo;
|
} KrSetNodeWorldTransformInfo;
|
||||||
|
|
||||||
KrResult KrInitialize(const KrInitializeInfo* pInitializeInfo);
|
KrResult KrInitialize(const KrInitializeInfo* pInitializeInfo);
|
||||||
|
|||||||
Reference in New Issue
Block a user