All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
flatNormals.h
1//
2// Copyright 2018 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_IMAGING_HD_FLAT_NORMALS_H
8#define PXR_IMAGING_HD_FLAT_NORMALS_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hd/api.h"
12
13#include "pxr/imaging/hd/types.h"
14
15#include "pxr/base/gf/vec3d.h"
16#include "pxr/base/gf/vec3f.h"
17
18PXR_NAMESPACE_OPEN_SCOPE
19
20
21class HdMeshTopology;
22
30class Hd_FlatNormals final
31{
32public:
36 HD_API
37 static VtArray<GfVec3f> ComputeFlatNormals(
38 HdMeshTopology const * topology,
39 GfVec3f const * pointsPtr);
40 HD_API
41 static VtArray<GfVec3d> ComputeFlatNormals(
42 HdMeshTopology const * topology,
43 GfVec3d const * pointsPtr);
44 HD_API
45 static VtArray<HdVec4f_2_10_10_10_REV> ComputeFlatNormalsPacked(
46 HdMeshTopology const * topology,
47 GfVec3f const * pointsPtr);
48 HD_API
49 static VtArray<HdVec4f_2_10_10_10_REV> ComputeFlatNormalsPacked(
50 HdMeshTopology const * topology,
51 GfVec3d const * pointsPtr);
52
53private:
54 Hd_FlatNormals() = delete;
55 ~Hd_FlatNormals() = delete;
56};
57
58
59PXR_NAMESPACE_CLOSE_SCOPE
60
61#endif // PXR_IMAGING_HD_FLAT_NORMALS_H
Basic type for a vector of 3 double components.
Definition: vec3d.h:46
Basic type for a vector of 3 float components.
Definition: vec3f.h:46
Topology data for meshes.
Definition: meshTopology.h:38
Represents an arbitrary dimensional rectangular container class.
Definition: array.h:211