File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ namespace vsg
3333
3434 // / origin value provides a means of translating the view matrix relative to the origin of any CoordinateFrame subgraphs
3535 // / to maximize the precision when moving around the CoordinateFrame subgraph. This is helpful for astronmically large
36- // / scenes where standrd double precision is insufficient for avoiding visually significant numerical errors.
36+ // / scenes where standard double precision is insufficient for avoiding visually significant numerical errors.
3737 dvec3 origin;
3838
3939 virtual dmat4 transform (const dvec3& offset = {}) const = 0;
Original file line number Diff line number Diff line change @@ -20,14 +20,18 @@ void ViewMatrix::read(Input& input)
2020{
2121 Object::read (input);
2222
23- input.read (" origin" , origin);
23+ if (input.version_greater_equal (1 , 1 , 8 ))
24+ input.read (" origin" , origin);
25+ else
26+ origin = {};
2427}
2528
2629void ViewMatrix::write (Output& output) const
2730{
2831 Object::write (output);
2932
30- output.write (" origin" , origin);
33+ if (output.version_greater_equal (1 , 1 , 8 ))
34+ output.write (" origin" , origin);
3135}
3236
3337void LookAt::read (Input& input)
You can’t perform that action at this time.
0 commit comments