载入中...
搜索中...
未找到
eve::fluids::FluidSurfaceBinding类 参考

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.

参数
positionsmodel-space vertex positions.
indicestriangle indices; the size must be a multiple of three.
uvsoptional 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.

参数
locationtriangle id and barycentric coordinates.
dtseconds 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()

◆ project()

bool eve::fluids::FluidSurfaceBinding::project ( const glm::vec3 &  worldPosition,
float  maxDistance,
SurfaceLocation &  outLocation 
) const

Find the closest material point on the current surface.

参数
worldPositionpoint to project.
maxDistancemaximum accepted distance; negative means unlimited.
outLocationreceives 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()

int eve::fluids::FluidSurfaceBinding::vertexCount ( ) const
inline

Vertex count.

返回
number of vertices in the bound topology.

在文件 FluidSurfaceBinding.h 第 79 行定义.

◆ 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.

参数
startinitial material-space address.
worldDisplacementdesired displacement; its normal component is discarded.
maxCrossingssafety 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.

被这些函数引用 eve::fluids::FluidSurfaceConstraintAdapter::walk().


该类的文档由以下文件生成: