Camera.pkg 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. $#include "Graphics/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. void SetUseReflection(bool enable);
  24. void SetReflectionPlane(const Plane& reflectionPlane);
  25. void SetUseClipping(bool enable);
  26. void SetClipPlane(const Plane& clipPlane);
  27. void SetProjection(const Matrix4& projection);
  28. float GetFarClip() const;
  29. float GetNearClip() const;
  30. float GetFov() const;
  31. float GetOrthoSize() const;
  32. float GetAspectRatio() const;
  33. float GetZoom() const;
  34. float GetLodBias() const;
  35. unsigned GetViewMask() const;
  36. unsigned GetViewOverrideFlags() const;
  37. FillMode GetFillMode() const;
  38. bool IsOrthographic() const;
  39. bool GetAutoAspectRatio() const;
  40. const Frustum& GetFrustum() const;
  41. Matrix4 GetProjection() const;
  42. Matrix4 GetGPUProjection() const;
  43. const Matrix3x4& GetView() const;
  44. void GetFrustumSize(Vector3& near, Vector3& far) const;
  45. float GetHalfViewSize() const;
  46. Frustum GetSplitFrustum(float nearClip, float farClip) const;
  47. Frustum GetViewSpaceFrustum() const;
  48. Frustum GetViewSpaceSplitFrustum(float nearClip, float farClip) const;
  49. Ray GetScreenRay(float x, float y) const;
  50. Vector2 WorldToScreenPoint(const Vector3& worldPos) const;
  51. Vector3 ScreenToWorldPoint(const Vector3& screenPos) const;
  52. const Vector2& GetProjectionOffset() const;
  53. bool GetUseReflection() const;
  54. const Plane& GetReflectionPlane() const;
  55. bool GetUseClipping() const;
  56. const Plane& GetClipPlane() const;
  57. float GetDistance(const Vector3& worldPos) const;
  58. float GetDistanceSquared(const Vector3& worldPos) const;
  59. float GetLodDistance(float distance, float scale, float bias) const;
  60. bool IsProjectionValid() const;
  61. Matrix3x4 GetEffectiveWorldTransform() const;
  62. tolua_property__get_set float farClip;
  63. tolua_property__get_set float nearClip;
  64. tolua_property__get_set float fov;
  65. tolua_property__get_set float orthoSize;
  66. tolua_property__get_set float aspectRatio;
  67. tolua_property__get_set float zoom;
  68. tolua_property__get_set float lodBias;
  69. tolua_property__get_set unsigned viewMask;
  70. tolua_property__get_set unsigned viewOverrideFlags;
  71. tolua_property__get_set FillMode fillMode;
  72. tolua_property__is_set bool orthographic;
  73. tolua_property__get_set bool autoAspectRatio;
  74. tolua_readonly tolua_property__get_set Frustum& frustum;
  75. tolua_readonly tolua_property__get_set Matrix4 projection;
  76. tolua_readonly tolua_property__get_set Matrix4 GPUProjection;
  77. tolua_readonly tolua_property__get_set Matrix3x4& view;
  78. tolua_readonly tolua_property__get_set float halfViewSize;
  79. tolua_readonly tolua_property__get_set Frustum viewSpaceFrustum;
  80. tolua_property__get_set Vector2& projectionOffset;
  81. tolua_property__get_set bool useReflection;
  82. tolua_property__get_set Plane& reflectionPlane;
  83. tolua_property__get_set bool useClipping;
  84. tolua_property__get_set Plane& clipPlane;
  85. tolua_readonly tolua_property__is_set bool projectionValid;
  86. tolua_readonly tolua_property__get_set Matrix3x4 effectiveWorldTransform;
  87. };