Skip to content

Commit eee9960

Browse files
MeshAlgo : Label functions that require care around threading
1 parent 0c944c5 commit eee9960

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

include/IECoreScene/MeshAlgo.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ enum class NormalWeighting
6464
};
6565

6666
/// Calculate the normals of a mesh primitive, based on a given position primitive variable.
67+
///
68+
/// NOTE : Uses tbb internally - in order to integrate with a program using tbb, should be placed inside a
69+
/// this_task_arena::isolate or other mechanism to protect from stealing outer tasks.
6770

6871
/// Uniform normals are simple - just compute the average normal across the face.
6972
IECORESCENE_API PrimitiveVariable calculateUniformNormals( const MeshPrimitive *mesh, const std::string &position = "P", const IECore::Canceller *canceller = nullptr );
@@ -121,6 +124,9 @@ IECORESCENE_API void reorderVertices( MeshPrimitive *mesh, int id0, int id1, int
121124
/// Distributes points over a mesh using an IECore::PointDistribution in UV space
122125
/// and mapping it to 3d space. It gives a fairly even distribution regardless of
123126
/// vertex spacing, provided the UVs are well layed out.
127+
///
128+
/// NOTE : Uses tbb internally - in order to integrate with a program using tbb, should be placed inside a
129+
/// this_task_arena::isolate or other mechanism to protect from stealing outer tasks.
124130
IECORESCENE_API PointsPrimitivePtr distributePoints( const MeshPrimitive *mesh, float density = 100.0, const Imath::V2f &offset = Imath::V2f( 0 ), const std::string &densityMask = "density", const std::string &uvSet = "uv", const std::string &refPosition = "P", const IECore::StringAlgo::MatchPattern &primitiveVariables = "", const IECore::Canceller *canceller = nullptr );
125131

126132
/// Split the input mesh in to N meshes based on the N unique values contained in a segment primitive variable.
@@ -189,9 +195,15 @@ IECORESCENE_API std::vector<MeshPrimitivePtr> segment( const MeshPrimitive *mesh
189195

190196
/// Merge the input meshes into a single mesh.
191197
/// Any PrimitiveVariables that exist will be combined or extended using a default value.
198+
///
199+
/// NOTE : Uses tbb internally - in order to integrate with a program using tbb, should be placed inside a
200+
/// this_task_arena::isolate or other mechanism to protect from stealing outer tasks.
192201
IECORESCENE_API MeshPrimitivePtr merge( const std::vector<const MeshPrimitive *> &meshes, const IECore::Canceller *canceller = nullptr );
193202

194203
/// Generate a new triangulated MeshPrimitive
204+
///
205+
/// NOTE : Uses tbb internally - in order to integrate with a program using tbb, should be placed inside a
206+
/// this_task_arena::isolate or other mechanism to protect from stealing outer tasks.
195207
IECORESCENE_API MeshPrimitivePtr triangulate( const MeshPrimitive *mesh, const IECore::Canceller *canceller = nullptr );
196208

197209
/// Generate a list of connected vertices per vertex

0 commit comments

Comments
 (0)