SRanipal Unreal SDK  1.3.2.0
SRanipal Unreal SDK document
SRanipal_Lip.h
1 // ========= Copyright 2018, HTC Corporation. All rights reserved. ===========
2 
3 #pragma once
4 #include "ViveSR_Enums.h"
5 #include "SRanipal_Lip_Enums.h"
6 
7 #include "Engine/Classes/Engine/Texture2D.h"
8 #include "CoreMinimal.h"
9 
10 #define SR_ANIPAL __declspec(dllimport)
11 extern "C" {
12 
13  namespace ViveSR {
14 
15  namespace anipal {
17  namespace Lip {
18 
19  const int ANIPAL_TYPE_LIP = 1;
24  SR_ANIPAL int GetLipData(LipData *data);
25  }
26  }
27  }
28 }
29 
31 UENUM(BlueprintType)
32 enum class LipShape :uint8
33 {
34  Jaw_Forward = 0 UMETA(DisplayName = "Jaw_Forward"),
35  Jaw_Right = 1 UMETA(DisplayName = "Jaw_Right"),
36  Jaw_Left = 2 UMETA(DisplayName = "Jaw_Left"),
37  Jaw_Open = 3 UMETA(DisplayName = "Jaw_Open"),
38  Mouth_Ape_Shape = 4 UMETA(DisplayName = "Mouth_Ape_Shape"),
39  Mouth_O_Shape = 5 UMETA(DisplayName = "Mouth_O_Shape"),
40  Mouth_Pout = 6 UMETA(DisplayName = "Mouth_Pout"),
41  Mouth_Lower_Right = 7 UMETA(DisplayName = "Mouth_Lower_Right"),
42  Mouth_Lower_Left = 8 UMETA(DisplayName = "Mouth_Lower_Left"),
43  Mouth_Smile_Right = 9 UMETA(DisplayName = "Mouth_Smile_Right"),
44  Mouth_Smile_Left = 10 UMETA(DisplayName = "Mouth_Smile_Left"),
45  Mouth_Sad_Right = 11 UMETA(DisplayName = "Mouth_Sad_Right"),
46  Mouth_Sad_Left = 12 UMETA(DisplayName = "Mouth_Sad_Left"),
47  Cheek_Puff_Right = 13 UMETA(DisplayName = "Cheek_Puff_Right"),
48  Cheek_Puff_Left = 14 UMETA(DisplayName = "Cheek_Puff_Left"),
49  Mouth_Lower_Inside = 15 UMETA(DisplayName = "Mouth_Lower_Inside"),
50  Mouth_Upper_Inside = 16 UMETA(DisplayName = "Mouth_Upper_Inside"),
51  Mouth_Lower_Overlay = 17 UMETA(DisplayName = "Mouth_Lower_Overlay"),
52  Mouth_Upper_Overlay = 18 UMETA(DisplayName = "Mouth_Upper_Overlay"),
53  Cheek_Suck = 19 UMETA(DisplayName = "Cheek_Suck"),
54  Mouth_LowerRight_Down = 20 UMETA(DisplayName = "Mouth_LowerRight_Down"),
55  Mouth_LowerLeft_Down = 21 UMETA(DisplayName = "Mouth_LowerLeft_Down"),
56  Mouth_UpperRight_Up = 22 UMETA(DisplayName = "Mouth_UpperRight_Up"),
57  Mouth_UpperLeft_Up = 23 UMETA(DisplayName = "Mouth_UpperLeft_Up"),
58  Mouth_Philtrum_Right = 24 UMETA(DisplayName = "Mouth_Philtrum_Right"),
59  Mouth_Philtrum_Left = 25 UMETA(DisplayName = "Mouth_Philtrum_Left"),
60  Max = 26 UMETA(Hidden),
61  None = 63 UMETA(DisplayName = "None"),
62 };
63 
68 {
69 public:
70  SRanipal_Lip();
71  ~SRanipal_Lip();
72  static SRanipal_Lip* Instance();
73  static void DestroyLipModule();
74 
85  bool GetLipWeightings(TMap<LipShape, float> &shapes);
91  bool UpdateTexture(UTexture2D *&texture);
92 
93 public:
94  int ImageWidth, ImageHeight;
95  int SingleImageWidth;
96 
97 private:
98  bool UpdateData();
99 
100 private:
101  static SRanipal_Lip* SRanipal_LipModule;
102  int LastUpdateFrame, LastUpdateResult;
104  FUpdateTextureRegion2D* updateRegion;
105  uint8* LipImageBuffer;
106  TMap<LipShape, float> Weightings;
107 };
Definition: SRanipal_Lip_Enums.h:31
The internal static class about lip relative API.
Definition: SRanipal_Lip.h:67
SR_ANIPAL int GetLipData(LipData *data)
bool UpdateTexture(UTexture2D *&texture)
int GetLipData_(ViveSR::anipal::Lip::LipData *data)
bool GetLipWeightings(TMap< LipShape, float > &shapes)
Definition: SRanipal_API_Lip.h:13