[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### C.1.12 Interface Changes

#### ``iDocument'` Changes

The `iDocument::Parse()` method now accepts an optional argument indicating whether or not extraneous whitespace in ``CS_NODE_TEXT'` nodes should be condensed. Most implementations of ``iDocument'` will attempt to respect this option if possible. For implementations where it does not make sense, the option will be ignored.

Previously, XML-based implementations of the ``iDocument'` interface condensed whitespace in ``CS_NODE_TEXT'` nodes at `Parse()` time. This is no longer the case. Whitespace is now preserved by default. If the new behavior is unsuitable for your case, use the new argument to `iDocument::Parse()` to indicate that whitespace should be condensed. This change was made in order to conform to the latest XML specification which states that XML scanners must preserve whitespace by default. Consult the following documents for more information regarding this issue.

http://www.w3.org/TR/REC-xml/#sec-white-space
http://www.xml.com/axml/notes/AllWSAlways.html

#### Mesh Factory Changes

The mesh factory interfaces (``iGeneralFactoryState'`, ``iHazeFactoryState'`, ``iInstancingFactoryState'`, ``iLightningFactoryState'`, ``iSprite2DFactoryState'`, ``iThingFactoryState'` and ``iSprite3DFactoryState'` no longer have the following methods. Use the methods with same name from ``iMeshObjectFactory'` instead:

- `SetMaterialWrapper()`
- `GetMaterialWrapper()`
- `SetMixMode()`
- `GetMixMode()`

#### ``iGeneralMeshState'`, ``iRainState'`, ``iInstancingMeshState'` Changes

From ``iGeneralMeshState'`, ``iInstancingMeshState'`, ``iRainState'` and ``iParticle'` the following methods have been removed. Use the methods with the same name from ``iMeshObject'` instead.

- `SetColor()`
- `GetColor()`
- `SetMaterialWrapper()`
- `GetMaterialWrapper()`
- `SetMixMode()`
- `GetMixMode()`
- `GetRenderMeshes()`

#### ``iImage'` Changes

The ``iImage'` interface has been reduced to a level where it merely serves as a container for pixel data; however, the image editing functionality was only relocated, not removed.

Forbidding direct manipulation of an ``iImage'`'s pixel data has the following consequences:

- The `Clone()` function was removed. The ``csImageMemory'` class provides a constructor that copies the pixel data from another ``iImage'` object, providing a functionality equal to `Clone()`.
- To edit the pixel data of an image, create a clone of an image (e.g. a ``csImageMemory'` as mentioned above) and manipulate the data in the newly cerated instance.
- If the image data is needed in another format, as the `SetFormat()` call has been removed from the interface.
- The image editing functionality found in methods such as `Rescale()`, `Sharpen()` was moved into the ``csImageManipulate'` class.
- The `CopyXXX()` method that copied an image into another are now provided by ``csImageMemory'`.

As a side-effect of these changes, the ``csImageFile'` and ``csImageMemory'` were merged and the former removed.

#### `iImageIO::Load()` Parameter Change

`iImageIO::Load()` now requires the image source data in an ``iDataBuffer'` object, instead of separate ``buffer'` and ``size'` parameters.

#### ``iLight'` Changes

The ``iLight'` and its implementation (``csLight'`) have been extended to also handle spot- and directional-lights. Note that the accual computation of lighting does not yet support these, however the engine can now store and handle the required data.

There have also been two smaller changes to the interface to make it more coherent. The influence radius have been renamed cut-off distance, and thus the methods `GetInfluenceRadius()` and `SetInfluenceRadius()` have been renamed accordingly to `GetCutoffDistance()` and `SetCutoffDistance()`, respectively. Also, `SetAttenuation()` has been renamed to `SetAttenuationMode()` in order to avoid confusion with other similary named methods. For the `CS_ATTN_LINEAR` attenuation type the specification has changed slightly. As a default, the distance where light goes out is same as the cut-off distance, but this can be changed by altering the first attenuation constant. See comments in ``CS/include/iengine/light.h'` for exact details of the different attenuation modes.

#### ``iParticleState'` Changes

From ``iParticleState'`, the following methods have been removed. Use the methods with the same name from ``iMeshObject'` instead.

- `SetColor()`
- `GetColor()`
- `SetMaterialWrapper()`
- `GetMaterialWrapper()`

#### ``iMaterialList'` Change

The function `iMaterialList::NewMaterial()` now needs an additional name parameter. It is not recommended to change the name later.

#### ``iObjectModel'` Change

The function ``iObjectModel::GetObjectBoundingBox()'` only has one parameter now. The optional ``type'` parameter has been removed as it was not implemented anywhere. In addition to that the constants `CS_BBOX_NORMAL`, `CS_BBOX_ACCURATE`, and `CS_BBOX_MAX` are also removed.

#### ``iSprite3DState'` Changes

Some methods from ``iSprite3DState'` have been removed that basically provided functionality which was also already available through ``iMeshObject'`:

- `SetBaseColor()`. Use `SetColor()` from ``iMeshObject'`.
- `GetBaseColor()`. Use `GetColor()` from ``iMeshObject'`.

Likewise, the `GetFactory()` method has been removed from ``iThingState'`. Equivalent functionality can be achieved by using `GetFactory()` from ``iMeshObject'` and querying the returned object for the ``iThingFactoryState'` interface. Example:

      csRef<iThingFactoryState> thing_fact_state =
      	scfQueryInterface<iThingFactoryState> (mesh->GetMeshObject ()
    	->GetFactory ());

#### `iTextureManager::FreeImages()` Removal

`iTextureManager::FreeImages()` has been removed. It was used to release the ``iImage'` objects associated with textures with the purpose of freeing up memory. This happens automatically now; the images associated with a texture are released by the renderer as soon as the image data is converted into the internal texture format (that is, uploaded to the graphics hardware).

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ]

This document was generated using texi2html 1.76.