Add orthographic camera
This commit is contained in:
parent
98320a6901
commit
49284dfcf8
14
src/xyz/marsavic/gfxlab/graphics3d/cameras/Orthographic.java
Normal file
14
src/xyz/marsavic/gfxlab/graphics3d/cameras/Orthographic.java
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
package xyz.marsavic.gfxlab.graphics3d.cameras;
|
||||||
|
|
||||||
|
import xyz.marsavic.geometry.Vector;
|
||||||
|
import xyz.marsavic.gfxlab.Vec3;
|
||||||
|
import xyz.marsavic.gfxlab.graphics3d.Camera;
|
||||||
|
import xyz.marsavic.gfxlab.graphics3d.Ray;
|
||||||
|
|
||||||
|
public class Orthographic implements Camera {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Ray exitingRay(Vector p) {
|
||||||
|
return Ray.pd(Vec3.zp(0, p), Vec3.xyz(0, 0, 1));
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue