CCPUVertexEmitter.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. /****************************************************************************
  2. Copyright (C) 2013 Henry van Merode. All rights reserved.
  3. Copyright (c) 2015-2016 Chukong Technologies Inc.
  4. Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
  5. http://www.cocos2d-x.org
  6. Permission is hereby granted, free of charge, to any person obtaining a copy
  7. of this software and associated documentation files (the "Software"), to deal
  8. in the Software without restriction, including without limitation the rights
  9. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  10. copies of the Software, and to permit persons to whom the Software is
  11. furnished to do so, subject to the following conditions:
  12. The above copyright notice and this permission notice shall be included in
  13. all copies or substantial portions of the Software.
  14. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. THE SOFTWARE.
  21. ****************************************************************************/
  22. #ifndef __CC_PU_PARTICLE_3D_VERTEX_EMITTER_H__
  23. #define __CC_PU_PARTICLE_3D_VERTEX_EMITTER_H__
  24. #include "extensions/Particle3D/PU/CCPUEmitter.h"
  25. #include <list>
  26. //Particle3DVertexEmitter NOT SUPPORT YET
  27. NS_CC_BEGIN
  28. //
  29. //class Particle3DVertexEmitter : public PUEmitter
  30. //{
  31. //protected:
  32. //
  33. // std::list<Vec3> mSpawnPositionList;
  34. // const Ogre::VertexElement* mPositionElement;
  35. // Ogre::VertexData* mVertexData;
  36. // Ogre::HardwareVertexBufferSharedPtr mBuffer;
  37. // unsigned char* mVertexBuffer;
  38. // Ogre::Mesh* mMesh;
  39. // Ogre::SubMesh* mSubMesh;
  40. // bool mMeshProcessed;
  41. // size_t mVertexSize;
  42. // size_t mMaxVertexCount;
  43. // size_t mVertexCount;
  44. // unsigned short mSubMeshNumber;
  45. // bool mAllVerticesProcessed;
  46. //
  47. // /** Determines the size of the steps that are used to traverse through the vertices.
  48. // */
  49. // unsigned short mStep;
  50. //
  51. // /** Determines in how many segments an edge is divided. This results in spawn points.
  52. // */
  53. // unsigned short mSegments;
  54. //
  55. // /** Defines the speed of generating spawnpoints. In each Particle Technique update
  56. // 'mIterations' vertices are traversed.
  57. // @remarks
  58. // Setting this attribute to a higher value is needed if the emission rate of the emitter
  59. // is high. On slower computers, emitting the particles may exceed generating the
  60. // spawnpoints (because this is not done at once, but per Particle Technique update).
  61. // */
  62. // unsigned short mIterations;
  63. //
  64. // /** Determines the name of the mesh of which the vertices are used.
  65. // */
  66. // std::string mMeshName;
  67. //
  68. // /** The _preProcessParticles() function is used to generate some spawn points in every update.
  69. // */
  70. // virtual void _preProcessParticles(ParticleTechnique* technique, float timeElapsed);
  71. //
  72. // /**
  73. // */
  74. // void _setDefaults(void);
  75. //
  76. // /**
  77. // */
  78. // void _loadMesh (void);
  79. //
  80. // /** Generate spawn points from a mesh. The points will not be generated all at once, but
  81. // gradually. In each call, the points on an edge are generated, until all vertices
  82. // have been processed. In that case, mAllVerticesProcessed is set to true and this
  83. // function stops further processing.
  84. // */
  85. // void _generatePoints (void);
  86. //
  87. // /**
  88. // */
  89. // void _generatePointsFromMesh (void);
  90. //
  91. // /**
  92. // */
  93. // void _generatePointsFromSubMesh (void);
  94. //
  95. // /**
  96. // */
  97. // void _fillVertexBuffer(void);
  98. //
  99. // /**
  100. // */
  101. // void _generatePointsFromVertexBuffer(void);
  102. //
  103. // /**
  104. // */
  105. // void _generatePoints (const Vec3& startVector,
  106. // const Vec3& endVector,
  107. // float lengthIncrement = 0.0f);
  108. //
  109. //public:
  110. // // Constants
  111. // static const unsigned short DEFAULT_STEP;
  112. // static const unsigned short DEFAULT_SEGMENTS;
  113. // static const unsigned short DEFAULT_ITERATIONS;
  114. //
  115. // Particle3DVertexEmitter(void);
  116. // virtual ~Particle3DVertexEmitter(void) {};
  117. //
  118. // /**
  119. // */
  120. // unsigned short getIterations(void) const;
  121. //
  122. // /**
  123. // */
  124. // void setIterations(unsigned short iterations);
  125. //
  126. // /**
  127. // */
  128. // unsigned short getSegments(void) const;
  129. //
  130. // /**
  131. // */
  132. // void setSegments(unsigned short segments);
  133. //
  134. // /**
  135. // */
  136. // unsigned short getStep(void) const;
  137. //
  138. // /**
  139. // */
  140. // void setStep(unsigned short step);
  141. //
  142. // /**
  143. // */
  144. // const std::string& getMeshName(void) const;
  145. //
  146. // /**
  147. // */
  148. // virtual void _notifyStart (void);
  149. //
  150. // /**
  151. // */
  152. // void setMeshName(const std::string& meshName);
  153. //
  154. // /**
  155. // */
  156. // virtual void _initParticlePosition(Particle* particle);
  157. //
  158. // /**
  159. // */
  160. // unsigned short _calculateRequestedParticles(float timeElapsed);
  161. //};
  162. NS_CC_END
  163. #endif