Guest User

Untitled

a guest
Jan 16th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.24 KB | None | 0 0
  1. #ifndef SYNC_VECTORS_H
  2. #define SYNC_VECTORS_H
  3.  
  4. #include <cmath>
  5.  
  6. namespace SYNC
  7. {
  8. struct Vector2
  9. {
  10. Vector2();
  11. Vector2(const Vector2 & vec);
  12. Vector2(const float & x, const float & y);
  13. ~Vector2();
  14.  
  15. inline Vector2 & operator=(const Vector2 & rhs);
  16.  
  17. inline Vector2 operator+(Vector2 rhs);
  18. inline Vector2 operator-(Vector2 rhs);
  19. inline Vector2 operator*(const float & scalar);
  20. friend inline Vector2 operator*(const float & scalar, Vector2 rhs);
  21.  
  22. inline Vector2 & operator+=(const Vector2 & rhs);
  23. inline Vector2 & operator-=(const Vector2 & rhs);
  24. inline Vector2 & operator*=(const float & scalar);
  25.  
  26. bool operator==(const Vector2 & rhs);
  27. bool operator!=(const Vector2 & rhs);
  28.  
  29. inline Vector2 & operator++();
  30. inline Vector2 & operator--();
  31.  
  32. inline void Normal(Vector2 & rhs);
  33.  
  34. Vector2 & Normalize();
  35. void Normalize(Vector2 & rhs);
  36.  
  37. Vector2 & Dot(const Vector2 & rhs1, const Vector2 & rhs2);
  38. static float Cross(const Vector2 & lhs, Vector2 & rhs);
  39.  
  40. float x;
  41. float y;
  42. };
  43.  
  44. struct Vector3
  45. {
  46. Vector3();
  47. Vector3(const Vector3 & vec);
  48. Vector3(const float & x, const float & y, const float & z);
  49. virtual ~Vector3();
  50.  
  51. inline Vector3 & operator=(const Vector3 & rhs);
  52.  
  53. inline Vector3 operator+(Vector3 rhs);
  54. inline Vector3 operator-(Vector3 rhs);
  55. inline Vector3 operator*(const float & scalar);
  56. friend inline Vector3 operator*(const float & scalar, Vector3 rhs);
  57.  
  58. inline Vector3 & operator+=(const Vector3 & rhs);
  59. inline Vector3 & operator-=(const Vector3 & rhs);
  60. inline Vector3 & operator*=(const float & rhs);
  61.  
  62. inline bool operator==(const Vector3 & rhs);
  63. inline bool operator!=(const Vector3 & rhs);
  64.  
  65. inline Vector3 & operator++();
  66. inline Vector3 & operator--();
  67.  
  68. void Normalize();
  69. void Normalize(Vector3 rhs);
  70.  
  71. void Dot(const Vector3 & vec1, const Vector3 & vec2);
  72. void Cross(const Vector3 & vec1, const Vector3 & vec2);
  73.  
  74. float x;
  75. float y;
  76. float z;
  77. };
  78.  
  79. struct Vector4
  80. {
  81. Vector4();
  82. Vector4(const Vector4 & rhs);
  83. Vector4(const float & x, const float & y, const float & z, const float & w);
  84. ~Vector4();
  85.  
  86. inline Vector4 & operator=(const Vector4 & rhs);
  87.  
  88. inline Vector4 operator+(Vector4 rhs);
  89. inline Vector4 operator-(Vector4 rhs);
  90. inline Vector4 operator*(const float & scalar);
  91. friend inline Vector4 operator*(const float & scalar, Vector4 rhs);
  92.  
  93. inline Vector4 & operator+=(const Vector4 & rhs);
  94. inline Vector4 & operator-=(const Vector4 & rhs);
  95. inline Vector4 & operator*=(const float & rhs);
  96.  
  97. inline bool operator==(const Vector4 & rhs);
  98. inline bool operator!=(const Vector4 & rhs);
  99.  
  100. inline Vector4 & operator++();
  101. inline Vector4 & operator--();
  102.  
  103. float x;
  104. float y;
  105. float z;
  106. float w;
  107. };
  108.  
  109. struct Quaternion
  110. {
  111. Quaternion();
  112. Quaternion(const Quaternion & rhs);
  113. Quaternion(const Vector3 & v, const float & w);
  114. ~Quaternion();
  115.  
  116. inline Quaternion & operator=(const Quaternion & rhs);
  117.  
  118. inline bool operator==(const Quaternion & rhs);
  119. inline bool operator!=(const Quaternion & rhs);
  120.  
  121. inline Quaternion operator*(Quaternion rhs);
  122. inline Quaternion & mul(const Quaternion & rhs);
  123.  
  124. inline void Conjugate();
  125. inline void Conjugate(Quaternion &);
  126.  
  127. inline void Normalize();
  128. inline void Normalize(Quaternion &);
  129.  
  130. Vector3 v;
  131. float w;
  132. };
  133.  
  134.  
  135. }
  136. #endif
  137.  
  138. #include "SYNC_Vectors.h"
  139.  
  140. //-----------------------------------------
  141. // SYNC::Vector2 defintions
  142. //-----------------------------------------
  143.  
  144. SYNC::Vector2::Vector2()
  145. {
  146. x = 0;
  147. y = 0;
  148. }
  149.  
  150. SYNC::Vector2::Vector2(const Vector2 & vec)
  151. {
  152. x = vec.x;
  153. y = vec.y;
  154. }
  155.  
  156. SYNC::Vector2::Vector2(const float & ix, const float & iy)
  157. {
  158. x = ix;
  159. y = iy;
  160. }
  161.  
  162. SYNC::Vector2::~Vector2()
  163. {
  164. }
  165.  
  166. SYNC::Vector2 & SYNC::Vector2::operator=(const SYNC::Vector2 & rhs)
  167. {
  168. x = rhs.x;
  169. y = rhs.y;
  170.  
  171. return *this;
  172. }
  173.  
  174. SYNC::Vector2 SYNC::Vector2::operator+(SYNC::Vector2 rhs)
  175. {
  176. rhs.x += x;
  177. rhs.y += y;
  178.  
  179. return rhs;
  180. }
  181.  
  182. SYNC::Vector2 SYNC::Vector2::operator-(SYNC::Vector2 rhs)
  183. {
  184. rhs.x -= x;
  185. rhs.y -= y;
  186.  
  187. return rhs;
  188. }
  189.  
  190. SYNC::Vector2 SYNC::Vector2::operator*(const float & scalar)
  191. {
  192. SYNC::Vector2 ret( x * scalar, y * scalar);
  193.  
  194. return ret;
  195. }
  196.  
  197. SYNC::Vector2 operator*(const float & scalar, SYNC::Vector2 rhs)
  198. {
  199. rhs.x *= scalar;
  200. rhs.y *= scalar;
  201.  
  202. return rhs;
  203. }
  204.  
  205. SYNC::Vector2 & SYNC::Vector2::operator+=(const Vector2 & rhs)
  206. {
  207. x += rhs.x;
  208. y += rhs.y;
  209.  
  210. return *this;
  211. }
  212.  
  213. SYNC::Vector2 & SYNC::Vector2::operator-=(const Vector2 & rhs)
  214. {
  215. x -= rhs.x;
  216. y -= rhs.y;
  217.  
  218. return *this;
  219. }
  220.  
  221. SYNC::Vector2 & SYNC::Vector2::operator*=(const float & scalar)
  222. {
  223. x *= scalar;
  224. y *= scalar;
  225.  
  226. return *this;
  227. }
  228.  
  229. bool SYNC::Vector2::operator==(const Vector2 & rhs)
  230. {
  231. if(rhs.x == x && rhs.y == y)
  232. return true;
  233. else
  234. return false;
  235. }
  236.  
  237. bool SYNC::Vector2::operator!=(const Vector2 & rhs)
  238. {
  239. if(rhs.x != x || rhs.y != y)
  240. return true;
  241. else
  242. return false;
  243. }
  244.  
  245. SYNC::Vector2 & SYNC::Vector2::operator++()
  246. {
  247. x++;
  248. y++;
  249.  
  250. return *this;
  251. }
  252.  
  253. SYNC::Vector2 & SYNC::Vector2::operator--()
  254. {
  255. x--;
  256. y--;
  257.  
  258. return *this;
  259. }
  260.  
  261. void SYNC::Vector2::Normal(Vector2 & rhs)
  262. {
  263. rhs.x = y;
  264. rhs.y = -x;
  265. }
  266.  
  267. SYNC::Vector2 & SYNC::Vector2::Normalize()
  268. {
  269. if(x > 0.000001 || y > 0.000001)
  270. {
  271. float length = sqrt((x * x) + (y * y));
  272. x /= length;
  273. y /= length;
  274. }
  275. else
  276. {
  277. x = 0;
  278. y = 0;
  279. }
  280.  
  281. return *this;
  282. }
  283.  
  284. void SYNC::Vector2::Normalize(Vector2 & rhs)
  285. {
  286. if(x > 0.000001 || y > 0.000001)
  287. {
  288. float length = sqrt((x * x) + (y * y));
  289. rhs.x = x / length;
  290. rhs.y = y / length;
  291. }
  292. else
  293. {
  294. rhs.x = 0;
  295. rhs.y = 0;
  296. }
  297. }
  298.  
  299. SYNC::Vector2 & SYNC::Vector2::Dot(const Vector2 & rhs1, const Vector2 & rhs2)
  300. {
  301. x = rhs1.x * rhs2.x;
  302. y = rhs1.y * rhs2.y;
  303.  
  304. return *this;
  305. }
  306.  
  307. float SYNC::Vector2::Cross(const Vector2 & rhs1, Vector2 & rhs2)
  308. {
  309. return ((rhs1.x * rhs2.y) - (rhs1.y * rhs2.x));
  310. }
  311.  
  312.  
  313. //-----------------------------------------
  314. // SYNC::Vector3 defintions
  315. //-----------------------------------------
  316.  
  317.  
  318. SYNC::Vector3::Vector3()
  319. {
  320. x = 0;
  321. y = 0;
  322. z = 0;
  323. }
  324.  
  325. SYNC::Vector3::Vector3(const Vector3 & vec)
  326. {
  327. x = vec.x;
  328. y = vec.y;
  329. z = vec.z;
  330. }
  331.  
  332. SYNC::Vector3::Vector3(const float & ix, const float & iy, const float & iz)
  333. {
  334. x = ix;
  335. y = iy;
  336. z = iz;
  337. }
  338.  
  339. SYNC::Vector3::~Vector3()
  340. {
  341. }
  342.  
  343. SYNC::Vector3 & SYNC::Vector3::operator=(const Vector3 & rhs)
  344. {
  345. x = rhs.x;
  346. y = rhs.y;
  347. z = rhs.z;
  348.  
  349. return *this;
  350. }
  351.  
  352. SYNC::Vector3 SYNC::Vector3::operator+(Vector3 rhs)
  353. {
  354. rhs.x += x;
  355. rhs.y += y;
  356. rhs.z += z;
  357.  
  358. return rhs;
  359. }
  360.  
  361. SYNC::Vector3 SYNC::Vector3::operator-(Vector3 rhs)
  362. {
  363. rhs.x -= x;
  364. rhs.y -= y;
  365. rhs.z -= z;
  366.  
  367. return rhs;
  368. }
  369.  
  370. SYNC::Vector3 SYNC::Vector3::operator*(const float & rhs)
  371. {
  372. Vector3 ret(x * rhs, y * rhs, z * rhs);
  373. return ret;
  374. }
  375.  
  376. SYNC::Vector3 operator*(const float & scalar, SYNC::Vector3 rhs)
  377. {
  378. rhs.x *= scalar;
  379. rhs.y *= scalar;
  380. rhs.z *= scalar;
  381.  
  382. return rhs;
  383. }
  384.  
  385. SYNC::Vector3 & SYNC::Vector3::operator+=(const Vector3 & rhs)
  386. {
  387. x += rhs.x;
  388. y += rhs.y;
  389. z += rhs.z;
  390.  
  391. return *this;
  392. }
  393.  
  394. SYNC::Vector3 & SYNC::Vector3::operator-=(const Vector3 & rhs)
  395. {
  396. x -= rhs.x;
  397. y -= rhs.y;
  398. z -= rhs.z;
  399.  
  400. return *this;
  401. }
  402.  
  403. SYNC::Vector3 & SYNC::Vector3::operator*=(const float & rhs)
  404. {
  405. x *= rhs;
  406. y *= rhs;
  407. z *= rhs;
  408.  
  409. return *this;
  410. }
  411.  
  412. bool SYNC::Vector3::operator==(const Vector3 & rhs)
  413. {
  414. if(x == rhs.x && y == rhs.y && z == rhs.z)
  415. return true;
  416. else
  417. return false;
  418. }
  419.  
  420. bool SYNC::Vector3::operator!=(const Vector3 & rhs)
  421. {
  422. if(x != rhs.x || y != rhs.y || z != rhs.z)
  423. return true;
  424. else
  425. return false;
  426. }
  427.  
  428. SYNC::Vector3 & SYNC::Vector3::operator++()
  429. {
  430. x++;
  431. y++;
  432. z++;
  433.  
  434. return *this;
  435. }
  436.  
  437. SYNC::Vector3 & SYNC::Vector3::operator--()
  438. {
  439. x--;
  440. y--;
  441. z--;
  442.  
  443. return *this;
  444. }
  445.  
  446. void SYNC::Vector3::Normalize()
  447. {
  448. if(x > 0.000001 || y > 0.000001 || z > 0.000001)
  449. {
  450. float length = sqrt((x * x) + (y * y) + (z * z));
  451. x /= length;
  452. y /= length;
  453. z /= length;
  454. }
  455. else
  456. {
  457. x = 0;
  458. y = 0;
  459. z = 0;
  460. }
  461. }
  462.  
  463. void SYNC::Vector3::Normalize(Vector3 rhs)
  464. {
  465. if(x > 0.000001 || y > 0.000001 || z > 0.000001)
  466. {
  467. float length = sqrt((x * x) + (y * y) + (z * z));
  468. rhs.x /= length;
  469. rhs.y /= length;
  470. rhs.z /= length;
  471. }
  472. else
  473. {
  474. rhs.x = 0;
  475. rhs.y = 0;
  476. rhs.z = 0;
  477. }
  478. }
  479.  
  480. void SYNC::Vector3::Dot(const Vector3 & vec1, const Vector3 & vec2)
  481. {
  482. x = vec1.x * vec2.x;
  483. y = vec1.y * vec2.y;
  484. z = vec1.z * vec2.z;
  485. }
  486.  
  487. void SYNC::Vector3::Cross(const Vector3 & vec1, const Vector3 & vec2)
  488. {
  489. x = ((vec1.y * vec2.z) - (vec1.z * vec2.y));
  490. y = ((vec1.z * vec2.x) - (vec1.x * vec2.z));
  491. z = ((vec1.x * vec2.y) - (vec1.y * vec2.x));
  492. }
  493.  
  494. //-----------------------------------------
  495. // SYNC::Vector4 defintions
  496. //-----------------------------------------
  497.  
  498. SYNC::Vector4::Vector4()
  499. {
  500. x = 0;
  501. y = 0;
  502. z = 0;
  503. w = 0;
  504. }
  505.  
  506. SYNC::Vector4::Vector4(const Vector4 & rhs)
  507. {
  508. x = rhs.x;
  509. y = rhs.y;
  510. z = rhs.z;
  511. w = rhs.w;
  512.  
  513. }
  514.  
  515. SYNC::Vector4::Vector4(const float & ix, const float & iy, const float & iz, const float & iw)
  516. {
  517. x = ix;
  518. y = iy;
  519. z = iz;
  520. w = iw;
  521. }
  522.  
  523. SYNC::Vector4::~Vector4()
  524. {
  525. }
  526.  
  527. SYNC::Vector4 & SYNC::Vector4::operator=(const Vector4 & rhs)
  528. {
  529. x = rhs.x;
  530. y = rhs.y;
  531. z = rhs.z;
  532. w = rhs.w;
  533.  
  534. return *this;
  535. }
  536.  
  537. SYNC::Vector4 SYNC::Vector4::operator+(Vector4 rhs)
  538. {
  539. rhs.x += x;
  540. rhs.y += y;
  541. rhs.z += z;
  542. rhs.w += w;
  543.  
  544. return rhs;
  545. }
  546.  
  547. SYNC::Vector4 SYNC::Vector4::operator-(Vector4 rhs)
  548. {
  549. rhs.x += x;
  550. rhs.y += y;
  551. rhs.z += z;
  552. rhs.w += w;
  553.  
  554. return rhs;
  555. }
  556.  
  557. SYNC::Vector4 SYNC::Vector4::operator*(const float & rhs)
  558. {
  559. Vector4 ret( x * rhs, y * rhs, z * rhs, w * rhs);
  560. return ret;
  561. }
  562.  
  563. SYNC::Vector4 operator*(const float & scalar, SYNC::Vector4 rhs)
  564. {
  565. rhs.x *= scalar;
  566. rhs.y *= scalar;
  567. rhs.z *= scalar;
  568. rhs.w *= scalar;
  569.  
  570. return rhs;
  571. }
  572.  
  573. SYNC::Vector4 & SYNC::Vector4::operator+=(const Vector4 & rhs)
  574. {
  575. x += rhs.x;
  576. y += rhs.y;
  577. z += rhs.z;
  578. w += rhs.w;
  579.  
  580. return *this;
  581. }
  582.  
  583. SYNC::Vector4 & SYNC::Vector4::operator-=(const Vector4 & rhs)
  584. {
  585. x += rhs.x;
  586. y += rhs.y;
  587. z += rhs.z;
  588. w += rhs.w;
  589.  
  590. return *this;
  591. }
  592.  
  593. SYNC::Vector4 & SYNC::Vector4::operator*=(const float & rhs)
  594. {
  595. x *= rhs;
  596. y *= rhs;
  597. z *= rhs;
  598. w *= rhs;
  599. }
  600.  
  601. bool SYNC::Vector4::operator==(const Vector4 & rhs)
  602. {
  603. if(x == rhs.x && y == rhs.y && z == rhs.z && w == rhs.w)
  604. return true;
  605. else
  606. return false;
  607. }
  608.  
  609. bool SYNC::Vector4::operator!=(const Vector4 & rhs)
  610. {
  611. if(x != rhs.x || y != rhs.y || z != rhs.z || w != rhs.w)
  612. return true;
  613. else
  614. return false;
  615. }
  616.  
  617. SYNC::Vector4 & SYNC::Vector4::operator++()
  618. {
  619. x++;
  620. y++;
  621. z++;
  622. w++;
  623. }
  624.  
  625. SYNC::Vector4 & SYNC::Vector4::operator--()
  626. {
  627. x--;
  628. y--;
  629. z--;
  630. w--;
  631. }
  632.  
  633. //---------------------------------
  634. // SYNC::Quaternion definitions
  635. //---------------------------------
  636.  
  637. SYNC::Quaternion::Quaternion()
  638. {
  639. v.x = 0;
  640. v.y = 0;
  641. v.z = 0;
  642. w = 0;
  643. }
  644.  
  645. SYNC::Quaternion::Quaternion(const Quaternion & rhs)
  646. {
  647. v.x = rhs.v.x;
  648. v.y = rhs.v.y;
  649. v.z = rhs.v.z;
  650. w = rhs.w;
  651. }
  652.  
  653. SYNC::Quaternion::Quaternion(const Vector3 & iv, const float & iw)
  654. {
  655. v = iv;
  656. w = iw;
  657. }
  658.  
  659. SYNC::Quaternion::~Quaternion()
  660. {
  661. }
  662.  
  663. SYNC::Quaternion & SYNC::Quaternion::operator=(const Quaternion & rhs)
  664. {
  665. v = rhs.v;
  666. w = rhs.w;
  667. }
  668.  
  669. bool SYNC::Quaternion::operator==(const Quaternion & rhs)
  670. {
  671. if(v == rhs.v && w == rhs.w)
  672. return true;
  673. else
  674. return false;
  675. }
  676.  
  677. bool SYNC::Quaternion::operator!=(const Quaternion & rhs)
  678. {
  679. if(v != rhs.v || w != rhs.w)
  680. return true;
  681. else
  682. return false;
  683. }
  684.  
  685. SYNC::Quaternion SYNC::Quaternion::operator*(Quaternion rhs)
  686. {
  687. rhs.v.x = (w * rhs.v.x) + (v.x * rhs.w) + (v.y * rhs.v.z) - (v.z * rhs.v.y);
  688. rhs.v.y = (w * rhs.v.y) - (v.x * rhs.v.z) + (v.y * rhs.w) + (v.z * rhs.v.x);
  689. rhs.v.z = (w * rhs.v.z) + (v.x * rhs.v.y) - (v.y * rhs.v.x) + (v.z * rhs.w);
  690. rhs.w = (w * rhs.w) - (v.x * rhs.v.x) - (v.y * rhs.v.y) - (v.z * rhs.v.z);
  691.  
  692. return rhs;
  693. }
  694.  
  695. SYNC::Quaternion & SYNC::Quaternion::mul(const Quaternion & rhs)
  696. {
  697. v.x = (w * rhs.v.x) + (v.x * rhs.w) + (v.y * rhs.v.z) - (v.z * rhs.v.y);
  698. v.y = (w * rhs.v.y) - (v.x * rhs.v.z) + (v.y * rhs.w) + (v.z * rhs.v.x);
  699. v.z = (w * rhs.v.z) + (v.x * rhs.v.y) - (v.y * rhs.v.x) + (v.z * rhs.w);
  700. w = (w * rhs.w) - (v.x * rhs.v.x) - (v.y * rhs.v.y) - (v.z * rhs.v.z);
  701.  
  702. return *this;
  703. }
  704.  
  705. void SYNC::Quaternion::Conjugate()
  706. {
  707. v *= -1;
  708. }
  709.  
  710. void SYNC::Quaternion::Conjugate(Quaternion & rhs)
  711. {
  712. rhs.v = v * -1;
  713. rhs.w = w;
  714. }
  715.  
  716. void SYNC::Quaternion::Normalize()
  717. {
  718. float length = sqrt((w*w) + (v.x * v.x) + (v.y * v.y) + (v.z * v.z));
  719. if(length > 0.000001)
  720. {
  721. v.x /= length;
  722. v.y /= length;
  723. v.z /= length;
  724. w /= length;
  725. }
  726. else
  727. {
  728. v.x = 0;
  729. v.y = 0;
  730. v.z = 0;
  731. w = 0;
  732. }
  733. }
  734.  
  735. void SYNC::Quaternion::Normalize(Quaternion & rhs)
  736. {
  737. float length = sqrt((w*w) + (v.x * v.x) + (v.y * v.y) + (v.z * v.z));
  738. if(length > 0.000001)
  739. {
  740. rhs.v.x = v.x / length;
  741. rhs.v.y = v.y / length;
  742. rhs.v.z = v.z / length;
  743. rhs.w = w / length;
  744. }
  745. else
  746. {
  747. rhs.v.x = 0;
  748. rhs.v.y = 0;
  749. rhs.v.z = 0;
  750. rhs.w = 0;
  751. }
  752. }
  753.  
  754. #ifndef SYNCMOD_H
  755. #define SYNCMOD_H
  756.  
  757. #include <fstream>
  758. #include <map>
  759. #include <string>
  760. #include "SYNC_Vectors.h"
  761.  
  762. struct SYNCMODEL_HEADER
  763. {
  764. char id[8];
  765. short ver[2];
  766. long m_numOfVertices;
  767. long m_numOfIndices;
  768. std::string m_modelName;
  769. };
  770.  
  771. struct VERTEX_TYPE
  772. {
  773. SYNC::Vector3 position;
  774. SYNC::Vector4 color;
  775. SYNC::Vector3 normal;
  776. SYNC::Vector3 binormal;
  777. SYNC::Vector3 tangent;
  778. SYNC::Vector2 textureCoords;
  779. };
  780.  
  781. class SYNCMODEL_MATERIAL_HEADER
  782. {
  783. enum DATA_TYPE{MATERIAL_SHORT , MATERIAL_INT, MATERIAL_LONG, MATERIAL_FLOAT, MATERIAL_DOUBLE};
  784. struct Data_Index
  785. {
  786. DATA_TYPE type;
  787. char * accessor;
  788. };
  789.  
  790. int m_numOfElements;
  791. std::map<std::string, Data_Index> m_Indices;
  792.  
  793. };
  794.  
  795. std::ifstream & operator>>(std::ifstream & stream, SYNCMODEL_HEADER & header);
  796.  
  797. #endif
  798.  
  799. #include "syncmod.h"
  800.  
  801. std::ifstream & operator>>(std::ifstream & stream, SYNCMODEL_HEADER & header)
  802. {
  803. stream.read(header.id, 8);
  804. stream.read(reinterpret_cast<char *>(&header.ver), sizeof(short) * 2);
  805. stream.read(reinterpret_cast<char *>(&header.m_numOfVertices), sizeof(long));
  806. stream.read(reinterpret_cast<char *>(&header.m_numOfIndices), sizeof(long));
  807. std::getline(stream, header.m_modelName, '');
  808. stream.seekg(static_cast<int>(stream.tellg()) - 1);
  809. return stream;
  810. }
  811.  
  812. inline Vector2 & operator=(const Vector2 & rhs);
  813.  
  814. SYNC::Vector2 & SYNC::Vector2::operator=(const SYNC::Vector2 & rhs)
Add Comment
Please, Sign In to add comment