Loading...
Searching...
No Matches
tetMeshConversionSceneIndex.h
1//
2// Copyright 2024 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_HDSI_TET_MESH_CONVERSION_SCENE_INDEX_H
8#define PXR_IMAGING_HDSI_TET_MESH_CONVERSION_SCENE_INDEX_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hdsi/api.h"
12#include "pxr/imaging/hd/filteringSceneIndex.h"
13
14#include "pxr/base/gf/vec3i.h"
15#include "pxr/base/gf/vec4i.h"
16
17PXR_NAMESPACE_OPEN_SCOPE
18
19
21
28{
29public:
30 HDSI_API
31 static HdsiTetMeshConversionSceneIndexRefPtr
32 New(const HdSceneIndexBaseRefPtr &inputSceneIndex);
33
34 HDSI_API
35 HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override;
36
37 HDSI_API
38 SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override;
39
40protected:
42 const HdSceneIndexBaseRefPtr &inputSceneIndex);
43
44 void _PrimsAdded(
45 const HdSceneIndexBase &sender,
46 const HdSceneIndexObserver::AddedPrimEntries &entries) override;
47
48 void _PrimsRemoved(
49 const HdSceneIndexBase &sender,
50 const HdSceneIndexObserver::RemovedPrimEntries &entries) override;
51
52 void _PrimsDirtied(
53 const HdSceneIndexBase &sender,
54 const HdSceneIndexObserver::DirtiedPrimEntries &entries) override;
55
56public:
57
58 static void _ComputeSurfaceFaces(
59 const VtVec4iArray& tetVertexIndices,
60 VtVec3iArray *surfaceFaceIndices);
61};
62
63
64PXR_NAMESPACE_CLOSE_SCOPE
65
66#endif //PXR_IMAGING_HDSI_TET_MESH_CONVERSION_SCENE_INDEX_H
Abstract interface to scene data.
Definition: sceneIndex.h:54
An abstract base class for a filtering scene index that observes a single input scene index.
A scene index converting TetMeshes into standard triangle based Meshes.
HDSI_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
Returns a pair of (prim type, datasource).
HDSI_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
Returns the paths of all scene index prims located immediately below primPath.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
Definition: declarePtrs.h:58
Small struct representing a 'prim' in the Hydra scene index.
Definition: sceneIndex.h:35