HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
smoothNormals.h
Go to the documentation of this file.
1
//
2
// Copyright 2016 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_SMOOTH_NORMALS_H
8
#define PXR_IMAGING_HD_SMOOTH_NORMALS_H
9
10
#include "
pxr/pxr.h
"
11
#include "
pxr/imaging/hd/api.h
"
12
#include "
pxr/imaging/hd/types.h
"
13
14
#include "
pxr/base/gf/vec3d.h
"
15
#include "
pxr/base/gf/vec3f.h
"
16
17
PXR_NAMESPACE_OPEN_SCOPE
18
19
20
class
Hd_VertexAdjacency
;
21
22
/// \class Hd_SmoothNormals
23
///
24
/// Hd_SmoothNormals encapsulates mesh smooth normals information.
25
/// It uses passed-in adjacency information and points data to compute
26
/// smooth per-vertex normals. It does this by averaging face normals of
27
/// faces surrounding a vertex.
28
///
29
class
Hd_SmoothNormals
final
30
{
31
public
:
32
/// Computes the smooth normals result using the supplied adjacency
33
/// information and points data. Returns an array of the same size and
34
/// type as the source points, with optional packing.
35
HD_API
36
static
VtArray<GfVec3f>
ComputeSmoothNormals
(
37
Hd_VertexAdjacency
const
* adjacency,
38
int
numPoints,
39
GfVec3f
const
* pointsPtr);
40
HD_API
41
static
VtArray<GfVec3d>
ComputeSmoothNormals
(
42
Hd_VertexAdjacency
const
* adjacency,
43
int
numPoints,
44
GfVec3d
const
* pointsPtr);
45
HD_API
46
static
VtArray<HdVec4f_2_10_10_10_REV>
ComputeSmoothNormalsPacked
(
47
Hd_VertexAdjacency
const
* adjacency,
48
int
numPoints,
49
GfVec3f
const
* pointsPtr);
50
HD_API
51
static
VtArray<HdVec4f_2_10_10_10_REV>
ComputeSmoothNormalsPacked
(
52
Hd_VertexAdjacency
const
* adjacency,
53
int
numPoints,
54
GfVec3d
const
* pointsPtr);
55
56
private
:
57
Hd_SmoothNormals
() =
delete
;
58
~
Hd_SmoothNormals
() =
delete
;
59
};
60
61
62
PXR_NAMESPACE_CLOSE_SCOPE
63
64
#endif // PXR_IMAGING_HD_SMOOTH_NORMALS_H
Hd_SmoothNormals
Definition:
smoothNormals.h:29
GfVec3f
Definition:
vec3f.h:45
api.h
HD_API
#define HD_API
Definition:
api.h:23
Hd_VertexAdjacency
Definition:
vertexAdjacency.h:58
types.h
pxr.h
Hd_SmoothNormals::ComputeSmoothNormals
static HD_API VtArray< GfVec3f > ComputeSmoothNormals(Hd_VertexAdjacency const *adjacency, int numPoints, GfVec3f const *pointsPtr)
VtArray< GfVec3f >
PXR_NAMESPACE_OPEN_SCOPE
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition:
path.h:1425
vec3d.h
Hd_SmoothNormals::ComputeSmoothNormalsPacked
static HD_API VtArray< HdVec4f_2_10_10_10_REV > ComputeSmoothNormalsPacked(Hd_VertexAdjacency const *adjacency, int numPoints, GfVec3f const *pointsPtr)
GfVec3d
Definition:
vec3d.h:45
PXR_NAMESPACE_CLOSE_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition:
pxr.h:74
vec3f.h
pxr
imaging
hd
smoothNormals.h
Generated on Wed Aug 27 2025 03:07:55 for HDK by
1.8.6