clan::Trianglex< Type > Class Template Reference - ClanLib SDK
Description: clan::Trianglex< Type > Class Template Reference

Public Member Functions | Public Attributes | List of all members
clan::Trianglex< Type > Class Template Reference
clanCore Math

Triangles. More...

`#include <triangle_math.h>`

## Public Member Functions
| Trianglex ()
| Trianglex (const Trianglex< Type > &copy)=default
| Trianglex (const Vec2< Type > &point_p, const Vec2< Type > &point_q, const Vec2< Type > &point_r)
bool | operator!= (const Trianglex< Type > &triangle) const
Trianglex< Type > & | operator= (const Trianglex< Type > &copy)=default
bool | operator== (const Trianglex< Type > &triangle) const
bool | point_inside (const Vec2< Type > &point) const
| Return true if the point is inside the triangle.

## Public Attributes
Vec2< Type > | p
| First triangle point.
Vec2< Type > | q
Vec2< Type > | r

## Detailed Description

template<typename Type>
class clan::Trianglex< Type >

Triangles.

These triangle templates are defined for: int (Triangle), float (Trianglef), double (Triangled)

## Constructor & Destructor Documentation

## ◆ Trianglex() [1/3]

template<typename Type>

clan::Trianglex< Type >::Trianglex | ( |  | ) |
| inline

References p, q, and r.

Referenced by Trianglex(), operator!=(), operator=(), and operator==().

## ◆ Trianglex() [2/3]

template<typename Type>

clan::Trianglex< Type >::Trianglex | ( | const Trianglex< Type > & | copy | ) |
| default

References Trianglex().

## ◆ Trianglex() [3/3]

template<typename Type>

clan::Trianglex< Type >::Trianglex | ( | const Vec2< Type > & | point_p,
|  | const Vec2< Type > & | point_q,
|  | const Vec2< Type > & | point_r )
| inline

References p, q, and r.

## Member Function Documentation

## ◆ operator!=()

template<typename Type>

bool clan::Trianglex< Type >::operator!= | ( | const Trianglex< Type > & | triangle | ) | const
| inline

References Trianglex(), p, q, and r.

## ◆ operator=()

template<typename Type>

Trianglex< Type > & clan::Trianglex< Type >::operator= | ( | const Trianglex< Type > & | copy | ) |
| default

References Trianglex().

## ◆ operator==()

template<typename Type>

bool clan::Trianglex< Type >::operator== | ( | const Trianglex< Type > & | triangle | ) | const
| inline

References Trianglex(), p, q, and r.

## ◆ point_inside()

template<typename Type>

bool clan::Trianglex< Type >::point_inside | ( | const Vec2< Type > & | point | ) | const

Return true if the point is inside the triangle.

Parameters

  point | = point to test.

Returns
  true if the point is inside the triangle

References clan::point.

## Member Data Documentation

## ◆ p

template<typename Type>

Vec2<Type> clan::Trianglex< Type >::p

First triangle point.

Referenced by Trianglex(), Trianglex(), operator!=(), and operator==().

## ◆ q

template<typename Type>

Vec2<Type> clan::Trianglex< Type >::q

Referenced by Trianglex(), Trianglex(), operator!=(), and operator==().

## ◆ r

template<typename Type>

Vec2<Type> clan::Trianglex< Type >::r

Referenced by Trianglex(), Trianglex(), operator!=(), and operator==().

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

- triangle_math.h