载入中...
搜索中...
未找到
OceanMesh.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Export.h"
4
5#include "common/Result.h"
6
7#include <cstdint>
8#include <glm/glm.hpp>
9#include <vector>
10
11namespace eve::fluids {
12class OceanWaterView;
13
16 unsigned segments = 256;
17 unsigned rings = 128;
18 double firstRadius = 0.5;
19 double outerRadius = 20000.0;
20};
21
30 std::vector<glm::dvec2> parameterOffsets;
31 std::vector<std::uint32_t> indices;
32 std::vector<double> radii;
33};
34
47
50 std::vector<float> positions;
51 std::vector<float> normals;
53 std::vector<float> surface;
54 glm::dvec3 origin{0.0};
55 double time = 0.0;
56};
57
65public:
69 glm::dvec2 center{0.0};
71 glm::dvec3 origin{0.0};
79
80private:
81 const OceanMeshData& mesh_;
82 const OceanWaterView& water_;
83};
84} // namespace eve::fluids
#define EVENGINE_API_DOMAINS
Definition Export.h:110
OceanMeshSettings mesh
ssq::Object water
Move-only, checked operation results for the common layer.
Move-only operation result carrying either a value or Status.
Definition Result.h:176
Owning topology preparation; settings are copied at build, with no retained references.
Definition OceanMesh.h:36
EVENGINE_API_DOMAINS Result< OceanMeshData > build() const
Build positively oriented triangles on XZ, graded geometrically from near water to horizon.
Definition OceanMesh.cpp:6
OceanMeshSettings settings
Definition OceanMesh.h:38
Prepare CPU reference vertices from the same water view used by rigid bodies. Borrows mesh and water ...
Definition OceanMesh.h:64
glm::dvec2 center
Double-precision world XZ center; continuous camera movement does not change wave phase.
Definition OceanMesh.h:69
EVENGINE_API_DOMAINS Result< OceanMeshFrame > build() const
Build an atomic owning vertex projection; invalid queries or degenerate tangents reject the whole fra...
OceanMeshFrameBuilder(const OceanMeshData &mesh, const OceanWaterView &water)
Borrow immutable topology and synchronized water for this synchronous build.
Definition OceanMesh.h:67
glm::dvec3 origin
Render origin subtracted before float conversion; use the same origin for camera and scene.
Definition OceanMesh.h:71
Synchronous borrowed composition of the spectral sea and an optional local wake. Both owners must out...
GLSL compute kernels for the GPU surface-flow solver.
Definition FluidTarget.h:12
Owning immutable topology projection; XZ offsets are relative to the render origin....
Definition OceanMesh.h:29
std::vector< std::uint32_t > indices
Definition OceanMesh.h:31
std::vector< glm::dvec2 > parameterOffsets
Definition OceanMesh.h:30
std::vector< double > radii
Definition OceanMesh.h:32
Owning CPU reference projection, ready for a mesh upload; simulation time and origin identify the fra...
Definition OceanMesh.h:49
std::vector< float > surface
Packed foam coverage and horizontal Jacobian, one pair per vertex.
Definition OceanMesh.h:53
std::vector< float > normals
Definition OceanMesh.h:51
std::vector< float > positions
Definition OceanMesh.h:50
Camera-centered concentric square rings with shared vertices and continuous distance grading.
Definition OceanMesh.h:15