Blender V2.61 - r43446
Defines | Functions | Variables

mball.c File Reference

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <ctype.h>
#include <float.h>
#include "MEM_guardedalloc.h"
#include "DNA_material_types.h"
#include "DNA_object_types.h"
#include "DNA_meta_types.h"
#include "DNA_scene_types.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_bpath.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_animsys.h"
#include "BKE_scene.h"
#include "BKE_library.h"
#include "BKE_displist.h"
#include "BKE_mball.h"
#include "BKE_object.h"
#include "BKE_material.h"

Go to the source code of this file.

Defines

#define RES   12
#define L   0
#define R   1
#define B   2
#define T   3
#define N   4
#define F   5
#define LBN   0
#define LBF   1
#define LTN   2
#define LTF   3
#define RBN   4
#define RBF   5
#define RTN   6
#define RTF   7
#define HASHBIT   (5)
#define HASHSIZE   (size_t)(1<<(3*HASHBIT))
#define HASH(i, j, k)   ((((( (i) & 31)<<5) | ( (j) & 31))<<5 ) | ( (k) & 31) )
#define MB_BIT(i, bit)   (((i)>>(bit))&1)
#define FLIP(i, bit)   ((i)^1<<(bit))
#define LB   0
#define LT   1
#define LN   2
#define LF   3
#define RB   4
#define RT   5
#define RN   6
#define RF   7
#define BN   8
#define BF   9
#define TN   10
#define TF   11

Functions

void unlink_mball (MetaBall *mb)
void free_mball (MetaBall *mb)
MetaBalladd_mball (const char *name)
MetaBallcopy_mball (MetaBall *mb)
static void extern_local_mball (MetaBall *mb)
void make_local_mball (MetaBall *mb)
MetaElemadd_metaball_element (MetaBall *mb, const int type)
void tex_space_mball (Object *ob)
float * make_orco_mball (Object *ob, ListBase *dispbase)
int is_basis_mball (Object *ob)
 Test, if Object *ob is basic MetaBall.
int is_mball_basis_for (Object *ob1, Object *ob2)
void copy_mball_properties (Scene *scene, Object *active_object)
Objectfind_basis_mball (Scene *scene, Object *basis)
 This function finds basic MetaBall.
void calc_mballco (MetaElem *ml, float *vec)
float densfunc (MetaElem *ball, float x, float y, float z)
octal_nodefind_metaball_octal_node (octal_node *node, float x, float y, float z, short depth)
float metaball (float x, float y, float z)
void accum_mballfaces (int i1, int i2, int i3, int i4)
void * new_pgn_element (int size)
void freepolygonize (PROCESS *p)
void docube (CUBE *cube, PROCESS *p, MetaBall *mb)
void testface (int i, int j, int k, CUBE *old, int bit, int c1, int c2, int c3, int c4, PROCESS *p)
CORNERsetcorner (PROCESS *p, int i, int j, int k)
int nextcwedge (int edge, int face)
int otherface (int edge, int face)
void makecubetable (void)
void BKE_freecubetable (void)
int setcenter (CENTERLIST *table[], int i, int j, int k)
void setedge (EDGELIST *table[], int i1, int j1, int k1, int i2, int j2, int k2, int vid)
int getedge (EDGELIST *table[], int i1, int j1, int k1, int i2, int j2, int k2)
void addtovertices (VERTICES *vertices, VERTEX v)
void vnormal (MB_POINT *point, PROCESS *p, MB_POINT *v)
int vertid (CORNER *c1, CORNER *c2, PROCESS *p, MetaBall *mb)
void converge (MB_POINT *p1, MB_POINT *p2, float v1, float v2, float(*function)(float, float, float), MB_POINT *p, MetaBall *mb, int f)
void add_cube (PROCESS *mbproc, int i, int j, int k, int count)
void find_first_points (PROCESS *mbproc, MetaBall *mb, int a)
void polygonize (PROCESS *mbproc, MetaBall *mb)
float init_meta (Scene *scene, Object *ob)
void fill_metaball_octal_node (octal_node *node, MetaElem *ml, short i)
void subdivide_metaball_octal_node (octal_node *node, float size_x, float size_y, float size_z, short depth)
void free_metaball_octal_node (octal_node *node)
void init_metaball_octal_tree (int depth)
void metaball_polygonize (Scene *scene, Object *ob, ListBase *dispbase)

