Cafu Engine
Brush3T< T > Class Template Reference

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...
 

Detailed Description

template<class T>
class Brush3T< T >

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):

  1. Die Normalenvektoren der Ebenen müssen nach AUßEN zeigen.

Constructor & Destructor Documentation

template<class T >
Brush3T< T >::Brush3T ( )
inline

Default constructor.

template<class T >
Brush3T< T >::Brush3T ( const BoundingBox3T< T > &  BB,
const Vector3T< T > &  Pos 
)

Generiert einen Brush aus einer BoundingBox 'BB', die vorher nach 'Pos' verschoben wird.

template<class T >
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.

Parameters
AFirst vertice.
BSecond vertice.
CThird vertice.
EpsilonTolerance value.
IncludeBevelPlanesIf false, only five planes (two for the sides and three for the edges) will be created. If true, also bevel planes will be included.

Member Function Documentation

template<class T >
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.

Parameters
BBBounding box to trace.
OriginOrigin of the trace.
DirDirection of the trace.
TraceTrace result.

Member Data Documentation

template<class T >
ArrayT< Plane3T<T> > Brush3T< T >::Planes

Array of planes this brush consists of.


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