space-game001/src/TeleportZone.h
2026-05-07 20:53:20 +03:00

28 lines
758 B
C++

#pragma once
#include <string>
#include <memory>
#include <Eigen/Core>
#include "SparkEmitter.h"
namespace ZL {
class Renderer;
class Texture;
struct TeleportZone {
std::string id;
Eigen::Vector3f position = Eigen::Vector3f::Zero();
float radius = 0.0f;
bool active = false;
std::string destinationLocation;
Eigen::Vector3f destinationPosition = Eigen::Vector3f::Zero();
float destinationRotationY = 0.0f;
std::unique_ptr<SparkEmitter> sparks;
void initSparks(std::shared_ptr<Texture> activeTex, std::shared_ptr<Texture> inactiveTex);
void update(float deltaMs);
void prepareForDraw(const Eigen::Matrix4f& viewMatrix);
void draw(Renderer& renderer, float zoom, int width, int height);
};
} // namespace ZL