Variables

static float thresh = 0.6f
static int totelem = 0
static MetaElem ** mainb
static octal_treemetaball_tree = NULL
static int * indices = NULL
static int totindex
static int curindex
static INTLISTScubetable [256]
static int corner1 [12]
static int corner2 [12]
static int leftface [12]
static int rightface [12]

Detailed Description

Definition in file mball.c.


Define Documentation

#define B   2
#define BF   9

Definition at line 814 of file mball.c.

Referenced by nextcwedge().

#define BN   8

Definition at line 813 of file mball.c.

Referenced by nextcwedge().

#define F   5
#define FLIP (   i,
  bit 
)    ((i)^1<<(bit))

Definition at line 520 of file mball.c.

Referenced by testface().

#define HASH (   i,
  j,
 
)    ((((( (i) & 31)<<5) | ( (j) & 31))<<5 ) | ( (k) & 31) )
#define HASHBIT   (5)

Definition at line 514 of file mball.c.

#define HASHSIZE   (size_t)(1<<(3*HASHBIT))

Definition at line 515 of file mball.c.

Referenced by polygonize().

#define L   0
#define LB   0

Definition at line 805 of file mball.c.

Referenced by nextcwedge().

#define LBF   1

Definition at line 503 of file mball.c.

Referenced by polygonize().

#define LBN   0

Definition at line 502 of file mball.c.

Referenced by polygonize().

#define LF   3

Definition at line 808 of file mball.c.

Referenced by nextcwedge().

#define LN   2

Definition at line 807 of file mball.c.

Referenced by nextcwedge().

#define LT   1

Definition at line 806 of file mball.c.

Referenced by nextcwedge().

#define LTF   3

Definition at line 505 of file mball.c.

Referenced by polygonize().

#define LTN   2

Definition at line 504 of file mball.c.

Referenced by polygonize().

#define MB_BIT (   i,
  bit 
)    (((i)>>(bit))&1)

Definition at line 519 of file mball.c.

Referenced by add_cube(), and makecubetable().

#define N   4

Definition at line 500 of file mball.c.

Referenced by EdgeDice::add_vert(), FLUID_3D::addVorticity(), bt_segment_collision(), TNT::Cholesky_upper_factorization(), TNT::Vector< Subscript >::copy(), TNT::Fortran_Matrix< T >::copy(), TNT::Matrix< MT_Scalar >::copy(), create_mesh(), TNT::dot_prod(), eigenvalue_solve(), KX_Camera::ExtractFrustumSphere(), fht_convolve(), fresnel_dielectric(), MemoryAllocator< N >::getBytes(), InitAtmosphere(), TNT::Vector< Subscript >::initialize(), TNT::Fortran_Matrix< T >::initialize(), TNT::Matrix< MT_Scalar >::initialize(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), lattice_foreachScreenVert(), TNT::Lower_triangular_solve(), TNT::LU_factor(), TNT::matmult(), TNT::Matrix< MT_Scalar >::Matrix(), MemoryAllocator< N >::MemoryAllocator(), TNT::mult_element(), TNT::Vector_Adaptor< BBVec >::newsize(), TNT::Fortran_Sparse_Vector< T >::newsize(), TNT::operator*(), TNT::operator+(), TNT::operator-(), TNT::operator<<(), TNT::Vector_Adaptor< BBVec >::operator=(), TNT::Region2D< Array2D >::operator=(), TNT::Region1D< Array1D >::operator=(), TNT::operator>>(), TNT::QR_factor(), TNT::QR_solve(), TNT::R_solve(), reflect(), btUnionFind::reset(), sample_cos_hemisphere(), sample_uniform_hemisphere(), QuadDice::scale_factor(), sCopy_Dense_Matrix(), TNT::Vector< Subscript >::set(), TNT::Fortran_Matrix< T >::set(), TNT::Matrix< MT_Scalar >::set(), iTaSC::WSDLSSolver::solve(), subsurf_calculate_limit_positions(), TNT::transpose(), TNT::Unit_lower_triangular_solve(), TNT::Unit_upper_triangular_solve(), AUD_SoftwareDevice::AUD_SoftwareHandle::update(), Upper_symmetric_eigenvalue_solve(), TNT::Upper_triangular_solve(), TNT::Vector< Subscript >::Vector(), TNT::Vector_Adaptor< BBVec >::Vector_Adaptor(), TNT::vectoradd(), TNT::vectorscale(), and TNT::vectorsub().

