Version 0.4 has been released.
New examples are available: 07.Collision, 08.SpecialFX.
Some notes on this release
~ When method returns a SceneNode, in general (and in Irrlicht ofcause) it means that you can cast it to more specific type if you completly sure that it is it, and it may looks like next sample code should work:
Code: Select all
SceneNode n = collMan.GetSceneNodeAndCollisionPointFromRay(...);
if (n.NodeType == SceneNodeType.Billboard)
{
BillboardSceneNode b = n as BillboardSceneNode;
// b will be null always, because proper class wrapping not implemented yet for SceneNode.
}
This code will work in future.
~ When you need to create a copy of some core type (like Vector or Rect) you have use copy construtor, like:
Code: Select all
Vector3Df v1 = new Vector3Df(10, 20, 30);
vector3Df v2 = v1; // this will create a reference on v1, so when you do v2.X = 11; then v1.X == 11 will be "true"
Vector3Df v3 = new Vector3Df(v1); // this will create new copy of v1; this is what you need in most cases
~ When you need to change only 1 member of core type value from the property, for example SceneNode.Position:
Code: Select all
/* BAD: */ node.Position.X = 1111; // this will not change X
/* GOOD: */ node.Position = new Vector3Df(1111, node.Position.Y, node.Position.Z); // this will change only X (as requested)
~ In this release operators are implemented for next core types: Vector2D, Vector3D, Rect and Dimension2D ("operator -" is additionaly implemented for Dimension2D, since Irrlicht doesn't have one).
And now it is possibly to write:
Code: Select all
Line3Df ray = new Line3Df();
ray.Start = new Vector3Df(camera.Position);
ray.End = ray.Start + (camera.Target - ray.Start).Normalize() * 1000.0f;
/* this sample directly from 07.Collision example */
Please note that there are still some core types like AABBox, Line, Trinagle, Matrix and Plane which has no operators, and even comparision operators not implemented, for example, now you cannot do:
Code: Select all
if (tri1 == tri2) ... /* as workaround, you can do "if (tri1.A == tri2.A && tri1.B == tri2.B && tri1.C == tri2.C) ..." */
it will be implemented in future.
~ In Video::Coloru/f class changed location of Alpha argument (in constructor and Set() methods), now it goes last and has default value 255/1.0f. Now, when you need to define opaque yellow color, you can do:
Code: Select all
Video::Coloru c = new Video::Coloru(255, 255, 0); // alpha is not specified here, and it is 255 by default
This is important if you used native Irrlicht (C++) and want to use Lime wrapper: next sample has different meaning:
Code: Select all
/* C++: */ color = video::SColor(255, 0, 0, 0); // this is black fully opaque color
/* C#: */ color = new Video::Coloru(255, 0, 0, 0); // this is red fully transparent color
/* C#: */ color = new Video::Coloru(0, 0, 0, 255); // this is C++ equvalent; fourth param is optional, and that can be shortened to three params: "...(0, 0, 0);"
~ In some CreateXXX methods of ParticleSystemSceneNode class,
time values specifies as float (not as s32/u32 as in Irrlicht), since proper classes (which this CreateXXX returns) operates with float too.
~ Wrapped all Irrlicht's particle emitters and affectors. They are all now can be created via ParticleSystemSceneNode.
Full list of changes for this release:
- Added and completly ported examples 07.Collision and 08.SpecialFX.
- Added class VolumeLightSceneNode. Added methods AddVolumeLightSceneNode and CreateTextureAnimator to SceneManager.
- Added classes ParticleMeshEmitter, ParticleRingEmitter, ParticleRotationAffector and ParticleSphereEmitter. Class ParticleSystemSceneNode extended with methods: CreateMeshEmitter, CreatePointEmitter, CreateRingEmitter, CreateRotationAffector, CreateScaleParticleAffector and CreateSphereEmitter.
- Added classes ParticleAnimatedMeshSceneNodeEmitter, ParticleAttractionAffector, ParticleBoxEmitter, ParticleCylinderEmitter, ParticleFadeOutAffector, ParticleGravityAffector. Class ParticleSystemSceneNode extended with methods: CreateAnimatedMeshSceneNodeEmitter, CreateAttractionAffector, CreateBoxEmitter, CreateCylinderEmitter, CreateFadeOutParticleAffector and CreateGravityAffector.
- Added enums BoneAnimationMode, BoneSkinningSpace, CullingType and JointUpdateOnRender. Added class BoneSceneNode. Changed ISceneNode.AutomaticCulling prop: now it operates with CullingType values. Class AnimatedMeshSceneNode extended with methods: AddShadowVolumeSceneNode, AnimateJoints, Clone, GetJointNode, SetJointMode, SetLoopMode, SetRenderFromIdentity, SetTransitionTime and prop JointCount.
- Added class ShadowVolumeSceneNode.
- Updated Irrlicht SDK to trunk rev. 3313.
- Added enums ParticleAffectorType and ParticleEmitterType. Added classes Particle, ParticleAffector, ParticleEmitter and ParticleSystemSceneNode. Added method AddParticleSystemSceneNode to SceneManager.
- Added methods AddHillPlaneMesh and AddWaterSurfaceSceneNode to SceneManager.
- Added enum IndexType. MeshBuffer extended with methods Append, GetNormal, GetPosition, GetTCoords, RecalculateBoundingBox, SetDirty, SetHardwareMappingHint; props BoundingBox, HardwareMappingHintForIndex, HardwareMappingHintForVertex, IndexCount, IndexType, Material, VertexCount, VertexType.
- Added enums HardwareBufferType and HardwareMappingHint. Mesh extended with methods GetMeshBuffer, SetDirty, SetHardwareMappingHint, SetMaterialFlag; props BoundingBox, MeshBufferCount.
- Added class MeshManipulator; added prop SceneManager.MeshManipulator.
- Added overloads to GUIFont.Draw(): now position can be specified as Recti, Vector2Di or two int values (x and y).
- Rect improved; now available int and float versions.
- Dimension2D improved; now available unsigned int and float versions.
- Vector2D improved; now available int and float versions.
- VideoDriver has been extended with new methods: ClearZBuffer, CreateScreenShot, DeleteAllDynamicLights, Draw2DLine, Draw3DBox, Draw3DLine, Draw3DTriangle, DrawMeshBuffer, DrawPixel, EnableClipPlane. Changed argument order of some VideoDriver.DrawXXX methods to be same structured: now color follows at the end (or before clip if present) and it became mandatory.
- Vector3D class has been improved: all native functionality wrapped (including operators). Templates imitation has been implemented and now there are two classes for 3d vectors: Vector3Df and Vector3Di.
- Added class SceneCollisionManager, prop SceneManager.SceneCollisionManager and default constructor to Matrix4f.
- Added class CollisionResponseSceneNodeAnimator and method SceneManager.CreateCollisionResponseAnimator.
- Added classes Line3Df, Plane3Df, Triangle3Df and TriangleSelector; prop SceneNode.TriangleSelector; added methods CreateOctreeTriangleSelector and CreateTriangleSelector to SceneManager.
- Added classes Dimension2Df and BillboardSceneNode; added SceneManager.AddBillboardSceneNode().
- Added enum LightType, classes LightSceneNode, Light and Colorf. Normalized argument list of RGBA values in constructors and Set() methods of Coloru/f classes: for constructors: R, G, B, A = 255 or 1.0f, for Set(): R, G, B, A? (if A not set, than it will not be changed). All the examples updated to this change, since there is no need to specify alpha value all the time now (if its 255).
- Added props AspectRatio, FarValue, FOV, InputReceiverEnabled, NearValue, Orthogonal, ProjectionMatrix, Rotation (setter overridden), Target, TargetAndRotationBinding, UpVector, ViewMatrix and ViewMatrixAffector to CameraSceneNode.
____
That's it for now!
![Smile :)](./images/smilies/icon_smile.gif)