Blender  V3.3
hydra/mesh.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: Apache-2.0
2  * Copyright 2022 NVIDIA Corporation
3  * Copyright 2022 Blender Foundation */
4 
5 #pragma once
6 
7 #include "hydra/config.h"
8 #include "hydra/geometry.h"
9 
10 #include <pxr/imaging/hd/mesh.h>
11 #include <pxr/imaging/hd/meshUtil.h>
12 
14 
15 class HdCyclesMesh final : public HdCyclesGeometry<PXR_NS::HdMesh, CCL_NS::Mesh> {
16  public:
18  const PXR_NS::SdfPath &rprimId
19 #if PXR_VERSION < 2102
20  ,
21  const PXR_NS::SdfPath &instancerId = {}
22 #endif
23  );
24  ~HdCyclesMesh() override;
25 
26  PXR_NS::HdDirtyBits GetInitialDirtyBitsMask() const override;
27 
28  void Finalize(PXR_NS::HdRenderParam *renderParam) override;
29 
30  private:
31  PXR_NS::HdDirtyBits _PropagateDirtyBits(PXR_NS::HdDirtyBits bits) const override;
32 
33  void Populate(PXR_NS::HdSceneDelegate *sceneDelegate,
34  PXR_NS::HdDirtyBits dirtyBits,
35  bool &rebuild) override;
36 
37  void PopulatePoints(PXR_NS::HdSceneDelegate *sceneDelegate);
38  void PopulateNormals(PXR_NS::HdSceneDelegate *sceneDelegate);
39 
40  void PopulatePrimvars(PXR_NS::HdSceneDelegate *sceneDelegate);
41 
42  void PopulateTopology(PXR_NS::HdSceneDelegate *sceneDelegate);
43 
44  PXR_NS::HdMeshUtil _util;
45  PXR_NS::HdMeshTopology _topology;
46  PXR_NS::VtIntArray _primitiveParams;
47 };
48 
#define final(a, b, c)
Definition: BLI_hash.h:21
PXR_NS::HdDirtyBits GetInitialDirtyBitsMask() const override
Definition: hydra/mesh.cpp:101
HdCyclesMesh(const PXR_NS::SdfPath &rprimId, const PXR_NS::SdfPath &instancerId={})
Definition: hydra/mesh.cpp:81
void Finalize(PXR_NS::HdRenderParam *renderParam) override
Definition: hydra/mesh.cpp:516
~HdCyclesMesh() override
Definition: hydra/mesh.cpp:97
#define HDCYCLES_NAMESPACE_CLOSE_SCOPE
Definition: hydra/config.h:17