#define R   1

Definition at line 497 of file mball.c.

Referenced by add_filt_fmask(), add_filt_fmask_pixsize(), add_filt_passes(), add_halo_flare(), addtosamp_shr(), ambient_occlusion(), ambient_occlusion_apply(), atm_tile(), bake_displacement(), bake_intersect_tree(), bake_set_shade_input(), bake_shade(), bsdf_microfacet_beckmann_sample(), bsdf_microfacet_ggx_sample(), bsdf_refraction_sample(), calc_renderco_ortho(), calc_renderco_zbuf(), calc_view_vector(), compatible_bump_compute(), ComputeTwist(), btCollisionWorld::convexSweepTest(), copyto_abufz(), count_mask(), cubemap_glob(), do_2d_mapping(), do_bake_shade(), do_bake_thread(), do_halo_tex(), do_lamp_tex(), do_sky_tex(), edge_enhance_add(), edge_enhance_tile(), environment_lighting_apply(), envmaptex(), EulerAngleFromMatrix(), eulO_to_gimbal_axis(), eulO_to_mat3(), eulO_to_quat(), KDL::Frame::Frame(), KDL::Frame2::Frame2(), fresnel(), get_lights(), get_next_bake_face(), get_sample_layers(), halo_pixelstruct(), halo_tile(), haloZtoDist(), image_sample(), imagewrap(), imagewraposa(), imagewraposa_aniso(), indirect_lighting_apply(), isb_add_samples(), isb_add_samples_transp(), isb_add_shadfac(), isb_bsp_test_face(), isb_bsp_test_strand(), ISB_create(), ISB_free(), ISB_getshadow(), isb_make_buffer(), isb_make_buffer_transp(), lamp_get_shadow(), lamphalo_tile(), make_pixelstructs(), mask_array(), mat3_to_eulo2(), mat4_to_dquat(), merge_transp_passes(), mistfactor(), multitex(), multitex_mtex(), multitex_nodes(), nextcwedge(), ntap_bump_compute(), ocean_texture(), TNT::Region2D< Array2D >::operator=(), TNT::Region1D< Array1D >::operator=(), pointdensitytex(), ray_ao(), ray_ao_qmc(), ray_ao_spheresamp(), ray_shadow(), ray_shadow_jitter(), ray_shadow_jittered_coords(), ray_shadow_qmc(), ray_trace_shadow_rad(), ray_trace_shadow_tra(), RE_bake_shade_all_selected(), RE_bake_shade_get_image(), render_lighting_halo(), render_realtime_texture(), renderflare(), renderhalo_post(), RefractionClosure::sample(), MicrofacetBeckmannClosure< Refractive >::sample(), MicrofacetGGXClosure< Refractive >::sample(), Color32::setBGRA(), Color32::setRGBA(), shade_color(), shade_input_calc_viewco(), shade_input_do_shade(), shade_input_initialize(), shade_input_set_shade_texco(), shade_input_set_strand(), shade_input_set_strand_texco(), shade_input_set_triangle(), shade_input_set_triangle_i(), shade_input_set_viewco(), shade_lamp_loop(), shade_lamp_loop_only_shadow(), shade_material_loop(), shade_one_light(), shade_sample_initialize(), shade_sample_sss(), shade_samples_do_AO(), shade_samples_fill_with_ps(), shade_strand_samples(), shade_tface(), shade_tra_samples(), shade_tra_samples_fill(), shade_volume_inside(), shadeDA_tile(), shadeHaloFloat(), shadeSkyPixel(), shadeSkyView(), shadeSunView(), sky_tile(), sphere_sampler(), spothalo(), threadsafe_table_sphere(), trace_reflect(), trace_refract(), traceray(), transform_inverse(), unref_strand_samples(), viewpixel_to_lampbuf(), vol_get_bounds(), vol_get_density(), vol_get_emission(), vol_get_reflection_color(), vol_get_shadow(), vol_get_sigma_t(), vol_precache_objectinstance_threads(), vol_trace_behind(), volume_trace(), volumeintegrate(), wrld_exposure_correct(), zbuffer_abuf_render(), zbuffer_solid(), zbuffer_sss(), zbuffer_transp_shade(), zbufshade_sss_tile(), zbufshade_tile(), and zbufshadeDA_tile().

