coneSchema.h
1 //
2 // Copyright 2021 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
25 // This file is generated by a script. Do not edit directly. Edit the
26 // schema.template.h file to make changes.
27 
28 #ifndef PXR_IMAGING_HD_CONE_SCHEMA_H
29 #define PXR_IMAGING_HD_CONE_SCHEMA_H
30 
31 #include "pxr/imaging/hd/api.h"
32 
33 #include "pxr/imaging/hd/schema.h"
34 
35 PXR_NAMESPACE_OPEN_SCOPE
36 
37 //-----------------------------------------------------------------------------
38 
39 #define HDCONE_SCHEMA_TOKENS \
40  (cone) \
41  (height) \
42  (radius) \
43  (axis) \
44  (X) \
45  (Y) \
46  (Z) \
47 
48 TF_DECLARE_PUBLIC_TOKENS(HdConeSchemaTokens, HD_API,
49  HDCONE_SCHEMA_TOKENS);
50 
51 //-----------------------------------------------------------------------------
52 
53 class HdConeSchema : public HdSchema
54 {
55 public:
56  HdConeSchema(HdContainerDataSourceHandle container)
57  : HdSchema(container) {}
58 
59  //ACCESSORS
60 
61  HD_API
62  HdDoubleDataSourceHandle GetHeight();
63  HD_API
64  HdDoubleDataSourceHandle GetRadius();
65  HD_API
66  HdTokenDataSourceHandle GetAxis();
67 
68  // RETRIEVING AND CONSTRUCTING
69 
75  HD_API
76  static HdContainerDataSourceHandle
77  BuildRetained(
78  const HdDoubleDataSourceHandle &height,
79  const HdDoubleDataSourceHandle &radius,
80  const HdTokenDataSourceHandle &axis
81  );
82 
89  class Builder
90  {
91  public:
92  HD_API
93  Builder &SetHeight(
94  const HdDoubleDataSourceHandle &height);
95  HD_API
96  Builder &SetRadius(
97  const HdDoubleDataSourceHandle &radius);
98  HD_API
99  Builder &SetAxis(
100  const HdTokenDataSourceHandle &axis);
101 
103  HD_API
104  HdContainerDataSourceHandle Build();
105 
106  private:
107  HdDoubleDataSourceHandle _height;
108  HdDoubleDataSourceHandle _radius;
109  HdTokenDataSourceHandle _axis;
110  };
111 
117  HD_API
118  static HdConeSchema GetFromParent(
119  const HdContainerDataSourceHandle &fromParentContainer);
120 
123  HD_API
124  static const HdDataSourceLocator &GetDefaultLocator();
125 
126 };
127 
128 PXR_NAMESPACE_CLOSE_SCOPE
129 
130 #endif
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
Definition: coneSchema.h:89
Represents an object that can identify the location of a data source.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:118
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:43