Loading...
Searching...
No Matches
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_POINTS_H
8#define PXR_IMAGING_HD_POINTS_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hd/api.h"
12#include "pxr/imaging/hd/version.h"
13#include "pxr/imaging/hd/rprim.h"
14
15PXR_NAMESPACE_OPEN_SCOPE
16
22{
24 HdPointsGeomStyle geomStyle = HdPointsGeomStyleInvalid)
25 : geomStyle(geomStyle)
26 {}
27
28 bool IsEmpty() const {
29 return geomStyle == HdPointsGeomStyleInvalid;
30 }
31
32 HdPointsGeomStyle geomStyle;
33};
34
37class HdPoints: public HdRprim
38{
39public:
40 HD_API
41 ~HdPoints() override;
42
43 inline HdDisplayStyle GetDisplayStyle(HdSceneDelegate* delegate) const;
44
45 HD_API
46 TfTokenVector const & GetBuiltinPrimvarNames() const override;
47
49 HD_API
50 static void ConfigureRepr(TfToken const &reprName,
51 const HdPointsReprDesc &desc);
52
53protected:
56 HD_API
57 HdPoints(SdfPath const& id);
58
59 using _PointsReprConfig = _ReprDescConfigs<HdPointsReprDesc>;
60
61 HD_API
62 static _PointsReprConfig::DescArray _GetReprDesc(TfToken const &reprName);
63
64private:
65
66 // Class can not be default constructed or copied.
67 HdPoints() = delete;
68 HdPoints(const HdPoints &) = delete;
69 HdPoints &operator =(const HdPoints &) = delete;
70
71 static _PointsReprConfig _reprDescConfig;
72};
73
74inline HdDisplayStyle
75HdPoints::GetDisplayStyle(HdSceneDelegate* delegate) const
76{
77 return delegate->GetDisplayStyle(GetId());
78}
79
80
81PXR_NAMESPACE_CLOSE_SCOPE
82
83#endif // PXR_IMAGING_HD_POINTS_H
Hydra Schema for a point cloud.
Definition: points.h:38
HD_API HdPoints(SdfPath const &id)
Constructor.
HD_API TfTokenVector const & GetBuiltinPrimvarNames() const override
Returns the names of built-in primvars, i.e.
static HD_API void ConfigureRepr(TfToken const &reprName, const HdPointsReprDesc &desc)
Configure geometric style of drawItems for reprName.
The render engine state for a given rprim from the scene graph.
Definition: rprim.h:38
SdfPath const & GetId() const
Returns the identifier of this Rprim.
Definition: rprim.h:146
Adapter class providing data exchange with the client scene graph.
virtual HD_API HdDisplayStyle GetDisplayStyle(SdfPath const &id)
Returns the display style for the given prim.
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
Describes how the geometry of a prim should be displayed.
Definition: sceneDelegate.h:64
Descriptor to configure a drawItem for a repr.
Definition: points.h:22
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440