#define RB   4

Definition at line 809 of file mball.c.

Referenced by nextcwedge().

#define RBF   5

Definition at line 507 of file mball.c.

Referenced by polygonize().

#define RBN   4

Definition at line 506 of file mball.c.

Referenced by polygonize().

#define RES   12

Definition at line 494 of file mball.c.

Referenced by converge(), KX_FontObject::DrawText(), and metaball_polygonize().

#define RF   7

Definition at line 812 of file mball.c.

Referenced by nextcwedge().

#define RN   6

Definition at line 811 of file mball.c.

Referenced by nextcwedge().

#define RT   5

Definition at line 810 of file mball.c.

Referenced by nextcwedge().

#define RTF   7

Definition at line 509 of file mball.c.

Referenced by polygonize().

#define RTN   6

Definition at line 508 of file mball.c.

Referenced by polygonize().

#define T   3

Definition at line 499 of file mball.c.

Referenced by KDL::abs(), KDL::acos(), CacheData::add(), array< uint4 >::array(), TNT::Array2D< T >::Array2D(), TNT::Array3D< T >::Array3D(), KDL::asin(), KDL::atan(), KDL::atan2(), AUD_convert_copy(), AUD_Reference< AUD_PitchReader >::AUD_Reference(), SG_QList::iterator< T >::back(), SG_DList::const_iterator< T >::back(), SG_DList::iterator< T >::back(), SG_QList::iterator< T >::begin(), SG_DList::const_iterator< T >::begin(), SG_DList::iterator< T >::begin(), bsdf_microfacet_beckmann_sample(), bsdf_microfacet_ggx_sample(), bsdf_refraction_sample(), bsdf_westin_backscatter_sample(), btSwap(), clear(), device_vector< uint4 >::copy(), btAlignedObjectArray< Material * >::copy(), TNT::i_refvec< T >::copy_(), KDL::cos(), KDL::cosh(), defocus_blur(), TNT::dot_prod(), btAlignedObjectArray< Material * >::downHeap(), SG_QList::iterator< T >::end(), SG_DList::const_iterator< T >::end(), SG_DList::iterator< T >::end(), gim_array< GIM_CONTACT >::erase_sorted_mem(), KDL::exp(), btAlignedObjectArray< Material * >::expand(), Filter_init(), id_map< void *, Shader >::find(), TNT::Fortran_Array3D< T >::Fortran_Array3D(), fresnel(), gim_down_heap(), gim_radix_sort(), gim_swap_elements(), gim_swap_elements_memcpy(), KDL::hypot(), TNT::i_refvec< T >::i_refvec(), Image_init(), InitAtmosphere(), TNT::Vector< Subscript >::initialize(), TNT::Fortran_Matrix< T >::initialize(), TNT::Matrix< MT_Scalar >::initialize(), btAlignedObjectArray< Material * >::initializeFromBuffer(), InitSunSky(), TNT::Fortran_Array3D< T >::inject(), gim_array< GIM_CONTACT >::insert_mem(), SG_QList::iterator< T >::iterator(), KDL::log(), TNT::matmult(), TNT::matmultdiag(), MAX3(), maxdirsterid(), nearest_point_in_tri_surface(), nextcwedge(), memcopy_elements_func::operator()(), TNT::operator*(), SG_QList::iterator< T >::operator++(), SG_DList::const_iterator< T >::operator++(), SG_DList::iterator< T >::operator++(), SG_QList::iterator< T >::operator--(), SG_DList::const_iterator< T >::operator--(), SG_DList::iterator< T >::operator--(), array< uint4 >::operator=(), TNT::Fortran_Array3D< T >::operator=(), GIM_AABB::overlapping_trans_cache(), p_face_stretch(), id_map< void *, Shader >::post_sync(), KDL::pow(), BSSRDFCubicClosure::pow5(), btAlignedObjectArray< Material * >::push_back(), gim_array< GIM_CONTACT >::push_back_memcpy(), btAlignedObjectArray< Material * >::quickSortInternal(), KDL::Rall1d< T, V, S >::Rall1d(), CacheData::read(), MEM_SmartPtr< GlutMouseManager >::Release(), SG_DListHead< BL_ArmatureConstraint >::Remove(), RemoveEulerAngleFromMatrix(), RemoveTwist(), btAlignedObjectArray< Material * >::reserve(), array< uint4 >::resize(), gim_array< GIM_CONTACT >::resize(), btAlignedObjectArray< Material * >::resize(), gim_array< GIM_CONTACT >::resizeData(), GenericEmissiveClosure::sample(), WestinBackscatterClosure::sample(), RefractionClosure::sample(), MicrofacetBeckmannClosure< Refractive >::sample(), MicrofacetGGXClosure< Refractive >::sample(), sample_cos_hemisphere(), sample_uniform_hemisphere(), SG_DListHead< BL_ArmatureConstraint >::SG_DListHead(), Sign(), KDL::sin(), KDL::sinh(), sky_texture_precompute(), KDL::sqr(), KDL::sqrt(), TNT::Array3D< T >::subarray(), TNT::Array2D< T >::subarray(), sum(), swap(), Swap(), btAlignedObjectArray< Material * >::swap(), SWAP_POINTERS(), id_map< void *, Shader >::sync(), KDL::tan(), KDL::tanh(), transform_inverse(), IK_QElbowSegment::UpdateAngleApply(), Video_init(), and ZeroInitialize().

