The PhysX Candy Wrapper for .NET is a wrapper library for the PhysX physics engine currently owned by Nvidia, although it was originally developed by Ageia. The wrapper is open source and is designed to be integrated with the math library of your choice.

Info For questions, bug reports, etc. use this forum topic.

In our case we are using the math library is built into Mogre due to the design of Ogre. There is a working Mogre binding available for download on the wrapper website. With the Mogre binding all of the wrappers methods are directly compatible with classes like Mogre.Vector3, Mogre.Quaternion, and so on. This approach makes things a lot easier and removes the need for yet another wrapper around NxOgre for example.

Depency:
You need to install the PhysX System Software.

PhysX SDK

It's profitable to install the PhysX SDK. This can be downloaded from the from NVidia website. The Windows version is completely free for both commercial and non-commercial use. You'll only need to pay a fee if you intend on releasing your game for the PS3, XBox or Wii. It's not open source, but it has been used in a many commercial games so it's heavily battle tested in the real world.
http://developer.nvidia.com/object/physx_downloads.html

For some reason NVidia has stopped providing the SDK download as a direct link from the download page. You now have to sign up and go through the PhysX developer support page. My experience with this process was long, tedious and annoying. If you are in a hurry it's not hard to google a direct download link to a previous version of the SDK while your waiting for NVidia to get there act together.
http://www.softpedia.com/progDownload/NVIDIA-PhysX-SDK-Download-104786.html

PhysX Candy Wrapper SDK

The wrapper is open source and can be downloaded from SourceForge. Although there is limited documentation, most of the code can be translated from the PhysX documentation fairly easily. There is also some bits and pieces floating around on the forums. It's my hope by making this wiki page that this situation improves. Even if the wrapper is no longer maintained, at least it's open source and can be taken over by other developers.
http://sourceforge.net/projects/eyecm-physx/files/eyecm-physx-mogre/

Implementation

(note: the following code was taken from my current project may be missing something, if you find any errors please correct them)

The first thing you will want to do is add a reference to the PhysX candy wrapper DLL to your Mogre project. Once this is done you'll have access to the wrapped classes under the namespace Mogre.PhysX;

What I did in my game engine was create a thin physics manager class for the purpose of holding common functionality and potentially making it easier to use a different physics engine if the day comes. Firstly add this line to the top of your physics manager class.

using Mogre.PhysX;


Next, you can add some private variables to the class that control the physics controller root and the scene (kind of like the SceneManager in Ogre).

private Physics physics;
private Scene scene;


Okay, that's the easy stuff out of the road. Now for the initialisation method that should be called somewhere as your game loads. I call it just after initailising Ogre.

public bool Initiliase()
{            
    // create the root object
    this.physics = Physics.Create();
    this.physics.Parameters.SkinWidth = 0.0025f;

    // setup default scene params
    SceneDesc sceneDesc = new SceneDesc();
    sceneDesc.SetToDefault();
    sceneDesc.Gravity = new Vector3(0, -9.8f, 0);
    sceneDesc.UpAxis = 1; // NX_Y in c++ (I couldn't find the equivilent enum for C#)
    
    // your class should implement IUserContactReport to use this
    //sceneDesc.UserContactReport = this;

    this.scene = physics.CreateScene(sceneDesc);

    // default material
    scene.Materials[0].Restitution = 0.5f;
    scene.Materials[0].StaticFriction = 0.5f;
    scene.Materials[0].DynamicFriction = 0.5f;

    // begin simulation
    this.scene.Simulate(0);
    return true;
}


After that you'll want to call an Update method in your main game / rendering loop (frameStarted for example).

public void Update(float deltaTime)
{
    this.scene.FlushStream();
    this.scene.FetchResults(SimulationStatuses.AllFinished, true);
    this.scene.Simulate(deltaTime);
}


And don't forget to be a good little programmer and clean up your resources. This should get called when your game exits. I'm not sure if it's absolutely required in managed code but it's better to be safe than sorry when we are dealing with unmanaged wrappers.

public void Dispose()
{
   this.physics.Dispose();
}


That's about it for the basics. You're game now has a working physics engine, although, it won't do much because you haven't setup any actors or collision shapes.

Solid things that move

To make your game more interesting, you'll want to give physical properties to the models in your game. PhysX likes to call these Actors. You set up an actor by providing it the details of it's shape, mass and if it's static or dynamic.

