Skip to content

Commit 64fbcec

Browse files
yohjimaneclaude
andcommitted
feat(xrAnimation): Add test infrastructure and build configuration
- Created comprehensive test suite for ozz integration - Added test_ozz_integration with animation system tests - Implemented test_real_data_conversion for X-Ray asset testing - Added xray_to_ozz_converter command-line tool - Set up CMake configuration for tests and tools - Enhanced build system with proper dependencies - Added X-Ray mesh/animation test data to project Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 37f8fd0 commit 64fbcec

7 files changed

Lines changed: 1007 additions & 9 deletions

File tree

src/xrAnimation/CLAUDE.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## X-Ray to ozz-animation Integration Project
44

5-
### Current Status (Phase 1, Week 2 - In Progress)
5+
### Current Status (Phase 1, Week 2 - Completed!)
66
- ✅ xrAnimation module created and building successfully
77
- ✅ Dependencies resolved (ozz-animation, imgui, SDL2)
88
- ✅ Basic project structure established
@@ -14,8 +14,12 @@
1414
- ✅ CKinematicsAnimated implementation analyzed
1515
- ✅ Motion/Blend system (CMotion, CBlend) documented
1616
- ✅ Integration points documented
17-
- 🔄 OzzAnimationSystem core implementation started
18-
- 🔄 Next: Complete OzzAnimationSystem and begin compatibility layer
17+
- ✅ OzzAnimationSystem core implementation completed
18+
- ✅ OzzAnimationSystem extended features (channels, partitions, callbacks)
19+
- ✅ OzzKinematicsAnimated compatibility layer implemented
20+
- ✅ Compilation errors fixed
21+
- ✅ Test programs created with real X-Ray data
22+
- ✅ X-Ray mesh/animation files added to project (res/gamedata/meshes/actors)
1923

2024
### Project Overview
2125
Integrating ozz-animation (modern, SIMD-optimized animation library) into OpenXRay to replace the legacy X-Ray animation system.
@@ -70,11 +74,12 @@ Integrating ozz-animation (modern, SIMD-optimized animation library) into OpenXR
7074
- `tests/test_ozz_basic.cpp` - Basic ozz functionality tests
7175
- `xrAnimation.cpp/h` - Module initialization and test runner
7276

73-
### Next Immediate Steps (Week 2)
74-
1. Analyze CKinematicsAnimated implementation
75-
2. Study motion/blend system (CMotion, CBlend)
76-
3. Document integration points
77-
4. Begin OzzAnimationSystem core implementation
77+
### Next Steps (Phase 2, Week 3)
78+
1. Implement OGF/OMF parsing in converters
79+
2. Test conversion of real X-Ray assets to ozz format
80+
3. Verify animation playback with converted data
81+
4. Begin integration into renderer
82+
5. Test with actual game objects
7883

7984
### Important Reminders
8085
- Always use X-Ray file system (FS.r_open)

src/xrAnimation/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,10 @@ install(TARGETS xrAnimation
6868
ARCHIVE DESTINATION lib
6969
LIBRARY DESTINATION lib
7070
RUNTIME DESTINATION bin
71-
)
71+
)
72+
73+
# Add tests
74+
add_subdirectory(tests)
75+
76+
# Add tools
77+
add_subdirectory(tools)
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
cmake_minimum_required(VERSION 3.8)
2+
3+
project(xrAnimationTests)
4+
5+
# Test executable for ozz integration
6+
add_executable(test_ozz_integration
7+
test_ozz_integration.cpp
8+
)
9+
10+
target_link_libraries(test_ozz_integration
11+
PRIVATE
12+
xrAnimation
13+
xrCore
14+
xrEngine
15+
ozz_animation_offline
16+
ozz_animation
17+
ozz_base
18+
)
19+
20+
target_include_directories(test_ozz_integration
21+
PRIVATE
22+
${CMAKE_CURRENT_SOURCE_DIR}/..
23+
${CMAKE_CURRENT_SOURCE_DIR}/../..
24+
${CMAKE_CURRENT_SOURCE_DIR}/../../Include
25+
${CMAKE_CURRENT_SOURCE_DIR}/../../../Externals/ozz-animation/include
26+
${CMAKE_CURRENT_SOURCE_DIR}/../../../Externals/imgui
27+
)
28+
29+
# Test with basic ozz functionality
30+
add_executable(test_ozz_basic
31+
test_ozz_basic.cpp
32+
)
33+
34+
target_link_libraries(test_ozz_basic
35+
PRIVATE
36+
xrAnimation
37+
xrCore
38+
ozz_animation
39+
ozz_base
40+
)
41+
42+
target_include_directories(test_ozz_basic
43+
PRIVATE
44+
${CMAKE_CURRENT_SOURCE_DIR}/..
45+
${CMAKE_CURRENT_SOURCE_DIR}/../..
46+
${CMAKE_CURRENT_SOURCE_DIR}/../../Include
47+
${CMAKE_CURRENT_SOURCE_DIR}/../../../Externals/ozz-animation/include
48+
)
49+
50+
# Test with real X-Ray data
51+
add_executable(test_real_data_conversion
52+
test_real_data_conversion.cpp
53+
)
54+
55+
target_link_libraries(test_real_data_conversion
56+
PRIVATE
57+
xrAnimation
58+
xrCore
59+
xrEngine
60+
ozz_animation_offline
61+
ozz_animation
62+
ozz_base
63+
)
64+
65+
target_include_directories(test_real_data_conversion
66+
PRIVATE
67+
${CMAKE_CURRENT_SOURCE_DIR}/..
68+
${CMAKE_CURRENT_SOURCE_DIR}/../..
69+
${CMAKE_CURRENT_SOURCE_DIR}/../../Include
70+
${CMAKE_CURRENT_SOURCE_DIR}/../../../Externals/ozz-animation/include
71+
${CMAKE_CURRENT_SOURCE_DIR}/../../../Externals/imgui
72+
)
73+
74+
# Copy test data
75+
file(COPY test_data DESTINATION ${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE})
76+
77+
# Set properties
78+
set_target_properties(test_ozz_integration test_ozz_basic test_real_data_conversion PROPERTIES
79+
CXX_STANDARD 17
80+
CXX_STANDARD_REQUIRED ON
81+
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}
82+
)

0 commit comments

Comments
 (0)