v0.1.0: 初始工程骨架 — 7模块 40头文件 32源文件 17文档 Apache-2.0
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "vde/curves/nurbs_curve.h"
|
||||
|
||||
using namespace vde::curves;
|
||||
|
||||
TEST(NurbsTest, BSpline_UnitWeight) {
|
||||
// 3 control points, degree 2, uniform knots
|
||||
NurbsCurve curve(
|
||||
{Point3D(0,0,0), Point3D(1,2,0), Point3D(2,0,0)},
|
||||
{0,0,0,1,1,1},
|
||||
{1,1,1},
|
||||
2
|
||||
);
|
||||
auto p = curve.evaluate(0.5);
|
||||
EXPECT_NEAR(p.y(), 1.0, 0.1); // Should peak near y=1
|
||||
}
|
||||
Reference in New Issue
Block a user