CS::TriangleT< T > Struct Template Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
CS::TriangleT< T > Struct Template Reference

A templated triangle. More...

`#include <csgeom/tri.h>`

List of all members.

## Public Member Functions
TriangleT & | operator= (const TriangleT &t)
| Assignment.
const T & | operator[] (size_t n) const
| Returns n-th component of the triangle.
T & | operator[] (size_t n)
| Returns n-th component of the triangle.
void | Set (const T &_a, const T &_b, const T &_c)
| Set the values.
| TriangleT ()
| Empty default constructor.
| TriangleT (const T &_a, const T &_b, const T &_c)
| Convenience constructor, builds a triangle with initializers.
| TriangleT (const TriangleT &t)
| Copy 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>

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>

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>

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:

- csgeom/tri.h