Merged 1499:1506 from 1.4 branch: Doc updates, getEmitter added.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1507 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2008-08-20 08:24:52 +00:00
parent 7bc7d66d7d
commit 2489bda2e8
8 changed files with 1314 additions and 27 deletions

View File

@ -1199,3 +1199,81 @@ vector3d.h
Changed signature (made template param)
bool equals(const vector3d<T>& other, const T tolerance = (T)ROUNDING_ERROR_32 ) const
Changes for Version 1.4.1
-------------------------
Since this version is a backward compatible bugfix release, the API changes are only a few. None of them should result
in uncompilable code. Newly found warnings might point out wrongly used variables, additional casts or type changes in the
app should easily fix that. The only change which might go unnoticed by the compiler, but affect the application is the
changed initialization in SColorf. This was done to synchronize with other constructors from SColorf and SColor, though,
so the expectations are now much better met.
Also, OSX users have to adjust the defines in IrrCompileConfig, as we now also have OSX defines in Irrlicht style. It's now
even possible to build with X11 support under OSX without changes in the device code.
SColor.h
Changed signature (SColorf is now default initialized to alpha=1.0f)
SColorf(f32 r=0.f, f32 g=0.f, f32 b=0.f, f32 a=1.f) : r(r), g(g), b(b), a(a) {}
IrrCompileConfig.h
Split the OSX define into platform and device (from old MACOSX define)
_IRR_OSX_PLATFORM_ for Apple systems running OSX
_IRR_USE_OSX_DEVICE_ for Cocoa native windowing on OSX
ISceneManager.h
Added new overload for getMesh with IReadFile instead of filename.
virtual IAnimatedMesh* getMesh(io::IReadFile* file) = 0;
irrMath.h
Renamed method setbit
REALINLINE void setbit_cond ( u32 &state, s32 condition, u32 mask )
ISceneNode.h
Changed signature (because the debug data enum values can be OR'ed to enable multiple debug data types)
virtual void setDebugDataVisible(s32 state)
s32 isDebugDataVisible() const
s32 DebugDataVisible;
matrix4.h
Changed signature (Added return values to some methods)
inline CMatrix4<T>& setbyproduct(const CMatrix4<T>& other_a,const CMatrix4<T>& other_b );
CMatrix4<T>& setbyproduct_nocheck(const CMatrix4<T>& other_a,const CMatrix4<T>& other_b );
inline CMatrix4<T>& makeIdentity();
CMatrix4<T>& setTranslation( const vector3d<T>& translation );
CMatrix4<T>& setInverseTranslation( const vector3d<T>& translation );
inline CMatrix4<T>& setRotationRadians( const vector3d<T>& rotation );
CMatrix4<T>& setRotationDegrees( const vector3d<T>& rotation );
inline CMatrix4<T>& setInverseRotationRadians( const vector3d<T>& rotation );
CMatrix4<T>& setInverseRotationDegrees( const vector3d<T>& rotation );
CMatrix4<T>& setScale( const vector3d<T>& scale );
CMatrix4<T>& buildProjectionMatrixPerspectiveFovRH(f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 zFar);
CMatrix4<T>& buildProjectionMatrixPerspectiveFovLH(f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 zFar);
CMatrix4<T>& buildProjectionMatrixPerspectiveRH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar);
CMatrix4<T>& buildProjectionMatrixPerspectiveLH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar);
CMatrix4<T>& buildProjectionMatrixOrthoLH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar);
CMatrix4<T>& buildProjectionMatrixOrthoRH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar);
CMatrix4<T>& buildCameraLookAtMatrixLH(...)
CMatrix4<T>& buildCameraLookAtMatrixRH(...)
CMatrix4<T>& buildShadowMatrix(const core::vector3df& light, core::plane3df plane, f32 point=1.0f);
CMatrix4<T>& buildNDCToDCMatrix( const core::rect<s32>& area, f32 zScale);
CMatrix4<T>& setTextureScale( f32 sx, f32 sy );
CMatrix4<T>& setTextureRotationCenter( f32 radAngle );
CMatrix4<T>& setTextureScaleCenter( f32 sx, f32 sy );
CMatrix4<T>& setTextureTranslate( f32 x, f32 y );
CMatrix4<T>& setM(const T* data);
Added overload (for one scale value for all axes)
CMatrix4<T>& setScale( const T scale ) { return setScale(core::vector3d<T>(scale,scale,scale)); }
S3DVertex.h
Added operator
bool operator<(const S3DVertex& other) const
bool operator<(const S3DVertex2TCoords& other) const
bool operator<(const S3DVertexTangents& other) const
irrString.h
Changed signature (int->u32, negative length didn't make sense)
bool equalsn(const string<T>& other, u32 n) const
bool equalsn(const T* const str, u32 n) const
New overload/missing method (completing the findLast... and find...Char methods)
s32 findLastChar(const T* const c, u32 count) const
Changed signature (Added return value)
string<T>& trim()

View File

@ -64,6 +64,10 @@ public:
Default is true. */
virtual void setParticlesAreGlobal(bool global=true) = 0;
//! Gets the particle emitter, which creates the particles.
/** \return The particle emitter. Can be 0 if none is set. */
virtual IParticleEmitter* getEmitter() =0;
//! Sets the particle emitter, which creates the particles.
/** A particle emitter can be created using one of the createEmitter
methods. For example to create and use a simple PointEmitter, call

View File

@ -206,7 +206,7 @@ namespace scene
//! Sets if the node should be visible or not.
/** All children of this node won't be visible either, when set
to true.
to false.
\param isVisible If the node shall be visible. */
virtual void setVisible(bool isVisible)
{

View File

@ -967,7 +967,7 @@ namespace core
template <class T>
inline void CMatrix4<T>::transformBox(core::aabbox3d<f32>& box) const
{
if (isIdentity() )
if (isIdentity())
return;
transformVect(box.MinEdge);
@ -979,32 +979,24 @@ namespace core
template <class T>
inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
{
f32 Amin[3];
f32 Amax[3];
const f32 Amin[3] = {box.MinEdge.X, box.MinEdge.Y, box.MinEdge.Z};
const f32 Amax[3] = {box.MaxEdge.X, box.MaxEdge.Y, box.MaxEdge.Z};
f32 Bmin[3];
f32 Bmax[3];
Amin[0] = box.MinEdge.X;
Amin[1] = box.MinEdge.Y;
Amin[2] = box.MinEdge.Z;
Amax[0] = box.MaxEdge.X;
Amax[1] = box.MaxEdge.Y;
Amax[2] = box.MaxEdge.Z;
Bmin[0] = Bmax[0] = M[12];
Bmin[1] = Bmax[1] = M[13];
Bmin[2] = Bmax[2] = M[14];
u32 i, j;
const CMatrix4<T> &m = *this;
for (i = 0; i < 3; ++i)
for (u32 i = 0; i < 3; ++i)
{
for (j = 0; j < 3; ++j)
for (u32 j = 0; j < 3; ++j)
{
f32 a = m(j,i) * Amin[j];
f32 b = m(j,i) * Amax[j];
const f32 a = m(j,i) * Amin[j];
const f32 b = m(j,i) * Amax[j];
if (a < b)
{

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,6 @@
#include "COpenGLDriver.h"
#include "IMaterialRenderer.h"
#include "IMaterialRenderer.h"
#if defined(_IRR_USE_OSX_DEVICE_)
#define GL_COMBINE_EXT 0x8570
#define GL_COMBINE_RGB_EXT 0x8571

View File

@ -63,6 +63,13 @@ CParticleSystemSceneNode::~CParticleSystemSceneNode()
}
//! Gets the particle emitter, which creates the particles.
IParticleEmitter* CParticleSystemSceneNode::getEmitter()
{
return Emitter;
}
//! Sets the particle emitter, which creates the particles.
void CParticleSystemSceneNode::setEmitter(IParticleEmitter* emitter)
{
@ -103,7 +110,6 @@ video::SMaterial& CParticleSystemSceneNode::getMaterial(u32 i)
}
//! Returns amount of materials used by this scene node.
u32 CParticleSystemSceneNode::getMaterialCount() const
{
@ -130,7 +136,6 @@ CParticleSystemSceneNode::createAnimatedMeshSceneNodeEmitter(
}
//! Creates a box particle emitter.
IParticleBoxEmitter* CParticleSystemSceneNode::createBoxEmitter(
const core::aabbox3df& box, const core::vector3df& direction,
@ -179,7 +184,6 @@ IParticleMeshEmitter* CParticleSystemSceneNode::createMeshEmitter(
}
//! Creates a point particle emitter.
IParticlePointEmitter* CParticleSystemSceneNode::createPointEmitter(
const core::vector3df& direction, u32 minParticlesPerSecond,
@ -222,7 +226,6 @@ IParticleSphereEmitter* CParticleSystemSceneNode::createSphereEmitter(
}
//! Creates a point attraction affector. This affector modifies the positions of the
//! particles and attracts them to a specified point at a specified speed per second.
IParticleAttractionAffector* CParticleSystemSceneNode::createAttractionAffector(
@ -258,7 +261,6 @@ IParticleRotationAffector* CParticleSystemSceneNode::createRotationAffector(
}
//! pre render event
void CParticleSystemSceneNode::OnRegisterSceneNode()
{
@ -272,7 +274,6 @@ void CParticleSystemSceneNode::OnRegisterSceneNode()
}
//! render
void CParticleSystemSceneNode::render()
{
@ -365,7 +366,6 @@ void CParticleSystemSceneNode::render()
}
//! returns the axis aligned bounding box of this node
const core::aabbox3d<f32>& CParticleSystemSceneNode::getBoundingBox() const
{
@ -373,7 +373,6 @@ const core::aabbox3d<f32>& CParticleSystemSceneNode::getBoundingBox() const
}
void CParticleSystemSceneNode::doParticleSystem(u32 time)
{
if (LastEmitTime==0)
@ -462,7 +461,6 @@ void CParticleSystemSceneNode::setParticlesAreGlobal(bool global)
}
//! Sets the size of all particles.
void CParticleSystemSceneNode::setParticleSize(const core::dimension2d<f32> &size)
{

View File

@ -33,6 +33,9 @@ public:
//! destructor
virtual ~CParticleSystemSceneNode();
//! Gets the particle emitter, which creates the particles.
virtual IParticleEmitter* getEmitter();
//! Sets the particle emitter, which creates the particles.
virtual void setEmitter(IParticleEmitter* emitter);