16 #include "Base/Util/Assert.h"
55 using namespace Particles;
62 case EShape::BarGauss:
63 return new BarGauss(D, D, 5 * D);
64 case EShape::BarLorentz:
65 return new BarLorentz(D, D, 5 * D);
67 return new Box(D, D, D);
70 case EShape::Spheroid:
71 return new Spheroid(R / 2, D);
72 case EShape::Cylinder:
73 return new Cylinder(R, D);
74 case EShape::TruncatedSphere:
75 return new TruncatedSphere(R, D / 3);
76 case EShape::TruncatedSpheroid:
77 return new TruncatedSpheroid(R, 2 * R, 1.5);
79 return new Cone(R, D, 1.3f);
80 case EShape::Icosahedron:
82 case EShape::Dodecahedron:
84 case EShape::TruncatedCube:
85 return new TruncatedCube(D, D / 3);
87 return new Prism6(R, D);
88 case EShape::Pyramid6:
89 return new Pyramid6(R, D, 1.3f);
90 case EShape::Pyramid4:
91 return new Pyramid4(D, D, 1.3f);
92 case EShape::Bipyramid4:
93 return new Bipyramid4(D, R * 3 / 2, 2.f / 3, 2);
95 return new Prism3(R, D);
96 case EShape::Pyramid3:
97 return new Pyramid3(R, D, 1.3f);
98 case EShape::EllipsoidalCylinder:
99 return new EllipsoidalCylinder(R, R / 2, D);
100 case EShape::HemiEllipsoid:
101 return new HemiEllipsoid(R, R, D);
102 case EShape::CosineRippleBox:
103 return new CosineRippleBox(D, D, D);
104 case EShape::CosineRippleGauss:
105 return new CosineRippleGauss(D, D, D);
106 case EShape::CosineRippleLorentz:
107 return new CosineRippleLorentz(D, D, D);
108 case EShape::SawtoothRippleBox:
109 return new SawtoothRippleBox(D, D, D);
110 case EShape::SawtoothRippleGauss:
111 return new SawtoothRippleGauss(D, D, D);
112 case EShape::SawtoothRippleLorentz:
113 return new SawtoothRippleLorentz(D, D, D);
114 case EShape::CantellatedCube:
115 return new CantellatedCube(D, D / 3);
116 case EShape::HorizontalCylinder:
117 return new HorizontalCylinder(R, D, -R, R);
118 case EShape::PlatonicOctahedron:
119 return new PlatonicOctahedron(D);
120 case EShape::PlatonicTetrahedron:
121 return new PlatonicTetrahedron(D);
122 case EShape::Pyramid2:
123 return new Pyramid2(R, D, D, 1.3f);
146 if (
int i =
objects.indexOf(o); i >= 0)
160 o->releaseGeometry();
162 o->releaseGeometry();
QVector< Object * > objectsBlend
static Particles::Particle * newParticle(Particles::EShape k, float R)
void addBlend(Object *)
add a transparent object, the model takes ownership
void add(Object *)
add an opaque object, the model takes ownership
void draw(Canvas &) const
void drawBlend(Canvas &) const
void updated(bool withEye)
void releaseGeometries()
may be called any time
QVector< Object * > objects
void rem(Object *)
removes an object, the caller becomes responsible
const float DodecahedronL2R
const float IcosahedronL2R