Removed cast warnings from shrinkwrap.c and BLI_kdopbvh.c
authorAndre Susano Pinto <andresusanopinto@gmail.com>
Fri, 22 Aug 2008 18:28:34 +0000 (18:28 +0000)
committerAndre Susano Pinto <andresusanopinto@gmail.com>
Fri, 22 Aug 2008 18:28:34 +0000 (18:28 +0000)
Only unused functions and openmp warnings left on those.

source/blender/blenkernel/intern/shrinkwrap.c
source/blender/blenlib/intern/BLI_kdopbvh.c

index 292a800e9cd677b843b53bf4576353135740923a..c60535cade2511e0bf03dac736b349037023b3fc 100644 (file)
@@ -113,23 +113,23 @@ void space_transform_from_matrixs(SpaceTransform *data, float local[4][4], float
 
 void space_transform_apply(const SpaceTransform *data, float *co)
 {
-       VecMat4MulVecfl(co, data->local2target, co);
+       VecMat4MulVecfl(co, ((SpaceTransform*)data)->local2target, co);
 }
 
 void space_transform_invert(const SpaceTransform *data, float *co)
 {
-       VecMat4MulVecfl(co, data->target2local, co);
+       VecMat4MulVecfl(co, ((SpaceTransform*)data)->target2local, co);
 }
 
 void space_transform_apply_normal(const SpaceTransform *data, float *no)
 {
-       Mat4Mul3Vecfl(data->local2target, no);
+       Mat4Mul3Vecfl( ((SpaceTransform*)data)->local2target, no);
        Normalize(no); // TODO: could we just determine de scale value from the matrix?
 }
 
 void space_transform_invert_normal(const SpaceTransform *data, float *no)
 {
-       Mat4Mul3Vecfl(data->target2local, no);
+       Mat4Mul3Vecfl(((SpaceTransform*)data)->target2local, no);
        Normalize(no); // TODO: could we just determine de scale value from the matrix?
 }
 
@@ -291,7 +291,7 @@ int normal_projection_project_vertex(char options, const float *vert, const floa
                space_transform_apply_normal( transf, tmp_no );
                no = tmp_no;
 
-               hit_tmp.dist *= Mat4ToScalef( transf->local2target );
+               hit_tmp.dist *= Mat4ToScalef( ((SpaceTransform*)transf)->local2target );
        }
        else
        {
@@ -318,7 +318,7 @@ int normal_projection_project_vertex(char options, const float *vert, const floa
                        space_transform_invert( transf, hit_tmp.co );
                        space_transform_invert_normal( transf, hit_tmp.no );
 
-                       hit_tmp.dist = VecLenf( vert, hit_tmp.co );
+                       hit_tmp.dist = VecLenf( (float*)vert, hit_tmp.co );
                }
 
                memcpy(hit, &hit_tmp, sizeof(hit_tmp) );
index c41c3d8c3ab67d16cde2b830b5751485a4ca1f12..989e516d161f6d164d25baf4df996b9f9a25ae5d 100644 (file)
@@ -82,7 +82,7 @@ typedef struct BVHOverlapData
 typedef struct BVHNearestData
 {
        BVHTree *tree;
-       float   *co;
+       const float     *co;
        BVHTree_NearestPointCallback callback;
        void    *userdata;
        float proj[13];                 //coordinates projection over axis
@@ -1248,7 +1248,6 @@ static void dfs_find_nearest_dfs(BVHNearestData *data, BVHNode *node)
 
 static void dfs_find_nearest_begin(BVHNearestData *data, BVHNode *node)
 {
-       int i;
        float nearest[3], sdist;
        sdist = calc_nearest_point(data, node, nearest);
        if(sdist >= data->nearest.dist) return;