//
// 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_IMAGING_HD_BACK_PLATE_SCHEMA_H
#define PXR_IMAGING_HD_BACK_PLATE_SCHEMA_H

/// \file

#include "pxr/imaging/hd/api.h"
#include "pxr/imaging/hd/schemaTypeDefs.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 HD_BACK_PLATE_SCHEMA_TOKENS \
    (backPlate) \
    (scaleTweak) \
    (rotateXYZTweak) \
    (translateTweak) \
    (image) \
    (alphaImage) \
    (depthImage) \
    (depthMinOffset) \
    (depthNormalizingFactor) \
    (depthCameraSpaceOffset) \
    (lumaGain) \
    (lumaGamma) \
    (lumaLift) \
    (plateVisibility) \
    (all) \
    (solo) \
    (none) \

TF_DECLARE_PUBLIC_TOKENS(HdBackPlateSchemaTokens, HD_API,
    HD_BACK_PLATE_SCHEMA_TOKENS);

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


/// \class HdBackPlateSchema
///
/// The HdBackPlateSchema specifies a container that will hold "back plate"
/// data. This data is parallel to the properties defined in
/// UsdGeomBackPlateAPI and more details can be found at usdGeom/backPlateAPI.h
///
class HdBackPlateSchema : public HdSchema
{
public:
    /// \name Schema retrieval
    /// @{

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

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

    /// @}

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

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

    HD_API
    HdVec2fDataSourceHandle GetScaleTweak() const;

    HD_API
    HdVec3fDataSourceHandle GetRotateXYZTweak() const;

    HD_API
    HdVec3fDataSourceHandle GetTranslateTweak() const;

    HD_API
    HdAssetPathDataSourceHandle GetImage() const;

    HD_API
    HdAssetPathDataSourceHandle GetAlphaImage() const;

    HD_API
    HdAssetPathDataSourceHandle GetDepthImage() const;

    HD_API
    HdFloatDataSourceHandle GetDepthMinOffset() const;

    HD_API
    HdFloatDataSourceHandle GetDepthNormalizingFactor() const;

    HD_API
    HdFloatDataSourceHandle GetDepthCameraSpaceOffset() const;

    HD_API
    HdVec3fDataSourceHandle GetLumaGain() const;

    HD_API
    HdVec3fDataSourceHandle GetLumaGamma() const;

    HD_API
    HdVec3fDataSourceHandle GetLumaLift() const;

    HD_API
    HdTokenDataSourceHandle GetPlateVisibility() const; 

    /// @}

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

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

    /// @} 

    /// \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.
    HD_API
    static HdContainerDataSourceHandle
    BuildRetained(
        const HdVec2fDataSourceHandle &scaleTweak,
        const HdVec3fDataSourceHandle &rotateXYZTweak,
        const HdVec3fDataSourceHandle &translateTweak,
        const HdAssetPathDataSourceHandle &image,
        const HdAssetPathDataSourceHandle &alphaImage,
        const HdAssetPathDataSourceHandle &depthImage,
        const HdFloatDataSourceHandle &depthMinOffset,
        const HdFloatDataSourceHandle &depthNormalizingFactor,
        const HdFloatDataSourceHandle &depthCameraSpaceOffset,
        const HdVec3fDataSourceHandle &lumaGain,
        const HdVec3fDataSourceHandle &lumaGamma,
        const HdVec3fDataSourceHandle &lumaLift,
        const HdTokenDataSourceHandle &plateVisibility
    );

    /// \class HdBackPlateSchema::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:
        HD_API
        Builder &SetScaleTweak(
            const HdVec2fDataSourceHandle &scaleTweak);
        HD_API
        Builder &SetRotateXYZTweak(
            const HdVec3fDataSourceHandle &rotateXYZTweak);
        HD_API
        Builder &SetTranslateTweak(
            const HdVec3fDataSourceHandle &translateTweak);
        HD_API
        Builder &SetImage(
            const HdAssetPathDataSourceHandle &image);
        HD_API
        Builder &SetAlphaImage(
            const HdAssetPathDataSourceHandle &alphaImage);
        HD_API
        Builder &SetDepthImage(
            const HdAssetPathDataSourceHandle &depthImage);
        HD_API
        Builder &SetDepthMinOffset(
            const HdFloatDataSourceHandle &depthMinOffset);
        HD_API
        Builder &SetDepthNormalizingFactor(
            const HdFloatDataSourceHandle &depthNormalizingFactor);
        HD_API
        Builder &SetDepthCameraSpaceOffset(
            const HdFloatDataSourceHandle &depthCameraSpaceOffset);
        HD_API
        Builder &SetLumaGain(
            const HdVec3fDataSourceHandle &lumaGain);
        HD_API
        Builder &SetLumaGamma(
            const HdVec3fDataSourceHandle &lumaGamma);
        HD_API
        Builder &SetLumaLift(
            const HdVec3fDataSourceHandle &lumaLift);
        HD_API
        Builder &SetPlateVisibility(
            const HdTokenDataSourceHandle &plateVisibility);

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

    private:
        HdVec2fDataSourceHandle _scaleTweak;
        HdVec3fDataSourceHandle _rotateXYZTweak;
        HdVec3fDataSourceHandle _translateTweak;
        HdAssetPathDataSourceHandle _image;
        HdAssetPathDataSourceHandle _alphaImage;
        HdAssetPathDataSourceHandle _depthImage;
        HdFloatDataSourceHandle _depthMinOffset;
        HdFloatDataSourceHandle _depthNormalizingFactor;
        HdFloatDataSourceHandle _depthCameraSpaceOffset;
        HdVec3fDataSourceHandle _lumaGain;
        HdVec3fDataSourceHandle _lumaGamma;
        HdVec3fDataSourceHandle _lumaLift;
        HdTokenDataSourceHandle _plateVisibility;

    };

    /// Returns token data source for use as plateVisibility value.
    ///
    /// The following values will be stored statically and reused for future
    /// calls:
    /// - HdBackPlateSchemaTokens->all
    /// - HdBackPlateSchemaTokens->solo
    /// - HdBackPlateSchemaTokens->none
    HD_API
    static HdTokenDataSourceHandle BuildPlateVisibilityDataSource(
        const TfToken &plateVisibility);

    /// @}
};

PXR_NAMESPACE_CLOSE_SCOPE

#endif