HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HUSD_LayerOffset.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_LayerOffset_h__
19 #define __HUSD_LayerOffset_h__
20 
21 #include "HUSD_API.h"
22 #include <SYS/SYS_Types.h>
23 
25 {
26 public:
27  explicit HUSD_LayerOffset(
28  fpreal64 offset = 0.0,
29  fpreal64 scale = 1.0)
30  : myOffset(offset),
31  myScale(scale)
32  { }
33 
34  fpreal64 offset() const
35  { return myOffset; }
37  { myOffset = offset; }
38  fpreal64 scale() const
39  { return myScale; }
41  { myScale = scale; }
42 
43  bool operator==(const HUSD_LayerOffset &other) const;
44  bool isIdentity() const;
45  bool isValid() const;
46  HUSD_LayerOffset inverse() const;
47 
48 private:
49  fpreal64 myOffset;
50  fpreal64 myScale;
51 };
52 
53 #endif
54 
void setScale(fpreal64 scale)
#define HUSD_API
Definition: HUSD_API.h:32
bool isIdentity(const MatType &m)
Determine if a matrix is an identity matrix.
Definition: Mat.h:860
double fpreal64
Definition: SYS_Types.h:201
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
GA_API const UT_StringHolder scale
GLintptr offset
Definition: glcorearb.h:665
fpreal64 offset() const
HUSD_LayerOffset(fpreal64 offset=0.0, fpreal64 scale=1.0)
void setOffset(fpreal64 offset)
fpreal64 scale() const