OmegaEngine API
1.0.3
|
A mesh loaded from an .X file. More...
Public Member Functions | |
override void | HoldReference () |
Increments the ReferenceCount by one. | |
override void | ReleaseReference () |
Decrements the ReferenceCount by one. | |
Public Member Functions inherited from OmegaEngine.Assets.Asset | |
override string | ToString () |
void | Dispose () |
Disposes the internal DirectX resources of this asset. More... | |
Static Public Member Functions | |
static XMesh | Get (Engine engine, string id) |
Returns a cached XMesh or creates a new one if the requested ID is not cached. More... | |
Public Attributes | |
readonly XMaterial [] | Materials |
Materials (diffuse/normal/height/specular map, lighting settings) associated with the mesh More... | |
Mesh | Mesh => _mesh |
Protected Member Functions | |
XMesh (Engine engine, Stream stream, string meshName) | |
Loads a static mesh from an .X file. More... | |
override void | Dispose (bool disposing) |
To be called by IDisposable.Dispose and the object destructor. More... | |
Properties | |
BoundingSphere | BoundingSphere [get, protected set] |
A bounding sphere surrounding this mesh More... | |
BoundingBox | BoundingBox [get, protected set] |
A bounding box surrounding this mesh More... | |
Properties inherited from OmegaEngine.Assets.Asset | |
string | Name [get, set] |
The filename More... | |
int | ReferenceCount [get] |
How many Renderables use this asset More... | |
bool | Disposed [get] |
Was this asset already disposed? More... | |
Properties inherited from NanoByte.Common.INamed< Asset > | |
string | Name |
A mesh loaded from an .X file.
|
inlineprotected |
Loads a static mesh from an .X file.
engine | The Engine providing rendering capabilities. |
stream | The .X file to load the mesh from. |
meshName | The name of the mesh. This is used for finding associated textures. |
InvalidDataException | stream does not contain a valid mesh. |
This should only be called by Get to prevent unnecessary duplicates.
|
inlineprotectedvirtual |
To be called by IDisposable.Dispose and the object destructor.
disposing | true if called manually and not by the garbage collector. |
Reimplemented from OmegaEngine.Assets.Asset.
Returns a cached XMesh or creates a new one if the requested ID is not cached.
engine | The Engine providing the cache and rendering capabilities. |
id | The ID of the asset to be returned. |
null
if id was empty.FileNotFoundException | The specified file could not be found. |
IOException | There was an error reading the file. |
UnauthorizedAccessException | Read access to the file is not permitted. |
InvalidDataException | The file does not contain a valid mesh. |
Remember to call CacheManager.Clean when done, otherwise this object will never be released.
readonly XMaterial [] OmegaEngine.Assets.XMesh.Materials |
Materials (diffuse/normal/height/specular map, lighting settings) associated with the mesh
|
getprotected set |
A bounding box surrounding this mesh
|
getprotected set |
A bounding sphere surrounding this mesh