acl/compression/transform_base.h¶
#include "acl/compression/transform_base.h"
The description of the base of a transform track list.
transform_base_desc_t¶
struct transform_base_desc_t
Describes the base of transform tracks: how each sample combines with the base. The transform tracks hold their space, see track_array::get_transform_space. Compression combines each sample with the base first, in the space of the transform tracks. Then it puts the result in object space, where it measures the error. The default value describes transform tracks that have no base.
transform_base_desc_t::format¶
additive_clip_format8 format = additive_clip_format8::none;
How a sample combines with the base, see additive_clip_format8. With none, the clip has no base and tracks must be null.
Defaults to none.
transform_base_desc_t::tracks¶
const track_array* tracks = nullptr;
The base transform tracks (vqvf, vqf, or vqsf). Their transform space must be local. In mesh space, compression puts the base in mesh space with rtm::vqv_mul (the scale of a parent does not shear its children), then it combines each sample with the base in mesh space. In mesh rotation space, compression puts the rotations of the base in mesh space, then it combines each sample with the base: the rotations in mesh space, the translations and scales in local space. The base must have the same transform hierarchy as the clip. The base can have a different transform type and a different number of samples than the clip. A clip sample uses the base sample at the same normalized time, rounded to the nearest sample. Required when format is not none. The caller owns the base.
Defaults to null.
transform_base_desc_t::adapter¶
const itransform_base_adapter_t* adapter = nullptr;
The base adapter that combines each sample with the base, see itransform_base_adapter_t. Required when format is custom, and must be null otherwise. The base adapter receives the base in the transform space of the clip. The legacy error metric (compression_settings::error_metric) does not support it. The caller owns the base adapter.
Defaults to null.
transform_base_desc_t::has_base¶
bool has_base() const
Returns whether or not the clip has a base.
transform_base_desc_t::is_valid¶
error_result is_valid(transform_space_t space) const
Returns whether a base description is valid or not, for a clip in the specified transform space. It is valid if:
- The base format is a valid value
- The mesh rotation space does not use the
relativebase format - With a base format, the base is a valid and non-empty list of transform tracks in local space
- Without a base format, the base is null
- With the
custombase format, the base adapter is not null and its default scale is 0.0 or 1.0 - With another base format, the base adapter is null