Camera.pkg 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. $#include "Camera.h"
  2. enum FillMode{};
  3. class Camera : public Component
  4. {
  5. void SetNearClip(float nearClip);
  6. void SetFarClip(float farClip);
  7. void SetFov(float fov);
  8. void SetOrthoSize(float orthoSize);
  9. void SetOrthoSize(const Vector2& orthoSize);
  10. void SetAspectRatio(float aspectRatio);
  11. void SetFillMode(FillMode mode);
  12. void SetZoom(float zoom);
  13. void SetLodBias(float bias);
  14. void SetViewMask(unsigned mask);
  15. void SetViewOverrideFlags(unsigned flags);
  16. void SetOrthographic(bool enable);
  17. void SetAutoAspectRatio(bool enable);
  18. void SetProjectionOffset(const Vector2& offset);
  19. void SetFlipVertical(bool enable);
  20. float GetFarClip() const;
  21. float GetNearClip() const;
  22. float GetFov() const;
  23. float GetOrthoSize() const;
  24. float GetAspectRatio() const;
  25. float GetZoom() const;
  26. float GetLodBias() const;
  27. unsigned GetViewMask() const;
  28. unsigned GetViewOverrideFlags() const;
  29. FillMode GetFillMode() const;
  30. bool IsOrthographic() const;
  31. bool GetAutoAspectRatio() const;
  32. const Frustum& GetFrustum() const;
  33. const Matrix4& GetProjection() const;
  34. Matrix4 GetProjection(bool apiSpecific) const;
  35. const Matrix3x4& GetView() const;
  36. void GetFrustumSize(Vector3& near, Vector3& far) const;
  37. float GetHalfViewSize() const;
  38. Frustum GetSplitFrustum(float nearClip, float farClip) const;
  39. Frustum GetViewSpaceFrustum() const;
  40. Frustum GetViewSpaceSplitFrustum(float nearClip, float farClip) const;
  41. Ray GetScreenRay(float x, float y) const;
  42. Vector2 WorldToScreenPoint(const Vector3& worldPos) const;
  43. Vector3 ScreenToWorldPoint(const Vector3& screenPos) const;
  44. Vector3 GetForwardVector() const;
  45. Vector3 GetRightVector() const;
  46. Vector3 GetUpVector() const;
  47. const Vector2& GetProjectionOffset() const;
  48. bool GetFlipVertical() const;
  49. float GetDistance(const Vector3& worldPos) const;
  50. float GetDistanceSquared(const Vector3& worldPos) const;
  51. float GetLodDistance(float distance, float scale, float bias) const;
  52. bool IsProjectionValid() const;
  53. tolua_property__get_set float farClip;
  54. tolua_property__get_set float nearClip;
  55. tolua_property__get_set float fov;
  56. tolua_property__get_set float orthoSize;
  57. tolua_property__get_set float aspectRatio;
  58. tolua_property__get_set float zoom;
  59. tolua_property__get_set float lodBias;
  60. tolua_property__get_set unsigned viewMask;
  61. tolua_property__get_set unsigned viewOverrideFlags;
  62. tolua_property__get_set FillMode fillMode;
  63. tolua_property__is_set bool orthographic;
  64. tolua_property__get_set bool autoAspectRatio;
  65. tolua_readonly tolua_property__get_set Frustum& frustum;
  66. tolua_readonly tolua_property__get_set Matrix4& projection;
  67. tolua_readonly tolua_property__get_set Matrix3x4& view;
  68. tolua_readonly tolua_property__get_set float halfViewSize;
  69. tolua_readonly tolua_property__get_set Frustum viewSpaceFrustum;
  70. tolua_readonly tolua_property__get_set Vector3 forwardVector;
  71. tolua_readonly tolua_property__get_set Vector3 rightVector;
  72. tolua_readonly tolua_property__get_set Vector3 upVector;
  73. tolua_property__get_set Vector2& projectionOffset;
  74. tolua_property__get_set bool flipVertical;
  75. tolua_readonly tolua_property__is_set bool projectionValid;
  76. };