PVRAssets Structs#

AnimationData::InternalData#

Nested Relationships#

This struct is a nested type of AnimationData.

Struct Documentation#

struct InternalData

Raw internal structure of the Animation.

Public Functions

inline InternalData()

Constructor. Initializing.

Public Members

uint32_t flags

Stores which animation arrays are stored.

std::vector<uint32_t> positionIndices

Index to positions.

std::vector<uint32_t> rotationIndices

Index to rotations.

std::vector<uint32_t> scaleIndices

Index to scales.

std::vector<uint32_t> matrixIndices

Index to matrices.

uint32_t numFrames

The number of frames of animation.

std::string animationName

The name of the animation.

std::vector<float> timeInSeconds

The time is seconds at which the animation occurs.

std::vector<KeyFrameData> keyFrames

Specifies key frame animation data.

float durationTime

Total durration time of this animation.

AnimationInstance#

Nested Relationships#

Nested Types#

Struct Documentation#

struct AnimationInstance#

A specific instance of an animation.

Public Functions

inline AnimationInstance()#

Constructor.

inline float getTotalTimeInMs() const#

Retrieves the time in milli seconds at which the animation will occur.

Returns

The time in milli seconds at which the animation will occur

inline float getTotalTimeInSec() const#

Retrieves the time in seconds at which the animation will occur.

Returns

The time in seconds at which the animation will occur

void updateAnimation(float timeInMs)#

update animation

Parameters

timeInMs – The time in milli seconds to set for the animation

Public Members

class AnimationData *animationData#

Animation data.

std::vector<KeyframeChannel> keyframeChannels#

Key frame data.

struct KeyframeChannel#

Key frame channels.

Public Functions

inline KeyframeChannel()#

Constructor.

Public Members

std::vector<void*> nodes#

Nodes of the animation.

uint32_t keyFrame#

keyframe (Scale/ Rotate/ Translate)

AnimationInstance::KeyframeChannel#

Nested Relationships#

This struct is a nested type of AnimationInstance.

Struct Documentation#

struct KeyframeChannel

Key frame channels.

Public Functions

inline KeyframeChannel()

Constructor.

Public Members

std::vector<void*> nodes

Nodes of the animation.

uint32_t keyFrame

keyframe (Scale/ Rotate/ Translate)

Camera::InternalData#

Nested Relationships#

This struct is a nested type of Camera.

Nested Types#

Struct Documentation#

struct InternalData

Raw internal structure of the Camera.

Public Functions

inline InternalData()

Default constructor.

Public Members

int32_t targetNodeIdx

Index of the target object.

float farClip

Far clip plane.

float nearClip

Near clip plane.

std::vector<FovAnimationData> fovs

A list of field of view values to use.

struct FovAnimationData

Contains perframe fov data.

Public Members

float timeInSec

Frame time in seconds.

float fov

Fov.

InternalData::FovAnimationData#

Nested Relationships#

This struct is a nested type of Camera::InternalData.

Struct Documentation#

struct FovAnimationData

Contains perframe fov data.

Public Members

float timeInSec

Frame time in seconds.

float fov

Fov.

KeyFrameData#

Struct Documentation#

struct KeyFrameData#

Represents an Animation that can be applied to different objects.

Public Types

enum class InterpolationType : uint32_t#

Specifies the type of interpolation to use between neighbouring frames of animation data.

Values:

enumerator Step#
enumerator Linear#
enumerator CubicSpline#

Public Members

std::vector<float> timeInSeconds#

The time in seconds at which the key frame takes plcae.

std::vector<glm::vec3> scale#

Scaling matrix.

std::vector<glm::quat> rotate#

Rotation matrix.

std::vector<glm::vec3> translation#

Translation matrix.

std::vector<glm::mat4> mat4#

Matrix data - note that this is only currently used by POD.

InterpolationType interpolation = InterpolationType::Step#

The interpolation used.

Light::InternalData#

Nested Relationships#

This struct is a nested type of Light.

Struct Documentation#

struct InternalData

Raw internal structure of the Light.

Public Functions

inline InternalData()

Public Members

int32_t spotTargetNodeIdx

Index of the target object

glm::vec3 color

Light color (0.0f -> 1.0f for each channel)

LightType type

Light type (point, directional, spot etc.)

float constantAttenuation

Constant attenuation

float linearAttenuation

Linear attenuation

float quadraticAttenuation

Quadratic attenuation

float falloffAngle

Falloff angle (in radians)

float falloffExponent

Falloff exponent

Mesh::InternalData#

Nested Relationships#

This struct is a nested type of Mesh.

Struct Documentation#

struct InternalData

Raw internal structure of the Mesh.

Public Functions

inline InternalData()

Default constructor.

Public Members

std::map<StringHash, FreeValue> semantics

Container that stores semantic values.

VertexAttributeContainer vertexAttributes

