Formatting
This commit is contained in:
@@ -13,6 +13,7 @@ namespace OpenVulkano::Scene
|
||||
class IRayIntersectable
|
||||
{
|
||||
public:
|
||||
virtual ~IRayIntersectable() = default;
|
||||
virtual std::optional<RayHit> Intersect(const Ray& ray) const = 0;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -45,16 +45,19 @@ namespace OpenVulkano::Scene
|
||||
{
|
||||
public:
|
||||
LabelDrawable(const std::shared_ptr<AtlasData>& atlasData, const LabelDrawableSettings& settings = LabelDrawableSettings());
|
||||
|
||||
void AddText(const std::string& text, const TextConfig& config = TextConfig());
|
||||
void SetLabelSettings(const LabelDrawableSettings& settings);
|
||||
void SetPosition(const Math::Vector3f& pos) { m_position = pos; }
|
||||
|
||||
[[nodiscard]] std::list<TextDrawable>& GetTexts() { return m_texts; }
|
||||
[[nodiscard]] LabelDrawableSettings& GetSettings() { return m_settings; }
|
||||
[[nodiscard]] UniformBuffer* GetLabelBuffer() { return &m_labelBuffer; }
|
||||
[[nodiscard]] Math::Vector3f& GetPosition() { return m_position; }
|
||||
[[nodiscard]] bool IsBillboard() const { return m_settings.isBillboard; }
|
||||
[[nodiscard]] const Math::AABB2f& GetBoundingBox() const { return m_bbox; }
|
||||
std::optional<RayHit> Intersect(const Ray& ray) const override;
|
||||
|
||||
[[nodiscard]] std::optional<RayHit> Intersect(const Ray& ray) const override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<AtlasData> m_atlasData;
|
||||
|
||||
@@ -48,9 +48,11 @@ namespace OpenVulkano::Scene
|
||||
TextDrawable(const std::string& atlasMetadataFile, Texture* atlasTex, const TextConfig& config = TextConfig());
|
||||
TextDrawable(const Array<char>& atlasMetadata, Texture* atlasTex, const TextConfig& config = TextConfig());
|
||||
TextDrawable(const std::shared_ptr<AtlasData>& atlasData, const TextConfig& config = TextConfig());
|
||||
|
||||
void GenerateText(const std::string& text, const Math::Vector2f& pos = Math::Vector2f(0.f));
|
||||
void SetConfig(const TextConfig& cfg) { m_cfg = cfg; }
|
||||
void SetAtlasData(const std::shared_ptr<AtlasData>& atlasData);
|
||||
|
||||
[[nodiscard]] Math::AABB2f& GetBoundingBox() { return m_bbox; }
|
||||
[[nodiscard]] TextConfig& GetConfig() { return m_cfg; }
|
||||
[[nodiscard]] const std::string& GetText() const { return m_text; }
|
||||
|
||||
Reference in New Issue
Block a user