NewPerspective creates and returns a new perspective camera with the specified parameters.
(aspect, near, far, fov float32, axis Axis)
| 59 | |
| 60 | // NewPerspective creates and returns a new perspective camera with the specified parameters. |
| 61 | func NewPerspective(aspect, near, far, fov float32, axis Axis) *Camera { |
| 62 | |
| 63 | c := new(Camera) |
| 64 | c.Node.Init(c) |
| 65 | c.aspect = aspect |
| 66 | c.near = near |
| 67 | c.far = far |
| 68 | c.axis = axis |
| 69 | c.proj = Perspective |
| 70 | c.fov = fov |
| 71 | c.size = 8 |
| 72 | c.projChanged = true |
| 73 | return c |
| 74 | } |
| 75 | |
| 76 | // NewOrthographic creates and returns a new orthographic camera with the specified parameters. |
| 77 | func NewOrthographic(aspect, near, far, size float32, axis Axis) *Camera { |
no test coverage detected