:rtype:
* 3-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz))
- * or 4-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz), :class:`PolyProxy`)
- * or 5-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz), :class:`PolyProxy`, 2-tuple (u, v))
+ * or 4-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz), :class:`KX_PolyProxy`)
+ * or 5-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz), :class:`KX_PolyProxy`, 2-tuple (u, v))
.. note::
:arg index: polygon number
:type index: integer
:return: a polygon object.
- :rtype: :class:`PolyProxy`
+ :rtype: :class:`KX_PolyProxy`
.. method:: transform(matid, matrix)
* dupli object between frames, which is needed for motion blur. last level
* goes first in the array. */
dob->persistent_id[0] = index;
- for (i = 1; i < ctx->level+1; i++)
+ for (i = 1; i < ctx->level + 1; i++)
dob->persistent_id[i] = ctx->persistent_id[ctx->level - i];
/* fill rest of values with INT_MAX which index will never have as value */
for (; i < MAX_DUPLI_RECUR; i++)
}
if (ok) {
- DupliObject *dob;
-
/* WARNING: doing animation updates in this way is not terribly accurate, as the dependencies
* and/or other objects which may affect this object's transforms are not updated either.
* However, this has always been the way that this worked (i.e. pre 2.5), so I guess that it'll be fine!
BKE_animsys_evaluate_animdata(scene, &ob->id, ob->adt, (float)scene->r.cfra, ADT_RECALC_ANIM); /* ob-eval will do drivers, so we don't need to do them */
BKE_object_where_is_calc_time(scene, ob, (float)scene->r.cfra);
- dob = make_dupli(ctx, ob, ob->obmat, scene->r.cfra, false, false);
+ make_dupli(ctx, ob, ob->obmat, scene->r.cfra, false, false);
}
}
if (u <= 0.0f) {
r_co[0] = 0.0f;
r_co[1] = 1.0f;
- }
+ }
else if (u >= 2.0f) {
r_co[0] = 1.0f;
r_co[1] = 0.0f;
copy_v3_v3(co, vb);
}
else if (weld2->profile.super_r == PRO_LINE_R &&
- weld1->profile.super_r != PRO_LINE_R)
+ weld1->profile.super_r != PRO_LINE_R)
{
copy_v3_v3(co, va);
}
/* n is odd, so get one corner-cut chord.
* Solve u == sqrt(2*(1-n2*u)^2) where n2 = floor(n/2) */
n2 = n / 2;
- u = (2.0f * n2 - M_SQRT2) / (2.0f * n2 * n2 - 1);
+ u = (2.0f * n2 - (float)M_SQRT2) / (2.0f * n2 * n2 - 1.0f);
for (i = 0; i < n; i++)
r_params[i] = i * u;
r_params[n] = umax;
void ScreenLensDistortionOperation::determineUV(float result[6], float x, float y) const
{
- float xy[2] = { x, y };
+ const float xy[2] = {x, y};
float uv[2];
get_uv(xy, uv);
float uv_dot = len_squared_v2(uv);
- copy_v2_v2(result+0, xy);
- copy_v2_v2(result+2, xy);
- copy_v2_v2(result+4, xy);
- get_delta(uv_dot, m_k4[0], uv, result+0);
- get_delta(uv_dot, m_k4[1], uv, result+2);
- get_delta(uv_dot, m_k4[2], uv, result+4);
+ copy_v2_v2(result + 0, xy);
+ copy_v2_v2(result + 2, xy);
+ copy_v2_v2(result + 4, xy);
+ get_delta(uv_dot, m_k4[0], uv, result + 0);
+ get_delta(uv_dot, m_k4[1], uv, result + 2);
+ get_delta(uv_dot, m_k4[2], uv, result + 4);
}
bool ScreenLensDistortionOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
}
/* Get meshes.*/
- dmesh_src = mesh_get_derived_final(scene, ob_src, CD_MASK_BAREMESH|CD_MASK_MDEFORMVERT);
+ dmesh_src = mesh_get_derived_final(scene, ob_src, CD_MASK_BAREMESH | CD_MASK_MDEFORMVERT);
me_dst = ob_dst->data;
/* Get vertex group array from source mesh */
bm = DM_to_bmesh(dm, true);
if ((bmd->lim_flags & MOD_BEVEL_VGROUP) && bmd->defgrp_name[0])
- modifier_get_vgroup(ob, dm, bmd->defgrp_name, &dvert, &vgroup);
+ modifier_get_vgroup(ob, dm, bmd->defgrp_name, &dvert, &vgroup);
if (vertex_only) {
BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {