CrystalSpace

Public API Reference

CS::TriangleT< T > Struct Template Reference

A templated triangle. More...

#include <csgeom/tri.h>

List of all members.

Public Member Functions

TriangleToperator= (const TriangleT &t)
 Assignment.
T & operator[] (size_t n)
 Returns n-th component of the triangle.
const T & operator[] (size_t n) const
 Returns n-th component of the triangle.
void Set (const T &_a, const T &_b, const T &_c)
 Set the values.
 TriangleT (const T &_a, const T &_b, const T &_c)
 Convenience constructor, builds a triangle with initializers.
 TriangleT (const TriangleT &t)
 Copy constructor.
 TriangleT ()
 Empty default constructor.

Detailed Description

template<typename T>
struct CS::TriangleT< T >

A templated triangle.

Note that this structure is only sensible if used in combination with a vertex or edge table. 'a', 'b', and 'c' are then indices in that table (either vertices or edges).

Definition at line 39 of file tri.h.


Constructor & Destructor Documentation

template<typename T>
CS::TriangleT< T >::TriangleT (  )  [inline]

Empty default constructor.

Definition at line 59 of file tri.h.

template<typename T>
CS::TriangleT< T >::TriangleT ( const T &  _a,
const T &  _b,
const T &  _c 
) [inline]

Convenience constructor, builds a triangle with initializers.

Definition at line 62 of file tri.h.

template<typename T>
CS::TriangleT< T >::TriangleT ( const TriangleT< T > &  t  )  [inline]

Copy constructor.

Definition at line 65 of file tri.h.


Member Function Documentation

template<typename T>
TriangleT& CS::TriangleT< T >::operator= ( const TriangleT< T > &  t  )  [inline]

Assignment.

Definition at line 73 of file tri.h.

template<typename T>
T& CS::TriangleT< T >::operator[] ( size_t  n  )  [inline]

Returns n-th component of the triangle.

Definition at line 100 of file tri.h.

template<typename T>
const T& CS::TriangleT< T >::operator[] ( size_t  n  )  const [inline]

Returns n-th component of the triangle.

Definition at line 93 of file tri.h.

template<typename T>
void CS::TriangleT< T >::Set ( const T &  _a,
const T &  _b,
const T &  _c 
) [inline]

Set the values.

Definition at line 82 of file tri.h.


Member Data Documentation

template<typename T>
T CS::TriangleT< T >::a

Triangle vertices or edges.

Definition at line 49 of file tri.h.

template<typename T>
T CS::TriangleT< T >::b

Triangle vertices or edges.

Definition at line 49 of file tri.h.

template<typename T>
T CS::TriangleT< T >::c

Triangle vertices or edges.

Definition at line 49 of file tri.h.

template<typename T>
T CS::TriangleT< T >::components[3]

All components.

Definition at line 54 of file tri.h.


The documentation for this struct was generated from the following file:

Generated for Crystal Space 1.4.1 by doxygen 1.7.1