HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HUSD_MirrorRootLayer.h
Go to the documentation of this file.
1 /*
2  * Copyright 2019 Side Effects Software Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
18 #ifndef __HUSD_MirrorRootLayer_h__
19 #define __HUSD_MirrorRootLayer_h__
20 
21 #include "HUSD_API.h"
22 #include <UT/UT_Matrix4.h>
23 #include <UT/UT_StringHolder.h>
24 #include <UT/UT_UniquePtr.h>
25 #include <pxr/pxr.h>
26 
28 
30 
32 
33 // This class contains content that should be copied to the root layer of a
34 // mirrored HUSD_Datahandle. This is separate from teh HUSD_Overrides session
35 // layers, because those can be enabled or disabled by user preference. The
36 // data in this layer must always exist, and is makes sense to allow it to be
37 // overridden by the data in the HUSD_Overrides, so we put it into the root
38 // layer of the mirrored stage.
39 //
40 // For now this root layer holds the USD camera primitive used when free
41 // tumbling in the viewport. This camera can either be a default camera or
42 // a reference to an existing camera, with modifications to the transforms.
44 {
45 public:
48 
49  void clear();
50  PXR_NS::XUSD_MirrorRootLayerData &data() const;
51 
53  {
54  public:
56  fpreal myFocalLength = 50.0;
57  fpreal myHAperture = 41.4214;
58  fpreal myHApertureOffset = 0.0;
59  fpreal myVAperture = 41.4214;
60  fpreal myVApertureOffset = 0.0;
61  fpreal myNearClip = 0.1;
62  fpreal myFarClip = 10000.0;
63  bool myIsOrtho = false;
64  bool mySetCamParms = true;
65  bool mySetCropParms = false;
66  };
67 
68  // Configure a USD camera primitive for use in the viewport.
69  void createViewportCamera(
70  const UT_StringRef &refcamera,
71  const CameraParms &camparms);
72 
73 private:
75 };
76 
77 #endif
78 
#define HUSD_API
Definition: HUSD_API.h:32
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:33
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1346
fpreal64 fpreal
Definition: SYS_Types.h:277
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:83