Diplomová práce 2013
Z Varhoo
(Rozdíly mezi verzemi)
m (Stránka Diplomová práce 2003 přemístěna na stránku Diplomová práce 2013: blbý rok) |
|||
(Není zobrazena 1 mezilehlá verze od 1 uživatele.) | |||
Řádka 2: | Řádka 2: | ||
=== API === |
=== API === |
||
+ | |||
+ | |||
+ | Share basic structure. |
||
+ | |||
+ | #ifndef UTILS_H |
||
+ | #define UTILS_H |
||
+ | |||
+ | typedef struct t_xyz { |
||
+ | float x; |
||
+ | float y; |
||
+ | float z; |
||
+ | } xyz; |
||
+ | |||
+ | typedef struct t_xy { |
||
+ | float x; |
||
+ | float y; |
||
+ | } xy; |
||
+ | #endif |
||
+ | |||
+ | Header for model '''UserSpace''' |
||
+ | |||
+ | typedef struct zone_t { |
||
+ | float from; |
||
+ | float to; |
||
+ | } zone; |
||
+ | |||
+ | class Zones { |
||
+ | private: |
||
+ | zone * zones; |
||
+ | short zones_size; |
||
+ | public: |
||
+ | Zones(); |
||
+ | void add(unsigned short id, float from, float to); |
||
+ | void print(); |
||
+ | zone * get(int * size); |
||
+ | }; |
||
+ | |||
+ | class UserSpace { |
||
+ | private: |
||
+ | int mod_actual; |
||
+ | int mod_previous; |
||
+ | xyz handL; |
||
+ | xyz handR; |
||
+ | xy pos; |
||
+ | Zones zones; |
||
+ | float powerL; |
||
+ | float powerR; |
||
+ | |||
+ | public: |
||
+ | UserSpace(); |
||
+ | ~UserSpace(); |
||
+ | void setUserLook(bool value); |
||
+ | void setUserHands(xyz left, xyz right); |
||
+ | |||
+ | void setConfigZone(uint8_t id, float size_from, float size_to); |
||
+ | void setConfigHysterize(float size); |
||
+ | void setConfigFceType(uint8_t type); |
||
+ | |||
+ | int getMod(); |
||
+ | xy getHandPos(); |
||
+ | float getPower(); |
||
+ | }; |
Aktuální verze z 5. 3. 2013, 18:12
[editovat] Společné části
[editovat] API
Share basic structure.
#ifndef UTILS_H #define UTILS_H typedef struct t_xyz { float x; float y; float z; } xyz; typedef struct t_xy { float x; float y; } xy; #endif
Header for model UserSpace
typedef struct zone_t { float from; float to; } zone; class Zones { private: zone * zones; short zones_size; public: Zones(); void add(unsigned short id, float from, float to); void print(); zone * get(int * size); }; class UserSpace { private: int mod_actual; int mod_previous; xyz handL; xyz handR; xy pos; Zones zones; float powerL; float powerR; public: UserSpace(); ~UserSpace(); void setUserLook(bool value); void setUserHands(xyz left, xyz right); void setConfigZone(uint8_t id, float size_from, float size_to); void setConfigHysterize(float size); void setConfigFceType(uint8_t type); int getMod(); xy getHandPos(); float getPower(); };