2
0

Camera.pkg 3.4 KB

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