42 const auto org = mesh.topology.org( e1 );
43 const auto dest = mesh.topology.dest( e );
44 if ( org < data.
size() && dest < data.
size() )
45 data.
push_back( data[org] * 0.5f + data[dest] * 0.5f );
57 auto oldLeft = mesh.topology.left( e );
59 auto newLeft = mesh.topology.left( e1 );
61 if ( newLeft && oldLeft && oldLeft < data.
size() )
65 auto oldRight = mesh.topology.right( e );
67 auto newRight = mesh.topology.right( e1 );
69 if ( newRight && oldRight && oldRight < data.
size() )
#define MRMESH_API
Definition MRMeshFwd.h:80
Definition MRMeshAttributesToUpdate.h:10
Definition MRMesh/MRMesh.h:23
std::vector<T>-like container that requires specific indexing type,
Definition MRVector.h:19
std::size_t size() const
Definition MRVector.h:51
void push_back(const T &t)
Definition MRVector.h:128
void autoResizeSet(I pos, size_t len, T val) MR_REQUIRES_IF_SUPPORTED(sizeof(T)>0 &&std
Definition MRVector.h:96
Definition MRCameraOrientationPlugin.h:8
MRMESH_API OnEdgeSplit meshOnEdgeSplitVertAttribute(const Mesh &mesh, const MeshAttributesToUpdate ¶ms)
auto onEdgeSplitVertAttribute(const Mesh &mesh, Vector< T, VertId > &data)
Definition MRMeshSubdivideCallbacks.h:38
auto onEdgeSplitFaceAttribute(const Mesh &mesh, Vector< T, FaceId > &data)
Definition MRMeshSubdivideCallbacks.h:52
MRMESH_API OnEdgeSplit meshOnEdgeSplitFaceAttribute(const Mesh &mesh, const MeshAttributesToUpdate ¶ms)
MRMESH_API OnEdgeSplit meshOnEdgeSplitAttribute(const Mesh &mesh, const MeshAttributesToUpdate ¶ms)