Math v0.2.0
Triangle Struct Reference

Triangle or polygon structure. (In 3D space). More...

#include <triangle.hpp>

Public Member Functions

 Triangle (f32x4 p0, f32x4 p1, f32x4 p2) noexcept
 Creates a new triangle (polygon) structure. (In 3D space).
 Triangle ()=default
 Creates a new zero size triangle (polygon) structure.
Triangle operator* (f32x4 v) const noexcept
Triangle operator/ (f32x4 v) const noexcept
Triangle operator+ (f32x4 v) const noexcept
Triangle operator- (f32x4 v) const noexcept
Triangleoperator*= (f32x4 v) noexcept
Triangleoperator/= (f32x4 v) noexcept
Triangleoperator+= (f32x4 v) noexcept
Triangleoperator-= (f32x4 v) noexcept
bool operator== (const Triangle &v) const noexcept
bool operator!= (const Triangle &v) const noexcept

Public Attributes

f32x4 p0 = f32x4::zero
f32x4 p1 = f32x4::zero
f32x4 p2 = f32x4::zero

Static Public Attributes

static constexpr int32 pointCount = 3
 Triangle point count. (Polygon).

Detailed Description

Triangle or polygon structure. (In 3D space).

Defined by three points in 3D space.

Constructor & Destructor Documentation

◆ Triangle()

Triangle ( f32x4 p0,
f32x4 p1,
f32x4 p2 )
inlinenoexcept

Creates a new triangle (polygon) structure. (In 3D space).

Parameters
p0first triangle vertex position in 3D space
p1second triangle vertex position in 3D space
p2third triangle vertex position in 3D space

Member Data Documentation

◆ p0

f32x4 p0 = f32x4::zero

First triangle vertex position.

◆ p1

f32x4 p1 = f32x4::zero

Second triangle vertex position.

◆ p2

f32x4 p2 = f32x4::zero

Third triangle vertex position.