|
|
|
@ -80,8 +80,8 @@ class MAGNUM_EXPORT AbstractImporter: public Corrade::PluginManager::Plugin { |
|
|
|
* @return Whether the file was successfully opened |
|
|
|
* @return Whether the file was successfully opened |
|
|
|
* |
|
|
|
* |
|
|
|
* Closes previous file, if it was opened, and tries to open given |
|
|
|
* Closes previous file, if it was opened, and tries to open given |
|
|
|
* file. See also Feature::OpenFile. Default implementation prints |
|
|
|
* file. See also @ref Feature "Feature::OpenFile". Default |
|
|
|
* message to error output and returns false. |
|
|
|
* implementation prints message to error output and returns false. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
virtual bool open(const std::string& filename); |
|
|
|
virtual bool open(const std::string& filename); |
|
|
|
|
|
|
|
|
|
|
|
@ -90,8 +90,9 @@ class MAGNUM_EXPORT AbstractImporter: public Corrade::PluginManager::Plugin { |
|
|
|
* @param in Input stream |
|
|
|
* @param in Input stream |
|
|
|
* @return Whether the file was successfully opened |
|
|
|
* @return Whether the file was successfully opened |
|
|
|
* |
|
|
|
* |
|
|
|
* See also open(const std::string&), Feature::OpenStream. Default |
|
|
|
* See also open(const std::string&), @ref Feature |
|
|
|
* implementation prints message to error output and returns false. |
|
|
|
* "Feature::OpenStream". Default implementation prints message to |
|
|
|
|
|
|
|
* error output and returns false. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
virtual bool open(std::istream& in); |
|
|
|
virtual bool open(std::istream& in); |
|
|
|
|
|
|
|
|
|
|
|
@ -102,58 +103,58 @@ class MAGNUM_EXPORT AbstractImporter: public Corrade::PluginManager::Plugin { |
|
|
|
* Each function pair provides access to the data. |
|
|
|
* Each function pair provides access to the data. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
/** @brief Scene count */ |
|
|
|
/** @brief %Scene count */ |
|
|
|
virtual inline size_t sceneCount() const { return 0; } |
|
|
|
virtual inline size_t sceneCount() const { return 0; } |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Scene |
|
|
|
* @brief %Scene |
|
|
|
* @param id Scene ID, from range [0, sceneCount()). |
|
|
|
* @param id %Scene ID, from range [0, sceneCount()). |
|
|
|
* |
|
|
|
* |
|
|
|
* Returns pointer to given scene or nullptr, if no such scene exists. |
|
|
|
* Returns pointer to given scene or nullptr, if no such scene exists. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
virtual inline SceneData* scene(size_t id) { return nullptr; } |
|
|
|
virtual inline SceneData* scene(size_t id) { return nullptr; } |
|
|
|
|
|
|
|
|
|
|
|
/** @brief Light count */ |
|
|
|
/** @brief %Light count */ |
|
|
|
virtual inline size_t lightCount() const { return 0; } |
|
|
|
virtual inline size_t lightCount() const { return 0; } |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Light |
|
|
|
* @brief %Light |
|
|
|
* @param id Light ID, from range [0, lightCount()). |
|
|
|
* @param id %Light ID, from range [0, lightCount()). |
|
|
|
* |
|
|
|
* |
|
|
|
* Returns pointer to given light or nullptr, if no such light exists. |
|
|
|
* Returns pointer to given light or nullptr, if no such light exists. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
virtual inline LightData* light(size_t id) { return nullptr; } |
|
|
|
virtual inline LightData* light(size_t id) { return nullptr; } |
|
|
|
|
|
|
|
|
|
|
|
/** @brief Camera count */ |
|
|
|
/** @brief %Camera count */ |
|
|
|
virtual inline size_t cameraCount() const { return 0; } |
|
|
|
virtual inline size_t cameraCount() const { return 0; } |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Camera |
|
|
|
* @brief %Camera |
|
|
|
* @param id Camera ID, from range [0, cameraCount()). |
|
|
|
* @param id %Camera ID, from range [0, cameraCount()). |
|
|
|
* |
|
|
|
* |
|
|
|
* Returns pointer to given camera or nullptr, if no such camera |
|
|
|
* Returns pointer to given camera or nullptr, if no such camera |
|
|
|
* exists. |
|
|
|
* exists. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
virtual inline CameraData* camera(size_t id) { return nullptr; } |
|
|
|
virtual inline CameraData* camera(size_t id) { return nullptr; } |
|
|
|
|
|
|
|
|
|
|
|
/** @brief Object count (without lights and cameras) */ |
|
|
|
/** @brief %Object count */ |
|
|
|
virtual inline size_t objectCount() const { return 0; } |
|
|
|
virtual inline size_t objectCount() const { return 0; } |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Object |
|
|
|
* @brief %Object |
|
|
|
* @param id Object ID, from range [0, objectCount()). |
|
|
|
* @param id %Object ID, from range [0, objectCount()). |
|
|
|
* |
|
|
|
* |
|
|
|
* Returns pointer to given object or nullptr, if no such object |
|
|
|
* Returns pointer to given object or nullptr, if no such object |
|
|
|
* exists. |
|
|
|
* exists. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
virtual inline ObjectData* object(size_t id) { return nullptr; } |
|
|
|
virtual inline ObjectData* object(size_t id) { return nullptr; } |
|
|
|
|
|
|
|
|
|
|
|
/** @brief Mesh count */ |
|
|
|
/** @brief %Mesh count */ |
|
|
|
virtual inline size_t meshCount() const { return 0; } |
|
|
|
virtual inline size_t meshCount() const { return 0; } |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Mesh |
|
|
|
* @brief %Mesh |
|
|
|
* @param id Mesh ID, from range [0, meshCount()). |
|
|
|
* @param id %Mesh ID, from range [0, meshCount()). |
|
|
|
* |
|
|
|
* |
|
|
|
* Returns pointer to given mesh or nullptr, if no such mesh exists. |
|
|
|
* Returns pointer to given mesh or nullptr, if no such mesh exists. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -171,12 +172,12 @@ class MAGNUM_EXPORT AbstractImporter: public Corrade::PluginManager::Plugin { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
virtual inline AbstractMaterialData* material(size_t id) { return nullptr; } |
|
|
|
virtual inline AbstractMaterialData* material(size_t id) { return nullptr; } |
|
|
|
|
|
|
|
|
|
|
|
/** @brief Texture count */ |
|
|
|
/** @brief %Texture count */ |
|
|
|
virtual inline size_t textureCount() const { return 0; } |
|
|
|
virtual inline size_t textureCount() const { return 0; } |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Texture |
|
|
|
* @brief %Texture |
|
|
|
* @param id Texture ID, from range [0, textureCount()). |
|
|
|
* @param id %Texture ID, from range [0, textureCount()). |
|
|
|
* |
|
|
|
* |
|
|
|
* Returns pointer to given texture or nullptr, if no such texture |
|
|
|
* Returns pointer to given texture or nullptr, if no such texture |
|
|
|
* exists. |
|
|
|
* exists. |
|
|
|
@ -188,7 +189,7 @@ class MAGNUM_EXPORT AbstractImporter: public Corrade::PluginManager::Plugin { |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief One-dimensional image |
|
|
|
* @brief One-dimensional image |
|
|
|
* @param id Image ID, from range [0, image1DCount()). |
|
|
|
* @param id %Image ID, from range [0, image1DCount()). |
|
|
|
* |
|
|
|
* |
|
|
|
* Returns pointer to given image or nullptr, if no such image exists. |
|
|
|
* Returns pointer to given image or nullptr, if no such image exists. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -199,7 +200,7 @@ class MAGNUM_EXPORT AbstractImporter: public Corrade::PluginManager::Plugin { |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Two-dimensional image |
|
|
|
* @brief Two-dimensional image |
|
|
|
* @param id Image ID, from range [0, image2DCount()). |
|
|
|
* @param id %Image ID, from range [0, image2DCount()). |
|
|
|
* |
|
|
|
* |
|
|
|
* Returns pointer to given image or nullptr, if no such image exists. |
|
|
|
* Returns pointer to given image or nullptr, if no such image exists. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -210,7 +211,7 @@ class MAGNUM_EXPORT AbstractImporter: public Corrade::PluginManager::Plugin { |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Three-dimensional image |
|
|
|
* @brief Three-dimensional image |
|
|
|
* @param id Image ID, from range [0, image3DCount()). |
|
|
|
* @param id %Image ID, from range [0, image3DCount()). |
|
|
|
* |
|
|
|
* |
|
|
|
* Returns pointer to given image or nullptr, if no such image exists. |
|
|
|
* Returns pointer to given image or nullptr, if no such image exists. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|