TriangleSample.h 589 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef TRIANGLESAMPLE_H_
  2. #define TRIANGLESAMPLE_H_
  3. #include "gameplay.h"
  4. #include "Sample.h"
  5. using namespace gameplay;
  6. /**
  7. * Sample creating and draw a single triangle.
  8. */
  9. class TriangleSample : public Sample
  10. {
  11. public:
  12. TriangleSample();
  13. void touchEvent(Touch::TouchEvent evt, int x, int y, unsigned int contactIndex);
  14. protected:
  15. void initialize();
  16. void finalize();
  17. void update(float elapsedTime);
  18. void render(float elapsedTime);
  19. private:
  20. Font* _font;
  21. Model* _model;
  22. float _spinDirection;
  23. Matrix _worldViewProjectionMatrix;
  24. };
  25. #endif