Atoms Crowd
7.0.0
BlackboardValue.h
1
#pragma once
2
// ===========================================================================
3
// Copyright (c) 2015 Toolchefs Ltd. All rights reserved.
4
//
5
// Use of this software is subject to the terms of the Toolchefs license
6
// agreement provided at the time of installation or download, or which
7
// otherwise accompanies this software in either electronic or hard copy form.
8
// ===========================================================================
9
10
#include <Atoms/Globals.h>
11
#include <AtomsCore/Metadata/Metadata.h>
12
#include <AtomsUtils/Curve.h>
13
#include <AtomsUtils/Image.h>
14
#include <AtomsUtils/Mesh.h>
15
#include <AtomsUtils/SampledCurve.h>
16
#include <vector>
17
18
namespace
Atoms
19
{
20
struct
BlackboardEntryPosition
21
{
22
short
valueIndex;
23
short
parentIndex;
24
};
25
26
template
<
typename
T>
27
class
BlackboardValue
28
{
29
public
:
30
BlackboardValue
()
31
{
32
position.valueIndex = -1;
33
position.parentIndex = 0;
34
}
35
BlackboardValue
(
const
T& defaultValue): value(defaultValue)
36
{
37
position.valueIndex = -1;
38
position.parentIndex = 0;
39
}
40
~
BlackboardValue
() {}
41
T value;
42
BlackboardEntryPosition
position;
43
};
44
45
typedef
BlackboardValue<bool>
BlackboardBoolValue
;
46
typedef
BlackboardValue<int>
BlackboardIntValue
;
47
typedef
BlackboardValue<unsigned int>
BlackboardUIntValue
;
48
typedef
BlackboardValue<unsigned short>
BlackboardUShortValue
;
49
typedef
BlackboardValue<double>
BlackboardDoubleValue
;
50
typedef
BlackboardValue<float>
BlackboardFloatValue
;
51
typedef
BlackboardValue<std::string>
BlackboardStringValue
;
52
typedef
BlackboardValue<AtomsMath::Vector2>
BlackboardVector2Value
;
53
typedef
BlackboardValue<AtomsMath::Vector2i>
BlackboardVector2iValue
;
54
typedef
BlackboardValue<AtomsMath::Vector2f>
BlackboardVector2fValue
;
55
typedef
BlackboardValue<AtomsMath::Vector3>
BlackboardVector3Value
;
56
typedef
BlackboardValue<AtomsMath::Vector3i>
BlackboardVector3iValue
;
57
typedef
BlackboardValue<AtomsMath::Vector3f>
BlackboardVector3fValue
;
58
typedef
BlackboardValue<AtomsMath::Vector4>
BlackboardVector4Value
;
59
typedef
BlackboardValue<AtomsMath::Vector4i>
BlackboardVector4iValue
;
60
typedef
BlackboardValue<AtomsMath::Vector4f>
BlackboardVector4fValue
;
61
typedef
BlackboardValue<AtomsMath::Quaternion>
BlackboardQuaternionValue
;
62
typedef
BlackboardValue<AtomsMath::Quaternionf>
BlackboardQuaternionfValue
;
63
typedef
BlackboardValue<AtomsMath::Matrix>
BlackboardMatrixValue
;
64
typedef
BlackboardValue<AtomsMath::Matrixf>
BlackboardMatrixfValue
;
65
typedef
BlackboardValue<AtomsMath::Euler>
BlackboardEulerValue
;
66
typedef
BlackboardValue<AtomsMath::Eulerf>
BlackboardEulerfValue
;
67
typedef
BlackboardValue<AtomsUtils::Curve>
BlackboardCurveValue
;
68
typedef
BlackboardValue<AtomsUtils::SampledCurve>
BlackboardSampledCurveValue
;
69
typedef
BlackboardValue<AtomsUtils::Mesh>
BlackboardMeshValue
;
70
typedef
BlackboardValue<AtomsUtils::Image>
BlackboardImageValue
;
71
typedef
BlackboardValue<AtomsPtr<AtomsCore::Metadata>
>
BlackboardMetadataValue
;
72
73
typedef
BlackboardValue<std::vector<int>
>
BlackboardIntArrayValue
;
74
typedef
BlackboardValue<std::vector<float>
>
BlackboardFloatArrayValue
;
75
typedef
BlackboardValue<std::vector<double>
>
BlackboardDoubleArrayValue
;
76
77
typedef
BlackboardValue<std::vector<std::string>
>
BlackboardStringArrayValue
;
78
typedef
BlackboardValue<std::vector<AtomsMath::Vector2>
>
BlackboardVector2ArrayValue
;
79
typedef
BlackboardValue<std::vector<AtomsMath::Vector2i>
>
BlackboardVector2iArrayValue
;
80
typedef
BlackboardValue<std::vector<AtomsMath::Vector2f>
>
BlackboardVector2fArrayValue
;
81
typedef
BlackboardValue<std::vector<AtomsMath::Vector3>
>
BlackboardVector3ArrayValue
;
82
typedef
BlackboardValue<std::vector<AtomsMath::Vector3i>
>
BlackboardVector3iArrayValue
;
83
typedef
BlackboardValue<std::vector<AtomsMath::Vector3f>
>
BlackboardVector3fArrayValue
;
84
typedef
BlackboardValue<std::vector<AtomsMath::Vector4>
>
BlackboardVector4ArrayValue
;
85
typedef
BlackboardValue<std::vector<AtomsMath::Vector4i>
>
BlackboardVector4iArrayValue
;
86
typedef
BlackboardValue<std::vector<AtomsMath::Vector4f>
>
BlackboardVector4fArrayValue
;
87
typedef
BlackboardValue<std::vector<AtomsMath::Quaternion>
>
BlackboardQuaternionArrayValue
;
88
typedef
BlackboardValue<std::vector<AtomsMath::Quaternionf>
>
BlackboardQuaternionfArrayValue
;
89
typedef
BlackboardValue<std::vector<AtomsMath::Matrix>
>
BlackboardMatrixArrayValue
;
90
typedef
BlackboardValue<std::vector<AtomsMath::Matrixf>
>
BlackboardMatrixfArrayValue
;
91
typedef
BlackboardValue<std::vector<AtomsMath::Euler>
>
BlackboardEulerArrayValue
;
92
typedef
BlackboardValue<std::vector<AtomsMath::Eulerf>
>
BlackboardEulerfArrayValue
;
93
typedef
BlackboardValue<std::vector<AtomsUtils::SampledCurve>
>
BlackboardSampledCurveArrayValue
;
94
typedef
BlackboardValue<std::vector<AtomsUtils::Curve>
>
BlackboardCurveArrayValue
;
95
typedef
BlackboardValue<std::vector<AtomsUtils::Mesh>
>
BlackboardMeshArrayValue
;
96
typedef
BlackboardValue<std::vector<AtomsUtils::Image>
>
BlackboardImageArrayValue
;
97
}
Atoms::BlackboardValue
Definition:
BlackboardValue.h:28
Atoms
Atoms namespace.
Definition:
Agent.h:29
Atoms::BlackboardEntryPosition
Definition:
BlackboardValue.h:21
Atoms
Public
Atoms
BehaviourTree
BlackboardValue.h