DX::IDXModelProperties Struct Reference
#include <IDXModelProperties.h>
Inherits DX::IDXModelOwned, and DX::IDXUserData.
List of all members.
Detailed Description
IDXModelProperties contains script, metres per unit, and any number of default object properties.
Member Function Documentation
virtual DXError DXMCALL DX::IDXModelProperties::AddProperty |
( |
const char * |
id, |
|
|
const char * |
type, |
|
|
IDXObjectPropPtr * |
out = 0 | |
|
) |
| | [pure virtual] |
Add a property to this model.
- Parameters:
-
| id | The ID of the new property. eg = "dynamicShadowCast" |
| type | The type of the new propery. eg = "bool" |
| out | An optional pointer to an IDXObjectPropPtr where a pointer will be stored. |
- Returns:
- Error_NullParam if id was null.
Error_NullParam if type was null.
Error_Success if the property was added.
virtual void DXMCALL DX::IDXModelProperties::ClearProperties |
( |
|
) |
[pure virtual] |
virtual float DXMCALL DX::IDXModelProperties::GetMetresPerUnit |
( |
|
) |
const [pure virtual] |
The current MPU for this model. This is a way of scaling the model.
- Returns:
- The current meters per unit.
virtual uint DXMCALL DX::IDXModelProperties::GetNumProperties |
( |
|
) |
const [pure virtual] |
Get the number of properties that are on this model.
- Returns:
- The number of properties.
virtual DXError DXMCALL DX::IDXModelProperties::GetProperty |
( |
const char * |
id, |
|
|
IDXObjectPropPtr * |
out | |
|
) |
| | const [pure virtual] |
Get the property at the specified index.
- Parameters:
-
| index | The index of the property to retrieve. |
| out | A pointer to an IDXObjectPropPtr to store the result in. |
- Returns:
- Error_NullParam if out was null.
Error_NullParam2 if id was null.
Error_NotFound if there was no prop with the id.
Error_Success if the property was stored in out.
virtual DXError DXMCALL DX::IDXModelProperties::GetProperty |
( |
uint |
index, |
|
|
IDXObjectPropPtr * |
out | |
|
) |
| | const [pure virtual] |
Get the property at the specified index.
- Parameters:
-
| index | The index of the property to retrieve. |
| out | A pointer to an IDXObjectPropPtr to store the result in. |
- Returns:
- Error_NullParam if out was null.
Error_OutOfRange if index was invalid.
Error_Success if the property was stored in out.
virtual DXError DXMCALL DX::IDXModelProperties::GetScript |
( |
const char ** |
out |
) |
const [pure virtual] |
Get the default script that is attached to this model
- Parameters:
-
| out | A pointer to a const char* which will receive the script. |
- Returns:
- Error_NullParam if out was null.
Error_NotFound if there was no script on this model.
Error_Success if the result was stored in out
virtual DXError DXMCALL DX::IDXModelProperties::RemoveProperty |
( |
const char * |
id |
) |
[pure virtual] |
Remove the property with the specified id.
- Parameters:
-
| id | The id of the property to remove. |
- Returns:
- Error_NullParam if id was null.
Error_NotFound if there was no property with that id .
Error_Success if the property was removed.
virtual DXError DXMCALL DX::IDXModelProperties::RemoveProperty |
( |
uint |
start, |
|
|
uint |
count | |
|
) |
| | [pure virtual] |
Remove a range of properties.
- Parameters:
-
| start | The index of the first element to remove. |
| count | The number of elements to remove. |
- Returns:
- Error_OutOfRange if start was out of range.
Error_Success if the range was removed.
virtual DXError DXMCALL DX::IDXModelProperties::RemoveProperty |
( |
IDXObjectPropPtr |
property |
) |
[pure virtual] |
Remove the specified property.
- Parameters:
-
| property | The IDXObjectPropPtr to remove. |
- Returns:
- Error_NullParam if property was null.
Error_NotFound if the property was not found.
Error_Success if the property was removed.
virtual DXError DXMCALL DX::IDXModelProperties::RemoveProperty |
( |
uint |
index |
) |
[pure virtual] |
Remove the property at the specified index.
- Parameters:
-
| index | The index of the property to remove. |
- Returns:
- Error_OutOfRange if index was out of range.
Error_Success if the property was removed.
virtual DXError DXMCALL DX::IDXModelProperties::RemoveScript |
( |
|
) |
[pure virtual] |
Remove the script attached to this mesh.
- Returns:
- Error_NotFound if there was no script on this mesh to remove.
Error_Success if the script was removed.
virtual DXError DXMCALL DX::IDXModelProperties::SetMetresPerUnit |
( |
float |
value |
) |
[pure virtual] |
Set the metres per unit value for the model. This must be positive.
- Parameters:
-
- Returns:
- Error_InvalidParam if value was negative.
Error_Success if the meters per unit was updated.
virtual DXError DXMCALL DX::IDXModelProperties::SetScript |
( |
const char * |
script |
) |
[pure virtual] |
Set the default script for this model. This will overwrite the current script.
- Parameters:
-
| script | Character string containing the new script. |
- Returns:
- Error_NullParam if script was null.
Error_Success if the script was set.