-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Zephyr: Renderer: stub out some basic geometry data structure and mes…
…h component
- Loading branch information
Showing
7 changed files
with
109 additions
and
12 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
zephyr/renderer/include/zephyr/renderer/component/mesh.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
#pragma once | ||
|
||
#include <zephyr/renderer/resource/geometry.hpp> | ||
#include <zephyr/scene/component.hpp> | ||
#include <memory> | ||
|
||
namespace zephyr { | ||
|
||
struct MeshComponent : Component { | ||
MeshComponent() = default; | ||
MeshComponent(std::shared_ptr<Geometry> geometry) : geometry{std::move(geometry)} {} | ||
|
||
std::shared_ptr<Geometry> geometry; | ||
}; | ||
|
||
} // namespace zephyr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
zephyr/renderer/include/zephyr/renderer/resource/geometry.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
#pragma once | ||
|
||
#include <zephyr/integer.hpp> | ||
#include <zephyr/float.hpp> | ||
#include <zephyr/non_copyable.hpp> | ||
#include <zephyr/non_moveable.hpp> | ||
//#include <zephyr/uid.hpp> | ||
#include <vector> | ||
|
||
namespace zephyr { | ||
|
||
class Geometry : NonCopyable, NonMoveable { | ||
public: | ||
// /// @returns the Unique ID of this geometry | ||
// [[nodiscard]] u64 GetUID() const { | ||
// return (u64)m_uid; | ||
// } | ||
|
||
std::vector<u32> m_indices{}; | ||
std::vector<f32> m_positions{}; | ||
|
||
// private: | ||
// UID m_uid{}; //< Unique ID of this geometry | ||
}; | ||
|
||
} // namespace zephyr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters