Welcome to mirror list, hosted at ThFree Co, Russian Federation.

particlepainter.h « gui « source « manta_full « python « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: da0a208b3e1078c0954b98adf32a7ae91fe8d387 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/******************************************************************************
 *
 * MantaFlow fluid solver framework
 * Copyright 2011 Tobias Pfaff, Nils Thuerey 
 *
 * This program is free software, distributed under the terms of the
 * GNU General Public License (GPL) 
 * http://www.gnu.org/licenses
 *
 * Painting particle systems
 *
 ******************************************************************************/

#ifndef _PARTICLEPAINTER_H_
#define _PARTICLEPAINTER_H_

#include "painter.h"
#include "particle.h"

namespace Manta {

//! Painter object for Particle Systems
class ParticlePainter : public LockedObjPainter {
	Q_OBJECT
public:
	ParticlePainter(GridPainter<int>* gridRef, QWidget* par = 0);
	~ParticlePainter();
	
	void paint();
	void attachWidget(QLayout* layout);

	enum PaintModes { PaintOff=0, PaintVel=1, PaintPos=2 };
	
protected:
	std::string getID();
	Real getScale();
	void update();
	void updateText();
	void processKeyEvent(PainterEvent e, int param);
	
	GridPainter<int>* mGridRef;
	ParticleBase* mLocal;
	QLabel* mInfo;

	//! for standard particle systems, this is used to select the data channel (display is changed with displayMode below)
	int mMode; 
	//! for BasicParticleSystem , change the way data channels are displayed
	int mDisplayMode; 

	int mLastPdata;
	bool mHavePdata;
	Real mMaxVal;
	std::string mPdataInfo;
	std::map<PbClass*, Real> mValScale;

	void paintBasicSys();
};    
	
} // namespace

#endif