Camera.pkg 4.0 KB

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