载入中...
搜索中...
未找到
ClothModel.h
浏览该文件的文档.
85 static eve::Result<ClothModel> fromTriangles(std::span<const float> positions, std::span<const int> triangleIndices,
99 static eve::Result<ClothModel> grid(int cols, int rows, float spacing, float originX, float originY, float originZ);
119 [[nodiscard]] std::span<const ClothModelParticle> particles() const noexcept { return particles_; }
121 [[nodiscard]] std::span<const ClothModelTriangle> triangles() const noexcept { return triangles_; }
123 [[nodiscard]] std::span<const ClothModelDistanceConstraint> distanceConstraints() const noexcept {
Move-only, checked operation results for the common layer.
Owning, renderer-independent dynamic values.
uint32_t schemaVersion() const noexcept
Schema version used by serialization adapters.
Definition ClothModel.h:117
std::span< const ClothModelParticle > particles() const noexcept
Read-only particles, valid until this model is destroyed or assigned.
Definition ClothModel.h:119
std::span< const ClothModelTetherConstraint > tetherConstraints() const noexcept
Read-only geodesic tethers generated from fixed particles.
Definition ClothModel.h:131
std::span< const ClothModelFoldConstraint > foldConstraints() const noexcept
Read-only fold constraints, valid until this model is destroyed or assigned.
Definition ClothModel.h:127
int gridRows() const noexcept
Grid row metadata, or zero for an arbitrary mesh.
Definition ClothModel.h:141
float gridSpacing() const noexcept
Grid spacing metadata, or zero for an arbitrary mesh.
Definition ClothModel.h:143
std::span< const ClothModelTriangle > triangles() const noexcept
Read-only triangles, valid until this model is destroyed or assigned.
Definition ClothModel.h:121
std::span< const ClothModelDistanceConstraint > distanceConstraints() const noexcept
Read-only distance constraints, valid until this model is destroyed or assigned.
Definition ClothModel.h:123
int gridCols() const noexcept
Grid column metadata, or zero for an arbitrary mesh.
Definition ClothModel.h:139
bool isClosed() const noexcept
Whether every topology edge belongs to exactly two triangles.
Definition ClothModel.h:135
float restVolume() const noexcept
Signed rest volume for a consistently wound closed mesh, otherwise zero.
Definition ClothModel.h:137
ClothConstraintKind
Type of a precomputed distance constraint in a cloth model.
Definition ClothModel.h:17
@ Structural
Precomputed rest-length constraint between two cloth particles.
Definition ClothModel.h:37
Adjacent-triangle fold relationship around the shared edge (a,b).
Definition ClothModel.h:45
Immutable rest-space particle stored by a ClothModel.
Definition ClothModel.h:24
Geodesic maximum-distance constraint from a particle to a fixed anchor.
Definition ClothModel.h:53
Triangle indices into a ClothModel particle array.
Definition ClothModel.h:32