Dynamic triangle surface used to bind films and droplets to deforming meshes. 更多...
#include <FluidSurfaceBinding.h>
Public 成员函数 | |
| bool | build (const std::vector< glm::vec3 > &positions, const std::vector< uint32_t > &indices, const std::vector< glm::vec2 > &uvs={}) |
| Build topology and initialize the current and previous poses. | |
| void | setTransform (const glm::mat4 &transform) |
| Apply a new rigid pose and preserve the old pose for velocity queries. | |
| bool | setDeformedPositions (const std::vector< glm::vec3 > &worldPositions) |
| Supply a new deformed world-space pose and preserve the previous pose. | |
| void | commitPose () |
| Make the current pose the previous pose, yielding zero surface velocity. | |
| bool | isValid () const |
| True when valid. | |
| int | triangleCount () const |
| Triangle count. | |
| int | vertexCount () const |
| Vertex count. | |
| std::vector< glm::uvec3 > | triangles () const |
| Triangles. | |
| SurfaceSample | evaluate (const SurfaceLocation &location, float dt) const |
| Evaluate a surface address in the current and previous poses. | |
| bool | project (const glm::vec3 &worldPosition, float maxDistance, SurfaceLocation &outLocation) const |
| Find the closest material point on the current surface. | |
| SurfaceWalkResult | walkAcrossSurface (const SurfaceLocation &start, const glm::vec3 &worldDisplacement, int maxCrossings=16) const |
| Move a location by a world-space displacement, crossing triangle edges. | |
| int | adjacentTriangle (uint32_t triangle, int oppositeVertex) const |
| Adjacent triangle. | |
详细描述
Dynamic triangle surface used to bind films and droplets to deforming meshes.
Locations are stored as triangle id plus barycentric coordinates, so they remain stable while the supplied vertices move. Call setTransform for rigid motion or setDeformedPositions for skinning, morphing and procedural deformation.
在文件 FluidSurfaceBinding.h 第 45 行定义.
成员函数说明
◆ adjacentTriangle()
| int eve::fluids::FluidSurfaceBinding::adjacentTriangle | ( | uint32_t | triangle, |
| int | oppositeVertex | ||
| ) | const |
Adjacent triangle.
- 返回
- neighboring triangle across the edge opposite local vertex, or -1 at a boundary.
在文件 FluidSurfaceBinding.cpp 第 305 行定义.
引用了 oppositeVertex , 以及 triangle.
被这些函数引用 walkAcrossSurface().
◆ build()
| bool eve::fluids::FluidSurfaceBinding::build | ( | const std::vector< glm::vec3 > & | positions, |
| const std::vector< uint32_t > & | indices, | ||
| const std::vector< glm::vec2 > & | uvs = {} |
||
| ) |
Build topology and initialize the current and previous poses.
- 参数
-
positions model-space vertex positions. indices triangle indices; the size must be a multiple of three. uvs optional per-vertex simulation UVs.
- 返回
- true when the mesh is a valid, non-empty triangle surface.
在文件 FluidSurfaceBinding.cpp 第 80 行定义.
引用了 a, ab, ac, b, edges, index, indices, key, positions, triangle, triangleCount() , 以及 u.
被这些函数引用 eve::fluids::FluidSurfaceConstraintAdapter::build().
◆ commitPose()
| void eve::fluids::FluidSurfaceBinding::commitPose | ( | ) |
Make the current pose the previous pose, yielding zero surface velocity.
在文件 FluidSurfaceBinding.cpp 第 147 行定义.
◆ evaluate()
| SurfaceSample eve::fluids::FluidSurfaceBinding::evaluate | ( | const SurfaceLocation & | location, |
| float | dt | ||
| ) | const |
Evaluate a surface address in the current and previous poses.
- 参数
-
location triangle id and barycentric coordinates. dt seconds between the two poses; non-positive values yield zero velocity.
在文件 FluidSurfaceBinding.cpp 第 194 行定义.
引用了 bary, eve::fluids::SurfaceLocation::barycentric, edge, isValid(), tangent, eve::fluids::SurfaceLocation::triangle , 以及 triangleCount().
被这些函数引用 eve::fluids::SurfaceDropletSimulation::addDroplet(), eve::fluids::FluidSurfaceConstraintAdapter::evaluate() , 以及 walkAcrossSurface().
◆ isValid()
| bool eve::fluids::FluidSurfaceBinding::isValid | ( | ) | const |
True when valid.
- 返回
- true when a valid topology and pose are available.
在文件 FluidSurfaceBinding.cpp 第 149 行定义.
引用了 u.
被这些函数引用 eve::fluids::SurfaceDropletSimulation::addDroplet(), eve::fluids::FluidSurfaceConstraintAdapter::evaluate(), evaluate(), eve::fluids::FluidSurfaceConstraintAdapter::isValid(), eve::fluids::FluidSurfaceConstraintAdapter::project(), project(), setDeformedPositions(), setTransform(), eve::fluids::SurfaceDropletSimulation::step(), eve::fluids::FluidSurfaceConstraintAdapter::walk() , 以及 walkAcrossSurface().
◆ project()
| bool eve::fluids::FluidSurfaceBinding::project | ( | const glm::vec3 & | worldPosition, |
| float | maxDistance, | ||
| SurfaceLocation & | outLocation | ||
| ) | const |
Find the closest material point on the current surface.
- 参数
-
worldPosition point to project. maxDistance maximum accepted distance; negative means unlimited. outLocation receives the closest address.
- 返回
- true when a point within maxDistance was found.
在文件 FluidSurfaceBinding.cpp 第 216 行定义.
引用了 bary, best, isValid(), point , 以及 triangleCount().
被这些函数引用 eve::fluids::FluidSurfaceConstraintAdapter::project().
◆ setDeformedPositions()
| bool eve::fluids::FluidSurfaceBinding::setDeformedPositions | ( | const std::vector< glm::vec3 > & | worldPositions | ) |
Supply a new deformed world-space pose and preserve the previous pose.
- 返回
- false when the vertex count differs from the topology.
在文件 FluidSurfaceBinding.cpp 第 140 行定义.
引用了 isValid().
被这些函数引用 eve::fluids::FluidSurfaceConstraintAdapter::setDeformedPositions().
◆ setTransform()
| void eve::fluids::FluidSurfaceBinding::setTransform | ( | const glm::mat4 & | transform | ) |
Apply a new rigid pose and preserve the old pose for velocity queries.
在文件 FluidSurfaceBinding.cpp 第 133 行定义.
引用了 isValid().
被这些函数引用 eve::fluids::FluidSurfaceConstraintAdapter::setTransform().
◆ triangleCount()
| int eve::fluids::FluidSurfaceBinding::triangleCount | ( | ) | const |
Triangle count.
- 返回
- number of triangles in the bound topology.
在文件 FluidSurfaceBinding.cpp 第 154 行定义.
被这些函数引用 eve::fluids::SurfaceDropletSimulation::addDroplet(), build(), eve::fluids::FluidSurfaceConstraintAdapter::evaluate(), evaluate(), project(), triangles() , 以及 walkAcrossSurface().
◆ triangles()
| std::vector< glm::uvec3 > eve::fluids::FluidSurfaceBinding::triangles | ( | ) | const |
Triangles.
- 返回
- indexed triangle topology for wet-film fields and render integration.
在文件 FluidSurfaceBinding.cpp 第 156 行定义.
引用了 triangleCount().
◆ vertexCount()
|
inline |
◆ walkAcrossSurface()
| SurfaceWalkResult eve::fluids::FluidSurfaceBinding::walkAcrossSurface | ( | const SurfaceLocation & | start, |
| const glm::vec3 & | worldDisplacement, | ||
| int | maxCrossings = 16 |
||
| ) | const |
Move a location by a world-space displacement, crossing triangle edges.
- 参数
-
start initial material-space address. worldDisplacement desired displacement; its normal component is discarded. maxCrossings safety bound for topology traversal.
- 返回
- final address, boundary state and unconsumed displacement.
在文件 FluidSurfaceBinding.cpp 第 240 行定义.
引用了 adjacentTriangle(), eve::fluids::SurfaceLocation::barycentric, evaluate(), from, isValid(), eve::fluids::SurfaceWalkResult::location, eve::fluids::SurfaceSample::position, eve::fluids::SurfaceWalkResult::reachedBoundary, eve::fluids::SurfaceWalkResult::remainingDisplacement, start, t, to, eve::fluids::SurfaceLocation::triangle, triangleCount() , 以及 eve::fluids::SurfaceWalkResult::valid.
该类的文档由以下文件生成:
- src/modules/fluids/FluidSurfaceBinding.h
- src/modules/fluids/FluidSurfaceBinding.cpp