#define TF   11

Definition at line 816 of file mball.c.

Referenced by nextcwedge().

#define TN   10

Definition at line 815 of file mball.c.

Referenced by nextcwedge().


Function Documentation

void accum_mballfaces ( int  i1,
int  i2,
int  i3,
int  i4 
)

Definition at line 716 of file mball.c.

References curindex, indices, MEM_freeN(), MEM_mallocN(), and totindex.

Referenced by docube().

void add_cube ( PROCESS mbproc,
int  i,
int  j,
int  k,
int  count 
)
MetaBall* add_mball ( const char *  name) [read]
MetaElem* add_metaball_element ( MetaBall mb,
const int  type 
) [read]
void addtovertices ( VERTICES vertices,
VERTEX  v 
)

Definition at line 1202 of file mball.c.

References vertices::count, i, if(), vertices::max, MEM_callocN(), MEM_freeN(), NULL, and vertices::ptr.

Referenced by vertid().

void BKE_freecubetable ( void  )

Definition at line 1073 of file mball.c.

References i, intlists::list, MEM_freeN(), intlist::next, intlists::next, and NULL.

Referenced by WM_exit_ext().

void calc_mballco ( MetaElem ml,
float *  vec 
)

Definition at line 525 of file mball.c.

References MetaElem::mat, and mul_m4_v3().

