Blender V5.3
instancer.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
10#include <pxr/base/gf/matrix4d.h>
11#include <pxr/base/gf/vec3f.h>
12#include <pxr/base/gf/vec4f.h>
13#include <pxr/base/vt/array.h>
14#include <pxr/imaging/hd/instancer.h>
15
17
18class HdCyclesInstancer final : public PXR_NS::HdInstancer {
19 public:
20 HdCyclesInstancer(PXR_NS::HdSceneDelegate *delegate, const PXR_NS::SdfPath &instancerId);
22
23 void Sync(PXR_NS::HdSceneDelegate *sceneDelegate,
24 PXR_NS::HdRenderParam *renderParam,
25 PXR_NS::HdDirtyBits *dirtyBits) override;
26
27 PXR_NS::VtMatrix4dArray ComputeInstanceTransforms(const PXR_NS::SdfPath &prototypeId);
28
29 private:
30 void SyncPrimvars();
31
32 PXR_NS::VtVec3fArray _translate;
33 PXR_NS::VtVec4fArray _rotate;
34 PXR_NS::VtVec3fArray _scale;
35 PXR_NS::VtMatrix4dArray _instanceTransform;
36};
37
#define final(a, b, c)
Definition BLI_hash_c.hh:21
void Sync(PXR_NS::HdSceneDelegate *sceneDelegate, PXR_NS::HdRenderParam *renderParam, PXR_NS::HdDirtyBits *dirtyBits) override
Definition instancer.cpp:28
HdCyclesInstancer(PXR_NS::HdSceneDelegate *delegate, const PXR_NS::SdfPath &instancerId)
Definition instancer.cpp:21
PXR_NS::VtMatrix4dArray ComputeInstanceTransforms(const PXR_NS::SdfPath &prototypeId)
Definition instancer.cpp:93
~HdCyclesInstancer() override
#define HDCYCLES_NAMESPACE_CLOSE_SCOPE