forked from KhronosGroup/ANARI-SDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meshUtil.h
32 lines (22 loc) · 889 Bytes
/
meshUtil.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright 2024 The Khronos Group
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <pxr/pxr.h>
#include <pxr/imaging/hd/meshUtil.h>
#include <pxr/base/vt/array.h>
#include <pxr/base/vt/value.h>
#include <pxr/base/vt/types.h>
#include <pxr/base/tf/token.h>
#include <pxr/usd/sdf/path.h>
PXR_NAMESPACE_OPEN_SCOPE
class HdAnariMeshUtil : public HdMeshUtil {
public:
using HdMeshUtil::HdMeshUtil;
// Gather per face primvar after a triangulation or quadrangulation
bool GatherPerFacePrimvar(const SdfPath& id, const TfToken& pvname, VtValue value, VtIntArray primitiveParameters, VtValue *mappedPrimvar) const;
private:
// Gather per face primvar after a triangulation or quadrangulation
template <typename T> static
void GatherPerFacePrimVar(VtIntArray const& primitiveParams, void const* sourceUntyped, VtValue *mappedPrimvar);
};
PXR_NAMESPACE_CLOSE_SCOPE