载入中...
搜索中...
未找到
LayeredCloth3D.h
浏览该文件的文档.
1#pragma once
2#include <memory>
3#include <span>
5
6namespace eve::physics {
16public:
22 LayeredCloth3D(int count, int cols, int rows, float spacing, float gap, float x, float y, float z);
27 explicit LayeredCloth3D(std::span<const ClothModel> models);
38 Cloth3D& layer(int index);
40 [[nodiscard]] int getLayerCount() const;
46 void update(float dt);
48 void setSolver(int substeps, int passes);
50 void setInterCollision(bool enabled);
52 [[nodiscard]] bool getInterCollision() const;
54 [[nodiscard]] int getContactCount() const;
56 void setWindVelocity(float x, float y, float z);
58 void reset();
62 void draw(graphics::Graphics* gfx);
63
64private:
65 void solveContacts(Cloth3D& a, Cloth3D& b);
66 std::vector<std::unique_ptr<Cloth3D>> layers_;
67 int substeps_ = 4;
68 int passes_ = 3;
69 int contacts_ = 0;
70 bool interCollision_ = true;
71};
72} // namespace eve::physics
double z
double y
double x
float gap
#define EVENGINE_API_DOMAINS
Definition Export.h:110
int rows
int cols
MeleePoint3 b
Definition MeleeHit.cpp:41
MeleePoint3 a
Definition MeleeHit.cpp:40
MeshVfxBatchedDraw draw
double dt
TileLayer * layer
int count
int spacing
uint32_t index
Interactive 3D cloth — Verlet particles + distance constraints. Meter space, +Y up,...
Definition Cloth3D.h:32
Owns multiple cloth sheets and advances their contacts synchronously. @ownership Owns every layer; no...
~LayeredCloth3D()
Release owned runtime layers; render resources follow the graphics owner.
LayeredCloth3D & operator=(const LayeredCloth3D &)=delete
Owned layers cannot be copy-assigned between groups.
LayeredCloth3D(const LayeredCloth3D &)=delete
Owned layers cannot be copied between groups.
Optional physics backend for vehicle mobility and body attach.
Definition Climbing.h:36
bool enabled