Home | History | Annotate | Download | only in math

Lines Matching refs:p0

223      * @param p0 control point 0
229 public static float interpolateCatmullRom(float u, float T, float p0, float p1, float p2, float p3) {
232 c2 = -1.0f * T * p0 + T * p2;
233 c3 = 2 * T * p0 + (T - 3) * p1 + (3 - 2 * T) * p2 + -T * p3;
234 c4 = -T * p0 + (2 - T) * p1 + (T - 2) * p2 + T * p3;
249 * @param p0 control point 0
256 public static Vector3f interpolateCatmullRom(float u, float T, Vector3f p0, Vector3f p1, Vector3f p2, Vector3f p3, Vector3f store) {
260 store.x = interpolateCatmullRom(u, T, p0.x, p1.x, p2.x, p3.x);
261 store.y = interpolateCatmullRom(u, T, p0.y, p1.y, p2.y, p3.y);
262 store.z = interpolateCatmullRom(u, T, p0.z, p1.z, p2.z, p3.z);
276 * @param p0 control point 0
282 public static Vector3f interpolateCatmullRom(float u, float T, Vector3f p0, Vector3f p1, Vector3f p2, Vector3f p3) {
283 return interpolateCatmullRom(u, T, p0, p1, p2, p3, null);
295 * @param p0 control point 0
301 public static float interpolateBezier(float u, float p0, float p1, float p2, float p3) {
305 return p0 * oneMinusU2 * oneMinusU
320 * @param p0 control point 0
327 public static Vector3f interpolateBezier(float u, Vector3f p0, Vector3f p1, Vector3f p2, Vector3f p3, Vector3f store) {
331 store.x = interpolateBezier(u, p0.x, p1.x, p2.x, p3.x);
332 store.y = interpolateBezier(u, p0.y, p1.y, p2.y, p3.y);
333 store.z = interpolateBezier(u, p0.z, p1.z, p2.z, p3.z);
346 * @param p0 control point 0
352 public static Vector3f interpolateBezier(float u, Vector3f p0, Vector3f p1, Vector3f p2, Vector3f p3) {
353 return interpolateBezier(u, p0, p1, p2, p3, null);
358 * @param p0 control point 0
367 public static float getCatmullRomP1toP2Length(Vector3f p0, Vector3f p1, Vector3f p2, Vector3f p3, float startRange, float endRange, float curveTension) {
373 FastMath.interpolateCatmullRom(startRange, curveTension, p0, p1, p2, p3, start);
377 FastMath.interpolateCatmullRom(endRange, curveTension, p0, p1, p2, p3, end);
379 Vector3f middle = FastMath.interpolateCatmullRom(middleValue, curveTension, p0, p1, p2, p3);
385 l1 = getCatmullRomP1toP2Length(p0, p1, p2, p3, startRange, middleValue, curveTension);
386 l2 = getCatmullRomP1toP2Length(p0, p1, p2, p3, middleValue, endRange, curveTension);
394 * @param p0 control point 0
400 public static float getBezierP1toP2Length(Vector3f p0, Vector3f p1, Vector3f p2, Vector3f p3) {
402 Vector3f v1 = p0.clone(), v2 = new Vector3f();
404 FastMath.interpolateBezier(t, p0, p1, p2, p3, v2);
686 * @param p0 Point 0.
689 * @return 1 If they are CCW, -1 if they are not CCW, 0 if p2 is between p0 and p1.
691 public static int counterClockwise(Vector2f p0, Vector2f p1, Vector2f p2) {
693 dx1 = p1.x - p0.x;
694 dy1 = p1.y - p0.y;
695 dx2 = p2.x - p0.x;
696 dy2 = p2.y - p0.y;