Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/curve.c
| Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | |||||
| #include "BKE_key.h" | #include "BKE_key.h" | ||||
| #include "BKE_library.h" | #include "BKE_library.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_object.h" | #include "BKE_object.h" | ||||
| #include "BKE_material.h" | #include "BKE_material.h" | ||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| #include "CLG_log.h" | |||||
| /* globals */ | /* globals */ | ||||
| /* local */ | /* local */ | ||||
| static CLG_LogRef LOG = {"bke.curve"}; | |||||
| static int cu_isectLL(const float v1[3], const float v2[3], const float v3[3], const float v4[3], | static int cu_isectLL(const float v1[3], const float v2[3], const float v3[3], const float v4[3], | ||||
| short cox, short coy, | short cox, short coy, | ||||
| float *lambda, float *mu, float vec[3]); | float *lambda, float *mu, float vec[3]); | ||||
| /* frees editcurve entirely */ | /* frees editcurve entirely */ | ||||
| void BKE_curve_editfont_free(Curve *cu) | void BKE_curve_editfont_free(Curve *cu) | ||||
| { | { | ||||
| if (cu->editfont) { | if (cu->editfont) { | ||||
| ▲ Show 20 Lines • Show All 950 Lines • ▼ Show 20 Lines | case CU_NURB_BEZIER: | ||||
| k = 0.6f; | k = 0.6f; | ||||
| for (a = 0; a < pnts_order; a++) { | for (a = 0; a < pnts_order; a++) { | ||||
| if (a >= order && a <= pnts) | if (a >= order && a <= pnts) | ||||
| k += 0.5f; | k += 0.5f; | ||||
| knots[a] = floorf(k); | knots[a] = floorf(k); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| printf("bez nurb curve order is not 3 or 4, should never happen\n"); | CLOG_ERROR(&LOG, "bez nurb curve order is not 3 or 4, should never happen"); | ||||
| } | } | ||||
| break; | break; | ||||
| default: | default: | ||||
| for (a = 0; a < pnts_order; a++) { | for (a = 0; a < pnts_order; a++) { | ||||
| knots[a] = (float)a; | knots[a] = (float)a; | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 4,344 Lines • Show Last 20 Lines | |||||