81 glm::vec4
color = glm::vec4(1.0);
95 bool operator==(
const Vertex& other)
const
97 return this->position == other.
position;
100 friend Vertex operator*(
const Vertex& lhs,
const float ratio)
106 .color = lhs.
color * ratio,
107 .normal = lhs.
normal * ratio,
108 .tangent = lhs.
tangent * ratio,
113 friend Vertex operator*(
const float ratio,
const Vertex& rhs)
119 friend Vertex operator+(
const Vertex& lhs,
const Vertex& rhs)
122 .position = lhs.position + rhs.position,
123 .tex_coords_0 = lhs.tex_coords_0 + rhs.tex_coords_0,
124 .tex_coords_1 = lhs.tex_coords_1 + rhs.tex_coords_1,
125 .color = lhs.color + rhs.color,
126 .normal = lhs.normal + rhs.normal,
127 .tangent = lhs.tangent + rhs.tangent,
128 .bitangent = lhs.bitangent + rhs.bitangent
168 bool operator==(
const Vertex& other)
const
170 return this->position == other.
position;
179 .color = lhs.
color * ratio,
180 .normal = lhs.
normal * ratio,
181 .tangent = lhs.
tangent * ratio,
186 friend SkinnedVertex operator*(
const float ratio,
const SkinnedVertex& rhs)
192 friend SkinnedVertex operator+(
const SkinnedVertex& lhs,
const SkinnedVertex& rhs)
194 return SkinnedVertex({
195 .position = lhs.position + rhs.position,
196 .tex_coords_0 = lhs.tex_coords_0 + rhs.tex_coords_0,
197 .tex_coords_1 = lhs.tex_coords_1 + rhs.tex_coords_1,
198 .color = lhs.color + rhs.color,
199 .normal = lhs.normal + rhs.normal,
200 .tangent = lhs.tangent + rhs.tangent,
201 .bitangent = lhs.bitangent + rhs.bitangent