update headers

This commit is contained in:
Nick Fisher
2022-12-05 17:51:44 +08:00
parent 58942ba94d
commit e0f9cfbde6
234 changed files with 62619 additions and 9800 deletions

View File

@@ -20,6 +20,12 @@
#include <utils/compiler.h>
#include <utils/Entity.h>
#include <filament/Box.h>
namespace filament {
class MaterialInstance;
}
namespace filament::gltfio {
class Animator;
@@ -29,7 +35,7 @@ class FilamentAsset;
* \class FilamentInstance FilamentInstance.h gltfio/FilamentInstance.h
* \brief Provides access to a hierarchy of entities that have been instanced from a glTF asset.
*
* Every entity has a filament::TransformManager component, and some entities also have \c Name or
* Every entity has a TransformManager component, and some entities also have \c Name or
* \c Renderable components.
*
* \see AssetLoader::createInstancedAsset()
@@ -39,7 +45,7 @@ public:
/**
* Gets the owner of this instance.
*/
FilamentAsset* getAsset() const noexcept;
FilamentAsset const* getAsset() const noexcept;
/**
* Gets the list of entities in this instance, one for each glTF node. All of these have a
@@ -63,6 +69,16 @@ public:
*/
void applyMaterialVariant(size_t variantIndex) noexcept;
/**
* Returns the number of material variants in the asset.
*/
size_t getMaterialVariantCount() const noexcept;
/**
* Returns the name of the given material variant, or null if it is out of bounds.
*/
const char* getMaterialVariantName(size_t variantIndex) const noexcept;
/**
* Returns the animation engine for the instance.
*
@@ -74,6 +90,76 @@ public:
* The animator is owned by the asset and should not be manually deleted.
*/
Animator* getAnimator() noexcept;
/**
* Gets the number of skins.
*/
size_t getSkinCount() const noexcept;
/**
* Gets the skin name at skin index.
*/
const char* getSkinNameAt(size_t skinIndex) const noexcept;
/**
* Gets the number of joints at skin index.
*/
size_t getJointCountAt(size_t skinIndex) const noexcept;
/**
* Gets joints at skin index.
*/
const utils::Entity* getJointsAt(size_t skinIndex) const noexcept;
/**
* Attaches the given skin to the given node, which must have an associated mesh with
* BONE_INDICES and BONE_WEIGHTS attributes.
*
* This is a no-op if the given skin index or target is invalid.
*/
void attachSkin(size_t skinIndex, utils::Entity target) noexcept;
/**
* Detaches the given skin from the given node.
*
* This is a no-op if the given skin index or target is invalid.
*/
void detachSkin(size_t skinIndex, utils::Entity target) noexcept;
/**
* Resets the AABB on all renderables by manually computing the bounding box.
*
* THIS IS ONLY USEFUL FOR MALFORMED ASSETS THAT DO NOT HAVE MIN/MAX SET UP CORRECTLY.
*
* Does not affect the return value of getBoundingBox() on the owning asset.
* Cannot be called after releaseSourceData() on the owning asset.
* Can only be called after loadResources() or asyncBeginLoad().
*/
void recomputeBoundingBoxes();
/**
* Gets the axis-aligned bounding box from the supplied min / max values in glTF accessors.
*
* If recomputeBoundingBoxes() has been called, then this returns the recomputed AABB.
*/
Aabb getBoundingBox() const noexcept;
/** Gets all material instances. These are already bound to renderables. */
const MaterialInstance* const* getMaterialInstances() const noexcept;
/** Gets all material instances (non-const). These are already bound to renderables. */
MaterialInstance* const* getMaterialInstances() noexcept;
/** Gets the number of materials returned by getMaterialInstances(). */
size_t getMaterialInstanceCount() const noexcept;
/**
* Releases ownership of material instances.
*
* This makes the client take responsibility for destroying MaterialInstance
* objects. The getMaterialInstances query becomes invalid after detachment.
*/
void detachMaterialInstances();
};
} // namespace filament::gltfio