kmy_for_yukar
SharpKmyCore
Math
Math/Plane.h
1
#pragma once
2
3
#include "Vector3.h"
4
5
namespace
XXSharpKmyMath
6
{
7
private ref class
Plane
8
{
9
public
:
10
Plane()
11
{
12
}
13
14
Plane(
float
nx,
float
ny,
float
nz,
float
pd)
15
{
16
normal.x = nx;
17
normal.y = ny;
18
normal.z = nz;
19
d = pd;
20
}
21
22
float
distanceTo(Vector3 point)
23
{
24
return
Vector3::dotProduct(normal, point) - d;
25
}
26
27
Vector3 normal;
28
float
d = 0;
29
};
30
}
31
構築:
1.9.4