Reading vertex data from a file
Interface

The name LoadVertex(…) suggests that it's going to parse the string, rather than parse the file with the given filename.  I suggest LoadVertexFile(…) for clarity.

The parameter should be a const std::string&amp;, to avoid unnecessarily copying the string.

You test whether file2.is_open(), but the code proceeds anyway if it isn't open.  The error message is printed to std::cout; I would recommend std::cerr, if you must print anything at all.  (Throwing an exception would be better.)  Furthermore, there is no way to programmatically tell whether the whole method succeeded.  What if the number of entries in the file is not a multiple of 3?

Implementation

I don't see any point in building three vectors x, y, and z, then transposing the results to populate vertexArray.  All you need is three temporary floats.  You don't need a counter.  Just read three entries at a time into those three floats.

You don't need to read a std::string and convert it using stof().  The iostream interface knows how to read floats.

You don't need to .close() the file explicitly; the ifstream's destructor takes care of that for you.

Suggested solution

bool ModelLoader::LoadVertexFile(const std::string&amp; fileLocation)
{
    std::ifstream file(fileLocation);
    if (!file) {
        std::cerr &lt;&lt; "Failed to load vertex data\n";
        return false;
    }

    float x, y, z;
    vertexArray.clear();
    while (file &gt;&gt; x &gt;&gt; y &gt;&gt; z)
    {
        vertexArray.push_back(PhysicsEngine::PxVec3(x, y, z));
    }
    return true;
}