Math v0.2.0
Line Struct Reference

Line structure. (In 3D space). More...

#include <line.hpp>

Public Member Functions

 Line (f32x4 start, f32x4 end) noexcept
 Creates a new line structure. (In 3D space).
 Line ()=default
 Creates a new zero size line structure.
f32x4 getDirection (bool normalize=true) const noexcept
 Returns line direction vector in 3D space.
Line operator* (f32x4 v) const noexcept
Line operator/ (f32x4 v) const noexcept
Line operator+ (f32x4 v) const noexcept
Line operator- (f32x4 v) const noexcept
Lineoperator*= (f32x4 v) noexcept
Lineoperator/= (f32x4 v) noexcept
Lineoperator+= (f32x4 v) noexcept
Lineoperator-= (f32x4 v) noexcept
bool operator== (const Line &v) const noexcept
bool operator!= (const Line &v) const noexcept

Public Attributes

f32x4 start = f32x4::zero
 Line start point in 3D space.
f32x4 end = f32x4::zero
 Line end point in 3D space.

Detailed Description

Line structure. (In 3D space).

Defined by a start and end points in the space.

Constructor & Destructor Documentation

◆ Line()

Line ( f32x4 start,
f32x4 end )
inlinenoexcept

Creates a new line structure. (In 3D space).

Parameters
starttarget line start point in the space
endtarget line end point in the space

Member Function Documentation

◆ getDirection()

f32x4 getDirection ( bool normalize = true) const
inlinenoexcept

Returns line direction vector in 3D space.

Parameters
normalizeis direction vector should be normalized