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. Lines.h
Mission NodeSDK 6.2C++renderingProject Included

Lines.h

Example: Lines.h

Examples / SDK 6.2 / C++ / rendering / Simple Shapes - Lines / project / src
Lines.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 x;
11 int y;
12 int prevx;
13 int prevy;
14 float vx;
15 float vy;
16} Star_t;
17
18class Lines: public Cubios::Application
19{
20public:
21 Lines();
22 virtual ~Lines();
23
24 virtual void on_PhysicsTick(const std::array<Cubios::Screen, 3>& screens) override;
25 virtual void on_Twist(const Cubios::TOPOLOGY_twistInfo_t& twist) override;
26 virtual void on_Message(uint32_t type, uint8_t* pkt, u32_t size) override;
27 virtual void on_ExternalMessage(uint8_t* pkt, u32_t size) override;
28 virtual void on_Pat(uint32_t count) override;
29 virtual void on_Render(std::array<Cubios::Screen, 3>& screens) override;
30 virtual void on_Tick(uint32_t currentTime, uint32_t deltaTime) override;
31 virtual void on_Timer(uint8_t timerID) override;
32
33 void InitializeResources();
34
35private:
36 void addStar();
37 void renderStarfield();
38
39private:
40 int numStars;
41 Star_t stars[50];
42
43};
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.
Context Rail

Project files

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

Related nodes

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