VectorHelper.h and MatrixHelper.h

Home Forums Real-Time 3D Rendering with DirectX and HLSL VectorHelper.h and MatrixHelper.h

This topic contains 1 reply, has 2 voices, and was last updated by  Paul Varcholik 2 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #324

    M.Rafi
    Participant

    Hello Mr. Varcholik I was looking over the code for chapter 13 and I saw that there was two header files you forgot to talk about in the book. VectorHelper and MatrixHelper. I was wondering what was the reason for these header file to be include because the book does not discuses the header files.

    #325

    Paul Varcholik
    Keymaster

    Hello,

    There are a few headers that I don’t mention in the book, or don’t detail in their entirety. This is for the sake of brevity, when the material is tangential to the chief topic, and/or when the classes are relatively simple.

    For the two headers you mention, VectorHelper.h and MatrixHelper.h, these files include helper classes to simplify common uses for vectors and matrices. VectorHelper.h includes declarations for 2D, 3D and 4D vector helpers. These classes expose static const vectors like Zero (a vector with zero in each component) and One (a vector with one in each component). There is also a ToString method that represents the vector as an std::string.

    For MatrixHelper there’s an Identity static const (representing a 4×4 identity matrix) and methods for getting and setting the Forward, Up, Right, and Translation components contained within a 4×4 matrix.

    Paul

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.