PVRAssets Functions#
pvr::assets::readGLTF#
Defined in GltfReader.h
Function Documentation#
-
::pvr::assets::Model pvr::assets::readGLTF(const ::pvr::Stream &stream, const IAssetProvider &assetProvider)#
pvr::assets::readGLTF#
Defined in GltfReader.h
Function Documentation#
-
void pvr::assets::readGLTF(const ::pvr::Stream &stream, const IAssetProvider &assetProvider, ::pvr::assets::Model &outModel)#
pvr::assets::getCameraHandle#
Defined in Model.h
Function Documentation#
-
inline CameraHandle pvr::assets::getCameraHandle(ModelHandle model, uint32_t cameraId)#
Create a Reference Counted Handle to a Camera from a Model. The handle provided works as any other std::shared_ptr smart pointer, and uses the “shared ref count” feature that allows the created CameraHandle to use the Model’s reference count (e.g. if the Camera is copied, the Model’s reference count increases, and if all references to the Model are released, the Model will be kept alive by this reference.
pvr::assets::getNodeHandle#
Defined in Model.h
Function Documentation#
-
inline NodeHandle pvr::assets::getNodeHandle(ModelHandle model, uint32_t nodeId)#
Create a Reference Counted Handle to a Node from a Model. The handle provided works as any other std::shared_ptr smart pointer, and uses the “shared ref count” feature that allows the created NodeHandle to use the Model’s reference count (e.g. if the Node is copied, the Model’s reference count increases, and if all references to the Model are released, the Model will be kept alive by this reference.
- Parameters
model – The model to whom the Node we will create the handle for belongs
nodeId – The ID of the Node inside model
- Returns
A Node Handle to the Node. It shares the ref counting of model
pvr::assets::loadModel#
Defined in Helper.h
Function Documentation#
-
pvr::assets::ModelHandle pvr::assets::loadModel(const IAssetProvider &app, const pvr::Stream &model)#
Load a model file using the provided scene file name.
- Parameters
app – An asset provider used to load the model file
modelFile –
- Returns
Returns a successfully created pvr::assets::ModelHandle object otherwise will throw
pvr::assets::readPOD#
Defined in PODReader.h
Function Documentation#
pvr::assets::getLightHandle#
Defined in Model.h
Function Documentation#
-
inline LightHandle pvr::assets::getLightHandle(ModelHandle model, uint32_t lightId)#
Create a Reference Counted Handle to a Light from a Model. The handle provided works as any other std::shared_ptr smart pointer, and uses the “shared ref count” feature that allows the created LightHandle to use the Model’s reference count (e.g. if the Light is copied, the Model’s reference count increases, and if all references to the Model are released, the Model will be kept alive by this reference.
pvr::assets::readPOD#
Defined in PODReader.h
Function Documentation#
pvr::assets::getMaterialHandle#
Defined in Model.h
Function Documentation#
-
inline MaterialHandle pvr::assets::getMaterialHandle(ModelHandle model, uint32_t materialId)#
Create a Reference Counted Handle to a Material from a Model. The handle provided works as any other std::shared_ptr smart pointer, and uses the “shared ref count” feature that allows the created MaterialHandle to use the Model’s reference count (e.g. if the Material is copied, the Model’s reference count increases, and if all references to the Model are released, the Model will be kept alive by this reference.
- Parameters
model – The model to whom the material we will create the handle for belongs
materialId – The ID of the material inside model
- Returns
A MaterialHandle to the Material. It shares the ref counting of model </returns
pvr::assets::isPOD#
Defined in PODReader.h
Function Documentation#
pvr::assets::loadModel#
Defined in Helper.h
Function Documentation#
-
pvr::assets::ModelHandle pvr::assets::loadModel(const IAssetProvider &app, const std::string &modelFile)#
Load a model file using the provided scene file name.
- Parameters
app – An asset provider used to load the model file
modelFile –
- Returns
Returns a successfully created pvr::assets::ModelHandle object otherwise will throw
pvr::assets::getMeshHandle#
Defined in Model.h
Function Documentation#
-
inline MeshHandle pvr::assets::getMeshHandle(ModelHandle model, uint32_t meshId)#
Create a Reference Counted Handle to a Mesh from a Model. The handle provided works as any other std::shared_ptr smart pointer, and uses the “shared ref count” feature that allows the created MeshHandle to use the Model’s reference count (e.g. if the Mesh is copied, the Model’s reference count increases, and if all references to the Model are released, the Model will be kept alive by this reference.
- Parameters
model – The model to whom the mesh we will create the handle for belongs
meshId – The ID of the meshId inside model
- Returns
A MeshHandle to the Mesh. It shares the ref counting of model </returns
pvr::assets::utils::getBoundingBox#
Defined in BoundingBox.h
Function Documentation#
-
inline math::AxisAlignedBox pvr::assets::utils::getBoundingBox(const Mesh &mesh)#
Return bounding box of a mesh.
It will be assumed that Vertex Position is a vec3 and has the semantic “POSITION”.
- Parameters
mesh – A mesh from which to get the bounding box of
- Returns
Axis-aligned bounding box
pvr::assets::utils::getBoundingBox#
Defined in BoundingBox.h
Function Documentation#
-
inline math::AxisAlignedBox pvr::assets::utils::getBoundingBox(const Model &model)#
Return bounding box of a model.
It will be assumed that Vertex Position is a vec3 and has the semantic “POSITION”.
- Parameters
model – A model from which to get the bounding box of. All meshes will be considered.
- Returns
Axis-aligned bounding box
pvr::assets::utils::getBoundingBox#
Defined in BoundingBox.h
Function Documentation#
-
inline math::AxisAlignedBox pvr::assets::utils::getBoundingBox(const Mesh &mesh, const char *positionSemanticName)#
Return bounding box of a mesh.
It will be assumed that Vertex Position is a vec3.
- Parameters
mesh – A mesh from which to get the bounding box of
positionSemanticName – Position attribute semantic name
- Returns
Axis-aligned bounding box
pvr::assets::utils::getBoundingBox#
Defined in BoundingBox.h
Function Documentation#
-
inline math::AxisAlignedBox pvr::assets::utils::getBoundingBox(const char *data, size_t stride_bytes, size_t offset_bytes, size_t size_bytes)#
Return bounding box from vertex data.
- Parameters
data – Vertex data
stride_bytes – Vertex stride in bytes
offset_bytes – Offset to the vertex data
size_bytes – Data size
- Returns
The Axis-aligned bounding box of the data
pvr::tool::createSkyBox#
Defined in Geometry.h
Function Documentation#
-
inline void pvr::tool::createSkyBox(float scale, bool adjustUV, uint32_t textureSize, std::vector<glm::vec3> &outVertices, std::vector<glm::vec2> &outUVs)#
Create a Skybox vertices and UVs for a specified texture size.
- Parameters
scale – scale the vertices
adjustUV –
textureSize – size of the texture
outVertices – array of generated vertices
outUVs – array of generated UVs
pvr::tool::impl::setUV#
Defined in Geometry.h
Function Documentation#
-
static inline void pvr::tool::impl::setUV(glm::vec2 &uv, float u, float v)#
pvr::tool::impl::setVertex#
Defined in Geometry.h
Function Documentation#
-
static inline void pvr::tool::impl::setVertex(glm::vec3 &vertex, float x, float y, float z)#
pvr::assets::helper::getTextureNameWithExtension#
Defined in Helper.h
Function Documentation#
-
void pvr::assets::helper::getTextureNameWithExtension(std::string &textureName, bool astcSupported)#
Change a texture name to have .astc or .pvr extension depending on whether .astc format is supported or not.
param name=”astcSupported”>flag to know whether astc is supported
- Parameters
textureName – Texture name to analyse
pvr::assets::helper::getModelFormatFromFilename#
Defined in Helper.h
Function Documentation#
-
pvr::assets::ModelFileFormat pvr::assets::helper::getModelFormatFromFilename(const std::string &modelFile)#
Retrieves the model definition type using the extension of the given filename.
- Parameters
modelFile – The name of the model file to use for determining its model file format
pvr::assets::helper::VertexIndexRead#
Defined in Helper.h
Function Documentation#
pvr::assets::helper::VertexRead#
Defined in Helper.h