MCPcopy Create free account
hub / github.com/TheRealMJP/BakingLab / Vertex

Class Vertex

SampleFramework11/v1.02/Graphics/Model.cpp:31–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29{
30
31struct Vertex
32{
33 Float3 Position;
34 Float3 Normal;
35 Float2 TexCoord;
36 Float3 Tangent;
37 Float3 Bitangent;
38
39 Vertex()
40 {
41 }
42
43 Vertex(const Float3& p, const Float3& n, const Float2& tc, const Float3& t, const Float3& b)
44 {
45 Position = p;
46 Normal = n;
47 TexCoord = tc;
48 Tangent = t;
49 Bitangent = b;
50 }
51
52 void Transform(const Float3& p, const Float3& s, const Quaternion& q)
53 {
54 Position *= s;
55 Position = Float3::Transform(Position, q);
56 Position += p;
57
58 Normal = Float3::Transform(Normal, q);
59 Tangent = Float3::Transform(Tangent, q);
60 Bitangent = Float3::Transform(Bitangent, q);
61 }
62};
63
64static const D3D11_INPUT_ELEMENT_DESC VertexInputs[5] =
65{

Callers 2

InitBoxMethod · 0.70
InitPlaneMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected