Subdiv: Move mesh creation functionality to own header
This commit is contained in:
parent
916edab639
commit
c9707a408f
|
@ -171,22 +171,6 @@ Subdiv *BKE_subdiv_new_from_mesh(const SubdivSettings *settings,
|
|||
|
||||
void BKE_subdiv_free(Subdiv *subdiv);
|
||||
|
||||
/* =========================== SUBDIV TO MESH API =========================== */
|
||||
|
||||
typedef struct SubdivToMeshSettings {
|
||||
/* Resolution at which ptex are being evaluated.
|
||||
* This defines how many vertices final mesh will have: every ptex has
|
||||
* resolution^2 vertices.
|
||||
*/
|
||||
int resolution;
|
||||
} SubdivToMeshSettings;
|
||||
|
||||
/* Create real hi-res mesh from subdivision, all geometry is "real". */
|
||||
struct Mesh *BKE_subdiv_to_mesh(
|
||||
Subdiv *subdiv,
|
||||
const SubdivToMeshSettings *settings,
|
||||
const struct Mesh *coarse_mesh);
|
||||
|
||||
/* ============================ DISPLACEMENT API ============================ */
|
||||
|
||||
void BKE_subdiv_displacement_attach_from_multires(
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* ***** BEGIN GPL LICENSE BLOCK *****
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* The Original Code is Copyright (C) 2018 by Blender Foundation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Contributor(s): Sergey Sharybin.
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
/** \file BKE_subdiv_mesh.h
|
||||
* \ingroup bke
|
||||
* \since July 2018
|
||||
* \author Sergey Sharybin
|
||||
*/
|
||||
|
||||
#ifndef __BKE_SUBDIV_MESH_H__
|
||||
#define __BKE_SUBDIV_MESH_H__
|
||||
|
||||
#include "BLI_sys_types.h"
|
||||
|
||||
struct Mesh;
|
||||
struct Subdiv;
|
||||
|
||||
typedef struct SubdivToMeshSettings {
|
||||
/* Resolution at which ptex are being evaluated.
|
||||
* This defines how many vertices final mesh will have: every ptex has
|
||||
* resolution^2 vertices.
|
||||
*/
|
||||
int resolution;
|
||||
} SubdivToMeshSettings;
|
||||
|
||||
/* Create real hi-res mesh from subdivision, all geometry is "real". */
|
||||
struct Mesh *BKE_subdiv_to_mesh(
|
||||
struct Subdiv *subdiv,
|
||||
const SubdivToMeshSettings *settings,
|
||||
const struct Mesh *coarse_mesh);
|
||||
|
||||
#endif /* __BKE_SUBDIV)MESH_H__ */
|
|
@ -327,6 +327,7 @@ set(SRC
|
|||
BKE_subdiv.h
|
||||
BKE_subdiv_eval.h
|
||||
BKE_subdiv_foreach.h
|
||||
BKE_subdiv_mesh.h
|
||||
BKE_subsurf.h
|
||||
BKE_suggestions.h
|
||||
BKE_text.h
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "BKE_subdiv.h"
|
||||
#include "BKE_subdiv_eval.h"
|
||||
#include "BKE_subdiv_foreach.h"
|
||||
#include "BKE_subdiv_mesh.h"
|
||||
|
||||
#include "DEG_depsgraph_query.h"
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include "BKE_modifier.h"
|
||||
#include "BKE_multires.h"
|
||||
#include "BKE_subdiv.h"
|
||||
#include "BKE_subdiv_mesh.h"
|
||||
|
||||
void BKE_multires_subdiv_settings_init(
|
||||
SubdivSettings *settings,
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "BKE_mesh.h"
|
||||
#include "BKE_key.h"
|
||||
#include "BKE_subdiv.h"
|
||||
#include "BKE_subdiv_mesh.h"
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
* \ingroup bke
|
||||
*/
|
||||
|
||||
#include "BKE_subdiv.h"
|
||||
#include "BKE_subdiv_mesh.h"
|
||||
|
||||
#include "atomic_ops.h"
|
||||
|
||||
|
@ -42,6 +42,7 @@
|
|||
|
||||
#include "BKE_mesh.h"
|
||||
#include "BKE_key.h"
|
||||
#include "BKE_subdiv.h"
|
||||
#include "BKE_subdiv_eval.h"
|
||||
#include "BKE_subdiv_foreach.h"
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include "BKE_multires.h"
|
||||
#include "BKE_modifier.h"
|
||||
#include "BKE_subdiv.h"
|
||||
#include "BKE_subdiv_mesh.h"
|
||||
#include "BKE_subsurf.h"
|
||||
|
||||
#include "DEG_depsgraph_query.h"
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "BKE_cdderivedmesh.h"
|
||||
#include "BKE_scene.h"
|
||||
#include "BKE_subdiv.h"
|
||||
#include "BKE_subdiv_mesh.h"
|
||||
#include "BKE_subsurf.h"
|
||||
|
||||
#include "DEG_depsgraph.h"
|
||||
|
|
Loading…
Reference in New Issue