PertCloud.cpp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690
  1. #include "gosFXHeaders.hpp"
  2. #include <MLR\MLRNGonCloud.hpp>
  3. //==========================================================================//
  4. // File: gosFX_gosFX::PertCloud.cpp //
  5. // Contents: Base gosFX::PertCloud Component //
  6. //---------------------------------------------------------------------------//
  7. // Copyright (C) Microsoft Corporation. All rights reserved. //
  8. //===========================================================================//
  9. //------------------------------------------------------------------------------
  10. //
  11. gosFX::PertCloud__Specification::PertCloud__Specification(
  12. Stuff::MemoryStream *stream,
  13. int gfx_version
  14. ):
  15. SpinningCloud__Specification(gosFX::PertCloudClassID, stream, gfx_version)
  16. {
  17. Check_Pointer(this);
  18. Verify(m_class == gosFX::PertCloudClassID);
  19. Verify(gos_GetCurrentHeap() == Heap);
  20. m_size.Load(stream, gfx_version);
  21. m_perturbation.Load(stream, gfx_version);
  22. m_pCenterRed.Load(stream, gfx_version);
  23. m_pCenterGreen.Load(stream, gfx_version);
  24. m_pCenterBlue.Load(stream, gfx_version);
  25. m_pCenterAlpha.Load(stream, gfx_version);
  26. m_particleClassSize = sizeof(gosFX::PertCloud::Particle);
  27. Verify(gfx_version > 5);
  28. *stream >> m_vertices;
  29. m_totalParticleSize =
  30. sizeof(gosFX::PertCloud::Particle)
  31. + m_vertices * sizeof(Stuff::Point3D)
  32. + 2 * sizeof(Stuff::RGBAColor);
  33. }
  34. //------------------------------------------------------------------------------
  35. //
  36. gosFX::PertCloud__Specification::PertCloud__Specification(unsigned sides):
  37. SpinningCloud__Specification(gosFX::PertCloudClassID)
  38. {
  39. Check_Pointer(this);
  40. Verify(gos_GetCurrentHeap() == Heap);
  41. m_particleClassSize = sizeof(gosFX::PertCloud::Particle);
  42. m_vertices = sides+2;
  43. m_totalParticleSize =
  44. sizeof(gosFX::PertCloud::Particle)
  45. + m_vertices * sizeof(Stuff::Point3D)
  46. + 2 * sizeof(Stuff::RGBAColor);
  47. }
  48. //------------------------------------------------------------------------------
  49. //
  50. gosFX::PertCloud__Specification*
  51. gosFX::PertCloud__Specification::Make(
  52. Stuff::MemoryStream *stream,
  53. int gfx_version
  54. )
  55. {
  56. Check_Object(stream);
  57. gos_PushCurrentHeap(Heap);
  58. PertCloud__Specification *spec =
  59. new gosFX::PertCloud__Specification(stream, gfx_version);
  60. gos_PopCurrentHeap();
  61. return spec;
  62. }
  63. //------------------------------------------------------------------------------
  64. //
  65. void
  66. gosFX::PertCloud__Specification::Save(Stuff::MemoryStream *stream)
  67. {
  68. Check_Object(this);
  69. Check_Object(stream);
  70. SpinningCloud__Specification::Save(stream);
  71. m_size.Save(stream);
  72. m_perturbation.Save(stream);
  73. m_pCenterRed.Save(stream);
  74. m_pCenterGreen.Save(stream);
  75. m_pCenterBlue.Save(stream);
  76. m_pCenterAlpha.Save(stream);
  77. *stream << m_vertices;
  78. }
  79. //------------------------------------------------------------------------------
  80. //
  81. void
  82. gosFX::PertCloud__Specification::BuildDefaults()
  83. {
  84. Check_Object(this);
  85. SpinningCloud__Specification::BuildDefaults();
  86. m_pCenterRed.m_ageCurve.SetCurve(1.0f);
  87. m_pCenterRed.m_seeded = false;
  88. m_pCenterRed.m_seedCurve.SetCurve(1.0f);
  89. m_pCenterGreen.m_ageCurve.SetCurve(1.0f);
  90. m_pCenterGreen.m_seeded = false;
  91. m_pCenterGreen.m_seedCurve.SetCurve(1.0f);
  92. m_pCenterBlue.m_ageCurve.SetCurve(1.0f);
  93. m_pCenterBlue.m_seeded = false;
  94. m_pCenterBlue.m_seedCurve.SetCurve(1.0f);
  95. m_pCenterAlpha.m_ageCurve.SetCurve(1.0f);
  96. m_pCenterAlpha.m_seeded = false;
  97. m_pCenterAlpha.m_seedCurve.SetCurve(1.0f);
  98. m_size.m_ageCurve.SetCurve(1.0f);
  99. m_size.m_seeded = false;
  100. m_size.m_seedCurve.SetCurve(1.0f);
  101. m_perturbation.m_ageCurve.SetCurve(0.25f);
  102. m_perturbation.m_seeded = false;
  103. m_perturbation.m_seedCurve.SetCurve(1.0f);
  104. }
  105. //------------------------------------------------------------------------------
  106. //
  107. bool
  108. gosFX::PertCloud__Specification::IsDataValid(bool fix_data)
  109. {
  110. Check_Object(this);
  111. return SpinningCloud__Specification::IsDataValid(fix_data);
  112. /*
  113. m_pCenterRed.m_ageCurve.SetCurve(1.0f);
  114. m_pCenterRed.m_seeded = false;
  115. m_pCenterRed.m_seedCurve.SetCurve(1.0f);
  116. m_pCenterGreen.m_ageCurve.SetCurve(1.0f);
  117. m_pCenterGreen.m_seeded = false;
  118. m_pCenterGreen.m_seedCurve.SetCurve(1.0f);
  119. m_pCenterBlue.m_ageCurve.SetCurve(1.0f);
  120. m_pCenterBlue.m_seeded = false;
  121. m_pCenterBlue.m_seedCurve.SetCurve(1.0f);
  122. m_pCenterAlpha.m_ageCurve.SetCurve(1.0f);
  123. m_pCenterAlpha.m_seeded = false;
  124. m_pCenterAlpha.m_seedCurve.SetCurve(1.0f);
  125. m_size.m_ageCurve.SetCurve(1.0f);
  126. m_size.m_seeded = false;
  127. m_size.m_seedCurve.SetCurve(1.0f);
  128. m_perturbation.m_ageCurve.SetCurve(0.25f);
  129. m_perturbation.m_seeded = false;
  130. m_perturbation.m_seedCurve.SetCurve(1.0f);
  131. */
  132. }
  133. //------------------------------------------------------------------------------
  134. //
  135. void
  136. gosFX::PertCloud__Specification::Copy(PertCloud__Specification *spec)
  137. {
  138. Check_Object(this);
  139. Check_Object(spec);
  140. SpinningCloud__Specification::Copy(spec);
  141. gos_PushCurrentHeap(Heap);
  142. m_size = spec->m_size;
  143. m_perturbation = spec->m_perturbation;
  144. m_pCenterRed = spec->m_pCenterRed;
  145. m_pCenterGreen = spec->m_pCenterGreen;
  146. m_pCenterBlue = spec->m_pCenterBlue;
  147. m_pCenterAlpha = spec->m_pCenterAlpha;
  148. m_vertices = spec->m_vertices;
  149. gos_PopCurrentHeap();
  150. }
  151. //############################################################################
  152. //############################## gosFX::PertCloud ################################
  153. //############################################################################
  154. gosFX::PertCloud::ClassData*
  155. gosFX::PertCloud::DefaultData = NULL;
  156. //------------------------------------------------------------------------------
  157. //
  158. void
  159. gosFX::PertCloud::InitializeClass()
  160. {
  161. Verify(!DefaultData);
  162. DefaultData =
  163. new ClassData(
  164. gosFX::PertCloudClassID,
  165. "gosFX::PertCloud",
  166. SpinningCloud::DefaultData,
  167. (Effect::Factory)&Make,
  168. (Specification::Factory)&Specification::Make
  169. );
  170. Register_Object(DefaultData);
  171. }
  172. //------------------------------------------------------------------------------
  173. //
  174. void
  175. gosFX::PertCloud::TerminateClass()
  176. {
  177. Unregister_Object(DefaultData);
  178. delete DefaultData;
  179. DefaultData = NULL;
  180. }
  181. //------------------------------------------------------------------------------
  182. //
  183. gosFX::PertCloud::PertCloud(
  184. Specification *spec,
  185. unsigned flags
  186. ):
  187. SpinningCloud(DefaultData, spec, flags)
  188. {
  189. Check_Object(spec);
  190. Verify(gos_GetCurrentHeap() == Heap);
  191. gos_PushCurrentHeap(MidLevelRenderer::Heap);
  192. m_cloudImplementation =
  193. new MidLevelRenderer::MLRNGonCloud(
  194. spec->m_vertices,
  195. spec->m_maxParticleCount
  196. );
  197. Register_Object(m_cloudImplementation);
  198. gos_PopCurrentHeap();
  199. unsigned index = spec->m_maxParticleCount*sizeof(Particle);
  200. m_P_vertices = Cast_Pointer(Stuff::Point3D*, &m_data[index]);
  201. index +=
  202. spec->m_vertices * spec->m_maxParticleCount * sizeof(Stuff::Point3D);
  203. m_P_color = Cast_Pointer(Stuff::RGBAColor*, &m_data[index]);
  204. m_cloudImplementation->SetData(
  205. Cast_Pointer(const int *, &m_activeParticleCount),
  206. m_P_vertices,
  207. m_P_color
  208. );
  209. }
  210. //------------------------------------------------------------------------------
  211. //
  212. gosFX::PertCloud::~PertCloud()
  213. {
  214. Unregister_Object(m_cloudImplementation);
  215. delete m_cloudImplementation;
  216. }
  217. //------------------------------------------------------------------------------
  218. //
  219. gosFX::PertCloud*
  220. gosFX::PertCloud::Make(
  221. Specification *spec,
  222. unsigned flags
  223. )
  224. {
  225. Check_Object(spec);
  226. gos_PushCurrentHeap(Heap);
  227. PertCloud *cloud = new gosFX::PertCloud(spec, flags);
  228. gos_PopCurrentHeap();
  229. return cloud;
  230. }
  231. //------------------------------------------------------------------------------
  232. //
  233. bool
  234. gosFX::PertCloud::AnimateParticle(
  235. unsigned index,
  236. const Stuff::LinearMatrix4D *world_to_new_local,
  237. Stuff::Time till
  238. )
  239. {
  240. Check_Object(this);
  241. //
  242. //-----------------------------------------
  243. // Animate the parent then get our pointers
  244. //-----------------------------------------
  245. //
  246. if (!SpinningCloud::AnimateParticle(index, world_to_new_local, till))
  247. return false;
  248. Set_Statistic(Pert_Count, Pert_Count+1);
  249. Specification *spec = GetSpecification();
  250. Check_Object(spec);
  251. Particle *particle = GetParticle(index);
  252. Check_Object(particle);
  253. Stuff::Scalar seed = particle->m_seed;
  254. Stuff::Scalar age = particle->m_age;
  255. //
  256. //------------------
  257. // Animate the color
  258. //------------------
  259. //
  260. Check_Pointer(m_P_color);
  261. index *= 2;
  262. m_P_color[index].red = spec->m_pCenterRed.ComputeValue(age, seed);
  263. m_P_color[index].green = spec->m_pCenterGreen.ComputeValue(age, seed);
  264. m_P_color[index].blue = spec->m_pCenterBlue.ComputeValue(age, seed);
  265. m_P_color[index].alpha = spec->m_pCenterAlpha.ComputeValue(age, seed);
  266. ++index;
  267. m_P_color[index].red = spec->m_pRed.ComputeValue(age, seed);
  268. m_P_color[index].green = spec->m_pGreen.ComputeValue(age, seed);
  269. m_P_color[index].blue = spec->m_pBlue.ComputeValue(age, seed);
  270. m_P_color[index].alpha = spec->m_pAlpha.ComputeValue(age, seed);
  271. return true;
  272. }
  273. //------------------------------------------------------------------------------
  274. //
  275. void
  276. gosFX::PertCloud::CreateNewParticle(
  277. unsigned index,
  278. Stuff::Point3D *translation
  279. )
  280. {
  281. Check_Object(this);
  282. //
  283. //-------------------------------------------------------------------
  284. // Let our parent do creation, then turn on the particle in the cloud
  285. //-------------------------------------------------------------------
  286. //
  287. SpinningCloud::CreateNewParticle(index, translation);
  288. m_cloudImplementation->TurnOn(index);
  289. Verify(m_cloudImplementation->IsOn(index));
  290. //
  291. //--------------------
  292. // Set up the particle
  293. //--------------------
  294. //
  295. Specification *spec = GetSpecification();
  296. Check_Object(spec);
  297. Particle *particle = GetParticle(index);
  298. Check_Object(particle);
  299. //
  300. //----------------------------------------
  301. // Now we compute the geometry of the pert
  302. //----------------------------------------
  303. //
  304. Verify(spec->m_vertices > 4);
  305. Stuff::Scalar angle_between = Stuff::Two_Pi/(spec->m_vertices-2);
  306. Stuff::Scalar radius = spec->m_size.ComputeValue(m_age, particle->m_seed);
  307. int even = 1;
  308. particle->m_vertices[0] = Stuff::Point3D::Identity;
  309. Stuff::Scalar bound = 0.0f;
  310. for (int j=1; j<spec->m_vertices-1; j++)
  311. {
  312. Stuff::Scalar perturbance =
  313. even * spec->m_perturbation.ComputeValue(m_age, particle->m_seed);
  314. Stuff::Scalar temp = perturbance + radius;
  315. particle->m_vertices[j] =
  316. Stuff::Point3D(
  317. Stuff::Sin(j*angle_between)*temp,
  318. Stuff::Cos(j*angle_between)*temp,
  319. perturbance
  320. );
  321. perturbance = temp*temp + perturbance*perturbance;
  322. if (perturbance > bound)
  323. bound = perturbance;
  324. even = -even;
  325. }
  326. particle->m_radius = Stuff::Sqrt(bound);
  327. particle->m_vertices[j] = particle->m_vertices[1];
  328. }
  329. //------------------------------------------------------------------------------
  330. //
  331. void gosFX::PertCloud::DestroyParticle(unsigned index)
  332. {
  333. SpinningCloud::DestroyParticle(index);
  334. m_cloudImplementation->TurnOff(index);
  335. Verify(!m_cloudImplementation->IsOn(index));
  336. }
  337. //------------------------------------------------------------------------------
  338. //
  339. void gosFX::PertCloud::Draw(DrawInfo *info)
  340. {
  341. Check_Object(this);
  342. Check_Object(info);
  343. //
  344. //---------------------------------------------------------
  345. // If we have active particles, set up the draw information
  346. //---------------------------------------------------------
  347. //
  348. if (m_activeParticleCount)
  349. {
  350. MidLevelRenderer::DrawEffectInformation dInfo;
  351. dInfo.effect = m_cloudImplementation;
  352. Specification *spec = GetSpecification();
  353. Check_Object(spec);
  354. dInfo.state.Combine(info->m_state, spec->m_state);
  355. dInfo.clippingFlags = info->m_clippingFlags;
  356. Stuff::LinearMatrix4D local_to_world;
  357. local_to_world.Multiply(m_localToParent, *info->m_parentToWorld);
  358. dInfo.effectToWorld = &local_to_world;
  359. //
  360. //--------------------------------------------------------------
  361. // Check the orientation mode. The first case is XY orientation
  362. //--------------------------------------------------------------
  363. //
  364. unsigned i;
  365. unsigned vert=0;
  366. if (spec->m_alignZUsingX)
  367. {
  368. if (spec->m_alignZUsingY)
  369. {
  370. //
  371. //-----------------------------------------
  372. // Get the camera location into local space
  373. //-----------------------------------------
  374. //
  375. Stuff::Point3D
  376. camera_in_world(info->m_clipper->GetCameraToWorldMatrix());
  377. Stuff::Point3D camera_in_cloud;
  378. camera_in_cloud.MultiplyByInverse(
  379. camera_in_world,
  380. local_to_world
  381. );
  382. //
  383. //--------------------------------------
  384. // Spin through all the active particles
  385. //--------------------------------------
  386. //
  387. for (i = 0; i < m_activeParticleCount; i++)
  388. {
  389. Particle *particle = GetParticle(i);
  390. Check_Object(particle);
  391. if (particle->m_age < 1.0f)
  392. {
  393. //
  394. //--------------------------------
  395. // Build the local to cloud matrix
  396. //--------------------------------
  397. //
  398. Stuff::Vector3D direction_in_cloud;
  399. direction_in_cloud.Subtract(
  400. camera_in_cloud,
  401. particle->m_localTranslation
  402. );
  403. Stuff::LinearMatrix4D pert_to_cloud;
  404. pert_to_cloud.BuildRotation(particle->m_localRotation);
  405. pert_to_cloud.AlignLocalAxisToWorldVector(
  406. direction_in_cloud,
  407. Stuff::Z_Axis,
  408. Stuff::Y_Axis,
  409. Stuff::X_Axis
  410. );
  411. pert_to_cloud.BuildTranslation(particle->m_localTranslation);
  412. //
  413. //----------------------------------------------------
  414. // Figure out the scale, then transform all the points
  415. //----------------------------------------------------
  416. //
  417. Stuff::Scalar scale = particle->m_scale;
  418. for (unsigned v=0; v<spec->m_vertices; ++v)
  419. {
  420. Stuff::Point3D scaled;
  421. scaled.Multiply(particle->m_vertices[v], scale);
  422. m_P_vertices[vert++].Multiply(scaled, pert_to_cloud);
  423. }
  424. }
  425. else
  426. vert += spec->m_vertices;
  427. }
  428. }
  429. //
  430. //-----------------------
  431. // Handle X-only rotation
  432. //-----------------------
  433. //
  434. else
  435. {
  436. //
  437. //-----------------------------------------
  438. // Get the camera location into local space
  439. //-----------------------------------------
  440. //
  441. Stuff::Point3D
  442. camera_in_world(info->m_clipper->GetCameraToWorldMatrix());
  443. Stuff::Point3D camera_in_cloud;
  444. camera_in_cloud.MultiplyByInverse(
  445. camera_in_world,
  446. local_to_world
  447. );
  448. //
  449. //--------------------------------------
  450. // Spin through all the active particles
  451. //--------------------------------------
  452. //
  453. for (i = 0; i < m_activeParticleCount; i++)
  454. {
  455. Particle *particle = GetParticle(i);
  456. Check_Object(particle);
  457. if (particle->m_age < 1.0f)
  458. {
  459. //
  460. //--------------------------------
  461. // Build the local to cloud matrix
  462. //--------------------------------
  463. //
  464. Stuff::Vector3D direction_in_cloud;
  465. direction_in_cloud.Subtract(
  466. camera_in_cloud,
  467. particle->m_localTranslation
  468. );
  469. Stuff::LinearMatrix4D pert_to_cloud;
  470. pert_to_cloud.BuildRotation(particle->m_localRotation);
  471. pert_to_cloud.AlignLocalAxisToWorldVector(
  472. direction_in_cloud,
  473. Stuff::Z_Axis,
  474. Stuff::X_Axis,
  475. -1
  476. );
  477. pert_to_cloud.BuildTranslation(particle->m_localTranslation);
  478. //
  479. //----------------------------------------------------
  480. // Figure out the scale, then transform all the points
  481. //----------------------------------------------------
  482. //
  483. Stuff::Scalar scale = particle->m_scale;
  484. for (unsigned v=0; v<spec->m_vertices; ++v)
  485. {
  486. Stuff::Point3D scaled;
  487. scaled.Multiply(particle->m_vertices[v], scale);
  488. m_P_vertices[vert++].Multiply(scaled, pert_to_cloud);
  489. }
  490. }
  491. else
  492. vert += spec->m_vertices;
  493. }
  494. }
  495. }
  496. //
  497. //-------------------------------------------------------
  498. // Each matrix needs to be aligned to the camera around Y
  499. //-------------------------------------------------------
  500. //
  501. else if (spec->m_alignZUsingY)
  502. {
  503. //
  504. //-----------------------------------------
  505. // Get the camera location into local space
  506. //-----------------------------------------
  507. //
  508. Stuff::Point3D
  509. camera_in_world(info->m_clipper->GetCameraToWorldMatrix());
  510. Stuff::Point3D camera_in_cloud;
  511. camera_in_cloud.MultiplyByInverse(
  512. camera_in_world,
  513. local_to_world
  514. );
  515. //
  516. //--------------------------------------
  517. // Spin through all the active particles
  518. //--------------------------------------
  519. //
  520. for (i = 0; i < m_activeParticleCount; i++)
  521. {
  522. Particle *particle = GetParticle(i);
  523. Check_Object(particle);
  524. if (particle->m_age < 1.0f)
  525. {
  526. //
  527. //--------------------------------
  528. // Build the local to cloud matrix
  529. //--------------------------------
  530. //
  531. Stuff::Vector3D direction_in_cloud;
  532. direction_in_cloud.Subtract(
  533. camera_in_cloud,
  534. particle->m_localTranslation
  535. );
  536. Stuff::LinearMatrix4D pert_to_cloud;
  537. pert_to_cloud.BuildRotation(particle->m_localRotation);
  538. pert_to_cloud.AlignLocalAxisToWorldVector(
  539. direction_in_cloud,
  540. Stuff::Z_Axis,
  541. Stuff::Y_Axis,
  542. -1
  543. );
  544. pert_to_cloud.BuildTranslation(particle->m_localTranslation);
  545. //
  546. //----------------------------------------------------
  547. // Figure out the scale, then transform all the points
  548. //----------------------------------------------------
  549. //
  550. Stuff::Scalar scale = particle->m_scale;
  551. for (unsigned v=0; v<spec->m_vertices; ++v)
  552. {
  553. Stuff::Point3D scaled;
  554. scaled.Multiply(particle->m_vertices[v], scale);
  555. m_P_vertices[vert++].Multiply(scaled, pert_to_cloud);
  556. }
  557. }
  558. else
  559. vert += spec->m_vertices;
  560. }
  561. }
  562. //
  563. //---------------------------------------------------------------
  564. // No alignment is necessary, so just multiply out all the active
  565. // particles
  566. //---------------------------------------------------------------
  567. //
  568. else
  569. {
  570. for (i = 0; i < m_activeParticleCount; i++)
  571. {
  572. Particle *particle = GetParticle(i);
  573. Check_Object(particle);
  574. if (particle->m_age < 1.0f)
  575. {
  576. //
  577. //--------------------------------
  578. // Build the local to cloud matrix
  579. //--------------------------------
  580. //
  581. Stuff::LinearMatrix4D pert_to_cloud;
  582. pert_to_cloud.BuildRotation(particle->m_localRotation);
  583. pert_to_cloud.BuildTranslation(particle->m_localTranslation);
  584. //
  585. //----------------------------------------------------
  586. // Figure out the scale, then transform all the points
  587. //----------------------------------------------------
  588. //
  589. Stuff::Scalar scale = particle->m_scale;
  590. for (unsigned v=0; v<spec->m_vertices; ++v)
  591. {
  592. Stuff::Point3D scaled;
  593. scaled.Multiply(particle->m_vertices[v], scale);
  594. m_P_vertices[vert++].Multiply(scaled, pert_to_cloud);
  595. }
  596. }
  597. else
  598. vert += spec->m_vertices;
  599. }
  600. }
  601. //
  602. //---------------------
  603. // Now just do the draw
  604. //---------------------
  605. //
  606. info->m_clipper->DrawEffect(&dInfo);
  607. }
  608. SpinningCloud::Draw(info);
  609. }
  610. //------------------------------------------------------------------------------
  611. //
  612. void
  613. gosFX::PertCloud::TestInstance() const
  614. {
  615. Verify(IsDerivedFrom(DefaultData));
  616. }