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:
authorBrecht Van Lommel <brecht@blender.org>2021-10-24 15:19:19 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-10-26 16:37:04 +0300
commitfd25e883e2807a151f673b87c152a59701a0df80 (patch)
tree9441933f32ba2672ca71c58842342a9c525e123e /intern/cycles/subd/subd_patch.cpp
parentd7d40745fa09061a3117bd3669c5a46bbf611eae (diff)
Cycles: remove prefix from source code file names
Remove prefix of filenames that is the same as the folder name. This used to help when #includes were using individual files, but now they are always relative to the cycles root directory and so the prefixes are redundant. For patches and branches, git merge and rebase should be able to detect the renames and move over code to the right file.
Diffstat (limited to 'intern/cycles/subd/subd_patch.cpp')
-rw-r--r--intern/cycles/subd/subd_patch.cpp121
1 files changed, 0 insertions, 121 deletions
diff --git a/intern/cycles/subd/subd_patch.cpp b/intern/cycles/subd/subd_patch.cpp
deleted file mode 100644
index 23b3e6d5136..00000000000
--- a/intern/cycles/subd/subd_patch.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright 2011-2013 Blender Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* Parts adapted from code in the public domain in NVidia Mesh Tools. */
-
-#include "scene/mesh.h"
-
-#include "subd/subd_patch.h"
-
-#include "util/util_math.h"
-#include "util/util_types.h"
-
-CCL_NAMESPACE_BEGIN
-
-/* De Casteljau Evaluation */
-
-static void decasteljau_cubic(float3 *P, float3 *dt, float t, const float3 cp[4])
-{
- float3 d0 = cp[0] + t * (cp[1] - cp[0]);
- float3 d1 = cp[1] + t * (cp[2] - cp[1]);
- float3 d2 = cp[2] + t * (cp[3] - cp[2]);
-
- d0 += t * (d1 - d0);
- d1 += t * (d2 - d1);
-
- *P = d0 + t * (d1 - d0);
- if (dt)
- *dt = d1 - d0;
-}
-
-static void decasteljau_bicubic(
- float3 *P, float3 *du, float3 *dv, const float3 cp[16], float u, float v)
-{
- float3 ucp[4], utn[4];
-
- /* interpolate over u */
- decasteljau_cubic(ucp + 0, utn + 0, u, cp);
- decasteljau_cubic(ucp + 1, utn + 1, u, cp + 4);
- decasteljau_cubic(ucp + 2, utn + 2, u, cp + 8);
- decasteljau_cubic(ucp + 3, utn + 3, u, cp + 12);
-
- /* interpolate over v */
- decasteljau_cubic(P, dv, v, ucp);
- if (du)
- decasteljau_cubic(du, NULL, v, utn);
-}
-
-/* Linear Quad Patch */
-
-void LinearQuadPatch::eval(float3 *P, float3 *dPdu, float3 *dPdv, float3 *N, float u, float v)
-{
- float3 d0 = interp(hull[0], hull[1], u);
- float3 d1 = interp(hull[2], hull[3], u);
-
- *P = interp(d0, d1, v);
-
- if (dPdu && dPdv) {
- *dPdu = interp(hull[1] - hull[0], hull[3] - hull[2], v);
- *dPdv = interp(hull[2] - hull[0], hull[3] - hull[1], u);
- }
-
- if (N) {
- *N = normalize(
- interp(interp(normals[0], normals[1], u), interp(normals[2], normals[3], u), v));
- }
-}
-
-BoundBox LinearQuadPatch::bound()
-{
- BoundBox bbox = BoundBox::empty;
-
- for (int i = 0; i < 4; i++)
- bbox.grow(hull[i]);
-
- return bbox;
-}
-
-/* Bicubic Patch */
-
-void BicubicPatch::eval(float3 *P, float3 *dPdu, float3 *dPdv, float3 *N, float u, float v)
-{
- if (N) {
- float3 dPdu_, dPdv_;
- decasteljau_bicubic(P, &dPdu_, &dPdv_, hull, u, v);
-
- if (dPdu && dPdv) {
- *dPdu = dPdu_;
- *dPdv = dPdv_;
- }
-
- *N = normalize(cross(dPdu_, dPdv_));
- }
- else {
- decasteljau_bicubic(P, dPdu, dPdv, hull, u, v);
- }
-}
-
-BoundBox BicubicPatch::bound()
-{
- BoundBox bbox = BoundBox::empty;
-
- for (int i = 0; i < 16; i++)
- bbox.grow(hull[i]);
-
- return bbox;
-}
-
-CCL_NAMESPACE_END