Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
AAPlaneClass.h
1/* Renegade Scripts.dll
2 Copyright 2013 Tiberian Technologies
3
4 This file is part of the Renegade scripts.dll
5 The Renegade scripts.dll is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free
7 Software Foundation; either version 2, or (at your option) any later
8 version. See the file COPYING for more details.
9 In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence.
10 Only the source code to the module(s) containing the licenced code has to be released.
11*/
12#pragma once
13
14#include "vector3.h"
15
16class AAPlaneClass
17{
18public:
19
20 enum AxisEnum
21 {
22 XNORMAL = 0,
23 YNORMAL = 1,
24 ZNORMAL = 2
25 };
26
27 AAPlaneClass() {}
28
29 AAPlaneClass(AxisEnum normal,float dist) :
30 Normal(normal),
31 Dist(dist)
32 {}
33
34 void Set(AxisEnum normal, float dist)
35 {
36 Normal = normal;
37 Dist = dist;
38 }
39
40 void Get_Normal(Vector3* normal) const
41 {
42 normal->Set(0,0,0);
43 (*normal)[Normal] = 1.0f;
44 }
45
46 inline bool In_Front(const Vector3& point) const
47 {
48 return Dist > point[Normal];
49 }
50
51public:
52
53 AxisEnum Normal;
54 float Dist;
55};