Contains information on the vertices, such as semantic names, strides etc.

std::vector<StridedBuffer> vertexAttributeDataBlocks

Contains the actual raw data (as in, the bytes of information)

uint32_t numBones

Faces information.

FaceData faces

Faces information.

MeshInfo primitiveData

Primitive data information.

int32_t skeleton

Skeleton identifier.

glm::mat4x4 unpackMatrix

This matrix is used to move from an int16_t representation to a float.

std::shared_ptr<void> userDataPtr

This is a pointer that is in complete control of the user, used for per-mesh data.

Mesh::MeshInfo#

Nested Relationships#

This struct is a nested type of Mesh.

Struct Documentation#

struct MeshInfo

Contains mesh information.

Public Functions

inline MeshInfo()

Constructor.

Public Members

uint32_t numVertices

Number of vertices in this mesh.

uint32_t numFaces

Number of faces in this mesh.

std::vector<uint32_t> stripLengths

If triangle strips exist, the length of each. Otherwise empty.

uint32_t numPatchSubdivisions

Number of Patch subdivisions.

uint32_t numPatches

Number of Patches.

uint32_t numControlPointsPerPatch

Number of Control points per patch.

float units

Scaling of the units.

PrimitiveTopology primitiveType

Type of primitive in this Mesh.

bool isIndexed

Contains indices (as opposed to being a flat list of vertices)

bool isSkinned

Contains indices (as opposed to being a flat list of vertices)

glm::vec3 min

The minimum vertex.

glm::vec3 max

The maximum vertex.

Model::InternalData#

Nested Relationships#

This struct is a nested type of Model.

Struct Documentation#

struct InternalData

Struct containing the internal data of the Model.

Public Functions

inline InternalData()

Constructor. Initializing to empty.

Public Members

std::map<StringHash, FreeValue> semantics

Store of the semantics.

float clearColor[3]

Background color.

float ambientColor[3]

Ambient color.

std::vector<Mesh> meshes

Mesh array. Any given mesh can be referenced by multiple Nodes.

std::vector<Camera> cameras

Camera array. Any given mesh can be referenced by multiple Nodes.

std::vector<Light> lights

Light array. Any given mesh can be referenced by multiple Nodes.

std::vector<Texture> textures

Textures in this Model.

std::vector<Material> materials

Materials in this Model.

std::vector<Node> nodes

Nodes array. The nodes are sorted thus: First Mesh Nodes, then Light Nodes, then Camera nodes.

std::vector<Skeleton> skeletons

Skeleton array.

std::vector<AnimationData> animationsData

Animation data.

std::vector<AnimationInstance> animationInstances

Animation instance data.

uint32_t numMeshNodes

Number of items in the nodes array which are Meshes.

uint32_t numLightNodes

Number of items in the nodes array which are Meshes.

uint32_t numCameraNodes

Number of items in the nodes array which are Meshes.

uint32_t numFrames

Number of frames of animation.

float currentFrame

Current frame in the animation.

float FPS

The frames per second the animation should be played at.

UInt8Buffer userData

Custom raw data stored by the user.

float units

Unit scaling.

uint32_t flags

Flags.

std::shared_ptr<void> userDataPtr

Can be used to store any kind of data that the user wraps in a std::shared_ptr resource.

Material::InternalData#

Nested Relationships#

This struct is a nested type of Model::Material.

Struct Documentation#

struct InternalData

Raw internal structure of the Material.

Public Members

std::map<StringHash, FreeValue> materialSemantics

storage for the per-material semantics

std::map<StringHash, uint32_t> textureIndices

Map of texture (semantic) names to indexes.

StringHash name

Name of the material.

StringHash effectFile

Effect filename if using an effect.

StringHash effectName

Effect name (in the filename) if using an effect.

UInt8Buffer userData

Raw user data.

Node::InternalData#

Nested Relationships#

This struct is a nested type of Model::Node.

Struct Documentation#

struct InternalData

Raw internal structure of the Node.

Public Types

enum TransformFlags

Transformation flags.

Values:

enumerator Identity

Transformation Identity.

enumerator Scale

Transformation has Scale.

enumerator Rotate

Transformation has Rotation.

enumerator Translate

Transformation has Translation.

enumerator SRT

SRT.

enumerator Matrix

has matrix

Public Functions

inline glm::vec3 &getFrameScaleAnimation()

Get current frame scale animation.

Returns

Returns scale

inline glm::quat &getFrameRotationAnimation()

Get current frame rotation animation.

Returns

Returns rotation

inline glm::vec3 &getFrameTranslationAnimation()

Get current frame translation animation.

Returns

Returns translation

inline const glm::vec3 &getFrameScaleAnimation() const

Get current frame scale animation (const)

Returns

Returns scale

inline const glm::quat &getFrameRotationAnimation() const

Get current frame rotation animation (const)

Returns

Returns rotation

