t0 = vert[ edge->v1 ].co;
t1 = vert[ edge->v2 ].co;
- closest_to_line_segment_v3(nearest_tmp, co, t0, t1);
- dist = len_v3v3(nearest_tmp, co);
+ // NOTE: casts to "float*" here are due to co being "const float*"
+ closest_to_line_segment_v3(nearest_tmp, (float*)co, t0, t1);
+ dist = len_v3v3(nearest_tmp, (float*)co);
if(dist < nearest->dist)
{
return collpair;
}
+#if 0
static int cloth_collision_response_moving( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair, CollPair *collision_end )
{
int result = 0;
}
return result;
}
+#endif
static float projectPointOntoLine(float *p, float *a, float *b)
{
return 0;
}
+#if 0
static int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair )
{
EdgeCollPair edgecollpair;
return 1;
}
+#endif
// return all collision objects in scene
///////////////////////////
// 3x3 matrix
///////////////////////////
+#if 0
/* printf 3x3 matrix on console: for debug output */
static void print_fmatrix(float m3[3][3])
{
printf("%f\t%f\t%f\n",m3[1][0],m3[1][1],m3[1][2]);
printf("%f\t%f\t%f\n\n",m3[2][0],m3[2][1],m3[2][2]);
}
+#endif
/* copy 3x3 matrix */
DO_INLINE void cp_fmatrix(float to[3][3], float from[3][3])
}
}
+#if 0
/*
// version 1.3
static int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatrix3x3 *S, fmatrix3x3 *P, fmatrix3x3 *Pinv)
return iterations<conjgrad_looplimit;
}
+#endif
// outer product is NOT cross product!!!
DO_INLINE void dfdx_spring_type1(float to[3][3], float extent[3], float length, float L, float dot, float k)
#endif // XXX old animation system
flag= setkeys(ctime, &key->block, k, t, 0);
-
+
if(flag==0)
- ; /* do_key(a, a+step, tot, (char *)out, key, k, t, 0); */
+ do_key(a, a+step, tot, (char *)out, key, actkb, k, t, 0);
else
- ; /* cp_key(a, a+step, tot, (char *)out, key, k[2],0); */
+ cp_key(a, a+step, tot, (char *)out, key, actkb, k[2], NULL, 0);
}
}
else {
/* **** XXX ******** */
static int seqrectx= 0; /* bad bad global! */
static int seqrecty= 0;
-static void waitcursor(int val) {}
-static int blender_test_break() {return 0;}
+//static void waitcursor(int val) {}
+//static int blender_test_break() {return 0;}
/* **** XXX ******** */
}
}
+#if 0
static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int cfra,
int build_proxy_run, int render_size);
}
waitcursor(0);
}
+#endif
/* **********************************************************************
return i;
}
+#if 0
/* check used when we need to change seq->blend_mode but not to effect or audio strips */
static int seq_can_blend(Sequence *seq)
{
return 0;
}
}
+#endif
/* *********************** threading api ******************* */
static pthread_mutex_t wakeup_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t wakeup_cond = PTHREAD_COND_INITIALIZER;
-static pthread_mutex_t prefetch_ready_lock = PTHREAD_MUTEX_INITIALIZER;
-static pthread_cond_t prefetch_ready_cond = PTHREAD_COND_INITIALIZER;
+//static pthread_mutex_t prefetch_ready_lock = PTHREAD_MUTEX_INITIALIZER;
+//static pthread_cond_t prefetch_ready_cond = PTHREAD_COND_INITIALIZER;
static pthread_mutex_t frame_done_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t frame_done_cond = PTHREAD_COND_INITIALIZER;
struct ImBuf * ibuf;
} PrefetchQueueElem;
+#if 0
static void *seq_prefetch_thread(void * This_)
{
PrefetchThread * This = This_;
/* deinit malloc mutex */
BLI_end_threads(0);
}
+#endif
void give_ibuf_prefetch_request(int rectx, int recty, int cfra, int chanshown,
int render_size)
pthread_mutex_unlock(&wakeup_lock);
}
+#if 0
static void seq_wait_for_prefetch_ready()
{
PrefetchThread *tslot;
fprintf(stderr, "SEQ-THREAD: prefetch done\n");
}
+#endif
ImBuf *give_ibuf_seq_threaded(Scene *scene, int rectx, int recty, int cfra, int chanshown, int render_size)
{
}
}
+#if 0
static void free_imbuf_seq_except(Scene *scene, int cfra)
{
Editing *ed= seq_give_editing(scene, FALSE);
}
SEQ_END
}
+#endif
void free_imbuf_seq(ListBase * seqbase, int check_mem_usage)
{
}
#endif
+#if 0 // XXX old animation system
static void free_imbuf_seq_with_ipo(Scene *scene, struct Ipo *ipo)
{
/* force update of all sequences with this ipo, on ipo changes */
}
SEQ_END
}
+#endif
/* seq funcs's for transforming internally
notice the difference between start/end and left/right.
if (ob->soft){
int nofquads;
- float s_shear = ob->soft->shearstiff*ob->soft->shearstiff;
+ //float s_shear = ob->soft->shearstiff*ob->soft->shearstiff;
nofquads = count_mesh_quads(me);
if (nofquads) {
bvh_insertionsort(a, begin, end, axis);
}
}
+#if 0
static void sort_along_axis(BVHTree *tree, int start, int end, int axis)
{
sort(tree->nodes, start, end, axis);
}
+#endif
//after a call to this function you can expect one of:
// every node to left of a[n] are smaller or equal to it
}
}
+#if 0
static void iterative_raycast(BVHRayCastData *data, BVHNode *node)
{
while(node)
}
}
}
+#endif
int BLI_bvhtree_ray_cast(BVHTree *tree, const float *co, const float *dir, float radius, BVHTreeRayHit *hit, BVHTree_RayCastCallback callback, void *userdata)
{
if(ntree->adt)
expand_animdata(fd, mainvar, ntree->adt);
+
+ if(ntree->gpd)
+ expand_doit(fd, mainvar, ntree->gpd);
for(node= ntree->nodes.first; node; node= node->next)
if(node->id && node->type!=CMP_NODE_R_LAYERS)
}
/* ID Search browse menu, open */
-static uiBlock *search_menu(bContext *C, ARegion *ar, void *arg_litem)
+static uiBlock *id_search_menu(bContext *C, ARegion *ar, void *arg_litem)
{
static char search[256];
static TemplateID template;
type= idptr.type;
if(flag & UI_ID_BROWSE) {
- but= uiDefBlockButN(block, search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*1.6, UI_UNIT_Y, "Browse ID data");
+ but= uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*1.6, UI_UNIT_Y, "Browse ID data");
if(type) {
but->icon= RNA_struct_ui_icon(type);
but->flag|= UI_HAS_ICON;
/********************* RNA Path Builder Template ********************/
+/* ---------- */
+
/* This is creating/editing RNA-Paths
*
* - ptr: struct which holds the path property
{
uiWidgetBase wtb;
float rad= 0.5f*(rect->ymax - rect->ymin);
- int textoffs;
widget_init(&wtb);
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
-}
\ No newline at end of file
+}
+
int i;
DerivedMesh *dm;
MVert *mvert = NULL;
- float cam_mat[4][4];
dm = mesh_create_derived_render(re->scene, ob, CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL);
mvert= dm->getVertArray(dm); /* local object space */
}
}
+#if 0
static void lightcache_filter2(VolumePrecache *vp)
{
int x, y, z;
if (new_g) { MEM_freeN(new_g); new_g=NULL; }
if (new_b) { MEM_freeN(new_b); new_b=NULL; }
}
+#endif
static inline int ms_I(int x, int y, int z, int *n) //has a pad of 1 voxel surrounding the core for boundary simulation
{