载入中...
搜索中...
未找到
OceanHullMask.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Export.h"
4
5#include <glm/glm.hpp>
6#include <glm/gtc/quaternion.hpp>
7#include <span>
8#include <vector>
9#include "common/Result.h"
10
11namespace eve::fluids {
18 glm::dvec3 center{0.0};
19 glm::dquat rotation{1.0, 0.0, 0.0, 0.0};
20 glm::dvec3 halfExtent{1.0};
21 std::vector<glm::dvec4> bevels;
22};
29public:
34 std::span<const glm::vec4> rows() const { return rows_; }
36 glm::dvec3 origin() const { return origin_; }
38 unsigned size() const { return static_cast<unsigned>(rows_.size() / 17); }
42 EVENGINE_API_DOMAINS bool contains(glm::dvec3 worldPoint) const;
43
44private:
46 glm::dvec3 origin_{0.0};
47 std::vector<glm::vec4> rows_;
48};
51public:
53 explicit OceanHullMaskBuilder(std::span<const OceanHullVolume> volumes) : volumes_(volumes) {}
54 glm::dvec3 origin{0.0};
61
62private:
63 std::span<const OceanHullVolume> volumes_;
64};
65} // namespace eve::fluids
#define EVENGINE_API_DOMAINS
Definition Export.h:110
std::vector< OceanHullVolume > volumes
Move-only, checked operation results for the common layer.
Move-only operation result carrying either a value or Status.
Definition Result.h:176
Synchronous borrowed geometry preparation, with no provider dependency.
EVENGINE_API_DOMAINS Result< OceanHullMaskFrame > build() const
Validate the entire batch then return its owning render projection.
OceanHullMaskBuilder(std::span< const OceanHullVolume > volumes)
Borrow volumes, which must remain alive and unchanged until build returns.
Immutable owning render-only union of convex dry volumes. No body handles, callbacks,...
glm::dvec3 origin() const
World origin subtracted before float projection.
unsigned size() const
Number of dry volumes; at most 32.
EVENGINE_API_DOMAINS bool contains(glm::dvec3 worldPoint) const
Reference fragment classification; nonfinite points are outside, boundary is inside....
std::span< const glm::vec4 > rows() const
Borrow packed render-space halfspaces until frame destruction/move. Each volume has seventeen vec4 ro...
GLSL compute kernels for the GPU surface-flow solver.
Definition FluidTarget.h:12
One convex dry volume in vessel-local metres, bounded by an oriented box. Extra halfspaces use dot(no...
std::vector< glm::dvec4 > bevels