forked from WEARTHaptics/WEART-SDK-Cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WeArtHapticObject.h
48 lines (39 loc) · 1.37 KB
/
WeArtHapticObject.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
#pragma once
#include "WeArtCommon.h"
#include "WeArtEffect.h"
#include <vector>
#include "WeArtTemperature.h"
#include "WeArtForce.h"
#include "WeArtTexture.h"
#include "WeArtMessages.h"
#include "WeArtClient.h"
//! @brief A haptic object class, representing one or multiple thimbles and hand with which the user interacts.
//!
//! The interaction is represented by the use of effects (WeArtEffect).
//!
//! The communication with the lower layers is triggered by adding and removing effects
//! (see WeArtHapticObject::AddEffect() and WeArtHapticObject::RemoveEffect()), which subsequently triggers an WeArtHapticObject::UpdateEffects() event.
//!
//! Such event then sends foward messages representing the processed events.
class WeArtHapticObject {
public:
// Sets default values for this component's properties
WeArtHapticObject(WeArtClient* client);
// Hand/finger state variables
int32_t handSideFlag;
int32_t actuationPointFlag;
// State variables. Serialized.
WeArtTemperature weArtTemperature;
WeArtForce weArtForce;
WeArtTexture weArtTexture;
// List of effect active on this object
// Not serialized.
std::vector<WeArtEffect*> activeEffects;
void AddEffect(WeArtEffect* effect);
void RemoveEffect(WeArtEffect* effect);
bool ContainsEffect(WeArtEffect* effect);
void UpdateEffects(void);
void SendMessage(WeArtMessage* msg);
private:
WeArtClient* weArtclient;
};