This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
points.h
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_ST_POINTS_H
8#define PXR_IMAGING_HD_ST_POINTS_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hdSt/api.h"
12#include "pxr/imaging/hd/version.h"
13#include "pxr/imaging/hd/drawingCoord.h"
14#include "pxr/imaging/hd/enums.h"
15#include "pxr/imaging/hd/perfLog.h"
16#include "pxr/imaging/hd/points.h"
17
18#include "pxr/usd/sdf/path.h"
19#include "pxr/base/vt/array.h"
20
21PXR_NAMESPACE_OPEN_SCOPE
22
27class HdStPoints final : public HdPoints
28{
29public:
30 HF_MALLOC_TAG_NEW("new HdStPoints");
31
32 HDST_API
33 HdStPoints(SdfPath const& id);
34
35 HDST_API
36 ~HdStPoints() override;
37
38 HDST_API
39 void UpdateRenderTag(HdSceneDelegate *delegate,
40 HdRenderParam *renderParam) override;
41
42 HDST_API
43 void Sync(HdSceneDelegate *delegate,
44 HdRenderParam *renderParam,
45 HdDirtyBits *dirtyBits,
46 TfToken const &reprToken) override;
47
48 HDST_API
49 void Finalize(HdRenderParam *renderParam) override;
50
51 HDST_API
52 HdDirtyBits GetInitialDirtyBitsMask() const override;
53
54protected:
55 HDST_API
56 void _InitRepr(TfToken const &reprToken, HdDirtyBits *dirtyBits) override;
57
58 HDST_API
59 HdDirtyBits _PropagateDirtyBits(HdDirtyBits bits) const override;
60
61 void _UpdateRepr(HdSceneDelegate *sceneDelegate,
62 HdRenderParam *renderParam,
63 TfToken const &reprToken,
64 HdDirtyBits *dirtyBitsState);
65
66 void _PopulateVertexPrimvars(HdSceneDelegate *sceneDelegate,
67 HdRenderParam *renderParam,
68 HdStDrawItem *drawItem,
69 HdDirtyBits *dirtyBitsState);
70
71private:
72 HdReprSharedPtr _smoothHullRepr;
73
74 bool _displayOpacity;
75
76 enum DrawingCoord {
77 InstancePrimvar = HdDrawingCoord::CustomSlotsBegin
78 };
79
80 void _UpdateDrawItem(HdSceneDelegate *sceneDelegate,
81 HdRenderParam *renderParam,
82 HdStDrawItem *drawItem,
83 HdDirtyBits *dirtyBits);
84
85 void _UpdateMaterialTagsForAllReprs(HdSceneDelegate *sceneDelegate,
86 HdRenderParam *renderParam);
87};
88
89
90PXR_NAMESPACE_CLOSE_SCOPE
91
92#endif // PXR_IMAGING_HD_ST_POINTS_H
Hydra Schema for a point cloud.
Definition: points.h:38
The HdRenderParam is an opaque (to core Hydra) handle, to an object that is obtained from the render ...
Adapter class providing data exchange with the client scene graph.
Points.
Definition: points.h:28
HDST_API void Sync(HdSceneDelegate *delegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits, TfToken const &reprToken) override
Pull invalidated scene data and prepare/update the renderable representation.
HDST_API HdDirtyBits _PropagateDirtyBits(HdDirtyBits bits) const override
This callback from Rprim gives the prim an opportunity to set additional dirty bits based on those al...
HDST_API void _InitRepr(TfToken const &reprToken, HdDirtyBits *dirtyBits) override
Initialize the given representation of this Rprim.
HDST_API HdDirtyBits GetInitialDirtyBitsMask() const override
Returns the set of dirty bits that should be added to the change tracker for this prim,...
HDST_API void Finalize(HdRenderParam *renderParam) override
Finalizes object resources.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71