mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 00:09:18 +02:00
Floating point export fix for models
This commit is contained in:
@@ -656,9 +656,9 @@ TAnimModel::export_as_text_( std::ostream &Output ) const {
|
|||||||
// header
|
// header
|
||||||
Output << "model ";
|
Output << "model ";
|
||||||
// location and rotation
|
// location and rotation
|
||||||
Output
|
Output << std::fixed << std::setprecision(3) // ustawienie dokładnie 3 cyfr po przecinku
|
||||||
<< location().x << ' '
|
<< location().x << ' '
|
||||||
<< location().y << ' '
|
<< location().y << ' '
|
||||||
<< location().z << ' ';
|
<< location().z << ' ';
|
||||||
Output
|
Output
|
||||||
<< "0 " ;
|
<< "0 " ;
|
||||||
|
|||||||
@@ -47,8 +47,7 @@ operator!=( lighting_data const &Left, lighting_data const &Right ) {
|
|||||||
namespace scene {
|
namespace scene {
|
||||||
|
|
||||||
struct bounding_area {
|
struct bounding_area {
|
||||||
|
glm::highp_dvec3 center; // mid point of the rectangle
|
||||||
glm::dvec3 center; // mid point of the rectangle
|
|
||||||
float radius { -1.0f }; // radius of the bounding sphere
|
float radius { -1.0f }; // radius of the bounding sphere
|
||||||
|
|
||||||
bounding_area() = default;
|
bounding_area() = default;
|
||||||
@@ -94,7 +93,7 @@ public:
|
|||||||
material_handle material { null_handle };
|
material_handle material { null_handle };
|
||||||
lighting_data lighting;
|
lighting_data lighting;
|
||||||
// geometry data
|
// 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
|
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
|
std::vector<world_vertex> vertices; // world space source data of the geometry
|
||||||
gfx::userdata_array userdata;
|
gfx::userdata_array userdata;
|
||||||
|
|||||||
Reference in New Issue
Block a user