Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_subdiv_mesh.h
| Show All 24 Lines | |||||
| #include "BLI_sys_types.h" | #include "BLI_sys_types.h" | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| extern "C" { | extern "C" { | ||||
| #endif | #endif | ||||
| struct Mesh; | struct Mesh; | ||||
| struct MEdge; | |||||
| struct Subdiv; | struct Subdiv; | ||||
| typedef struct SubdivToMeshSettings { | typedef struct SubdivToMeshSettings { | ||||
| /* Resolution at which regular ptex (created for quad polygon) are being | /* Resolution at which regular ptex (created for quad polygon) are being | ||||
| * evaluated. This defines how many vertices final mesh will have: every | * evaluated. This defines how many vertices final mesh will have: every | ||||
| * regular ptex has resolution^2 vertices. Special (irregular, or ptex | * regular ptex has resolution^2 vertices. Special (irregular, or ptex | ||||
| * created for a corner of non-quad polygon) will have resolution of | * created for a corner of non-quad polygon) will have resolution of | ||||
| * `resolution - 1`. | * `resolution - 1`. | ||||
| */ | */ | ||||
| int resolution; | int resolution; | ||||
| /* When true, only edges emitted from coarse ones will be displayed. */ | /* When true, only edges emitted from coarse ones will be displayed. */ | ||||
| bool use_optimal_display; | bool use_optimal_display; | ||||
| } SubdivToMeshSettings; | } SubdivToMeshSettings; | ||||
| /* Create real hi-res mesh from subdivision, all geometry is "real". */ | /* Create real hi-res mesh from subdivision, all geometry is "real". */ | ||||
| struct Mesh *BKE_subdiv_to_mesh(struct Subdiv *subdiv, | struct Mesh *BKE_subdiv_to_mesh(struct Subdiv *subdiv, | ||||
| const SubdivToMeshSettings *settings, | const SubdivToMeshSettings *settings, | ||||
| const struct Mesh *coarse_mesh); | const struct Mesh *coarse_mesh); | ||||
| /* Interpolate a position along the `coarse_edge` at the relative `u` coordinate. If `is_simple` is | |||||
| * false, this will perform a B-Spline interpolation using the edge neighbors, otherwise a linear | |||||
| * interpolation will be done base on the edge vertices. */ | |||||
| void BKE_subdiv_mesh_interpolate_position_on_edge(const struct Mesh *coarse_mesh, | |||||
| const struct MEdge *coarse_edge, | |||||
| bool is_simple, | |||||
| float u, | |||||
| float pos_r[3]); | |||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||