Blender
V3.3
|
#include "multires_reshape.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "BLI_math_vector.h"
#include "BKE_subdiv_foreach.h"
#include "BKE_subdiv_mesh.h"
Go to the source code of this file.
Classes | |
struct | MultiresReshapeAssignVertcosContext |
Typedefs | |
typedef struct MultiresReshapeAssignVertcosContext | MultiresReshapeAssignVertcosContext |
Functions | |
static void | multires_reshape_vertcos_foreach_single_vertex (const SubdivForeachContext *foreach_context, const GridCoord *grid_coord, const int subdiv_vertex_index) |
static void | multires_reshape_vertcos_foreach_vertex (const SubdivForeachContext *foreach_context, const PTexCoord *ptex_coord, const int subdiv_vertex_index) |
static bool | multires_reshape_vertcos_foreach_topology_info (const SubdivForeachContext *foreach_context, const int num_vertices, const int UNUSED(num_edges), const int UNUSED(num_loops), const int UNUSED(num_polygons), const int *UNUSED(subdiv_polygon_offset)) |
static void | multires_reshape_vertcos_foreach_vertex_inner (const SubdivForeachContext *foreach_context, void *UNUSED(tls_v), const int ptex_face_index, const float ptex_face_u, const float ptex_face_v, const int UNUSED(coarse_face_index), const int UNUSED(coarse_face_corner), const int subdiv_vertex_index) |
static void | multires_reshape_vertcos_foreach_vertex_every_corner (const struct SubdivForeachContext *foreach_context, void *UNUSED(tls_v), const int ptex_face_index, const float ptex_face_u, const float ptex_face_v, const int UNUSED(coarse_vertex_index), const int UNUSED(coarse_face_index), const int UNUSED(coarse_face_corner), const int subdiv_vertex_index) |
static void | multires_reshape_vertcos_foreach_vertex_every_edge (const struct SubdivForeachContext *foreach_context, void *UNUSED(tls_v), const int ptex_face_index, const float ptex_face_u, const float ptex_face_v, const int UNUSED(coarse_edge_index), const int UNUSED(coarse_face_index), const int UNUSED(coarse_face_corner), const int subdiv_vertex_index) |
bool | multires_reshape_assign_final_coords_from_vertcos (const MultiresReshapeContext *reshape_context, const float(*vert_coords)[3], const int num_vert_coords) |
bool multires_reshape_assign_final_coords_from_vertcos | ( | const MultiresReshapeContext * | reshape_context, |
const float(*) | vert_coords[3], | ||
int | num_vert_coords | ||
) |
Set displacement grids values at a reshape level to a object coordinates of the given source.
False will be returned if the number of vertex coordinates did not match required number of vertices at a reshape level.
Definition at line 170 of file multires_reshape_vertcos.c.
References MultiresReshapeContext::base_mesh, BKE_subdiv_foreach_subdiv_geometry(), MultiresReshapeContext::level, multires_reshape_vertcos_foreach_topology_info(), multires_reshape_vertcos_foreach_vertex_every_corner(), multires_reshape_vertcos_foreach_vertex_every_edge(), multires_reshape_vertcos_foreach_vertex_inner(), MultiresReshapeContext::reshape, MultiresReshapeAssignVertcosContext::reshape_context, SubdivToMeshSettings::resolution, MultiresReshapeContext::subdiv, SubdivForeachContext::topology_info, and SubdivToMeshSettings::use_optimal_display.
Referenced by multiresModifier_reshapeFromVertcos().
|
static |
Set single displacement grid value at a reshape level to a corresponding vertex coordinate. This function will be called for every side of a boundary grid points for inner coordinates.
Definition at line 29 of file multires_reshape_vertcos.c.
References BLI_assert, copy_v3_v3(), ReshapeGridElement::displacement, multires_reshape_grid_element_for_grid_coord(), NULL, MultiresReshapeAssignVertcosContext::reshape_context, SubdivForeachContext::user_data, and MultiresReshapeAssignVertcosContext::vert_coords.
Referenced by multires_reshape_vertcos_foreach_vertex().
|
static |
Definition at line 96 of file multires_reshape_vertcos.c.
References MultiresReshapeAssignVertcosContext::num_vert_coords, and SubdivForeachContext::user_data.
Referenced by multires_reshape_assign_final_coords_from_vertcos().
|
static |
Definition at line 44 of file multires_reshape_vertcos.c.
References MultiresReshapeContext::base_mesh, MultiresReshapeContext::face_start_grid_index, GridCoord::grid_index, Mesh::mpoly, multires_reshape_grid_to_face_index(), multires_reshape_ptex_coord_to_grid(), multires_reshape_vertcos_foreach_single_vertex(), MultiresReshapeAssignVertcosContext::reshape_context, MPoly::totloop, GridCoord::u, SubdivForeachContext::user_data, and GridCoord::v.
Referenced by multires_reshape_vertcos_foreach_vertex_every_corner(), multires_reshape_vertcos_foreach_vertex_every_edge(), and multires_reshape_vertcos_foreach_vertex_inner().
|
static |
Definition at line 131 of file multires_reshape_vertcos.c.
References multires_reshape_vertcos_foreach_vertex(), and PTexCoord::ptex_face_index.
Referenced by multires_reshape_assign_final_coords_from_vertcos().
|
static |
Definition at line 151 of file multires_reshape_vertcos.c.
References multires_reshape_vertcos_foreach_vertex(), and PTexCoord::ptex_face_index.
Referenced by multires_reshape_assign_final_coords_from_vertcos().
|
static |
Definition at line 112 of file multires_reshape_vertcos.c.
References multires_reshape_vertcos_foreach_vertex(), and PTexCoord::ptex_face_index.
Referenced by multires_reshape_assign_final_coords_from_vertcos().