Sampler.h 937 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef Sampler_H_
  2. #define Sampler_H_
  3. #include "Base.h"
  4. #include "Constants.h"
  5. namespace gameplay
  6. {
  7. class Sampler
  8. {
  9. public:
  10. /**
  11. * Constructor.
  12. */
  13. Sampler(const char* id);
  14. /**
  15. * Destructor.
  16. */
  17. virtual ~Sampler(void);
  18. const std::string& getId() const;
  19. const char* getString(const std::string& name);
  20. void set(const std::string& name, const std::string& value);
  21. /**
  22. * Writes this sampler to a material file.
  23. *
  24. * @param file The file pointer.
  25. * @param indent The number of indentation levels.
  26. * @param parent The parent sampler from this material's parent.
  27. */
  28. void writeMaterial(FILE* file, unsigned int indent, Sampler* parent = NULL);
  29. private:
  30. void writeProperty(FILE* file, const std::string& name, unsigned int indent, Sampler* parent = NULL);
  31. private:
  32. std::string _id;
  33. std::map<std::string, std::string> props;
  34. };
  35. }
  36. #endif