BillboardSet.pkg 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. $#include "BillboardSet.h"
  2. struct Billboard
  3. {
  4. Vector3 position_ @ position;
  5. Vector2 size_ @ size;
  6. Rect uv_ @ uv;
  7. Color color_ @ color;
  8. float rotation_ @ rotation;
  9. bool enabled_ @ enabled;
  10. float sortDistance_ @ sortDistance;
  11. };
  12. class BillboardSet : public Drawable
  13. {
  14. void SetMaterial(Material* material);
  15. void SetNumBillboards(unsigned num);
  16. void SetRelative(bool enable);
  17. void SetScaled(bool enable);
  18. void SetSorted(bool enable);
  19. void SetFaceCamera(bool enable);
  20. void SetFaceCameraAxes(const Vector3& axes);
  21. void SetAnimationLodBias(float bias);
  22. void Commit();
  23. Material* GetMaterial() const;
  24. unsigned GetNumBillboards() const;
  25. Billboard* GetBillboard(unsigned index);
  26. bool IsRelative() const;
  27. bool IsScaled() const;
  28. bool IsSorted() const;
  29. bool GetFaceCamera() const;
  30. const Vector3& GetFaceCameraAxes() const;
  31. float GetAnimationLodBias() const;
  32. tolua_property__get_set Material* material;
  33. tolua_property__get_set unsigned numBillboards;
  34. tolua_property__is_set bool relative;
  35. tolua_property__is_set bool scaled;
  36. tolua_property__is_set bool sorted;
  37. tolua_property__get_set bool faceCamera;
  38. tolua_property__get_set Vector3& faceCameraAxes;
  39. tolua_property__get_set float animationLodBias;
  40. };