inline const glm::vec3 &getFrameTranslationAnimation() const

Get current frame translation animation (const)

Returns

Returns rotation

inline glm::vec3 &getScale()

Get local space scale.

Returns

Returns local space scale<returns>

inline glm::quat &getRotate()

Get local space rotation.

Returns

Returns local space rotation<returns>

inline glm::vec3 &getTranslation()

Get local space translation.

Returns

Returns local space translation<returns>

inline const glm::vec3 &getScale() const

Get local space scale.

Returns

Returns local space scale<returns>

inline const glm::quat &getRotate() const

Get local space rotation.

Returns

Returns local space rotation<returns>

inline const glm::vec3 &getTranslation() const

Get local space translation.

Returns

Returns local space translation<returns>

inline InternalData()

Default constructor.

Public Members

StringHash name

Name of object.

uint32_t objectIndex

Index into mesh, light or camera array, depending on which object list contains this Node.

uint32_t materialIndex

Index of material used on this mesh.

uint32_t parentIndex

Index into Node array; recursively apply ancestor’s transforms after this instance’s.

UInt8Buffer userData

Optionally, user data.

float frameTransform[16]

contains interpolated SRT or Matrix for an frame else single Matrix for non animated node. Rotations are stored as quaternion in the format xyzw

glm::vec3 scale

Node’s local space scale.

glm::quat rotation

Node’s local space rotation.

glm::vec3 translation

Node’s local space translation.

uint32_t transformFlags

keep an flag whether the transformation data is stored as SRT or Matrix or Identity.

int32_t skin

Skin index for mesh nodes.

bool hasAnimation

Has animation data.

Skeleton#

Struct Documentation#

struct Skeleton#

The skeleton structure encapsulates all that which is required to define a skeleton including name, a set of bones and matrices for transformations.

Public Members

std::string name#

The name of the skeleton.

std::vector<uint32_t> bones#

A list of bones in the skeleton.

std::vector<glm::mat4> invBindMatrices#

Matrices used for animating the skeleton.

IndexedArray::DictionaryEntry#

Nested Relationships#

This struct is a nested type of IndexedArray.

Struct Documentation#

struct DictionaryEntry#

Public Functions

inline DictionaryEntry()#
inline DictionaryEntry(const IndexType_ &key, const ValueType_ &value)#

Public Members

ValueType_ value#
IndexType_ key#

IndexedArray::StorageItem_#

Nested Relationships#

This struct is a nested type of IndexedArray.

Inheritance Relationships#

Base Type#

  • public pvr::IndexedArray< ValueType_, IndexType_ >::DictionaryEntry

Struct Documentation#

struct StorageItem_ : public pvr::IndexedArray<ValueType_, IndexType_>::DictionaryEntry#

Public Functions

inline StorageItem_()#
inline StorageItem_(const IndexType_ &key, const ValueType_ &value)#

Public Members

bool isUnused#

ShadowVolume::ShadowVolumeData#

Nested Relationships#

This struct is a nested type of ShadowVolume.

Struct Documentation#

struct ShadowVolumeData#

Public Functions

inline ShadowVolumeData()#
inline ~ShadowVolumeData()#

Public Members

char *indexData#
uint32_t numIndices#

Volume::VolumeEdge#

Nested Relationships#

This struct is a nested type of Volume.

Struct Documentation#

struct VolumeEdge

Represents an edge.

Public Members

uint32_t vertexIndices[2]

The indexes of the two vertices of the edge.

uint32_t visibilityFlags

Flags.

Volume::VolumeMesh#

Nested Relationships#

This struct is a nested type of Volume.

Struct Documentation#

struct VolumeMesh

Preprocessed data needed to create volumes out of a mesh.

Public Functions

inline VolumeMesh()

Default constructor for a volume mesh.

Public Members

glm::vec3 *vertices

A pointer to a list of vertices making up the volume.

VolumeEdge *edges

A pointer to a list of edges between vertices.

VolumeTriangle *triangles

A pointer to a list of triangles making up the volume.

glm::vec3 minimum

The minimum vertex.

glm::vec3 maximum

The maximum vertex.

uint32_t numVertices

The number of vertices making up the volume.

uint32_t numEdges

The number of edges making up the volume.

uint32_t numTriangles

The number of triangles making up the volume.

uint8_t *vertexData

Vertex data.

bool needs32BitIndices

Specifies whether 32 bit indicies are required.

Volume::VolumeTriangle#

Nested Relationships#

This struct is a nested type of Volume.

Struct Documentation#

struct VolumeTriangle

Represents an face (triangle).

Public Members

uint32_t vertexIndices[3]

The indexes of the three vertices of the triangle.

uint32_t edgeIndices[3]

The indexes of the three vertices of the three edges of the triangle.

glm::vec3 normal

The normal of the triangle.

int32_t winding

The winding of the triangle (clockwise / counterclockwise)