2011-02-18 13:05:18 +00:00
|
|
|
/*
|
2008-04-16 22:40:48 +00:00
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
2002-10-12 11:37:38 +00:00
|
|
|
*
|
|
|
|
* 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
|
2008-04-16 22:40:48 +00:00
|
|
|
* of the License, or (at your option) any later version.
|
2002-10-12 11:37:38 +00:00
|
|
|
*
|
|
|
|
* 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,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2002-10-12 11:37:38 +00:00
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* The Original Code is: all of this file.
|
|
|
|
*
|
|
|
|
* Contributor(s): none yet.
|
|
|
|
*
|
2008-04-16 22:40:48 +00:00
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
2002-10-12 11:37:38 +00:00
|
|
|
*/
|
2012-02-17 18:59:41 +00:00
|
|
|
#ifndef __BKE_MBALL_H__
|
|
|
|
#define __BKE_MBALL_H__
|
2002-10-12 11:37:38 +00:00
|
|
|
|
2011-02-18 13:05:18 +00:00
|
|
|
/** \file BKE_mball.h
|
|
|
|
* \ingroup bke
|
|
|
|
* \since March 2001
|
|
|
|
* \author nzc
|
|
|
|
*/
|
2013-02-05 12:46:15 +00:00
|
|
|
struct Main;
|
2002-10-12 11:37:38 +00:00
|
|
|
struct MetaBall;
|
|
|
|
struct Object;
|
2009-01-04 14:14:06 +00:00
|
|
|
struct Scene;
|
2002-10-12 11:37:38 +00:00
|
|
|
struct MetaElem;
|
2004-06-29 17:10:13 +00:00
|
|
|
|
2012-05-07 06:38:41 +00:00
|
|
|
void BKE_mball_unlink(struct MetaBall *mb);
|
|
|
|
void BKE_mball_free(struct MetaBall *mb);
|
2013-02-05 12:46:15 +00:00
|
|
|
struct MetaBall *BKE_mball_add(struct Main *bmain, const char *name);
|
2012-05-07 06:38:41 +00:00
|
|
|
struct MetaBall *BKE_mball_copy(struct MetaBall *mb);
|
2004-06-29 17:10:13 +00:00
|
|
|
|
2012-05-07 06:38:41 +00:00
|
|
|
void BKE_mball_make_local(struct MetaBall *mb);
|
2004-06-29 17:10:13 +00:00
|
|
|
|
2013-03-09 05:35:49 +00:00
|
|
|
bool BKE_mball_is_basis_for(struct Object *ob1, struct Object *ob2);
|
|
|
|
bool BKE_mball_is_basis(struct Object *ob);
|
2012-05-07 06:38:41 +00:00
|
|
|
struct Object *BKE_mball_basis_find(struct Scene *scene, struct Object *ob);
|
2004-06-29 17:10:13 +00:00
|
|
|
|
2012-05-07 06:38:41 +00:00
|
|
|
void BKE_mball_texspace_calc(struct Object *ob);
|
|
|
|
float *BKE_mball_make_orco(struct Object *ob, struct ListBase *dispbase);
|
2004-06-29 17:10:13 +00:00
|
|
|
|
2012-05-07 06:38:41 +00:00
|
|
|
void BKE_mball_properties_copy(struct Scene *scene, struct Object *active_object);
|
2002-10-12 11:37:38 +00:00
|
|
|
|
2013-06-28 18:19:55 +00:00
|
|
|
bool BKE_mball_minmax(struct MetaBall *mb, float min[3], float max[3]);
|
|
|
|
bool BKE_mball_minmax_ex(struct MetaBall *mb, float min[3], float max[3],
|
|
|
|
float obmat[4][4], const short flag);
|
|
|
|
bool BKE_mball_center_median(struct MetaBall *mb, float r_cent[3]);
|
|
|
|
bool BKE_mball_center_bounds(struct MetaBall *mb, float r_cent[3]);
|
2014-09-01 20:09:31 +10:00
|
|
|
void BKE_mball_transform(struct MetaBall *mb, float mat[4][4]);
|
2012-10-06 03:34:52 +00:00
|
|
|
void BKE_mball_translate(struct MetaBall *mb, const float offset[3]);
|
2012-02-26 08:55:31 +00:00
|
|
|
|
2012-05-07 06:38:41 +00:00
|
|
|
struct MetaElem *BKE_mball_element_add(struct MetaBall *mb, const int type);
|
2002-10-30 02:07:20 +00:00
|
|
|
|
2012-10-06 03:02:14 +00:00
|
|
|
void BKE_mball_select_all(struct MetaBall *mb);
|
|
|
|
void BKE_mball_deselect_all(struct MetaBall *mb);
|
|
|
|
void BKE_mball_select_swap(struct MetaBall *mb);
|
|
|
|
|
2015-05-12 13:57:11 +05:00
|
|
|
/* **** Depsgraph evaluation **** */
|
|
|
|
|
|
|
|
struct EvaluationContext;
|
|
|
|
|
|
|
|
void BKE_mball_eval_geometry(struct EvaluationContext *eval_ctx,
|
|
|
|
struct MetaBall *mball);
|
|
|
|
|
2012-04-28 16:49:00 +00:00
|
|
|
#endif
|