-
Notifications
You must be signed in to change notification settings - Fork 7
/
Object.h
51 lines (38 loc) · 1.35 KB
/
Object.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright 2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include "OSPRayGlobalState.h"
#include "ospray_math.h"
// helium
#include "helium/BaseObject.h"
#include "helium/utility/ChangeObserverPtr.h"
// std
#include <string_view>
namespace anari_ospray {
struct Object : public helium::BaseObject
{
Object(ANARIDataType type, OSPRayGlobalState *s);
virtual ~Object() = default;
virtual bool getProperty(const std::string_view &name,
ANARIDataType type,
void *ptr,
uint32_t flags);
virtual void commit();
virtual bool isValid() const;
OSPRayGlobalState *deviceState() const;
};
struct UnknownObject : public Object
{
UnknownObject(ANARIDataType type, OSPRayGlobalState *s);
bool isValid() const override;
};
} // namespace anari_ospray
#define OSPRAY_ANARI_TYPEFOR_SPECIALIZATION(type, anari_type) \
namespace anari { \
ANARI_TYPEFOR_SPECIALIZATION(type, anari_type); \
}
#define OSPRAY_ANARI_TYPEFOR_DEFINITION(type) \
namespace anari { \
ANARI_TYPEFOR_DEFINITION(type); \
}
OSPRAY_ANARI_TYPEFOR_SPECIALIZATION(anari_ospray::Object *, ANARI_OBJECT);