Skip to content

Commit 3f51541

Browse files
Andy FerrisChris Foster
authored andcommitted
Corrected docs for composed camera transformation
1 parent ce24526 commit 3f51541

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,6 @@ space to 2D `screen_points` giving their projected locations on a virtual camera
187187
image, you might use the following code:
188188

189189
```julia
190-
cam_transform = PerspectiveMap() AffineMap(cam_rotation, -cam_position)
190+
cam_transform = PerspectiveMap() inv(AffineMap(cam_rotation, cam_position))
191191
screen_points = map(cam_transform, points)
192192
```

src/perspective.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This transformation is designed to be used in composition with other coordinate
1010
transformations, defining e.g. the position and orientation of the camera. For
1111
example:
1212
13-
cam_transform = PerspectiveMap() ∘ AffineMap(cam_rotation, -cam_position)
13+
cam_transform = PerspectiveMap() ∘ inv(AffineMap(cam_rotation, cam_position))
1414
screen_points = map(cam_transform, points)
1515
"""
1616
immutable PerspectiveMap <: Transformation

0 commit comments

Comments
 (0)