Camera.pkg 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. const Vector2& GetProjectionOffset() const;
  51. bool GetUseReflection() const;
  52. const Plane& GetReflectionPlane() const;
  53. bool GetUseClipping() const;
  54. const Plane& GetClipPlane() const;
  55. float GetDistance(const Vector3& worldPos) const;
  56. float GetDistanceSquared(const Vector3& worldPos) const;
  57. float GetLodDistance(float distance, float scale, float bias) const;
  58. bool IsProjectionValid() const;
  59. Matrix3x4 GetEffectiveWorldTransform() const;
  60. tolua_property__get_set float farClip;
  61. tolua_property__get_set float nearClip;
  62. tolua_property__get_set float fov;
  63. tolua_property__get_set float orthoSize;
  64. tolua_property__get_set float aspectRatio;
  65. tolua_property__get_set float zoom;
  66. tolua_property__get_set float lodBias;
  67. tolua_property__get_set unsigned viewMask;
  68. tolua_property__get_set unsigned viewOverrideFlags;
  69. tolua_property__get_set FillMode fillMode;
  70. tolua_property__is_set bool orthographic;
  71. tolua_property__get_set bool autoAspectRatio;
  72. tolua_readonly tolua_property__get_set Frustum& frustum;
  73. tolua_readonly tolua_property__get_set Matrix4& projection;
  74. tolua_readonly tolua_property__get_set Matrix3x4& view;
  75. tolua_readonly tolua_property__get_set float halfViewSize;
  76. tolua_readonly tolua_property__get_set Frustum viewSpaceFrustum;
  77. tolua_property__get_set Vector2& projectionOffset;
  78. tolua_property__get_set bool useReflection;
  79. tolua_property__get_set Plane& reflectionPlane;
  80. tolua_property__get_set bool useClipping;
  81. tolua_property__get_set Plane& clipPlane;
  82. tolua_readonly tolua_property__is_set bool projectionValid;
  83. tolua_readonly tolua_property__get_set Matrix3x4 effectiveWorldTransform;
  84. };