Commit fc1f2f7c authored by hybrid's avatar hybrid

Fixed the particle emitter types which were missing.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@878 dfc29bdd-3216-0410-991c-e03cc46cb475
parent f787c99c
...@@ -16,9 +16,9 @@ namespace scene ...@@ -16,9 +16,9 @@ namespace scene
enum E_CULLING_TYPE enum E_CULLING_TYPE
{ {
EAC_OFF = 0, EAC_OFF = 0,
EAC_BOX, EAC_BOX = 1,
EAC_FRUSTUM_BOX, EAC_FRUSTUM_BOX = 2,
EAC_FRUSTUM_SPHERE EAC_FRUSTUM_SPHERE = 4
}; };
//! Names for culling type //! Names for culling type
......
...@@ -46,6 +46,9 @@ public: ...@@ -46,6 +46,9 @@ public:
//! Gets whether to emit min<->max particles for every vertex per //! Gets whether to emit min<->max particles for every vertex per
//! second, or to pick min<->max vertices every second //! second, or to pick min<->max vertices every second
virtual bool getEveryMeshVertex() const = 0; virtual bool getEveryMeshVertex() const = 0;
//! Get emitter type
virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_ANIMATED_MESH; }
}; };
} // end namespace scene } // end namespace scene
......
...@@ -49,6 +49,9 @@ public: ...@@ -49,6 +49,9 @@ public:
//! Get whether or not to draw points inside the cylinder //! Get whether or not to draw points inside the cylinder
virtual bool getOutlineOnly() const = 0; virtual bool getOutlineOnly() const = 0;
//! Get emitter type
virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_CYLINDER; }
}; };
} // end namespace scene } // end namespace scene
......
...@@ -17,7 +17,12 @@ namespace scene ...@@ -17,7 +17,12 @@ namespace scene
enum E_PARTICLE_EMITTER_TYPE enum E_PARTICLE_EMITTER_TYPE
{ {
EPET_POINT = 0, EPET_POINT = 0,
EPET_ANIMATED_MESH,
EPET_BOX, EPET_BOX,
EPET_CYLINDER,
EPET_MESH,
EPET_RING,
EPET_SPHERE,
EPET_COUNT EPET_COUNT
}; };
...@@ -25,7 +30,12 @@ enum E_PARTICLE_EMITTER_TYPE ...@@ -25,7 +30,12 @@ enum E_PARTICLE_EMITTER_TYPE
const c8* const ParticleEmitterTypeNames[] = const c8* const ParticleEmitterTypeNames[] =
{ {
"Point", "Point",
"AnimatedMesh",
"Box", "Box",
"Cylinder",
"Mesh",
"Ring",
"Sphere",
0 0
}; };
......
...@@ -46,6 +46,9 @@ public: ...@@ -46,6 +46,9 @@ public:
//! Gets whether to emit min<->max particles for every vertex per second, or to pick //! Gets whether to emit min<->max particles for every vertex per second, or to pick
//! min<->max vertices every second //! min<->max vertices every second
virtual bool getEveryMeshVertex() const = 0; virtual bool getEveryMeshVertex() const = 0;
//! Get emitter type
virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_MESH; }
}; };
} // end namespace scene } // end namespace scene
......
...@@ -37,6 +37,9 @@ public: ...@@ -37,6 +37,9 @@ public:
//! Get the thickness of the ring //! Get the thickness of the ring
virtual f32 getRingThickness() const = 0; virtual f32 getRingThickness() const = 0;
//! Get emitter type
virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_RING; }
}; };
} // end namespace scene } // end namespace scene
......
...@@ -31,6 +31,9 @@ public: ...@@ -31,6 +31,9 @@ public:
//! Get the radius of the sphere for particle emissions //! Get the radius of the sphere for particle emissions
virtual f32 getRadius() const = 0; virtual f32 getRadius() const = 0;
//! Get emitter type
virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_SPHERE; }
}; };
} // end namespace scene } // end namespace scene
......
...@@ -437,7 +437,7 @@ namespace scene ...@@ -437,7 +437,7 @@ namespace scene
//! Enables or disables automatic culling based on the bounding box. //! Enables or disables automatic culling based on the bounding box.
/** Automatic culling is enabled by default. Note that not /** Automatic culling is enabled by default. Note that not
all SceneNodes support culling (the billboard scene node for example) all SceneNodes support culling (e.g. the billboard scene node)
and that some nodes always cull their geometry because it is their and that some nodes always cull their geometry because it is their
only reason for existence, for example the OctreeSceneNode. only reason for existence, for example the OctreeSceneNode.
\param state: The culling state to be used. */ \param state: The culling state to be used. */
......
...@@ -91,13 +91,17 @@ struct S3DVertex2TCoords : S3DVertex ...@@ -91,13 +91,17 @@ struct S3DVertex2TCoords : S3DVertex
//! constructor with two different texture coords, but no normal //! constructor with two different texture coords, but no normal
S3DVertex2TCoords(const core::vector3df& pos, SColor color, S3DVertex2TCoords(const core::vector3df& pos, SColor color,
const core::vector2d<f32>& tcoords, const core::vector2d<f32>& tcoords2) const core::vector2d<f32>& tcoords, const core::vector2d<f32>& tcoords2)
: S3DVertex(pos, core::vector3df(0.0f, 0.0f, 0.0f), color, tcoords), TCoords2(tcoords2) {} : S3DVertex(pos, core::vector3df(), color, tcoords), TCoords2(tcoords2) {}
//! constructor with all values //! constructor with all values
S3DVertex2TCoords(const core::vector3df& pos, const core::vector3df& normal, const SColor& color, S3DVertex2TCoords(const core::vector3df& pos, const core::vector3df& normal, const SColor& color,
const core::vector2d<f32>& tcoords, const core::vector2d<f32>& tcoords2) const core::vector2d<f32>& tcoords, const core::vector2d<f32>& tcoords2)
: S3DVertex(pos, normal, color, tcoords), TCoords2(tcoords2) {} : S3DVertex(pos, normal, color, tcoords), TCoords2(tcoords2) {}
//! constructor with all values
S3DVertex2TCoords(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv, f32 tu2, f32 tv2)
: S3DVertex(x,y,z, nx,ny,nz, c, tu,tv), TCoords2(tu2,tv2) {}
//! constructor with the same texture coords and normal //! constructor with the same texture coords and normal
S3DVertex2TCoords(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv) S3DVertex2TCoords(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv)
: S3DVertex(x,y,z, nx,ny,nz, c, tu,tv), TCoords2(tu,tv) {} : S3DVertex(x,y,z, nx,ny,nz, c, tu,tv), TCoords2(tu,tv) {}
...@@ -149,14 +153,14 @@ struct S3DVertexTangents : S3DVertex ...@@ -149,14 +153,14 @@ struct S3DVertexTangents : S3DVertex
//! constructor //! constructor
S3DVertexTangents(const core::vector3df& pos, SColor c, S3DVertexTangents(const core::vector3df& pos, SColor c,
const core::vector2df& tcoords) const core::vector2df& tcoords)
: S3DVertex(pos, core::vector3df(0.0f, 0.0f, 0.0f), c, tcoords) { } : S3DVertex(pos, core::vector3df(), c, tcoords) { }
//! constructor //! constructor
S3DVertexTangents(const core::vector3df& pos, S3DVertexTangents(const core::vector3df& pos,
const core::vector3df& normal, SColor c, const core::vector3df& normal, SColor c,
const core::vector2df& tcoords, const core::vector2df& tcoords,
const core::vector3df& tangent=core::vector3df(0.0f, 0.0f, 0.0f), const core::vector3df& tangent=core::vector3df(),
const core::vector3df& binormal=core::vector3df(0.0f, 0.0f, 0.0f)) const core::vector3df& binormal=core::vector3df())
: S3DVertex(pos, normal, c, tcoords), Tangent(tangent), Binormal(binormal) { } : S3DVertex(pos, normal, c, tcoords), Tangent(tangent), Binormal(binormal) { }
//! Tangent vector along the x-axis of the texture //! Tangent vector along the x-axis of the texture
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment