Merge pull request #1279 from Squareys/update-docs
Update docs (Logging, Preamble Copyright and embedded Textures)pull/1110/merge
commit
b84de79219
|
@ -3,12 +3,12 @@
|
||||||
Open Asset Import Library (assimp)
|
Open Asset Import Library (assimp)
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
Copyright (c) 2006-2012, assimp team
|
Copyright (c) 2006-2017, assimp team
|
||||||
|
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use of this software in source and binary forms,
|
Redistribution and use of this software in source and binary forms,
|
||||||
with or without modification, are permitted provided that the following
|
with or without modification, are permitted provided that the following
|
||||||
conditions are met:
|
conditions are met:
|
||||||
|
|
||||||
* Redistributions of source code must retain the above
|
* Redistributions of source code must retain the above
|
||||||
|
@ -25,16 +25,16 @@ conditions are met:
|
||||||
derived from this software without specific prior
|
derived from this software without specific prior
|
||||||
written permission of the assimp team.
|
written permission of the assimp team.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
29
doc/dox.h
29
doc/dox.h
|
@ -453,7 +453,7 @@ by calling it as a singleton with the requested logging-type. To see how this wo
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
||||||
// Create a logger instance
|
// Create a logger instance
|
||||||
DefaultLogger::create("",Logger::VERBOSE);
|
DefaultLogger::create("", Logger::VERBOSE);
|
||||||
|
|
||||||
// Now I am ready for logging my stuff
|
// Now I am ready for logging my stuff
|
||||||
DefaultLogger::get()->info("this is my info-call");
|
DefaultLogger::get()->info("this is my info-call");
|
||||||
|
@ -472,22 +472,9 @@ Just derivate your own logger from the abstract base class LogStream and overwri
|
||||||
|
|
||||||
@code
|
@code
|
||||||
// Example stream
|
// Example stream
|
||||||
class myStream :
|
class myStream : public LogStream
|
||||||
public LogStream
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
|
||||||
myStream()
|
|
||||||
{
|
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
// Destructor
|
|
||||||
~myStream()
|
|
||||||
{
|
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
// Write womethink using your own functionality
|
// Write womethink using your own functionality
|
||||||
void write(const char* message)
|
void write(const char* message)
|
||||||
{
|
{
|
||||||
|
@ -496,10 +483,10 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
// Select the kinds of messages you want to receive on this log stream
|
// Select the kinds of messages you want to receive on this log stream
|
||||||
const unsigned int severity = Logger::DEBUGGING|Logger::INFO|Logger::ERR|Logger::WARN;
|
const unsigned int severity = Logger::Debugging|Logger::Info|Logger::Err|Logger::Warn;
|
||||||
|
|
||||||
// Attaching it to the default logger
|
// Attaching it to the default logger
|
||||||
Assimp::DefaultLogger::get()->attachStream( new myStream(), severity );
|
Assimp::DefaultLogger::get()->attachStream( new myStream, severity );
|
||||||
|
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
|
@ -512,10 +499,10 @@ flag set:
|
||||||
@code
|
@code
|
||||||
|
|
||||||
unsigned int severity = 0;
|
unsigned int severity = 0;
|
||||||
severity |= Logger::DEBUGGING;
|
severity |= Logger::Debugging;
|
||||||
|
|
||||||
// Detach debug messages from you self defined stream
|
// Detach debug messages from you self defined stream
|
||||||
Assimp::DefaultLogger::get()->attachStream( new myStream(), severity );
|
Assimp::DefaultLogger::get()->attachStream( new myStream, severity );
|
||||||
|
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
|
@ -743,6 +730,8 @@ need them at all.
|
||||||
Normally textures used by assets are stored in separate files, however,
|
Normally textures used by assets are stored in separate files, however,
|
||||||
there are file formats embedding their textures directly into the model file.
|
there are file formats embedding their textures directly into the model file.
|
||||||
Such textures are loaded into an aiTexture structure.
|
Such textures are loaded into an aiTexture structure.
|
||||||
|
For embedded textures, the value of `AI_MATKEY_TEXTURE(textureType, index)` will be `*<index>` where
|
||||||
|
`<index>` is the index of the texture in aiScene::mTextures.
|
||||||
<br>
|
<br>
|
||||||
There are two cases:
|
There are two cases:
|
||||||
<br>
|
<br>
|
||||||
|
@ -930,7 +919,7 @@ All material key constants start with 'AI_MATKEY' (it's an ugly macro for histor
|
||||||
<td><tt>TEXTURE(t,n)</tt></td>
|
<td><tt>TEXTURE(t,n)</tt></td>
|
||||||
<td>aiString</td>
|
<td>aiString</td>
|
||||||
<td>n/a</td>
|
<td>n/a</td>
|
||||||
<td>Defines the path to the n'th texture on the stack 't', where 'n' is any value >= 0 and 't' is one of the #aiTextureType enumerated values.</td>
|
<td>Defines the path of the n'th texture on the stack 't', where 'n' is any value >= 0 and 't' is one of the #aiTextureType enumerated values. Either a filepath or `*<index>`, where `<index>` is the index of an embedded texture in aiScene::mTextures.</td>
|
||||||
<td>See the 'Textures' section above.</td>
|
<td>See the 'Textures' section above.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue