Skip to content

Commit

Permalink
Merge branch 'master' into MultiLayerTileDatabase
Browse files Browse the repository at this point in the history
  • Loading branch information
robertosfield committed Jan 9, 2025
2 parents 896c634 + 8983791 commit 0510346
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/vsg/app/ViewMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace vsg

/// origin value provides a means of translating the view matrix relative to the origin of any CoordinateFrame subgraphs
/// to maximize the precision when moving around the CoordinateFrame subgraph. This is helpful for astronmically large
/// scenes where standrd double precision is insufficient for avoiding visually significant numerical errors.
/// scenes where standard double precision is insufficient for avoiding visually significant numerical errors.
dvec3 origin;

virtual dmat4 transform(const dvec3& offset = {}) const = 0;
Expand Down
8 changes: 6 additions & 2 deletions src/vsg/app/ViewMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@ void ViewMatrix::read(Input& input)
{
Object::read(input);

input.read("origin", origin);
if (input.version_greater_equal(1, 1, 8))
input.read("origin", origin);
else
origin = {};
}

void ViewMatrix::write(Output& output) const
{
Object::write(output);

output.write("origin", origin);
if (output.version_greater_equal(1, 1, 8))
output.write("origin", origin);
}

void LookAt::read(Input& input)
Expand Down

0 comments on commit 0510346

Please sign in to comment.