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
This commit is contained in:
hybrid 2007-08-29 23:03:08 +00:00
parent f787c99c1a
commit fc1f2f7cf3
9 changed files with 40 additions and 11 deletions

View File

@ -16,18 +16,18 @@ namespace scene
enum E_CULLING_TYPE
{
EAC_OFF = 0,
EAC_BOX,
EAC_FRUSTUM_BOX,
EAC_FRUSTUM_SPHERE
EAC_BOX = 1,
EAC_FRUSTUM_BOX = 2,
EAC_FRUSTUM_SPHERE = 4
};
//! Names for culling type
const c8* const AutomaticCullingNames[] =
{
"false",
"box", // camera box against node box
"frustum_box", // camera frustum against node box
"frustum_sphere", // camera frustum against node sphere
"box", // camera box against node box
"frustum_box", // camera frustum against node box
"frustum_sphere", // camera frustum against node sphere
0
};

View File

@ -46,6 +46,9 @@ public:
//! Gets whether to emit min<->max particles for every vertex per
//! second, or to pick min<->max vertices every second
virtual bool getEveryMeshVertex() const = 0;
//! Get emitter type
virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_ANIMATED_MESH; }
};
} // end namespace scene

View File

@ -49,6 +49,9 @@ public:
//! Get whether or not to draw points inside the cylinder
virtual bool getOutlineOnly() const = 0;
//! Get emitter type
virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_CYLINDER; }
};
} // end namespace scene

View File

@ -17,7 +17,12 @@ namespace scene
enum E_PARTICLE_EMITTER_TYPE
{
EPET_POINT = 0,
EPET_ANIMATED_MESH,
EPET_BOX,
EPET_CYLINDER,
EPET_MESH,
EPET_RING,
EPET_SPHERE,
EPET_COUNT
};
@ -25,7 +30,12 @@ enum E_PARTICLE_EMITTER_TYPE
const c8* const ParticleEmitterTypeNames[] =
{
"Point",
"AnimatedMesh",
"Box",
"Cylinder",
"Mesh",
"Ring",
"Sphere",
0
};

View File

@ -46,6 +46,9 @@ public:
//! Gets whether to emit min<->max particles for every vertex per second, or to pick
//! min<->max vertices every second
virtual bool getEveryMeshVertex() const = 0;
//! Get emitter type
virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_MESH; }
};
} // end namespace scene

View File

@ -37,6 +37,9 @@ public:
//! Get the thickness of the ring
virtual f32 getRingThickness() const = 0;
//! Get emitter type
virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_RING; }
};
} // end namespace scene

View File

@ -31,6 +31,9 @@ public:
//! Get the radius of the sphere for particle emissions
virtual f32 getRadius() const = 0;
//! Get emitter type
virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_SPHERE; }
};
} // end namespace scene

View File

@ -437,7 +437,7 @@ namespace scene
//! Enables or disables automatic culling based on the bounding box.
/** 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
only reason for existence, for example the OctreeSceneNode.
\param state: The culling state to be used. */

View File

@ -91,13 +91,17 @@ struct S3DVertex2TCoords : S3DVertex
//! constructor with two different texture coords, but no normal
S3DVertex2TCoords(const core::vector3df& pos, SColor color,
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
S3DVertex2TCoords(const core::vector3df& pos, const core::vector3df& normal, const SColor& color,
const core::vector2d<f32>& tcoords, const core::vector2d<f32>& 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
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) {}
@ -149,14 +153,14 @@ struct S3DVertexTangents : S3DVertex
//! constructor
S3DVertexTangents(const core::vector3df& pos, SColor c,
const core::vector2df& tcoords)
: S3DVertex(pos, core::vector3df(0.0f, 0.0f, 0.0f), c, tcoords) { }
: S3DVertex(pos, core::vector3df(), c, tcoords) { }
//! constructor
S3DVertexTangents(const core::vector3df& pos,
const core::vector3df& normal, SColor c,
const core::vector2df& tcoords,
const core::vector3df& tangent=core::vector3df(0.0f, 0.0f, 0.0f),
const core::vector3df& binormal=core::vector3df(0.0f, 0.0f, 0.0f))
const core::vector3df& tangent=core::vector3df(),
const core::vector3df& binormal=core::vector3df())
: S3DVertex(pos, normal, c, tcoords), Tangent(tangent), Binormal(binormal) { }
//! Tangent vector along the x-axis of the texture