Floating point export fix for models

This commit is contained in:
2025-01-28 00:43:57 +01:00
parent 6a16ccf335
commit 63c8a79023
2 changed files with 5 additions and 6 deletions

View File

@@ -656,8 +656,8 @@ TAnimModel::export_as_text_( std::ostream &Output ) const {
// header
Output << "model ";
// location and rotation
Output
<< location().x << ' '
Output << std::fixed << std::setprecision(3) // ustawienie dokładnie 3 cyfr po przecinku
<< location().x << ' '
<< location().y << ' '
<< location().z << ' ';
Output

View File

@@ -47,8 +47,7 @@ operator!=( lighting_data const &Left, lighting_data const &Right ) {
namespace scene {
struct bounding_area {
glm::dvec3 center; // mid point of the rectangle
glm::highp_dvec3 center; // mid point of the rectangle
float radius { -1.0f }; // radius of the bounding sphere
bounding_area() = default;
@@ -94,7 +93,7 @@ public:
material_handle material { null_handle };
lighting_data lighting;
// geometry data
glm::dvec3 origin; // world position of the relative coordinate system origin
glm::highp_dvec3 origin; // world position of the relative coordinate system origin
gfx::geometry_handle geometry { 0, 0 }; // relative origin-centered chunk of geometry held by gfx renderer
std::vector<world_vertex> vertices; // world space source data of the geometry
gfx::userdata_array userdata;