Compare commits

..

No commits in common. "ed7c7902ec398e5d6a73aa441625bed652c102ef" and "382730960f7cdf46e73a024bdb11c79f9d44b197" have entirely different histories.

7 changed files with 17 additions and 10478 deletions

View File

@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.20)
cmake_minimum_required (VERSION 3.3)
# Defines the project's name
project(ozz)

View File

@ -49,7 +49,7 @@ class StdAllocator {
StdAllocator(const StdAllocator&) noexcept {}
template <class _Other>
StdAllocator(const StdAllocator<_Other>&) noexcept {}
StdAllocator<value_type>(const StdAllocator<_Other>&) noexcept {}
template <class _Other>
struct rebind {

View File

@ -14,11 +14,7 @@ void SpeedScaleNode::DrawDebugUi() {
// ensure m_time_scale is positive
m_time_scale = m_time_scale * (is_negative ? -1.f : 1.f);
if (ImGui::SliderFloat("Time Scale", &m_time_scale, 0.01f, 2.f)) {
if (fabs(m_time_scale - 1.0) < 0.2) {
m_time_scale = 1.0;
}
}
ImGui::SliderFloat("Time Scale", &m_time_scale, 0.01f, 5.f);
// and back to the original negative or positive sign
m_time_scale = m_time_scale * (is_negative ? -1.f : 1.f);
}

View File

@ -35,14 +35,14 @@ AnimationController::AnimationController(SkinnedMesh* skinned_mesh)
sampler_node1->SetAnimation(skinned_mesh->m_animations[2], skinned_mesh->m_animation_sync_track[2]);
m_anim_nodes.push_back(sampler_node1);
SpeedScaleNode* speed_node = new SpeedScaleNode(this);
speed_node->m_name = "SpeedNode0";
speed_node->m_input_node = sampler_node0;
m_anim_nodes.push_back(speed_node);
// SpeedScaleNode* speed_node = new SpeedScaleNode(this);
// speed_node->m_name = "SpeedNode0";
// speed_node->m_input_node = sampler_node0;
// m_anim_nodes.push_back(speed_node);
BlendNode* blend_node = new BlendNode(this);
blend_node->m_name = "Blend0";
blend_node->m_input_A = speed_node;
blend_node->m_input_A = sampler_node0;
blend_node->m_input_B = sampler_node1;
blend_node->m_sync_inputs = true;
m_anim_nodes.push_back(blend_node);

View File

@ -42,8 +42,8 @@ inline void Camera_Init(Camera* camera) {
camera->pitch = 10 * M_PI / 180.0f;
memcpy(&camera->mtxView, &mtx_identity, sizeof(camera->mtxView));
Camera_CalcToMatrix(camera, &camera->mtxView[0]);
Camera_CalcFromMatrix(camera, &camera->mtxView[0]);
Camera_CalcToMatrix(camera, &camera->mtxView);
Camera_CalcFromMatrix(camera, &camera->mtxView);
}
void Camera_CalcFromMatrix(Camera* camera, float* mat) {
@ -153,6 +153,6 @@ inline void Camera_Update(
camera->vel[i] = camera->vel[i] * 0.1;
}
Camera_CalcToMatrix(camera, &camera->mtxView[0]);
Camera_CalcToMatrix(camera, &camera->mtxView);
}
}

File diff suppressed because it is too large Load Diff

View File

@ -17,10 +17,9 @@
#include "Camera.h"
#include "SkinnedMesh.h"
#include "GLFW/glfw3.h"
#include "embedded_fonts.h"
const int Width = 2420;
const int Height = 1480;
const int Width = 1024;
const int Height = 768;
const int MaxVertices = (1 << 16);
const int MaxIndices = MaxVertices * 3;
@ -234,6 +233,7 @@ int main() {
AnimationController animation_controller (&skinned_mesh);
// state.ozz = std::make_unique<ozz_t>();
state.time.factor = 1.0f;
Camera_Init(&state.camera);
@ -242,24 +242,8 @@ int main() {
ImGui::CreateContext();
ImGui::StyleColorsDark();
ImGuiIO& io = ImGui::GetIO();
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;
io.IniFilename = "ATPImgui.ini";
ImGui::GetStyle().ScaleAllSizes(2.0);
//io.Fonts->AddFontDefault();
ImFontConfig font_config;
font_config.OversampleH = 4;
font_config.OversampleV = 4;
font_config.GlyphExtraSpacing.x = 1.0f;
io.Fonts->AddFontFromMemoryCompressedTTF(
// roboto_medium_ttf_compressed_data,
// roboto_medium_ttf_compressed_size,
droid_sans_ttf_compressed_data,
droid_sans_ttf_compressed_size,
28,
&font_config);
io.IniFilename = nullptr;
io.Fonts->AddFontDefault();
io.KeyMap[ImGuiKey_Tab] = GLFW_KEY_TAB;
io.KeyMap[ImGuiKey_LeftArrow] = GLFW_KEY_LEFT;
io.KeyMap[ImGuiKey_RightArrow] = GLFW_KEY_RIGHT;