MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / vec3

Class vec3

include/daScript/misc/vectypes.h:100–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98
99 template <typename TT>
100 struct vec3 {
101 TT x, y, z;
102 __forceinline friend StringWriter & operator<< (StringWriter & stream, const vec3<TT> & vec) {
103 stream << vec.x << DAS_PRINT_VEC_SEPARATROR << vec.y << DAS_PRINT_VEC_SEPARATROR << vec.z;
104 return stream;
105 }
106 __forceinline bool operator == ( const vec3<TT> & vec ) const {
107 return x==vec.x && y==vec.y && z==vec.z;
108 }
109 __forceinline bool operator != ( const vec3<TT> & vec ) const {
110 return x!=vec.x || y!=vec.y || z!=vec.z;
111 }
112 __forceinline vec3() = default;
113 __forceinline vec3(const vec3 &) = default;
114 __forceinline vec3 & operator = (const vec3 &) = default;
115 __forceinline vec3(vec4f t) : x(vec_extract<TT>::x(t)), y(vec_extract<TT>::y(t)), z(vec_extract<TT>::z(t)) {}
116 __forceinline vec3(TT X, TT Y, TT Z) : x(X), y(Y), z(Z) {}
117 __forceinline vec3(TT t) : x(t), y(t), z(t) {}
118 __forceinline operator vec4f() const { return vec_loadu3(&x); };
119 };
120
121 template <typename TT>
122 struct vec4 {

Callers

nothing calls this directly

Calls 1

vec_loadu3Function · 0.85

Tested by

no test coverage detected