Files
test/source/blender/blenkernel/BKE_subdiv_deform.hh
Hans Goudey 11f0d88d13 Subdiv: Move most blenkernel subdiv code to C++ namespace
Move most code to `blender::bke::subdiv`. That helps organization
and makes using C++ in subdiv code easier, which will be useful for
removing the unnecessary opensubdiv C-API wrapper.
2024-04-19 09:03:31 -04:00

32 lines
854 B
C++

/* SPDX-FileCopyrightText: 2019 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup bke
*/
#pragma once
#include "BLI_sys_types.h"
struct Mesh;
namespace blender::bke::subdiv {
struct Subdiv;
/* Special version of subdivision surface which calculates final positions for coarse vertices.
* Effectively is pushing the coarse positions to the limit surface.
*
* One of the usage examples is calculation of crazy space of subdivision modifier, allowing to
* paint on a deformed mesh with sub-surf on it.
*
* vertex_cos are supposed to hold coordinates of the coarse mesh. */
void deform_coarse_vertices(Subdiv *subdiv,
const Mesh *coarse_mesh,
float (*vertex_cos)[3],
int num_verts);
} // namespace blender::bke::subdiv