Skip to content

Commit 0510346

Browse files
committed
Merge branch 'master' into MultiLayerTileDatabase
2 parents 896c634 + 8983791 commit 0510346

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

include/vsg/app/ViewMatrix.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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;

src/vsg/app/ViewMatrix.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff 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

2629
void 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

3337
void LookAt::read(Input& input)

0 commit comments

Comments
 (0)