Gamedev Framework (gf)  0.11.0
A C++14 framework for 2D games
Public Member Functions | Protected Attributes | List of all members
gf::EdgeRef< T > Class Template Reference

A reference to an edge (two points) More...

#include <gf/Triangulation.h>

Public Member Functions

 EdgeRef (const T &p0, const T &p1)
 Constructor with two points. More...
const Toperator[] (std::size_t index) const
 Access the points of the edge. More...

Protected Attributes

const Tm_points [2]

Detailed Description

template<typename T>
class gf::EdgeRef< T >

A reference to an edge (two points)

Constructor & Destructor Documentation

◆ EdgeRef()

template<typename T >
gf::EdgeRef< T >::EdgeRef ( const T p0,
const T p1 

Constructor with two points.

The address of the points must not change while the edge is alive.

p0The first point
p1The second point

Member Function Documentation

◆ operator[]()

template<typename T >
const T& gf::EdgeRef< T >::operator[] ( std::size_t  index) const

Access the points of the edge.

indexThe index of the point ( \( 0 \) or \( 1 \))

Member Data Documentation

◆ m_points

template<typename T >
const T* gf::EdgeRef< T >::m_points[2]