PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
material_uv_transform_component.h
1#pragma once
2
3#include "pixelbullet/assets/material.h"
4
5namespace pixelbullet
6{
8{
10
11 [[nodiscard]] bool operator==(const MaterialUvTransformComponent&) const noexcept = default;
12};
13
14inline Node& operator<<(Node& node, const MaterialUvTransformComponent& component)
15{
16 node["transform"] << component.transform;
17 return node;
18}
19
20inline const Node& operator>>(const Node& node, MaterialUvTransformComponent& component)
21{
22 if (node.HasProperty("transform"))
23 {
24 node["transform"] >> component.transform;
25 }
26 else
27 {
28 component.transform = MaterialTextureTransform{};
29 }
30
31 return node;
32}
33} // namespace pixelbullet
Represents a hierarchical node capable of storing various data types and supporting YAML serializatio...
Definition node.h:45
Definition material.h:312
Definition material_uv_transform_component.h:8