Logo
Math/Plane.h
1#pragma once
2
3#include "Vector3.h"
4
5namespace SharpKmyMath
6{
7 public ref class Plane
8 {
9 public:
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
28 float d = 0;
29 };
30}
31
Definition: Math/Plane.h:8
float d
Definition: Math/Plane.h:28
Plane(float nx, float ny, float nz, float pd)
Definition: Math/Plane.h:14
float distanceTo(Vector3 point)
Definition: Math/Plane.h:22
Plane()
Definition: Math/Plane.h:10
Vector3 normal
Definition: Math/Plane.h:27
Definition: RefCapture.h:3
Definition: Vector3.h:8
float y
Definition: Vector3.h:11
float z
Definition: Vector3.h:11
float x
Definition: Vector3.h:11
static float dotProduct(Vector3 v1, Vector3 v2)
Definition: Vector3.h:94