Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
TVector4.h
Go to the documentation of this file.
1#pragma once
2
4#include "Math/math_fwd.h"
5#include "Math/constant.h"
6#include "Utility/utility.h"
7
8namespace ph::math
9{
10
13template<typename T>
14class TVector4 final : public TVectorNBase<TVector4<T>, T, 4>
15{
16private:
17 using Base = TVectorNBase<TVector4<T>, T, 4>;
18
19protected:
20 using Base::m;
21
22public:
24
25 using Base::Base;
26
27 TVector4(T vx, T vy, T vz, T vw);
28
29 template<typename U>
30 explicit TVector4(const TVector4<U>& other);
31
32 T& x();
33 T& y();
34 T& z();
35 T& w();
36 const T& x() const;
37 const T& y() const;
38 const T& z() const;
39 const T& w() const;
40
41 T& r();
42 T& g();
43 T& b();
44 T& a();
45 const T& r() const;
46 const T& g() const;
47 const T& b() const;
48 const T& a() const;
49};
50
51}// end namespace ph::math
52
53#include "Math/TVector4.ipp"
Represents a 4-D vector.
Definition TVector4.h:15
T & r()
Definition TVector4.ipp:80
T & g()
Definition TVector4.ipp:86
T & w()
Definition TVector4.ipp:50
T & y()
Definition TVector4.ipp:38
PH_DEFINE_INLINE_RULE_OF_5_MEMBERS(TVector4)
TVector4(T vx, T vy, T vz, T vw)
Definition TVector4.ipp:17
T & x()
Definition TVector4.ipp:32
T & z()
Definition TVector4.ipp:44
T & b()
Definition TVector4.ipp:92
T & a()
Definition TVector4.ipp:98
Definition TVectorNBase.h:14
std::array< T, N > m
Definition TArithmeticArrayBase.h:217
Math functions and utilities.
Definition TransformInfo.h:10