BillboardSet.pkg 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. $#include "BillboardSet.h"
  2. /// %Billboard component.
  3. class BillboardSet : public Drawable
  4. {
  5. public:
  6. /// Set material.
  7. void SetMaterial(Material* material);
  8. /// Set number of billboards.
  9. void SetNumBillboards(unsigned num);
  10. /// Set whether billboards are relative to the scene node.
  11. void SetRelative(bool enable);
  12. /// Set whether scene node scale affects billboards' size.
  13. void SetScaled(bool enable);
  14. /// Set whether billboards are sorted by distance.
  15. void SetSorted(bool enable);
  16. /// Set animation LOD bias.
  17. void SetAnimationLodBias(float bias);
  18. /// Mark for bounding box and vertex buffer update. Call after modifying the billboards.
  19. void Commit();
  20. /// Return material.
  21. Material* GetMaterial() const;
  22. /// Return number of billboards.
  23. unsigned GetNumBillboards() const { return billboards_.Size(); }
  24. /// Return billboard by index.
  25. Billboard* GetBillboard(unsigned index);
  26. /// Return whether billboards are relative to the scene node.
  27. bool IsRelative() const { return relative_; }
  28. /// Return whether scene node scale affects billboards' size.
  29. bool IsScaled() const { return scaled_; }
  30. /// Return whether billboards are sorted.
  31. bool IsSorted() const { return sorted_; }
  32. /// Return animation LOD bias.
  33. float GetAnimationLodBias() const { return animationLodBias_; }
  34. float GetAnimationLodBias() const;
  35. };