diff options
Diffstat (limited to 'kue/utility.h')
-rw-r--r-- | kue/utility.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/kue/utility.h b/kue/utility.h new file mode 100644 index 00000000..56343acb --- /dev/null +++ b/kue/utility.h @@ -0,0 +1,31 @@ +#ifndef _UTILITY_H +#define _UTILITY_H + +#include "texture.h" + +// Helper functions for rules implementations +namespace KueUtility { + enum rackType {None, Triangle, Diamond}; + + // Regulation table layout + void layoutTable(); + // Regulation pocket layout + void layoutPockets(); + + // Lays out the billiard in either 8-ball or 9-ball style, or just + // place the cue ball (with rack_type = None) + // Billiard 0 becomes the cue ball, and the rest of the billiards + // are indexed according to their face number + void layoutBilliards(rackType rack_type = None); + + // The texture for a given billiard index + KueTexture textureForBilliard(unsigned int index); + + // Regulation radius of billiards, in meters + double defaultBilliardRadius(); + + // Regulation radius of pockets, in meters + double defaultPocketRadius(); +}; + +#endif |