Updated D bindings to the latest C headers (aiGetMaterialTextureCount, comments about UTF-8 in aiString).
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@472 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
parent
64168ba975
commit
a5d0829b78
|
@ -579,17 +579,33 @@ extern ( C ) {
|
||||||
) aiGetMaterialString;
|
) aiGetMaterialString;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper function for retrieving a texture from the material.
|
* Get the number of textures for a particular texture type.
|
||||||
|
*
|
||||||
|
* Params:
|
||||||
|
* pMat = Pointer to the input material. May not be NULL
|
||||||
|
* type = Texture type to check for
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* Number of textures for this type.
|
||||||
|
*/
|
||||||
|
uint function( aiMaterial* pMat, aiTextureType type ) aiGetMaterialTextureCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function to get all values pertaining to a particular texture slot
|
||||||
|
* from a material structure.
|
||||||
*
|
*
|
||||||
* This function is provided just for convenience. You could also read the
|
* This function is provided just for convenience. You could also read the
|
||||||
* texture by reading all of its properties manually. This function bundles
|
* texture by parsing all of its properties manually. This function bundles
|
||||||
* all of them in a huge function-monster.
|
* all of them in a huge function monster.
|
||||||
*
|
*
|
||||||
* Params:
|
* Params:
|
||||||
* mat = Pointer to the input material. May not be null.
|
* mat = Pointer to the input material. May not be null.
|
||||||
* type = Specifies the <code>aiTextureType</code> of the texture to be
|
* type = Specifies the texture stack (<code>aiTextureType</code>) to
|
||||||
* retrieved.
|
* read from.
|
||||||
* index = Index of the texture to be retrieved.
|
* index = Index of the texture. The function fails if the requested
|
||||||
|
* index is not available for this texture type.
|
||||||
|
* <code>aiGetMaterialTextureCount()</code> can be used to determine
|
||||||
|
* the number of textures in a particular texture stack.
|
||||||
* path = Receives the output path. null is not a valid value.
|
* path = Receives the output path. null is not a valid value.
|
||||||
* mapping = Recieves the texture mapping mode to be used.
|
* mapping = Recieves the texture mapping mode to be used.
|
||||||
* Pass null if you are not interested in this information.
|
* Pass null if you are not interested in this information.
|
||||||
|
@ -606,7 +622,7 @@ extern ( C ) {
|
||||||
* UV order) or null if you are not interested in this information.
|
* UV order) or null if you are not interested in this information.
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* <code>aiReturn.SUCCESS</code> on success, something else otherwise.
|
* <code>aiReturn.SUCCESS</code> on success, otherwise something else.
|
||||||
*/
|
*/
|
||||||
aiReturn function(
|
aiReturn function(
|
||||||
aiMaterial* mat,
|
aiMaterial* mat,
|
||||||
|
|
|
@ -152,6 +152,7 @@ public:
|
||||||
bind( aiGetMaterialIntegerArray )( "aiGetMaterialIntegerArray" );
|
bind( aiGetMaterialIntegerArray )( "aiGetMaterialIntegerArray" );
|
||||||
bind( aiGetMaterialColor )( "aiGetMaterialColor" );
|
bind( aiGetMaterialColor )( "aiGetMaterialColor" );
|
||||||
bind( aiGetMaterialString )( "aiGetMaterialString" );
|
bind( aiGetMaterialString )( "aiGetMaterialString" );
|
||||||
|
bind( aiGetMaterialTextureCount )( "aiGetMaterialTextureCount" );
|
||||||
bind( aiGetMaterialTexture )( "aiGetMaterialTexture" );
|
bind( aiGetMaterialTexture )( "aiGetMaterialTexture" );
|
||||||
}
|
}
|
||||||
++m_sRefCount;
|
++m_sRefCount;
|
||||||
|
|
|
@ -85,11 +85,24 @@ extern ( C ) {
|
||||||
const size_t MAXLEN = 1024;
|
const size_t MAXLEN = 1024;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a string, zero byte terminated.
|
* Represents an UTF-8 string, zero byte terminated.
|
||||||
*
|
*
|
||||||
* The length of such a string is limited to <code>MAXLEN</code> characters
|
* The length of such a string is limited to <code>MAXLEN</code> bytes
|
||||||
* (excluding the terminal \0).
|
* (excluding the terminal \0).
|
||||||
*
|
*
|
||||||
|
* The character set of an aiString is explicitly defined to be UTF-8. This
|
||||||
|
* Unicode transformation was chosen in the belief that most strings in 3d
|
||||||
|
* model files are limited to ASCII characters, thus the character set
|
||||||
|
* needed to be ASCII compatible.
|
||||||
|
*
|
||||||
|
* Most text file loaders provide proper Unicode input file handling,
|
||||||
|
* special unicode characters are correctly transcoded to UTF-8 and are kept
|
||||||
|
* throughout the libraries' import pipeline.
|
||||||
|
*
|
||||||
|
* For most applications, it will be absolutely sufficient to interpret the
|
||||||
|
* aiString as ASCII data and work with it as one would work with a plain
|
||||||
|
* char[].
|
||||||
|
*
|
||||||
* To access an aiString from D you might want to use something like the
|
* To access an aiString from D you might want to use something like the
|
||||||
* following piece of code:
|
* following piece of code:
|
||||||
* ---
|
* ---
|
||||||
|
@ -101,6 +114,10 @@ extern ( C ) {
|
||||||
struct aiString {
|
struct aiString {
|
||||||
/**
|
/**
|
||||||
* Length of the string (excluding the terminal \0).
|
* Length of the string (excluding the terminal \0).
|
||||||
|
*
|
||||||
|
* This is <em>not</em> the logical length of strings containing UTF-8
|
||||||
|
* multibyte sequences, but the number of bytes from the beginning of the
|
||||||
|
* string to its end.
|
||||||
*/
|
*/
|
||||||
size_t length;
|
size_t length;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue