feat: layers, grid
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
#include "material/gizmo.h"
|
#include "material/gizmo.h"
|
||||||
#include "utils/NameComponentManager.h"
|
#include "utils/NameComponentManager.h"
|
||||||
#include "Gizmo.hpp"
|
#include "Gizmo.hpp"
|
||||||
|
#include "GridOverlay.hpp"
|
||||||
#include "ResourceBuffer.hpp"
|
#include "ResourceBuffer.hpp"
|
||||||
#include "components/CollisionComponentManager.hpp"
|
#include "components/CollisionComponentManager.hpp"
|
||||||
#include "components/AnimationComponentManager.hpp"
|
#include "components/AnimationComponentManager.hpp"
|
||||||
@@ -74,6 +75,7 @@ namespace thermion_filament
|
|||||||
void setRotation(EntityId e, float rads, float x, float y, float z, float w);
|
void setRotation(EntityId e, float rads, float x, float y, float z, float w);
|
||||||
void queuePositionUpdate(EntityId e, float x, float y, float z, bool relative);
|
void queuePositionUpdate(EntityId e, float x, float y, float z, bool relative);
|
||||||
void queueRotationUpdate(EntityId e, float rads, float x, float y, float z, float w, bool relative);
|
void queueRotationUpdate(EntityId e, float rads, float x, float y, float z, float w, bool relative);
|
||||||
|
void queueRelativePositionUpdateWorldAxis(EntityId entity, float viewportCoordX, float viewportCoordY, float x, float y, float z);
|
||||||
const utils::Entity *getCameraEntities(EntityId e);
|
const utils::Entity *getCameraEntities(EntityId e);
|
||||||
size_t getCameraEntityCount(EntityId e);
|
size_t getCameraEntityCount(EntityId e);
|
||||||
const utils::Entity *getLightEntities(EntityId e) noexcept;
|
const utils::Entity *getLightEntities(EntityId e) noexcept;
|
||||||
@@ -169,27 +171,31 @@ namespace thermion_filament
|
|||||||
///
|
///
|
||||||
void setPriority(EntityId entity, int priority);
|
void setPriority(EntityId entity, int priority);
|
||||||
|
|
||||||
/// @brief returns the gizmo entity, used to manipulate the global transform for entities
|
|
||||||
/// @param out a pointer sized large enough to hold three EntityId values (representing the x, y, and z axis of the translation gizmo).
|
|
||||||
/// @return
|
|
||||||
///
|
|
||||||
void getGizmo(EntityId *out);
|
|
||||||
|
|
||||||
|
|
||||||
/// @brief returns the 2D min/max viewport coordinates of the bounding box for the specified enitty;
|
/// @brief returns the 2D min/max viewport coordinates of the bounding box for the specified enitty;
|
||||||
/// @param out a pointer large enough to store four floats (the min/max coordinates of the bounding box)
|
/// @param out a pointer large enough to store four floats (the min/max coordinates of the bounding box)
|
||||||
/// @return
|
/// @return
|
||||||
///
|
///
|
||||||
Aabb2 getBoundingBox(EntityId entity);
|
Aabb2 getBoundingBox(EntityId entity);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Toggles the visibility of the given layer.
|
||||||
|
/// Layer 0 - regular scene assets
|
||||||
|
/// Layer 1 - gizmo
|
||||||
|
/// Layer 2 - grid
|
||||||
|
///
|
||||||
|
void setLayerEnabled(int layer, bool enabled);
|
||||||
|
|
||||||
friend class FilamentViewer;
|
friend class FilamentViewer;
|
||||||
|
|
||||||
|
Gizmo* gizmo = nullptr;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
gltfio::AssetLoader *_assetLoader = nullptr;
|
gltfio::AssetLoader *_assetLoader = nullptr;
|
||||||
const ResourceLoaderWrapperImpl *const _resourceLoaderWrapper;
|
const ResourceLoaderWrapperImpl *const _resourceLoaderWrapper;
|
||||||
Engine *_engine;
|
Engine *_engine;
|
||||||
Scene *_scene;
|
Scene *_scene;
|
||||||
View* _view;
|
View* _view;
|
||||||
|
|
||||||
gltfio::MaterialProvider *_ubershaderProvider = nullptr;
|
gltfio::MaterialProvider *_ubershaderProvider = nullptr;
|
||||||
gltfio::ResourceLoader *_gltfResourceLoader = nullptr;
|
gltfio::ResourceLoader *_gltfResourceLoader = nullptr;
|
||||||
gltfio::TextureProvider *_stbDecoder = nullptr;
|
gltfio::TextureProvider *_stbDecoder = nullptr;
|
||||||
@@ -216,7 +222,8 @@ namespace thermion_filament
|
|||||||
const char *entityName);
|
const char *entityName);
|
||||||
|
|
||||||
EntityId addGizmo();
|
EntityId addGizmo();
|
||||||
Gizmo* _gizmo = nullptr;
|
|
||||||
|
GridOverlay* _gridOverlay = nullptr;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user