PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
mesh_renderer.h
1#pragma once
2
3#include "pixelbullet/filesystem/virtual_path.h"
4#include "pixelbullet/filesystem/virtual_path_serialization.h"
5#include "pixelbullet/serialization/node.h"
6
7namespace pixelbullet
8{
10{
11 VirtualPath mesh;
12 VirtualPath material;
13 bool visible = true;
14};
15
16inline Node& operator<<(Node& node, const MeshRenderer& meshRenderer)
17{
18 node["mesh"] << meshRenderer.mesh;
19 node["material"] << meshRenderer.material;
20 node["visible"] << meshRenderer.visible;
21 return node;
22}
23
24inline const Node& operator>>(const Node& node, MeshRenderer& meshRenderer)
25{
26 node["mesh"] >> meshRenderer.mesh;
27 node["material"] >> meshRenderer.material;
28 node["visible"] >> meshRenderer.visible;
29 return node;
30}
31} // namespace pixelbullet
Represents a hierarchical node capable of storing various data types and supporting YAML serializatio...
Definition node.h:45
Definition virtual_path.h:10
Definition mesh_renderer.h:10