This is copy half of a port of a project I was playing around with in 2003. I wanted to learn more about GLUT and OpenGL in general.
At it's core, the program is simply a file system browser with a 3D view.
Visually, the program displays all the files and directories as a set of hexagonal tiles spiralling around a central "down" tile. As each directory is accessed, a new layer of tiles is added above the current layer with the new central tile allowing you to go back down to the layer down while being centered on the lower item in the previous layer. This means the layers of tiles tend to "grow" on a organic manner". At the bottom, the root of the file system would have no central tile. As you ascend the file system into deep leaves, the stack of previous tile layers can get visually clunky so they would be dimmed and/or would vanish into darkness after a few layers.
Logically, the program seeks to use common standard libraries (from the common APIs of the time). While I'm updating it to use OpenGL's shaders and (possibly Vulkan in the future) it should seek to use the standard C++libraries and other open source solutions where it makes sense.
Previously the system was coded in something preceding C++03. The API was not as well thought out as it could be and while it has an abstraction layer for it's only implementation above Win32, it was still not abstract enough.
-
World
- contains everything- has the
std::list<View *>
- has the pointer to the root
View
- has the pointer to the focus
View
- has the pointer to the "top" or latest
View
- has the
std::list<Light *>
- has the
-
View
-"no description"
? I think this is the root of a file system- Has a link set to other neighboring
View
s (6) - I think the idea was that you could traverse them as some sort of 6 leafed tree. - has the
std::list<Layer *>
to the list of Layers - (TODO: should switch to astd::stack
) - Has a link to the bottom
Layer
- Has a link to the
Model
- Has a
Vector
position
- Has a link set to other neighboring
-
Layer
- contains the list of nodes to display ?- has a
std::list<Node*>
- has a link to the "selected"
Node*
- has a link to the
Model
- has a
Vector
position
- has a
-
Node
- has a 3D
Model
- has an
Entity
in the File System (TODO make Entity)
- has a 3D
-
Model
- holds the
GL
information to render the 3D data - has
static
s which can build/render/etc predefinedShape
s
- holds the
-
Shape
- is actually empty at the moment. (TODO remove?)
-
PersistentStorage
- contains a key-value pair system for storing attributes like model names, etc. -
Key
- a string name and value (TODO revise - modelled on Windows Registry) -
Menu
- a menu to see in theWorld
-
MenuOption
- an item in theMenu
-
ShellExecutor
- executes shell commands -
Choreographer
- animates Nodes in various ways -
ActionRetriever
- retrieves variousMenu
s for a given filepath (TODOEntity
)
Things to delete, reuse from other projects (see hobbies)
Vector
- reusegeometry::R3::vector
?Color
- reuseraytrace::Color
?Debug
- move to basalFileSystem
- usestd::filesystem
- Everything in
namespace hexagon
- Uses
yaml-cpp
- Uses
std::filesystem
- Uses
OpenGL::GL
v4 w/ Shaders World
- has at least one element in
std::vector<Root>
- has at least one element in
Column
- has at least one element in
std::vector<Layer>
- has at least one element in
Layer
- has at least one element in
std::vector<Node>
- has at least one element in
Node
- represents anEntity
in the file system- has one
Model
per ____? (or Shape?)
- has one
Entity
-Choreographer
- knows how to animate aNode
via it's predefinedDances
ActionRetriever
- takes aNode
's FilesystemEntity
and determines what it can do with it, returningMenu
.
Simple Types:
namespace hexagon {
constexpr size_t dimensions{3u};
union triplet {
struct {
float r;
float g;
float b;
} rgb;
struct {
float x;
float y;
float z;
} xyz;
};
using point = float[dimensions];
using vector = float[dimensions];
using color = float[dimensions];
-
Object
- has a 3D position
- has a 3D orientation
- has a base scalar
-
Light
is anObject
- has a 3D color