Referenced by find_first_points(), and init_meta().

void converge ( MB_POINT p1,
MB_POINT p2,
float  v1,
float  v2,
float(*)(float, float, float)  function,
MB_POINT p,
MetaBall mb,
int  f 
)

Definition at line 1299 of file mball.c.

References i, RES, MetaBall::thresh, point::x, point::y, and point::z.

Referenced by vertid().

MetaBall* copy_mball ( MetaBall mb) [read]
void copy_mball_properties ( Scene scene,
Object active_object 
)
float densfunc ( MetaElem ball,
float  x,
float  y,
float  z 
)
void docube ( CUBE cube,
PROCESS p,
MetaBall mb 
)
static void extern_local_mball ( MetaBall mb) [static]

Definition at line 139 of file mball.c.

References extern_local_matarar(), MetaBall::mat, and MetaBall::totcol.

Referenced by make_local_mball().

void fill_metaball_octal_node ( octal_node node,
MetaElem ml,
short  i 
)
Object* find_basis_mball ( Scene scene,
Object basis 
) [read]

This function finds basic MetaBall.

Basic MetaBall doesn't include any number at the end of its name. All MetaBalls with same base of name can be blended. MetaBalls with different basic name can't be blended.

warning!, is_basis_mball() can fail on returned object, see long note above.

Definition at line 419 of file mball.c.

References BLI_split_name_num(), Object::data, MetaBall::editelems, MetaBall::elems, F_ERROR, ListBase::first, MetaElem::flag, Object::flag, Object::id, MAX_ID_NAME, MB_HIDE, ID::name, MetaElem::next, next_object(), NULL, OB_FROMDUPLI, OB_MBALL, totelem, and Object::type.

Referenced by allow_render_object(), build_dag_object(), convert_exec(), init_render_mball(), and makeDispListMBall().

void find_first_points ( PROCESS mbproc,
MetaBall mb,
int  a 
)
octal_node* find_metaball_octal_node ( octal_node node,
float  x,
float  y,
float  z,
short  depth 
)

Definition at line 608 of file mball.c.

References find_metaball_octal_node(), and octal_node::nodes.

Referenced by find_metaball_octal_node(), and metaball().

void free_mball ( MetaBall mb)
void free_metaball_octal_node ( octal_node node)
void freepolygonize ( PROCESS p)
int getedge ( EDGELIST table[],
int  i1,
int  j1,
int  k1,
int  i2,
int  j2,
int  k2 
)
float init_meta ( Scene scene,
Object ob 
)
void init_metaball_octal_tree ( int  depth)
int is_basis_mball ( Object ob)

Test, if Object *ob is basic MetaBall.

It test last character of Object ID name. If last character is digit it return 0, else it return 1.

Definition at line 345 of file mball.c.

References Object::id, len(), ID::name, and strlen().

Referenced by draw_bounding_volume(), drawDispList(), drawObjectSelect(), drawWireExtra(), and is_mball_basis_for().

int is_mball_basis_for ( Object ob1,
Object ob2 
)

Definition at line 356 of file mball.c.

References BLI_split_name_num(), Object::id, is_basis_mball(), MAX_ID_NAME, and ID::name.

Referenced by unlink_object().

void make_local_mball ( MetaBall mb)
float* make_orco_mball ( Object ob,
ListBase dispbase 
)

Definition at line 293 of file mball.c.

References Object::bb, data, ListBase::first, MEM_mallocN(), DispList::nr, size(), BoundBox::vec, and DispList::verts.

Referenced by init_render_mball().

