Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_view3d/drawobject.c')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c192
1 files changed, 96 insertions, 96 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 22fd77afd88..339dc830016 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -65,7 +65,7 @@
#include "DNA_world_types.h"
#include "BLI_blenlib.h"
-#include "BLI_arithb.h"
+#include "BLI_math.h"
#include "BLI_editVert.h"
#include "BLI_edgehash.h"
#include "BLI_rand.h"
@@ -152,7 +152,7 @@ static void view3d_project_short_clip(ARegion *ar, float *vec, short *adr)
/* clipplanes in eye space */
if(rv3d->rflag & RV3D_CLIPPING) {
VECCOPY(vec4, vec);
- Mat4MulVecfl(rv3d->viewmatob, vec4);
+ mul_m4_v3(rv3d->viewmatob, vec4);
if(view3d_test_clipping(rv3d, vec4))
return;
}
@@ -160,7 +160,7 @@ static void view3d_project_short_clip(ARegion *ar, float *vec, short *adr)
VECCOPY(vec4, vec);
vec4[3]= 1.0;
- Mat4MulVec4fl(rv3d->persmatob, vec4);
+ mul_m4_v4(rv3d->persmatob, vec4);
/* clipplanes in window space */
if( vec4[3]>BL_NEAR_CLIP ) { /* is the NEAR clipping cutoff for picking */
@@ -189,7 +189,7 @@ static void view3d_project_short_noclip(ARegion *ar, float *vec, short *adr)
VECCOPY(vec4, vec);
vec4[3]= 1.0;
- Mat4MulVec4fl(rv3d->persmatob, vec4);
+ mul_m4_v4(rv3d->persmatob, vec4);
if( vec4[3]>BL_NEAR_CLIP ) { /* is the NEAR clipping cutoff for picking */
fx= (ar->winx/2)*(1 + vec4[0]/vec4[3]);
@@ -456,8 +456,8 @@ void drawcircball(int mode, float *cent, float rad, float tmat[][4])
VECCOPY(vx, tmat[0]);
VECCOPY(vy, tmat[1]);
- VecMulf(vx, rad);
- VecMulf(vy, rad);
+ mul_v3_fl(vx, rad);
+ mul_v3_fl(vy, rad);
glBegin(mode);
for(a=0; a<tot; a++) {
@@ -544,7 +544,7 @@ void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, int depth_write, floa
/* project first and test */
for(vos= strings->first; vos; vos= vos->next) {
if(mat)
- Mat4MulVecfl(mat, vos->vec);
+ mul_m4_v3(mat, vos->vec);
view3d_project_short_clip(ar, vos->vec, vos->mval);
if(vos->mval[0]!=IS_CLIPPED)
tot++;
@@ -674,7 +674,7 @@ static void drawshadbuflimits(Lamp *la, float mat[][4])
lavec[0]= -mat[2][0];
lavec[1]= -mat[2][1];
lavec[2]= -mat[2][2];
- Normalize(lavec);
+ normalize_v3(lavec);
sta[0]= mat[3][0]+ la->clipsta*lavec[0];
sta[1]= mat[3][1]+ la->clipsta*lavec[1];
@@ -705,13 +705,13 @@ static void spotvolume(float *lvec, float *vvec, float inp)
/* camera is at 0,0,0 */
float temp[3],plane[3],mat1[3][3],mat2[3][3],mat3[3][3],mat4[3][3],q[4],co,si,angle;
- Normalize(lvec);
- Normalize(vvec); /* is this the correct vector ? */
+ normalize_v3(lvec);
+ normalize_v3(vvec); /* is this the correct vector ? */
- Crossf(temp,vvec,lvec); /* equation for a plane through vvec en lvec */
- Crossf(plane,lvec,temp); /* a plane perpendicular to this, parrallel with lvec */
+ cross_v3_v3v3(temp,vvec,lvec); /* equation for a plane through vvec en lvec */
+ cross_v3_v3v3(plane,lvec,temp); /* a plane perpendicular to this, parrallel with lvec */
- Normalize(plane);
+ normalize_v3(plane);
/* now we've got two equations: one of a cone and one of a plane, but we have
three unknowns. We remove one unkown by rotating the plane to z=0 (the plane normal) */
@@ -724,7 +724,7 @@ static void spotvolume(float *lvec, float *vvec, float inp)
q[1] = plane[1] ;
q[2] = -plane[0] ;
q[3] = 0 ;
- Normalize(&q[1]);
+ normalize_v3(&q[1]);
angle = saacos(plane[2])/2.0;
co = cos(angle);
@@ -735,7 +735,7 @@ static void spotvolume(float *lvec, float *vvec, float inp)
q[2] *= si;
q[3] = 0;
- QuatToMat3(q,mat1);
+ quat_to_mat3(mat1,q);
/* rotate lamp vector now over acos(inp) degrees */
@@ -743,7 +743,7 @@ static void spotvolume(float *lvec, float *vvec, float inp)
vvec[1] = lvec[1] ;
vvec[2] = lvec[2] ;
- Mat3One(mat2);
+ unit_m3(mat2);
co = inp;
si = sqrt(1-inp*inp);
@@ -751,17 +751,17 @@ static void spotvolume(float *lvec, float *vvec, float inp)
mat2[1][0] = -si;
mat2[0][1] = si;
mat2[1][1] = co;
- Mat3MulMat3(mat3,mat2,mat1);
+ mul_m3_m3m3(mat3,mat2,mat1);
mat2[1][0] = si;
mat2[0][1] = -si;
- Mat3MulMat3(mat4,mat2,mat1);
- Mat3Transp(mat1);
+ mul_m3_m3m3(mat4,mat2,mat1);
+ transpose_m3(mat1);
- Mat3MulMat3(mat2,mat1,mat3);
- Mat3MulVecfl(mat2,lvec);
- Mat3MulMat3(mat2,mat1,mat4);
- Mat3MulVecfl(mat2,vvec);
+ mul_m3_m3m3(mat2,mat1,mat3);
+ mul_m3_v3(mat2,lvec);
+ mul_m3_m3m3(mat2,mat1,mat4);
+ mul_m3_v3(mat2,vvec);
return;
}
@@ -789,9 +789,9 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob)
lampsize= pixsize*((float)U.obcenter_dia*0.5f);
/* and view aligned matrix: */
- Mat4CpyMat4(imat, rv3d->viewinv);
- Normalize(imat[0]);
- Normalize(imat[1]);
+ copy_m4_m4(imat, rv3d->viewinv);
+ normalize_v3(imat[0]);
+ normalize_v3(imat[1]);
/* for AA effects */
glGetFloatv(GL_CURRENT_COLOR, curcol);
@@ -835,13 +835,13 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob)
short axis;
/* setup a 45 degree rotation matrix */
- VecRotToMat3(imat[2], M_PI/4.0f, mat);
+ vec_rot_to_mat3( mat,imat[2], M_PI/4.0f);
/* vectors */
VECCOPY(v1, imat[0]);
- VecMulf(v1, circrad*1.2f);
+ mul_v3_fl(v1, circrad*1.2f);
VECCOPY(v2, imat[0]);
- VecMulf(v2, circrad*2.5f);
+ mul_v3_fl(v2, circrad*2.5f);
/* center */
glTranslatef(vec[0], vec[1], vec[2]);
@@ -852,8 +852,8 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob)
for (axis=0; axis<8; axis++) {
glVertex3fv(v1);
glVertex3fv(v2);
- Mat3MulVecfl(mat, v1);
- Mat3MulVecfl(mat, v2);
+ mul_m3_v3(mat, v1);
+ mul_m3_v3(mat, v2);
}
glEnd();
@@ -1144,11 +1144,11 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob
if(flag==0) {
if(cam->flag & (CAM_SHOWLIMITS+CAM_SHOWMIST)) {
wmLoadMatrix(rv3d->viewmat);
- Mat4CpyMat4(vec, ob->obmat);
- Mat4Ortho(vec);
+ copy_m4_m4(vec, ob->obmat);
+ normalize_m4(vec);
wmMultMatrix(vec);
- Mat4SwapMat4(rv3d->persmat, tmat);
+ swap_m4m4(rv3d->persmat, tmat);
wmGetSingleMatrix(rv3d->persmat);
if(cam->flag & CAM_SHOWLIMITS) {
@@ -1161,7 +1161,7 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob
if(cam->flag & CAM_SHOWMIST)
if(wrld) draw_limit_line(wrld->miststa, wrld->miststa+wrld->mistdist, 0xFFFFFF);
- Mat4SwapMat4(rv3d->persmat, tmat);
+ swap_m4m4(rv3d->persmat, tmat);
}
}
}
@@ -2271,13 +2271,13 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, Object *ob, E
z= 0.5f*(v1[2]+v2[2]);
if(v3d->flag & V3D_GLOBAL_STATS) {
- Mat4MulVecfl(ob->obmat, v1);
- Mat4MulVecfl(ob->obmat, v2);
+ mul_m4_v3(ob->obmat, v1);
+ mul_m4_v3(ob->obmat, v2);
}
if(unit->system)
- bUnit_AsString(val, sizeof(val), VecLenf(v1, v2)*unit->scale_length, 3, unit->system, B_UNIT_LENGTH, do_split, FALSE);
+ bUnit_AsString(val, sizeof(val), len_v3v3(v1, v2)*unit->scale_length, 3, unit->system, B_UNIT_LENGTH, do_split, FALSE);
else
- sprintf(val, conv_float, VecLenf(v1, v2));
+ sprintf(val, conv_float, len_v3v3(v1, v2));
view3d_cached_text_draw_add(x, y, z, val, 0);
}
@@ -2302,16 +2302,16 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, Object *ob, E
VECCOPY(v4, efa->v4->co);
}
if(v3d->flag & V3D_GLOBAL_STATS) {
- Mat4MulVecfl(ob->obmat, v1);
- Mat4MulVecfl(ob->obmat, v2);
- Mat4MulVecfl(ob->obmat, v3);
- if (efa->v4) Mat4MulVecfl(ob->obmat, v4);
+ mul_m4_v3(ob->obmat, v1);
+ mul_m4_v3(ob->obmat, v2);
+ mul_m4_v3(ob->obmat, v3);
+ if (efa->v4) mul_m4_v3(ob->obmat, v4);
}
if (efa->v4)
- area= AreaQ3Dfl(v1, v2, v3, v4);
+ area= area_quad_v3(v1, v2, v3, v4);
else
- area = AreaT3Dfl(v1, v2, v3);
+ area = area_tri_v3(v1, v2, v3);
if(unit->system)
bUnit_AsString(val, sizeof(val), area*unit->scale_length, 3, unit->system, B_UNIT_LENGTH, do_split, FALSE); // XXX should be B_UNIT_AREA
@@ -2343,10 +2343,10 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, Object *ob, E
VECCOPY(v4, v3);
}
if(v3d->flag & V3D_GLOBAL_STATS) {
- Mat4MulVecfl(ob->obmat, v1);
- Mat4MulVecfl(ob->obmat, v2);
- Mat4MulVecfl(ob->obmat, v3);
- Mat4MulVecfl(ob->obmat, v4);
+ mul_m4_v3(ob->obmat, v1);
+ mul_m4_v3(ob->obmat, v2);
+ mul_m4_v3(ob->obmat, v3);
+ mul_m4_v3(ob->obmat, v4);
}
e1= efa->e1;
@@ -2358,30 +2358,30 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, Object *ob, E
if( (e4->f & e1->f & SELECT) || (G.moving && (efa->v1->f & SELECT)) ) {
/* Vec 1 */
- sprintf(val,"%.3f", RAD2DEG(VecAngle3(v4, v1, v2)));
- VecLerpf(fvec, efa->cent, efa->v1->co, 0.8f);
+ sprintf(val,"%.3f", RAD2DEG(angle_v3v3v3(v4, v1, v2)));
+ interp_v3_v3v3(fvec, efa->cent, efa->v1->co, 0.8f);
view3d_cached_text_draw_add(efa->cent[0], efa->cent[1], efa->cent[2], val, 0);
}
if( (e1->f & e2->f & SELECT) || (G.moving && (efa->v2->f & SELECT)) ) {
/* Vec 2 */
- sprintf(val,"%.3f", RAD2DEG(VecAngle3(v1, v2, v3)));
- VecLerpf(fvec, efa->cent, efa->v2->co, 0.8f);
+ sprintf(val,"%.3f", RAD2DEG(angle_v3v3v3(v1, v2, v3)));
+ interp_v3_v3v3(fvec, efa->cent, efa->v2->co, 0.8f);
view3d_cached_text_draw_add(fvec[0], fvec[1], fvec[2], val, 0);
}
if( (e2->f & e3->f & SELECT) || (G.moving && (efa->v3->f & SELECT)) ) {
/* Vec 3 */
if(efa->v4)
- sprintf(val,"%.3f", RAD2DEG(VecAngle3(v2, v3, v4)));
+ sprintf(val,"%.3f", RAD2DEG(angle_v3v3v3(v2, v3, v4)));
else
- sprintf(val,"%.3f", RAD2DEG(VecAngle3(v2, v3, v1)));
- VecLerpf(fvec, efa->cent, efa->v3->co, 0.8f);
+ sprintf(val,"%.3f", RAD2DEG(angle_v3v3v3(v2, v3, v1)));
+ interp_v3_v3v3(fvec, efa->cent, efa->v3->co, 0.8f);
view3d_cached_text_draw_add(fvec[0], fvec[1], fvec[2], val, 0);
}
/* Vec 4 */
if(efa->v4) {
if( (e3->f & e4->f & SELECT) || (G.moving && (efa->v4->f & SELECT)) ) {
- sprintf(val,"%.3f", RAD2DEG(VecAngle3(v3, v4, v1)));
- VecLerpf(fvec, efa->cent, efa->v4->co, 0.8f);
+ sprintf(val,"%.3f", RAD2DEG(angle_v3v3v3(v3, v4, v1)));
+ interp_v3_v3v3(fvec, efa->cent, efa->v4->co, 0.8f);
view3d_cached_text_draw_add(fvec[0], fvec[1], fvec[2], val, 0);
}
}
@@ -3434,7 +3434,7 @@ static void draw_particle(ParticleKey *state, int draw_as, short draw, float pix
{
vec[0]=2.0f*pixsize;
vec[1]=vec[2]=0.0;
- QuatMulVecf(state->rot,vec);
+ mul_qt_v3(state->rot,vec);
if(draw_as==PART_DRAW_AXIS) {
cd[1]=cd[2]=cd[4]=cd[5]=0.0;
cd[0]=cd[3]=1.0;
@@ -3462,7 +3462,7 @@ static void draw_particle(ParticleKey *state, int draw_as, short draw, float pix
vec[1]=2.0f*pixsize;
vec[0]=vec[2]=0.0;
- QuatMulVecf(state->rot,vec);
+ mul_qt_v3(state->rot,vec);
if(draw_as==PART_DRAW_AXIS){
VECCOPY(vec2,state->co);
}
@@ -3474,7 +3474,7 @@ static void draw_particle(ParticleKey *state, int draw_as, short draw, float pix
vec[2]=2.0f*pixsize;
vec[0]=vec[1]=0.0;
- QuatMulVecf(state->rot,vec);
+ mul_qt_v3(state->rot,vec);
if(draw_as==PART_DRAW_AXIS){
VECCOPY(vec2,state->co);
}
@@ -3489,9 +3489,9 @@ static void draw_particle(ParticleKey *state, int draw_as, short draw, float pix
case PART_DRAW_LINE:
{
VECCOPY(vec,state->vel);
- Normalize(vec);
+ normalize_v3(vec);
if(draw & PART_DRAW_VEL_LENGTH)
- VecMulf(vec,VecLength(state->vel));
+ mul_v3_fl(vec,len_v3(state->vel));
VECADDFAC(pdd->vd,state->co,vec,-draw_line[0]); pdd->vd+=3;
VECADDFAC(pdd->vd,state->co,vec,draw_line[1]); pdd->vd+=3;
if(cd) {
@@ -3649,7 +3649,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
if( (base->flag & OB_FROMDUPLI) && (ob->flag & OB_FROMGROUP) ) {
float mat[4][4];
- Mat4MulMat4(mat, psys->imat, ob->obmat);
+ mul_m4_m4m4(mat, psys->imat, ob->obmat);
wmMultMatrix(mat);
}
@@ -3671,9 +3671,9 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
break;
case PART_DRAW_CIRC:
/* calculate view aligned matrix: */
- Mat4CpyMat4(imat, rv3d->viewinv);
- Normalize(imat[0]);
- Normalize(imat[1]);
+ copy_m4_m4(imat, rv3d->viewinv);
+ normalize_v3(imat[0]);
+ normalize_v3(imat[1]);
/* no break! */
case PART_DRAW_CROSS:
case PART_DRAW_AXIS:
@@ -3729,9 +3729,9 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
break;
}
if(part->draw & PART_DRAW_SIZE && part->draw_as!=PART_DRAW_CIRC){
- Mat4CpyMat4(imat, rv3d->viewinv);
- Normalize(imat[0]);
- Normalize(imat[1]);
+ copy_m4_m4(imat, rv3d->viewinv);
+ normalize_v3(imat[0]);
+ normalize_v3(imat[1]);
}
if(!create_cdata && pdd && pdd->cdata) {
@@ -3903,7 +3903,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
psys_get_particle_on_path(&sim,a,&state,need_v);
if(psys->parent)
- Mat4MulVecfl(psys->parent->obmat, state.co);
+ mul_m4_v3(psys->parent->obmat, state.co);
/* create actiual particle data */
if(draw_as == PART_DRAW_BB) {
@@ -3923,7 +3923,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
state.time=cfra;
if(psys_get_particle_state(&sim,a,&state,0)){
if(psys->parent)
- Mat4MulVecfl(psys->parent->obmat, state.co);
+ mul_m4_v3(psys->parent->obmat, state.co);
/* create actiual particle data */
if(draw_as == PART_DRAW_BB) {
@@ -3946,7 +3946,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
VECCOPY(pdd->ved,state.co);
pdd->ved+=3;
VECCOPY(vel,state.vel);
- VecMulf(vel,timestep);
+ mul_v3_fl(vel,timestep);
VECADD(pdd->ved,state.co,vel);
pdd->ved+=3;
@@ -4566,10 +4566,10 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
float vec_a[3] = { fac,0, 0}; // Offset perpendicular to the curve
float vec_b[3] = {-fac,0, 0}; // Delta along the curve
- QuatMulVecf(bevp->quat, vec_a);
- QuatMulVecf(bevp->quat, vec_b);
- VecAddf(vec_a, vec_a, bevp->vec);
- VecAddf(vec_b, vec_b, bevp->vec);
+ mul_qt_v3(bevp->quat, vec_a);
+ mul_qt_v3(bevp->quat, vec_b);
+ add_v3_v3v3(vec_a, vec_a, bevp->vec);
+ add_v3_v3v3(vec_b, vec_b, bevp->vec);
VECSUBFAC(vec_a, vec_a, bevp->dir, fac);
VECSUBFAC(vec_b, vec_b, bevp->dir, fac);
@@ -4711,8 +4711,8 @@ static void drawspiral(float *cent, float rad, float tmat[][4], int start)
VECCOPY(vx, tmat[0]);
VECCOPY(vy, tmat[1]);
- VecMulf(vx, rad);
- VecMulf(vy, rad);
+ mul_v3_fl(vx, rad);
+ mul_v3_fl(vy, rad);
VECCOPY(vec, cent);
@@ -4776,7 +4776,7 @@ static void drawtube(float *vec, float radius, float height, float tmat[][4])
float cur[3];
drawcircball(GL_LINE_LOOP, vec, radius, tmat);
- VecCopyf(cur,vec);
+ copy_v3_v3(cur,vec);
cur[2]+=height;
drawcircball(GL_LINE_LOOP, cur, radius, tmat);
@@ -4797,7 +4797,7 @@ static void drawcone(float *vec, float radius, float height, float tmat[][4])
{
float cur[3];
- VecCopyf(cur,vec);
+ copy_v3_v3(cur,vec);
cur[2]+=height;
drawcircball(GL_LINE_LOOP, cur, radius, tmat);
@@ -4845,9 +4845,9 @@ static int drawmball(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
else UI_ThemeColor(TH_WIRE);
wmGetMatrix(tmat);
- Mat4Invert(imat, tmat);
- Normalize(imat[0]);
- Normalize(imat[1]);
+ invert_m4_m4(imat, tmat);
+ normalize_v3(imat[0]);
+ normalize_v3(imat[1]);
while(ml) {
@@ -4904,14 +4904,14 @@ static void draw_forcefield(Scene *scene, Object *ob)
/* calculus here, is reused in PFIELD_FORCE */
wmGetMatrix(tmat);
- Mat4Invert(imat, tmat);
-// Normalize(imat[0]); // we don't do this because field doesnt scale either... apart from wind!
-// Normalize(imat[1]);
+ invert_m4_m4(imat, tmat);
+// normalize_v3(imat[0]); // we don't do this because field doesnt scale either... apart from wind!
+// normalize_v3(imat[1]);
if (pd->forcefield == PFIELD_WIND) {
float force_val;
- Mat4One(tmat);
+ unit_m4(tmat);
UI_ThemeColorBlend(curcol, TH_BACK, 0.5);
//if (has_ipo_code(ob->ipo, OB_PD_FSTR))
@@ -4947,7 +4947,7 @@ static void draw_forcefield(Scene *scene, Object *ob)
else if (pd->forcefield == PFIELD_VORTEX) {
float ffall_val, force_val;
- Mat4One(tmat);
+ unit_m4(tmat);
//if (has_ipo_code(ob->ipo, OB_PD_FFALL))
// ffall_val = IPO_GetFloatValue(ob->ipo, OB_PD_FFALL, scene->r.cfra);
//else
@@ -5008,7 +5008,7 @@ static void draw_forcefield(Scene *scene, Object *ob)
else if(pd->falloff==PFIELD_FALL_TUBE){
float radius,distance;
- Mat4One(tmat);
+ unit_m4(tmat);
vec[0]=vec[1]=0.0f;
radius=(pd->flag&PFIELD_USEMAXR)?pd->maxrad:1.0f;
@@ -5030,7 +5030,7 @@ static void draw_forcefield(Scene *scene, Object *ob)
else if(pd->falloff==PFIELD_FALL_CONE){
float radius,distance;
- Mat4One(tmat);
+ unit_m4(tmat);
radius=(pd->flag&PFIELD_USEMAXR)?pd->maxrad:1.0f;
radius*=(float)M_PI/180.0f;
@@ -5278,7 +5278,7 @@ static void draw_hooks(Object *ob)
if (md->type==eModifierType_Hook) {
HookModifierData *hmd = (HookModifierData*) md;
- VecMat4MulVecfl(vec, ob->obmat, hmd->cent);
+ mul_v3_m4v3(vec, ob->obmat, hmd->cent);
if(hmd->object) {
setlinestyle(3);
@@ -5310,7 +5310,7 @@ void drawRBpivot(bRigidBodyJointConstraint *data)
if(G.f & G_RENDER_SHADOW)
return;
- EulToMat4(eu,mat);
+ eul_to_mat4(mat,eu);
glLineWidth (4.0f);
setlinestyle(2);
for (axis=0; axis<3; axis++) {
@@ -5319,7 +5319,7 @@ void drawRBpivot(bRigidBodyJointConstraint *data)
dir[axis] = 1.f;
glBegin(GL_LINES);
- Mat4MulVecfl(mat,dir);
+ mul_m4_v3(mat,dir);
v[0] += dir[0];
v[1] += dir[1];
v[2] += dir[2];
@@ -5895,7 +5895,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
vec[0]= vec[1]= vec[2]= 0.0;
wmGetMatrix(tmat);
- Mat4Invert(imat, tmat);
+ invert_m4_m4(imat, tmat);
setlinestyle(2);
drawcircball(GL_LINE_LOOP, vec, ob->inertia, imat);
@@ -5982,7 +5982,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
if (cti->get_target_matrix)
cti->get_target_matrix(curcon, cob, ct, bsystem_time(scene, ob, (float)(scene->r.cfra), give_timeoffset(ob)));
else
- Mat4One(ct->matrix);
+ unit_m4(ct->matrix);
setlinestyle(3);
glBegin(GL_LINES);