title: C++ type casting vector class
body: <p>I have two vector classes:</p>
  
  <pre><code>typedef struct D3DXVECTOR3 {
      FLOAT x;
      FLOAT y;
      FLOAT z;
  } D3DXVECTOR3, *LPD3DXVECTOR3;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>class MyVector3{
      FLOAT x;
      FLOAT y;
      FLOAT z;
  };
  </code></pre>
  
  <p>and a function:</p>
  
  <pre><code>void function(D3DXVECTOR3* Vector);
  </code></pre>
  
  <p>How is it possible (if it's possible) to achieve something like this:</p>
  
  <pre><code>MyVector3 vTest;
  function(&amp;vTest);
  </code></pre>