Strictly speaking, the physics engine knows nothing about the graphics engine in your game. You need to tell the actors from the physics engine how to move the scene nodes from the graphics engine. For this reason, you might want to create a class the ties together an actor and a scene node. When you want your physics engine to move the scene nodes around you simply call the Update method from inside your game loop.

public class ActorNode
{
	private SceneNode sceneNode;
	private Actor actor;

	public ActorNode(SceneNode sceneNode, Actor actor)
	{
	    this.sceneNode = sceneNode;
	    this.actor = actor;
	}

	internal void Update(float deltaTime)
	{
	    if (!actor.IsSleeping)
	    {
		this.sceneNode.Position = actor.GlobalPosition;
		this.sceneNode.Orientation = actor.GlobalOrientationQuaternion;
	    }
	}
}


But before you can do anything with this class you'll need to know how to create actors. Typically speaking, you'll want to move an Entity around with an actor, although it's not required that you have an Entity attached. For example you may also want to control the camera or lights with the physics engine. To keep things simple, lets crate a sphere around the well known ogrehead.mesh.

float scale = 0.1f;
int id = 0;

// graphics
Entity entity = sceneManager.CreateEntity("ogreHead" + id.ToString(), "ogrehead.mesh");
SceneNode sceneNode = sceneManager.RootSceneNode.CreateChildSceneNode();
sceneNode.AttachObject(entity);
sceneNode.Position = new Vector3(0, 10, 0);
sceneNode.Scale = Vector3.UNIT_SIZE * scale;

// physics
// attaching a body to the actor makes it dynamic, you can set things like initial velocity
BodyDesc bodyDesc = new BodyDesc();
bodyDesc.LinearVelocity = new Vector3(0, 2, 5);

// the actor properties control the mass, position and orientation
// if you leave the body set to null it will become a static actor and wont move
ActorDesc actorDesc = new ActorDesc();
actorDesc.Density = 4;
actorDesc.Body = bodyDesc;
actorDesc.GlobalPosition = sceneNode.Position;
actorDesc.GlobalOrientation = sceneNode.Orientation.ToRotationMatrix();

// a quick trick the get the size of the physics shape right is to use the bounding box of the entity
actorDesc.Shapes.Add(new SphereShapeDesc(entity.BoundingBox.HalfSize * scale, entity.BoundingBox.Center * scale));

// finally, create the actor in the physics scene
Actor actor = scene.CreateActor(actorDesc);

// create our special actor node to tie together the scene node and actor that we can update its position later
ActorNode actorNode = new ActorNode(sceneNode, actor);
actorNodeList.Add(actorNode);


Now all you have to do is update your actor nodes in your game loop. There are some optimisations that can be applied to this later, but lets keep it simple for now.

foreach (ActorNode actorNode in actorNodeList)
	actorNode.Update(deltaTime);


You should be able to run your game and see the ogre head falling off the screen, of course, this isn't very useful because you don't have a floor for it to bounce off. Lets add one. Static actors like the floor or your level geometry don't need to be added to the actorNodeList because they won't move.

// creating an invisible static plane is really simple
ActorDesc actorDesc = new ActorDesc(new PlaneShapeDesc());
scene.CreateActor(actorDesc);


Next up we'll take a look at something more difficult but very powerful.

Dealing with Triangle Mesh shapes


One of the more difficult tasks is telling the physics engine about the triangle mesh shapes in your game world. When your taking this approach you should realise that it's not as fast as bounding things in your game world with simple shapes like spheres and boxes. However, it is very useful (and more appropriate) in some situations like the general geometry of your level or odd shapes that sphere's and boxes don't fit very well.

But before you can do this with Ogre / Mogre you'll need to extract the vertices and triangles out of your entities. Here's a class that's very useful for doing so.

public class StaticMeshData
{
	private Vector3[] vertices;
	private uint[] indices;
	private MeshPtr meshPtr;
	private Vector3 scale = Vector3.UNIT_SCALE;

	public float[] Points
	{
		get
		{
			// extract the points out of the vertices
			float[] points = new float[this.Vertices.Length * 3];
			int i = 0;

			foreach (Vector3 vertex in this.Vertices)
			{
				points[i + 0] = vertex.x;
				points[i + 1] = vertex.y;
				points[i + 2] = vertex.z;
				i += 3;
			}

			return points;
		}
	}

	public Vector3[] Vertices
	{
		get
		{
			return this.vertices;
		}
	}

	public uint[] Indices
	{
		get
		{
			return this.indices;
		}
	}

