Eule::TrapazoidalPrismCollider Class Reference

A collider describing a trapazoidal prism. More...

`#include <TrapazoidalPrismCollider.h>`

Inheritance diagram for Eule::TrapazoidalPrismCollider:
[legend]
Collaboration diagram for Eule::TrapazoidalPrismCollider:
[legend]

## Public Member Functions

| TrapazoidalPrismCollider ()
| TrapazoidalPrismCollider (const TrapazoidalPrismCollider &other)=default
| TrapazoidalPrismCollider (TrapazoidalPrismCollider &&other) noexcept=default
void | operator= (const TrapazoidalPrismCollider &other)
void | operator= (TrapazoidalPrismCollider &&other) noexcept
const Vector3d & | GetVertex (std::size_t index) const
| Will return a specific vertex. More...
void | SetVertex (std::size_t index, const Vector3d value)
| Will set the value of a specific vertex. More...
bool | Contains (const Vector3d &point) const override
| Tests, if this Collider contains a point. More...

## Static Public Attributes

static constexpr std::size_t | BACK = 0
static constexpr std::size_t | FRONT = 4
static constexpr std::size_t | LEFT = 0
static constexpr std::size_t | RIGHT = 2
static constexpr std::size_t | BOTTOM = 0
static constexpr std::size_t | TOP = 1

## Detailed Description

A collider describing a trapazoidal prism.

A trapazoidal prism is basically a box, but each vertex can be manipulated individually, altering the angles between faces. Distorting a 2d face into 3d space will result in undefined behaviour. Each face should stay flat, relative to itself. This shape is based on QUADS!

Definition at line 13 of file TrapazoidalPrismCollider.h.

## Constructor & Destructor Documentation

## TrapazoidalPrismCollider() [1/3]

TrapazoidalPrismCollider::TrapazoidalPrismCollider | ( |  | ) |

Definition at line 5 of file TrapazoidalPrismCollider.cpp.

{
return;
}

## TrapazoidalPrismCollider() [2/3]

Eule::TrapazoidalPrismCollider::TrapazoidalPrismCollider | ( | const TrapazoidalPrismCollider & | other | ) |

default

## TrapazoidalPrismCollider() [3/3]

Eule::TrapazoidalPrismCollider::TrapazoidalPrismCollider | ( | TrapazoidalPrismCollider && | other | ) |

defaultnoexcept

## Member Function Documentation

## Contains()

bool TrapazoidalPrismCollider::Contains | ( | const Vector3d & | point | ) | const

overridevirtual

Tests, if this Collider contains a point.

Implements Eule::Collider.

Definition at line 103 of file TrapazoidalPrismCollider.cpp.

{
for (std::size_t i = 0; i < 6; i++)
if (FaceDot((FACE_NORMALS)i, point) < 0)
return false;
return true;
}

## GetVertex()

const Vector3d & TrapazoidalPrismCollider::GetVertex | ( | std::size_t | index | ) | const

Will return a specific vertex.

Definition at line 26 of file TrapazoidalPrismCollider.cpp.

{
return vertices[index];
}

## operator=() [1/2]

void TrapazoidalPrismCollider::operator= | ( | const TrapazoidalPrismCollider & | other | ) |

Definition at line 10 of file TrapazoidalPrismCollider.cpp.

{
vertices = other.vertices;
faceNormals = other.faceNormals;
return;
}

## operator=() [2/2]

void TrapazoidalPrismCollider::operator= | ( | TrapazoidalPrismCollider && | other | ) |

noexcept

Definition at line 18 of file TrapazoidalPrismCollider.cpp.

{
vertices = std::move(other.vertices);
faceNormals = std::move(other.faceNormals);
return;
}

## SetVertex()

void TrapazoidalPrismCollider::SetVertex | ( | std::size_t | index,
|  | const Vector3d | value
| ) |  |

Will set the value of a specific vertex.

Definition at line 31 of file TrapazoidalPrismCollider.cpp.

{
vertices[index] = value;
GenerateNormalsFromVertices();
return;
}

## Member Data Documentation

## BACK

constexpr std::size_t Eule::TrapazoidalPrismCollider::BACK = 0

staticconstexpr

Definition at line 32 of file TrapazoidalPrismCollider.h.

## BOTTOM

constexpr std::size_t Eule::TrapazoidalPrismCollider::BOTTOM = 0

staticconstexpr

Definition at line 36 of file TrapazoidalPrismCollider.h.

## FRONT

constexpr std::size_t Eule::TrapazoidalPrismCollider::FRONT = 4

staticconstexpr

Definition at line 33 of file TrapazoidalPrismCollider.h.

## LEFT

constexpr std::size_t Eule::TrapazoidalPrismCollider::LEFT = 0

staticconstexpr

Definition at line 34 of file TrapazoidalPrismCollider.h.

## RIGHT

constexpr std::size_t Eule::TrapazoidalPrismCollider::RIGHT = 2

staticconstexpr

Definition at line 35 of file TrapazoidalPrismCollider.h.

## TOP

constexpr std::size_t Eule::TrapazoidalPrismCollider::TOP = 1

staticconstexpr

Definition at line 37 of file TrapazoidalPrismCollider.h.

The documentation for this class was generated from the following files:

- Eule/TrapazoidalPrismCollider.h
- Eule/TrapazoidalPrismCollider.cpp