17 Commits

Author SHA1 Message Date
gentlegiantJGC
1fd6cbba9f
Fixed errors due to the camera being too far from the origin (#632)
* Fixed errors due to the camera being too far from the origin

When the camera was too far from the origin there were a number of overflow errors.
This clamps the camera to +/- 1B
Fixes #557

* Reformatted
2022-04-21 00:45:20 -04:00
gentlegiantJGC
3a0c71f458 Reformatted using Black release 2022-02-13 12:05:51 +00:00
gentlegiantJGC
3c3c6b1120 Reformatted 2021-04-18 14:12:05 +01:00
gentlegiantJGC
5354772456 Made inputs more lenient and cast to correct type
Made the checks of the input less strict
Cast to the required type before setting the internal value
2021-04-18 14:11:19 +01:00
Podshot
de3f6d1db3 Enforce data type and length for set_location() 2021-04-16 10:22:54 -04:00
Podshot
551214df23 Use isinstance() for type checking instead of type() 2021-04-15 13:38:25 -04:00
gentlegiantJGC
6affeae699 Made camera matrix immutable
There could be issues if code modifies the live matrix
2021-04-13 11:58:00 +01:00
gentlegiantJGC
297f8de22e Moved the camera coordinate locking into the camera class 2021-04-08 17:05:39 +01:00
gentlegiantJGC
4d7056492c Optimised the camera to only notify movement if state has changed 2021-03-28 16:28:41 +01:00
gentlegiantJGC
83f77b4416 Added properties to the camera for clipping distance 2021-03-28 16:27:57 +01:00
gentlegiantJGC
127b5ab3c1 Fixed the renderer appearing upside down
There was a case where the fov could be set to greater than 180 which would flip the renderer upside down.
This should fix that.
This was caused by the fov in perspective and orthographic mode sharing the same attribute. This adds in attributes for each of them.
2021-03-14 12:35:56 +00:00
gentlegiantJGC
bc59da41e3 Cleaned up docstrings 2021-02-09 10:54:16 +00:00
gentlegiantJGC
03f877bda3 Added a rotating property to the camera
This will track if the camera is in the mouse locked/rotating state
2021-02-09 10:26:02 +00:00
gentlegiantJGC
5900c98c22 Added __slots__ to the camera 2021-01-26 13:27:31 +00:00
gentlegiantJGC
e29b6e684d Reset the camera matrix when the camera moved 2021-01-21 14:54:57 +00:00
gentlegiantJGC
42ea952f37 Fixed some issues defining events 2021-01-21 14:54:23 +00:00
gentlegiantJGC
e61453669a Added a camera subclass that adds speed attributes 2021-01-17 11:07:34 +00:00