Skip to main content

GltfScaleArtifact

Struct GltfScaleArtifact 

Source
#[non_exhaustive]
pub struct GltfScaleArtifact { /* private fields */ }
Expand description

A rewritten glTF/GLB container and the exact locations that changed.

Implementations§

Source§

impl GltfScaleArtifact

Source

pub fn bytes(&self) -> &[u8]

The rewritten container bytes.

Source

pub fn container(&self) -> GltfContainerKind

The container kind, unchanged from the source.

Source

pub fn rewritten_accessors(&self) -> &[usize]

Source accessor indices whose payload was rewritten, ascending and without repeats. One entry per unique accessor index, however many logical uses reach it.

Source

pub fn rewritten_json_pointers(&self) -> &[String]

JSON pointers whose value was rewritten, in lexical order.

Buffer URIs re-encoded during container reassembly are not domain rewrites and are reported by Self::reencoded_buffers instead.

prove_rewritten_artifact checks this list against its own independent scan, so it is evidence rather than an unverified label.

Source

pub fn reencoded_buffers(&self) -> &[usize]

Buffer indices whose data URI was re-encoded, ascending. Empty for a GLB whose only buffer is the BIN chunk.

Source

pub fn affected_source_nodes(&self) -> &[usize]

The affected closure as source-node array indices, ascending.

Reported in the raw glTF index space the operation’s own selectors use — /nodes/{i} — not as normalized animsmith_core::BoneIds. A producer recording which identities an artifact affected must name them in the space the request named, and a consumer holding the original file can resolve these directly against its nodes array. animsmith_core::scale::ScalePlan::affected_nodes reports the same closure in the normalized space; the frontend already proves the two describe one tree before it writes a byte.

For ScaleOperation::RestBindUniformScale this is the closed connected hierarchy of DESIGN.md Appendix D §D.2. For ScaleOperation::WholeDocumentLinearUnits it is every node the source declares, that operation’s closure being the whole document.

Source

pub fn affected_source_skins(&self) -> &[usize]

The affected skins as source-skin array indices, ascending, in the same raw index space as Self::affected_source_nodes.

For ScaleOperation::RestBindUniformScale a skin is affected when at least one of its joints lies inside the closure — which is exactly the condition under which its inverseBindMatrices accessor is rebased in at least one slot. A skin straddling the closure boundary is listed: it is affected, in the slots whose joints are. For ScaleOperation::WholeDocumentLinearUnits it is every skin the source declares.

Source

pub fn declared_factor(&self) -> f64

The factor the caller declared: the conversion factor q for a whole-document conversion, the expected common factor s for a rest/bind reparameterization.

Source

pub fn operation(&self) -> ScaleOperation

The operation that produced this artifact, echoed with the selectors the caller declared.

Reported so a proof can refuse to check a rest/bind artifact against a whole-document plan, or the reverse: the two operations write different domains, and a factor alone does not distinguish them.

Trait Implementations§

Source§

impl Clone for GltfScaleArtifact

Source§

fn clone(&self) -> GltfScaleArtifact

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GltfScaleArtifact

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.