Blender V4.3
hydra/mesh.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2022 NVIDIA Corporation
2 * SPDX-FileCopyrightText: 2022 Blender Foundation
3 *
4 * SPDX-License-Identifier: Apache-2.0 */
5
6#pragma once
7
8#include "hydra/config.h"
9#include "hydra/geometry.h"
10
11#include <pxr/imaging/hd/mesh.h>
12#include <pxr/imaging/hd/meshUtil.h>
13
15
16class HdCyclesMesh final : public HdCyclesGeometry<PXR_NS::HdMesh, CCL_NS::Mesh> {
17 public:
18 HdCyclesMesh(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
PXR_NS::HdDirtyBits GetInitialDirtyBitsMask() const override
HdCyclesMesh(const PXR_NS::SdfPath &rprimId, const PXR_NS::SdfPath &instancerId={})
void Finalize(PXR_NS::HdRenderParam *renderParam) override
~HdCyclesMesh() override
#define HDCYCLES_NAMESPACE_CLOSE_SCOPE