//
// Copyright 2023 Pixar
//
// Licensed under the terms set forth in the LICENSE.txt file available at
// https://openusd.org/license.
//
////////////////////////////////////////////////////////////////////////

/* ************************************************************************** */
/* **                                                                      ** */
/* ** This file is generated by a script.                                  ** */
/* **                                                                      ** */
/* ** Do not edit it directly (unless it is within a CUSTOM CODE section)! ** */
/* ** Edit hdSchemaDefs.py instead to make changes.                        ** */
/* **                                                                      ** */
/* ************************************************************************** */

#ifndef PXR_USD_IMAGING_USD_IMAGING_GEOM_XFORM_VECTORS_SCHEMA_H
#define PXR_USD_IMAGING_USD_IMAGING_GEOM_XFORM_VECTORS_SCHEMA_H

/// \file

#include "pxr/usdImaging/usdImaging/api.h"

#include "pxr/imaging/hd/schema.h"

// --(BEGIN CUSTOM CODE: Includes)--
// --(END CUSTOM CODE: Includes)--

PXR_NAMESPACE_OPEN_SCOPE

// --(BEGIN CUSTOM CODE: Declares)--
// --(END CUSTOM CODE: Declares)--

#define USD_IMAGING_GEOM_XFORM_VECTORS_SCHEMA_TOKENS \
    (geomXformVectors) \
    (translation) \
    (rotation) \
    (rotationOrder) \
    (scale) \
    (pivot) \

TF_DECLARE_PUBLIC_TOKENS(UsdImagingGeomXformVectorsSchemaTokens, USDIMAGING_API,
    USD_IMAGING_GEOM_XFORM_VECTORS_SCHEMA_TOKENS);

//-----------------------------------------------------------------------------


/// \class UsdImagingGeomXformVectorsSchema
///
/// The UsdImagingGeomXformVectorsSchema exposes the result of
/// UsdGeomXformCommonAPI::GetXformVectorsByAccumulation(). This is a
/// decomposition of the USD transformation operations that includes more
/// information than is available in the xform matrix value, such as the pivot
/// offset. This schema is intended for read-only access to data stored in USD;
/// it is otherwise inert and does not participate in or imply any subsequent
/// computations.
///
class UsdImagingGeomXformVectorsSchema : public HdSchema
{
public:
    /// \name Schema retrieval
    /// @{

    UsdImagingGeomXformVectorsSchema(HdContainerDataSourceHandle container)
      : HdSchema(container) {}

    /// Retrieves a container data source with the schema's default name token
    /// "geomXformVectors" from the parent container and constructs a
    /// UsdImagingGeomXformVectorsSchema instance.
    /// Because the requested container data source may not exist, the result
    /// should be checked with IsDefined() or a bool comparison before use.
    USDIMAGING_API
    static UsdImagingGeomXformVectorsSchema GetFromParent(
        const HdContainerDataSourceHandle &fromParentContainer);

    /// @}

// --(BEGIN CUSTOM CODE: Schema Methods)--
// --(END CUSTOM CODE: Schema Methods)--

    /// \name Member accessor
    /// @{

    USDIMAGING_API
    HdVec3dDataSourceHandle GetTranslation() const;

    USDIMAGING_API
    HdVec3fDataSourceHandle GetRotation() const;

    USDIMAGING_API
    HdTokenDataSourceHandle GetRotationOrder() const;

    USDIMAGING_API
    HdVec3fDataSourceHandle GetScale() const;

    USDIMAGING_API
    HdVec3fDataSourceHandle GetPivot() const; 

    /// @}

    /// \name Schema location
    /// @{

    /// Returns a token where the container representing this schema is found in
    /// a container by default.
    USDIMAGING_API
    static const TfToken &GetSchemaToken();

    /// Returns an HdDataSourceLocator (relative to the prim-level data source)
    /// where the container representing this schema is found by default.
    USDIMAGING_API
    static const HdDataSourceLocator &GetDefaultLocator();

    /// @} 

    /// \name Schema construction
    /// @{

    /// \deprecated Use Builder instead.
    ///
    /// Builds a container data source which includes the provided child data
    /// sources. Parameters with nullptr values are excluded. This is a
    /// low-level interface. For cases in which it's desired to define
    /// the container with a sparse set of child fields, the Builder class
    /// is often more convenient and readable.
    USDIMAGING_API
    static HdContainerDataSourceHandle
    BuildRetained(
        const HdVec3dDataSourceHandle &translation,
        const HdVec3fDataSourceHandle &rotation,
        const HdTokenDataSourceHandle &rotationOrder,
        const HdVec3fDataSourceHandle &scale,
        const HdVec3fDataSourceHandle &pivot
    );

    /// \class UsdImagingGeomXformVectorsSchema::Builder
    /// 
    /// Utility class for setting sparse sets of child data source fields to be
    /// filled as arguments into BuildRetained. Because all setter methods
    /// return a reference to the instance, this can be used in the "builder
    /// pattern" form.
    class Builder
    {
    public:
        USDIMAGING_API
        Builder &SetTranslation(
            const HdVec3dDataSourceHandle &translation);
        USDIMAGING_API
        Builder &SetRotation(
            const HdVec3fDataSourceHandle &rotation);
        USDIMAGING_API
        Builder &SetRotationOrder(
            const HdTokenDataSourceHandle &rotationOrder);
        USDIMAGING_API
        Builder &SetScale(
            const HdVec3fDataSourceHandle &scale);
        USDIMAGING_API
        Builder &SetPivot(
            const HdVec3fDataSourceHandle &pivot);

        /// Returns a container data source containing the members set thus far.
        USDIMAGING_API
        HdContainerDataSourceHandle Build();

    private:
        HdVec3dDataSourceHandle _translation;
        HdVec3fDataSourceHandle _rotation;
        HdTokenDataSourceHandle _rotationOrder;
        HdVec3fDataSourceHandle _scale;
        HdVec3fDataSourceHandle _pivot;

    };

    /// @}
};

PXR_NAMESPACE_CLOSE_SCOPE

#endif