axmol/extensions/Particle3D/PU/CCPUVertexEmitter.h

171 lines
4.7 KiB
C
Raw Normal View History

2019-11-23 20:27:39 +08:00
/****************************************************************************
Copyright (C) 2013 Henry van Merode. All rights reserved.
Copyright (c) 2015-2016 Chukong Technologies Inc.
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
2021-12-25 10:04:45 +08:00
2022-10-01 16:24:52 +08:00
https://axmolengine.github.io/
2021-12-25 10:04:45 +08:00
2019-11-23 20:27:39 +08:00
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
2021-12-25 10:04:45 +08:00
2019-11-23 20:27:39 +08:00
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
2021-12-25 10:04:45 +08:00
2019-11-23 20:27:39 +08:00
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
2022-07-16 10:43:05 +08:00
#ifndef __AX_PU_PARTICLE_3D_VERTEX_EMITTER_H__
#define __AX_PU_PARTICLE_3D_VERTEX_EMITTER_H__
2019-11-23 20:27:39 +08:00
#include "extensions/Particle3D/PU/CCPUEmitter.h"
#include <list>
2021-12-25 10:04:45 +08:00
// Particle3DVertexEmitter NOT SUPPORT YET
NS_AX_BEGIN
2019-11-23 20:27:39 +08:00
//
2021-12-25 10:04:45 +08:00
// class Particle3DVertexEmitter : public PUEmitter
2019-11-23 20:27:39 +08:00
//{
2021-12-25 10:04:45 +08:00
// protected:
2019-11-23 20:27:39 +08:00
//
// std::list<Vec3> mSpawnPositionList;
// const Ogre::VertexElement* mPositionElement;
// Ogre::VertexData* mVertexData;
// Ogre::HardwareVertexBufferSharedPtr mBuffer;
// unsigned char* mVertexBuffer;
// Ogre::Mesh* mMesh;
// Ogre::SubMesh* mSubMesh;
// bool mMeshProcessed;
// size_t mVertexSize;
// size_t mMaxVertexCount;
// size_t mVertexCount;
// unsigned short mSubMeshNumber;
// bool mAllVerticesProcessed;
//
// /** Determines the size of the steps that are used to traverse through the vertices.
// */
// unsigned short mStep;
2021-12-25 10:04:45 +08:00
//
2019-11-23 20:27:39 +08:00
// /** Determines in how many segments an edge is divided. This results in spawn points.
// */
// unsigned short mSegments;
//
// /** Defines the speed of generating spawnpoints. In each Particle Technique update
// 'mIterations' vertices are traversed.
// @remarks
// Setting this attribute to a higher value is needed if the emission rate of the emitter
2021-12-25 10:04:45 +08:00
// is high. On slower computers, emitting the particles may exceed generating the
2019-11-23 20:27:39 +08:00
// spawnpoints (because this is not done at once, but per Particle Technique update).
// */
// unsigned short mIterations;
//
// /** Determines the name of the mesh of which the vertices are used.
// */
// std::string mMeshName;
//
// /** The _preProcessParticles() function is used to generate some spawn points in every update.
// */
// virtual void _preProcessParticles(ParticleTechnique* technique, float timeElapsed);
//
2021-12-25 10:04:45 +08:00
// /**
2019-11-23 20:27:39 +08:00
// */
// void _setDefaults();
//
2021-12-25 10:04:45 +08:00
// /**
2019-11-23 20:27:39 +08:00
// */
// void _loadMesh ();
//
// /** Generate spawn points from a mesh. The points will not be generated all at once, but
// gradually. In each call, the points on an edge are generated, until all vertices
2021-12-25 10:04:45 +08:00
// have been processed. In that case, mAllVerticesProcessed is set to true and this
2019-11-23 20:27:39 +08:00
// function stops further processing.
// */
// void _generatePoints ();
2021-12-25 10:04:45 +08:00
//
// /**
2019-11-23 20:27:39 +08:00
// */
// void _generatePointsFromMesh ();
//
2021-12-25 10:04:45 +08:00
// /**
2019-11-23 20:27:39 +08:00
// */
// void _generatePointsFromSubMesh ();
//
2021-12-25 10:04:45 +08:00
// /**
2019-11-23 20:27:39 +08:00
// */
// void _fillVertexBuffer();
//
2021-12-25 10:04:45 +08:00
// /**
2019-11-23 20:27:39 +08:00
// */
// void _generatePointsFromVertexBuffer();
//
2021-12-25 10:04:45 +08:00
// /**
2019-11-23 20:27:39 +08:00
// */
2021-12-25 10:04:45 +08:00
// void _generatePoints (const Vec3& startVector,
2019-11-23 20:27:39 +08:00
// const Vec3& endVector,
// float lengthIncrement = 0.0f);
//
2021-12-25 10:04:45 +08:00
// public:
2019-11-23 20:27:39 +08:00
// // Constants
// static const unsigned short DEFAULT_STEP;
// static const unsigned short DEFAULT_SEGMENTS;
// static const unsigned short DEFAULT_ITERATIONS;
//
// Particle3DVertexEmitter();
// virtual ~Particle3DVertexEmitter() {};
//
2021-12-25 10:04:45 +08:00
// /**
2019-11-23 20:27:39 +08:00
// */
// unsigned short getIterations() const;
//
2021-12-25 10:04:45 +08:00
// /**
2019-11-23 20:27:39 +08:00
// */
// void setIterations(unsigned short iterations);
2021-12-25 10:04:45 +08:00
//
// /**
2019-11-23 20:27:39 +08:00
// */
// unsigned short getSegments() const;
//
2021-12-25 10:04:45 +08:00
// /**
2019-11-23 20:27:39 +08:00
// */
// void setSegments(unsigned short segments);
//
2021-12-25 10:04:45 +08:00
// /**
2019-11-23 20:27:39 +08:00
// */
// unsigned short getStep() const;
//
2021-12-25 10:04:45 +08:00
// /**
2019-11-23 20:27:39 +08:00
// */
// void setStep(unsigned short step);
//
2021-12-25 10:04:45 +08:00
// /**
2019-11-23 20:27:39 +08:00
// */
// std::string_view getMeshName() const;
2019-11-23 20:27:39 +08:00
//
2021-12-25 10:04:45 +08:00
// /**
2019-11-23 20:27:39 +08:00
// */
// virtual void _notifyStart ();
2021-12-25 10:04:45 +08:00
//
// /**
2019-11-23 20:27:39 +08:00
// */
// void setMeshName(std::string_view meshName);
2019-11-23 20:27:39 +08:00
//
2021-12-25 10:04:45 +08:00
// /**
2019-11-23 20:27:39 +08:00
// */
// virtual void _initParticlePosition(Particle* particle);
//
2021-12-25 10:04:45 +08:00
// /**
2019-11-23 20:27:39 +08:00
// */
// unsigned short _calculateRequestedParticles(float timeElapsed);
//};
NS_AX_END
2019-11-23 20:27:39 +08:00
#endif