void makecubetable ( void  )
float metaball ( float  x,
float  y,
float  z 
)
void metaball_polygonize ( Scene scene,
Object ob,
ListBase dispbase 
)
void* new_pgn_element ( int  size)
int nextcwedge ( int  edge,
int  face 
)

Definition at line 989 of file mball.c.

References B, BF, BN, L, LB, LF, LN, LT, R, RB, RF, RN, RT, T, TF, and TN.

Referenced by makecubetable().

int otherface ( int  edge,
int  face 
)

Definition at line 1023 of file mball.c.

References leftface, and rightface.

Referenced by makecubetable().

void polygonize ( PROCESS mbproc,
MetaBall mb 
)
int setcenter ( CENTERLIST table[],
int  i,
int  j,
int  k 
)

Definition at line 1103 of file mball.c.

References HASH, centerlist::i, i, centerlist::j, centerlist::k, new_pgn_element(), centerlist::next, and NULL.

Referenced by add_cube(), and testface().

CORNER* setcorner ( PROCESS p,
int  i,
int  j,
int  k 
)
void setedge ( EDGELIST table[],
int  i1,
int  j1,
int  k1,
int  i2,
int  j2,
int  k2,
int  vid 
)
void subdivide_metaball_octal_node ( octal_node node,
float  size_x,
float  size_y,
float  size_z,
short  depth 
)
void testface ( int  i,
int  j,
int  k,
CUBE old,
int  bit,
int  c1,
int  c2,
int  c3,
int  c4,
PROCESS p 
)
void tex_space_mball ( Object ob)

Compute bounding box of all MetaElems/MetaBalls.

Bounding box is computed from polygonized surface. Object *ob is basic MetaBall (usually with name Meta). All other MetaBalls (with names Meta.001, Meta.002, etc) are included in this Bounding Box.

Definition at line 249 of file mball.c.

References Object::bb, boundbox_set_from_min_max(), data, Object::disp, DO_MINMAX, ListBase::first, max, MEM_callocN(), min, DispList::next, DispList::nr, NULL, and DispList::verts.

Referenced by copy_texture_space(), makeDispListMBall(), and makeDispListMBall_forRender().

void unlink_mball ( MetaBall mb)

Definition at line 76 of file mball.c.

References Material::id, MetaBall::mat, NULL, MetaBall::totcol, and ID::us.

Referenced by free_mball(), and free_object().

int vertid ( CORNER c1,
CORNER c2,
PROCESS p,
MetaBall mb 
)
void vnormal ( MB_POINT point,
PROCESS p,
MB_POINT v 
)

Definition at line 1220 of file mball.c.

References process::delta, FALSE, process::function, sqrtf, point::x, point::y, and point::z.

Referenced by MeshManager::device_update_mesh(), and vertid().


Variable Documentation

int corner1[12] [static]
Initial value:

Definition at line 821 of file mball.c.

Referenced by docube(), makecubetable(), and p_rectangle_area().

int corner2[12] [static]
Initial value:

Definition at line 823 of file mball.c.

Referenced by docube(), makecubetable(), and p_rectangle_area().

INTLISTS* cubetable[256] [static]

Definition at line 818 of file mball.c.

int curindex
int* indices = NULL [static]
int leftface[12] [static]
Initial value:
 {
    B,  L,  L,  F,  R,  T,  N,  R,  N,  B,  T,  F}

Definition at line 825 of file mball.c.

Referenced by makecubetable(), and otherface().

MetaElem** mainb [static]

Definition at line 72 of file mball.c.

octal_tree* metaball_tree = NULL [static]

Definition at line 73 of file mball.c.

int rightface[12] [static]
Initial value:
 {
    L,  T,  N,  L,  B,  R,  R,  F,  B,  F,  N,  T}

Definition at line 828 of file mball.c.

Referenced by makecubetable(), and otherface().

float thresh = 0.6f [static]
int totelem = 0 [static]
int totindex [static]