MCPcopy Create free account
hub / github.com/TheRealMJP/DeferredTexturing / MeshVertex

Class MeshVertex

SampleFramework12/v1.00/Graphics/Model.h:25–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23{
24
25struct MeshVertex
26{
27 Float3 Position;
28 Float3 Normal;
29 Float2 UV;
30 Float3 Tangent;
31 Float3 Bitangent;
32
33 MeshVertex()
34 {
35 }
36
37 MeshVertex(const Float3& p, const Float3& n, const Float2& uv, const Float3& t, const Float3& b)
38 {
39 Position = p;
40 Normal = n;
41 UV = uv;
42 Tangent = t;
43 Bitangent = b;
44 }
45
46 void Transform(const Float3& p, const Float3& s, const Quaternion& q)
47 {
48 Position *= s;
49 Position = Float3::Transform(Position, q);
50 Position += p;
51
52 Normal = Float3::Transform(Normal, q);
53 Tangent = Float3::Transform(Tangent, q);
54 Bitangent = Float3::Transform(Bitangent, q);
55 }
56
57 template<typename TSerializer> void Serialize(TSerializer& serializer)
58 {
59 SerializeItem(serializer, Position);
60 SerializeItem(serializer, Normal);
61 SerializeItem(serializer, UV);
62 SerializeItem(serializer, Tangent);
63 SerializeItem(serializer, Bitangent);
64 }
65};
66
67enum class MaterialTextures
68{

Callers 2

InitBoxMethod · 0.85
InitPlaneMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected