#include <KMath.h>
|
static Vect | PointerCastToY (Camera *cam, float targetY) |
|
static float | Clamp (float val, float min, float max) |
| Clamps a float to an interval.
|
|
static Vect | ClampPointToAABB (const Vect &point, const Vect &aabbMin, const Vect &aabbMax) |
| Clamps a point to be within an AABB.
|
|
static bool | IntervalOverlap (float aMin, float aMax, float bMin, float bMax) |
| Overlap test two float intervals.
|
|
static bool | Intersect (const CollisionVolume &A, const CollisionVolume &B) |
| Intersection test two CollisionVolume.
|
|
static bool | Intersect (const BSphere &A, const BSphere &B) |
| Intersection test two BSphere.
|
|
static bool | Intersect (const BSphere &bsphere, const Vect &point) |
| Intersection test BSphere with Point in space.
|
|
static bool | Intersect (const AABB &A, const AABB &B) |
| Intersection test two AABB.
|
|
static bool | Intersect (const AABB &aabb, const BSphere &bsphere) |
| Intersection test AABB with BSphere.
|
|
static float | Lerp (float from, float to, float t) |
| Lerp between two floats by t.
|
|
static float | CubicPerlin1D (unsigned int seed, int repeat, float t) |
| Generates continuous noise and returns the value at t.
|
|
◆ Clamp()
float KMath::Clamp |
( |
float |
val, |
|
|
float |
min, |
|
|
float |
max |
|
) |
| |
|
static |
Clamps a float to an interval.
Haru, 4/12/2023.
- Parameters
-
val | Value to clamp. |
max | Maximum value of interval to clamp to. |
min | Minimum value of interval to clamp to. |
- Returns
- The closest value to val within the interval [min,max].
◆ ClampPointToAABB()
Vect KMath::ClampPointToAABB |
( |
const Vect & |
point, |
|
|
const Vect & |
aabbMin, |
|
|
const Vect & |
aabbMax |
|
) |
| |
|
static |
Clamps a point to be within an AABB.
Haru, 4/12/2023.
- Parameters
-
point | Point to clamp. |
aabbMax | Maximum point of AABB to clamp to. |
aabbMin | Minimum point of AABB to clamp to. |
- Returns
- The closest point to point within the AABB defined by aabbMin and aabbMax.
◆ CubicPerlin1D()
float KMath::CubicPerlin1D |
( |
unsigned int |
seed, |
|
|
int |
repeat, |
|
|
float |
t |
|
) |
| |
|
static |
Generates continuous noise and returns the value at t.
Haru, 3/19/2023.
- Parameters
-
seed | The seed. |
repeat | How long before it repeats. |
t | T value. |
- Returns
- A float.
◆ Intersect() [1/5]
bool KMath::Intersect |
( |
const AABB & |
A, |
|
|
const AABB & |
B |
|
) |
| |
|
static |
Intersection test two AABB.
Haru, 4/12/2023.
- Parameters
-
A | An AABB to process. |
B | An AABB to process. |
- Returns
- True if they intersect, false not.
◆ Intersect() [2/5]
bool KMath::Intersect |
( |
const AABB & |
aabb, |
|
|
const BSphere & |
bsphere |
|
) |
| |
|
static |
Intersection test AABB with BSphere.
Haru, 4/12/2023.
- Parameters
-
- Returns
- True if they intersect, false not.
◆ Intersect() [3/5]
Intersection test two BSphere.
Haru, 4/12/2023.
- Parameters
-
- Returns
- True if they intersect, false not.
◆ Intersect() [4/5]
bool KMath::Intersect |
( |
const BSphere & |
bsphere, |
|
|
const Vect & |
point |
|
) |
| |
|
static |
Intersection test BSphere with Point in space.
Haru, 4/12/2023.
- Parameters
-
bsphere | The BSphere to process. |
point | The position of the point to process. |
- Returns
- True if they intersect, false not.
◆ Intersect() [5/5]
Intersection test two CollisionVolume.
Haru, 4/12/2023.
- Parameters
-
- Returns
- True if they intersect, false not.
◆ IntervalOverlap()
bool KMath::IntervalOverlap |
( |
float |
aMin, |
|
|
float |
aMax, |
|
|
float |
bMin, |
|
|
float |
bMax |
|
) |
| |
|
static |
Overlap test two float intervals.
Haru, 3/19/2023.
- Parameters
-
aMin | Minimum value of interval A. |
aMax | Maximum value of interval A. |
bMin | Minimum value of interval B. |
bMax | Maximum value of interval B. |
- Returns
- True if they overlap, false not.
◆ Lerp()
float KMath::Lerp |
( |
float |
from, |
|
|
float |
to, |
|
|
float |
t |
|
) |
| |
|
static |
Lerp between two floats by t.
Haru, 3/19/2023.
- Parameters
-
from | Value from which to interpolate. |
to | Value to interpolate towards. |
t | T value for Lerp. |
- Returns
- Interpolated float between from and to by t.
◆ PointerCastToY()
Vect KMath::PointerCastToY |
( |
Camera * |
cam, |
|
|
float |
targetY |
|
) |
| |
|
static |
The documentation for this class was generated from the following files: