UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Geometry::TMeshUniformSurfaceSampling< TMeshType, RealType > Class Template Reference

#include <MeshSurfacePointSampling.h>

Public Member Functions

 TMeshUniformSurfaceSampling ()=default
 
 TMeshUniformSurfaceSampling (const TMeshType &Mesh)
 
bool Init (const TMeshType &Mesh)
 
bool IsValid () const
 
int32 DrawTriangleIDSample (RealType UniformRandom1, RealType UniformRandom2) const
 

Constructor & Destructor Documentation

◆ TMeshUniformSurfaceSampling() [1/2]

template<typename TMeshType , typename RealType >
UE::Geometry::TMeshUniformSurfaceSampling< TMeshType, RealType >::TMeshUniformSurfaceSampling ( )
default

◆ TMeshUniformSurfaceSampling() [2/2]

template<typename TMeshType , typename RealType >
UE::Geometry::TMeshUniformSurfaceSampling< TMeshType, RealType >::TMeshUniformSurfaceSampling ( const TMeshType Mesh)
inline

Member Function Documentation

◆ DrawTriangleIDSample()

template<typename TMeshType , typename RealType >
int32 UE::Geometry::TMeshUniformSurfaceSampling< TMeshType, RealType >::DrawTriangleIDSample ( RealType  UniformRandom1,
RealType  UniformRandom2 
) const
inline

Sample a random triangle, with probability proportional to relative triangle area. Note: Use VectorUtil::UniformSampleTrianglePoint to generate a uniform random point on a given triangle, or VectorUtil::UniformSampleTriangleBarycentricCoords for a uniform random barycentric coordinate

Parameters UniformRandom1, UniformRandom2 must be in the [0,1) range.

◆ Init()

template<typename TMeshType , typename RealType >
bool UE::Geometry::TMeshUniformSurfaceSampling< TMeshType, RealType >::Init ( const TMeshType Mesh)
inline

◆ IsValid()

template<typename TMeshType , typename RealType >
bool UE::Geometry::TMeshUniformSurfaceSampling< TMeshType, RealType >::IsValid ( ) const
inline

The documentation for this class was generated from the following file: