Diese Klasse implementiert Brushes. More...
#include "Brush.hpp"
Public Member Functions | |
Brush3T () | |
Default constructor. More... | |
Brush3T (const BoundingBox3T< T > &BB, const Vector3T< T > &Pos) | |
Generiert einen Brush aus einer BoundingBox 'BB', die vorher nach 'Pos' verschoben wird. More... | |
Brush3T (const Vector3T< T > &A, const Vector3T< T > &B, const Vector3T< T > &C, const T Epsilon, bool IncludeBevelPlanes=true) | |
Creates a triangular, zero-volume brush from the vertices A, B and C. More... | |
void | TraceBoundingBox (const BoundingBox3T< T > &BB, const Vector3T< T > &Origin, const Vector3T< T > &Dir, VB_Trace3T< T > &Trace) const |
Traces the (relative) bounding box 'BB' from the (absolute) 'Origin' along 'Dir' towards the end position 'Origin+VectorScale(Dir, Trace.Fraction)'. More... | |
Public Attributes | |
ArrayT< Plane3T< T > > | Planes |
Array of planes this brush consists of. More... | |
Diese Klasse implementiert Brushes.
Ein Brush ist nichts weiter als eine Ansammlung (Array) von Planes, deren Schnitt ein konvexes, dreidimensionales Polyhedron darstellt.
Eigenschaften des Brushs (Vereinbarungen):
Brush3T< T >::Brush3T | ( | const BoundingBox3T< T > & | BB, |
const Vector3T< T > & | Pos | ||
) |
Generiert einen Brush aus einer BoundingBox 'BB', die vorher nach 'Pos' verschoben wird.
Brush3T< T >::Brush3T | ( | const Vector3T< T > & | A, |
const Vector3T< T > & | B, | ||
const Vector3T< T > & | C, | ||
const T | Epsilon, | ||
bool | IncludeBevelPlanes = true |
||
) |
Creates a triangular, zero-volume brush from the vertices A, B and C.
A | First vertice. |
B | Second vertice. |
C | Third vertice. |
Epsilon | Tolerance value. |
IncludeBevelPlanes | If false, only five planes (two for the sides and three for the edges) will be created. If true, also bevel planes will be included. |
void Brush3T< T >::TraceBoundingBox | ( | const BoundingBox3T< T > & | BB, |
const Vector3T< T > & | Origin, | ||
const Vector3T< T > & | Dir, | ||
VB_Trace3T< T > & | Trace | ||
) | const |
Traces the (relative) bounding box 'BB' from the (absolute) 'Origin' along 'Dir' towards the end position 'Origin+VectorScale(Dir, Trace.Fraction)'.
The result is returned in 'Trace'. This method handles the bloating and unbloating of the brush according to a description by Kekoa Proudfoot: Tracing the 'BB' against this brush is reduced to a simple ray collision test against the "bloated" brush.
BB | Bounding box to trace. |
Origin | Origin of the trace. |
Dir | Direction of the trace. |
Trace | Trace result. |
Array of planes this brush consists of.