- 新增Math库: Vector2/3/4, Matrix3/4, Quaternion, Transform, Color等 - 新增测试框架: Google Test (gtest) - 新增140个单元测试,覆盖Vector, Matrix, Quaternion, Geometry - VolumeRenderer支持vcpkg的NanoVDB - 添加TESTING.md测试文档
22 lines
390 B
C++
22 lines
390 B
C++
#pragma once
|
|
|
|
#include "Math.h"
|
|
#include "Vector3.h"
|
|
|
|
namespace XCEngine {
|
|
namespace Math {
|
|
|
|
struct Sphere {
|
|
Vector3 center = Vector3::Zero();
|
|
float radius = 0.0f;
|
|
|
|
Sphere() = default;
|
|
Sphere(const Vector3& center, float radius);
|
|
|
|
bool Contains(const Vector3& point) const;
|
|
bool Intersects(const Sphere& other) const;
|
|
};
|
|
|
|
} // namespace Math
|
|
} // namespace XCEngine
|