	public int TriangleCount
	{
		get
		{
			return this.indices.Length / 3;
		}
	}

	public StaticMeshData(MeshPtr meshPtr)
	{
		Initiliase(meshPtr, Vector3.UNIT_SCALE);
	}

	public StaticMeshData(MeshPtr meshPtr, float unitScale)
	{
		Initiliase(meshPtr, Vector3.UNIT_SCALE * unitScale);
	}

	public StaticMeshData(MeshPtr meshPtr, Vector3 scale)
	{
		Initiliase(meshPtr, scale);
	}

	private void Initiliase(MeshPtr meshPtr, Vector3 scale)
	{
		this.scale = scale;
		this.meshPtr = meshPtr;

		PrepareBuffers();
		ReadData();
	}

	private void ReadData()
	{
		int indexOffset = 0;
		uint vertexOffset = 0;

		// read the index and vertex data from the mesh
		for(ushort i = 0; i < meshPtr.NumSubMeshes; i++)
		{
			SubMesh subMesh = meshPtr.GetSubMesh(i);

			indexOffset = ReadIndexData(indexOffset, vertexOffset, subMesh.indexData);

			if(subMesh.useSharedVertices == false)
				vertexOffset = ReadVertexData(vertexOffset, subMesh.vertexData);
		}

		// add the shared vertex data
		if(meshPtr.sharedVertexData != null)
			vertexOffset = ReadVertexData(vertexOffset, meshPtr.sharedVertexData);
	}

	private void PrepareBuffers()
	{
		uint indexCount = 0;
		uint vertexCount = 0;

		// Add any shared vertices
		if(meshPtr.sharedVertexData != null)
			vertexCount = meshPtr.sharedVertexData.vertexCount;

		// Calculate the number of vertices and indices in the sub meshes
		for (ushort i = 0; i < meshPtr.NumSubMeshes; i++)
		{
			SubMesh subMesh = meshPtr.GetSubMesh(i);

			// we have already counted the vertices that are shared
			if(subMesh.useSharedVertices == false)
				vertexCount += subMesh.vertexData.vertexCount;

			indexCount += subMesh.indexData.indexCount;
		}

		// Allocate space for the vertices and indices
		vertices = new Vector3[vertexCount];
		indices = new uint[indexCount];
	}

	private unsafe uint ReadVertexData(uint vertexOffset, VertexData vertexData)
	{
		VertexElement posElem = vertexData.vertexDeclaration.FindElementBySemantic(VertexElementSemantic.VES_POSITION);
		HardwareVertexBufferSharedPtr vertexBuffer = vertexData.vertexBufferBinding.GetBuffer(posElem.Source);
		byte* vertexMemory = (byte*)vertexBuffer.Lock(HardwareBuffer.LockOptions.HBL_READ_ONLY);
		float* pElem;

		for (uint i = 0; i < vertexData.vertexCount; i++)
		{
			posElem.BaseVertexPointerToElement(vertexMemory, &pElem);

			Vector3 point = new Vector3(pElem[0], pElem[1], pElem[2]);
			vertices[vertexOffset] = point * this.scale;
			vertexMemory += vertexBuffer.VertexSize;
			vertexOffset++;
		}

		vertexBuffer.Unlock();
		return vertexOffset;
	}
	private unsafe int ReadIndexData(int indexOffset, uint vertexOffset, IndexData indexData)
	{
		// get index data
		HardwareIndexBufferSharedPtr indexBuf = indexData.indexBuffer;
		HardwareIndexBuffer.IndexType indexType = indexBuf.Type;
		uint* pLong = (uint*)(indexBuf.Lock(HardwareBuffer.LockOptions.HBL_READ_ONLY));
		ushort* pShort = (ushort*)pLong;

		for (uint i = 0; i < indexData.indexCount; i++)
		{
			if(indexType == HardwareIndexBuffer.IndexType.IT_32BIT)
				indices[indexOffset] = pLong[i] + vertexOffset;
			else
				indices[indexOffset] = pShort[i] + vertexOffset;

			indexOffset++;
		}

		indexBuf.Unlock();
		return indexOffset;
	}
}


Now that you have a way of extracting the triangle mesh you can use this to cook meshes used by the physics engine. The reason you need to cook them first is because PhysX will optimise the meshes for physics calculations. This may be very different to the mesh used for graphics.

There are two types of mesh shapes in PhysX. The first is a convex hull shape. This is ideal for dynamic objects because it's a lot faster to calculate collisions with convex shapes then it is with concave ones (I won't go into the reasons right now).

