WOWCube Docs logo
WOWCube Docs
Mission Control
Section Shortcuts
APIExamplesSourceWOWConnectChangelog
Filters
SDK and language defaults persist in cookies.
SDK version
Navigation Tree
Collapsed by default, focused on the active path.
Made byMcKay Seamons
GitHub
  1. Home
  2. Docs
  3. Examples
  4. Rectangles.h
Mission NodeSDK 6.2C++renderingProject Included

Rectangles.h

Example: Rectangles.h

Examples / SDK 6.2 / C++ / rendering / Simple Shapes - Rectangles / project / src
Rectangles.h
CPP
1// This header file is generated by WOWCube SDK project wizard
2#pragma once
3#include "Gfx.h"
4
5#define DISPLAY_CENTER_X 120
6#define DISPLAY_CENTER_Y 120
7
8typedef struct
9{
10 int dist;
11 int xoffset;
12} Rect_t;
13
14
15class Rectangles: public Cubios::Application
16{
17public:
18 Rectangles();
19 virtual ~Rectangles();
20
21 virtual void on_PhysicsTick(const std::array<Cubios::Screen, 3>& screens) override;
22 virtual void on_Twist(const Cubios::TOPOLOGY_twistInfo_t& twist) override;
23 virtual void on_Message(uint32_t type, uint8_t* pkt, u32_t size) override;
24 virtual void on_ExternalMessage(uint8_t* pkt, u32_t size) override;
25 virtual void on_Pat(uint32_t count) override;
26 virtual void on_Render(std::array<Cubios::Screen, 3>& screens) override;
27 virtual void on_Tick(uint32_t currentTime, uint32_t deltaTime) override;
28 virtual void on_Timer(uint8_t timerID) override;
29
30 void InitializeResources();
31private:
32 void drawRect(int cx, int cy, int dist, int xoffset);
33
34private:
35 Rect_t rects[2];
36 float fParam;
37 float fOffset;
38};
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.
Context Rail

Project files

Rectangles.cpp
project/src/Rectangles.cpp
Rectangles.h
project/src/Rectangles.h
wowcubeapp-build.json
project/wowcubeapp-build.json
Context Rail

Related nodes

Rectangles.cpp
Examples / SDK 6.2 / C++ / rendering / Simple Shapes - Rectangles / project / src
Simple Shapes - Rectangles
Examples / SDK 6.2 / C++ / rendering
info.json
Examples / SDK 6.2 / C++ / rendering / Simple Shapes - Rectangles
wowcubeapp-build.json
Examples / SDK 6.2 / C++ / rendering / Simple Shapes - Rectangles / project
Previous Node
Rectangles.cpp
Examples / SDK 6.2 / C++ / rendering / Simple Shapes - Rectangles / project / src
Next Node
wowcubeapp-build.json
Examples / SDK 6.2 / C++ / rendering / Simple Shapes - Rectangles / project