Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_image_proj.c
| Context not available. | |||||
| } | } | ||||
| else /* dummy values for zero area face */ | else /* dummy values for zero area face */ | ||||
| w_tmp[0] = w_tmp[1] = w_tmp[2] = 1.0f / 3.0f; | w_tmp[0] = w_tmp[1] = w_tmp[2] = 1.0f / 3.0f; | ||||
| /* done mimicing barycentric_weights_v2() */ | /* done mimicking barycentric_weights_v2() */ | ||||
| return (v1[2] * w_tmp[0]) + (v2[2] * w_tmp[1]) + (v3[2] * w_tmp[2]); | return (v1[2] * w_tmp[0]) + (v2[2] * w_tmp[1]) + (v3[2] * w_tmp[2]); | ||||
| } | } | ||||
| Context not available. | |||||
| if (ibuf->rect_float) projPixel->pixel.f_pt[0] = 0; | if (ibuf->rect_float) projPixel->pixel.f_pt[0] = 0; | ||||
| else projPixel->pixel.ch_pt[0] = 0; | else projPixel->pixel.ch_pt[0] = 0; | ||||
| #endif | #endif | ||||
| /* pointer arithmetics */ | /* pointer arithmetic */ | ||||
| projPixel->image_index = projima - ps->projImages; | projPixel->image_index = projima - ps->projImages; | ||||
| return projPixel; | return projPixel; | ||||
| Context not available. | |||||
| v2coSS = ps->screenCoords[lt_vtri[1]]; | v2coSS = ps->screenCoords[lt_vtri[1]]; | ||||
| v3coSS = ps->screenCoords[lt_vtri[2]]; | v3coSS = ps->screenCoords[lt_vtri[2]]; | ||||
| /* This funtion gives is a concave polyline in UV space from the clipped tri*/ | /* This function gives is a concave polyline in UV space from the clipped tri*/ | ||||
| project_bucket_clip_face( | project_bucket_clip_face( | ||||
| is_ortho, is_flip_object, | is_ortho, is_flip_object, | ||||
| clip_rect, bucket_bounds, | clip_rect, bucket_bounds, | ||||
| Context not available. | |||||
| //uv[0] = (((float)x) + 0.5f) / ibuf->x; | //uv[0] = (((float)x) + 0.5f) / ibuf->x; | ||||
| uv[0] = (float)x / ibuf_xf; /* use pixel offset UV coords instead */ | uv[0] = (float)x / ibuf_xf; /* use pixel offset UV coords instead */ | ||||
| /* Note about IsectPoly2Df_twoside, checking the face or uv flipping doesnt work, | /* Note about IsectPoly2Df_twoside, checking the face or uv flipping doesn't work, | ||||
| * could check the poly direction but better to do this */ | * could check the poly direction but better to do this */ | ||||
| if ((do_backfacecull == true && IsectPoly2Df(uv, uv_clip, uv_clip_tot)) || | if ((do_backfacecull == true && IsectPoly2Df(uv, uv_clip, uv_clip_tot)) || | ||||
| (do_backfacecull == false && IsectPoly2Df_twoside(uv, uv_clip, uv_clip_tot))) | (do_backfacecull == false && IsectPoly2Df_twoside(uv, uv_clip, uv_clip_tot))) | ||||
| Context not available. | |||||
| /* Now create new UV's for the seam face */ | /* Now create new UV's for the seam face */ | ||||
| float (*outset_uv)[2] = ps->faceSeamUVs[tri_index]; | float (*outset_uv)[2] = ps->faceSeamUVs[tri_index]; | ||||
| float insetCos[3][3]; /* inset face coords. NOTE!!! ScreenSace for ortho, Worldspace in prespective view */ | float insetCos[3][3]; /* inset face coords. NOTE!!! ScreenSace for ortho, Worldspace in perspective view */ | ||||
| const float *vCoSS[3]; /* vertex screenspace coords */ | const float *vCoSS[3]; /* vertex screenspace coords */ | ||||
| Context not available. | |||||