public ConvexShapeDesc CreateConvexHull(StaticMeshData meshData)
{
    // create descriptor for convex hull
    ConvexShapeDesc convexMeshShapeDesc = null;
    ConvexMeshDesc convexMeshDesc = new ConvexMeshDesc();
    convexMeshDesc.PinPoints<float>(meshData.Points, 0, sizeof(float) * 3);
    convexMeshDesc.PinTriangles<uint>(meshData.Indices, 0, sizeof(uint) * 3);
    convexMeshDesc.VertexCount = (uint)meshData.Vertices.Length;
    convexMeshDesc.TriangleCount = (uint)meshData.TriangleCount;
    convexMeshDesc.Flags = ConvexFlags.ComputeConvex;

    MemoryStream stream = new MemoryStream(1024);
    CookingInterface.InitCooking();

    if (CookingInterface.CookConvexMesh(convexMeshDesc, stream))
    {
	stream.Seek(0, SeekOrigin.Begin);
	ConvexMesh convexMesh = physics.CreateConvexMesh(stream);
	convexMeshShapeDesc = new ConvexShapeDesc(convexMesh);
	CookingInterface.CloseCooking();
    }

    convexMeshDesc.UnpinAll();
    return convexMeshShapeDesc;
}


Secondly, we have a triangle mesh shape that will detect collisions with every triangle in the shape. Unfortunately, it's very intensive on the physics engine to detect these kinds of collisions so there are a few restrictions. The most important one is that this can only be applied to static objects in your game world. The second is that they should have a reasonably low triangle count. Generally this is okay for a rooms with walls, floors, hallways, and so on. For the detailed shapes though you'll want to bound them with groups of simple shapes like spheres and boxes.

public TriangleMeshShapeDesc CreateTriangleMesh(StaticMeshData meshData)
{
    // create descriptor for triangle mesh
    TriangleMeshShapeDesc triangleMeshShapeDesc = null;
	    TriangleMeshDesc triangleMeshDesc = new TriangleMeshDesc();
    triangleMeshDesc.PinPoints<float>(meshData.Points, 0, sizeof(float) * 3);
    triangleMeshDesc.PinTriangles<uint>(meshData.Indices, 0, sizeof(uint) * 3);
    triangleMeshDesc.VertexCount = (uint)meshData.Vertices.Length;
    triangleMeshDesc.TriangleCount = (uint)meshData.TriangleCount;

    MemoryStream stream = new MemoryStream(1024);
    CookingInterface.InitCooking();

    if (CookingInterface.CookTriangleMesh(triangleMeshDesc, stream))
    {
	stream.Seek(0, SeekOrigin.Begin);
	TriangleMesh triangleMesh = physics.CreateTriangleMesh(stream);
	triangleMeshShapeDesc = new TriangleMeshShapeDesc(triangleMesh);
	CookingInterface.CloseCooking();
    }

    triangleMeshDesc.UnpinAll();
    return triangleMeshShapeDesc;
}


If you need help, open a thread in Mogre add-ons forum and ask user zarifus to answer in this thread.

See also


Alternatives
Here are alternatives for physics and collision detection with Mogre.

<HR>
Creative Commons Copyright -- Some rights reserved.


THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.

1. Definitions

  • "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License.
  • "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License.
  • "Licensor" means the individual or entity that offers the Work under the terms of this License.
  • "Original Author" means the individual or entity who created the Work.
  • "Work" means the copyrightable work of authorship offered under the terms of this License.
  • "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.
  • "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike.

2. Fair Use Rights

Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws.

3. License Grant

Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:

  • to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works;
  • to create and reproduce Derivative Works;
  • to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works;
  • to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works.
  • For the avoidance of doubt, where the work is a musical composition:
    • Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work.
    • Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions).
    • Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions).


The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved.

4. Restrictions

The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:

  • You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(c), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(c), as requested.
  • You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, a later version of this License with the same License Elements as this License, or a Creative Commons iCommons license that contains the same License Elements as this License (e.g. Attribution-ShareAlike 2.5 Japan). You must include a copy of, or the Uniform Resource Identifier for, this License or other license specified in the previous sentence with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License.
  • If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit.

5. Representations, Warranties and Disclaimer

UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

6. Limitation on Liability.

EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. Termination

  • This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
  • Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.

8. Miscellaneous

  • Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
  • Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.
  • If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
  • No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
  • This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.