This website uses cookies to improve our services and deliver relevant ads.
By interacting with this site, you agree to this use. For more information, see our Cookies Policy

Macros

#define
OVR_AVATAR_MAXIMUM_JOINT_COUNT
The maximum joint count that can be in a skinned mesh renderer.
#define
OVR_AVATAR_MAX_MATERIAL_LAYER_COUNT
The maximum number of material layers.

Enumerations

enum
ovrAvatarMessageType {
}
Tells you the type of message recieved.
enum
ovrAvatarLogLevel {
}
Avatar Logging Level Matches the Android Log Levels.
enum
ovrAvatarAssetLevelOfDetail {
}
enum
ovrAvatarCapabilities {
}
Avatar capabilities mask.
enum
ovrAvatarButton {
}
Button Mask.
enum
ovrAvatarTouch {
}
Touch Mask.
enum
ovrAvatarControllerType {
}
Controller Types.
enum
ovrAvatarHandGesture {
}
Hand gestures.
enum
ovrAvatarMaterialLayerBlendMode {
}
Material Layer Blend Modes.
enum
ovrAvatarMaterialLayerSampleMode {
}
Material Layer Sample Modes.
enum
ovrAvatarMaterialMaskType {
}
Material Mask Types Masks programmatically control which portions of the surface this layer is applied to.
enum
ovrAvatarVisibilityFlags {
}
Visibility flags for avatar components.
enum
ovrAvatarRenderPartType {
}
Render part types.
enum
ovrAvatarAssetType {
}
Asset types.
enum
ovrAvatarTextureFormat {
}
Texture Format.

Typedefs

uint64_t
Opaque types.
struct ovrAvatarMessage_
struct ovrAvatarSpecification_
struct ovrAvatarAsset_
struct ovrAvatar_
struct ovrAvatarRenderPart_
struct ovrAvatarPacket_
struct ovrAvatarSpecificationRequest
const float
Update the voice visualization component of the avatar.
const uint8_t
BUFFER_ ( )
Read a packet out of a buffer.
void(*

Functions

OVRN_EXPORT ( void )
Initialize the SDK.
Remove a message from the message queue if there are any.
Find the type of an opaque message.
Get the avatar specification message contents.
Get the asset loaded message.
OVRN_EXPORT ( ovrAvatarSpecificationRequest * )
Create a new Specification Request.
Create an avatar.
OVRN_EXPORT ( uint32_t )
Get the count of assets that are referenced by this avatar.
Get the referenced asset for an index.
Get the materials for the body.
Get the type of a render part.
Get the skinned mesh render part.
Get the skinned mesh with physically based rendering part.
Get the skinned mesh with physically based rendering part.
Get the projector render part.
Get avatar component at a given index.
Get the Body Component.
Get the Base Component.
Get the Left Controller Component.
Get the Left Hand Component.
Get asset type.
Get mesh asset data.
Get combined mesh asset data.
Get combined mesh asset IDs.
OVRN_EXPORT ( const ovrAvatar * )
Get texture asset data.
Get material asset data.
Finish packet recording.
OVRN_EXPORT ( bool )
Write a packet to a buffer.
OVRN_EXPORT ( float )
Get duration of packet.
Integration section.

Macros Documentation

#define OVR_AVATAR_MAXIMUM_JOINT_COUNT
The maximum joint count that can be in a skinned mesh renderer.
#define OVR_AVATAR_MAX_MATERIAL_LAYER_COUNT
The maximum number of material layers.

Enumeration Type Documentation

enum OVR_Avatar.h.ovrAvatarMessageType
Tells you the type of message recieved.
Enumerator
ovrAvatarMessageType_AvatarSpecification
An avatar specification being returned.
ovrAvatarMessageType_AssetLoaded
An asset has finished loading.
ovrAvatarMessageType_Count
enum OVR_Avatar.h.ovrAvatarLogLevel
Avatar Logging Level Matches the Android Log Levels.
Enumerator
ovrAvatarLogLevel_Unknown= 0
ovrAvatarLogLevel_Default
ovrAvatarLogLevel_Verbose
ovrAvatarLogLevel_Debug
ovrAvatarLogLevel_Info
ovrAvatarLogLevel_Warn
ovrAvatarLogLevel_Error
ovrAvatarLogLevel_Fatal
ovrAvatarLogLevel_Silent
enum OVR_Avatar.h.ovrAvatarAssetLevelOfDetail
Enumerator
ovrAvatarAssetLevelOfDetail_One= 1
ovrAvatarAssetLevelOfDetail_Three= 3
ovrAvatarAssetLevelOfDetail_Five= 5
enum OVR_Avatar.h.ovrAvatarCapabilities
Avatar capabilities mask.
Enumerator
ovrAvatarCapability_Body
This avatar will have a body and head.
ovrAvatarCapability_Hands
This avatar will have hands.
ovrAvatarCapability_Base
This avatar will have a base cone.
ovrAvatarCapability_Voice
This avatar will have voice visualization.
ovrAvatarCapability_BodyTilt
This avatar will have a body translation with respect to the eyeOrientation.
ovrAvatarCapability_All
This avatar will have all available capabilities.
enum OVR_Avatar.h.ovrAvatarButton
Button Mask.
Enumerator
ovrAvatarButton_One
X/A pressed.
ovrAvatarButton_Two
Y/B pressed.
ovrAvatarButton_Three
Select/Oculus button pressed.
ovrAvatarButton_Joystick
Joystick button pressed.
enum OVR_Avatar.h.ovrAvatarTouch
Touch Mask.
Enumerator
ovrAvatarTouch_One
Capacitive touch for X/A button.
ovrAvatarTouch_Two
Capacitive touch for Y/B button.
ovrAvatarTouch_Joystick
Capacitive touch for thumbstick.
ovrAvatarTouch_ThumbRest
Capacitive touch for thumb rest.
ovrAvatarTouch_Index
Capacitive touch for index trigger.
ovrAvatarTouch_Pointing
Index finger is pointing.
ovrAvatarTouch_ThumbUp
Thumb is up.
enum OVR_Avatar.h.ovrAvatarControllerType
Controller Types.
Enumerator
ovrAvatarControllerType_Touch
ovrAvatarControllerType_Malibu
ovrAvatarControllerType_Go
ovrAvatarControllerType_Count
enum OVR_Avatar.h.ovrAvatarHandGesture
Hand gestures.
Enumerator
ovrAvatarHandGesture_Default
ovrAvatarHandGesture_GripSphere
ovrAvatarHandGesture_GripCube
ovrAvatarHandGesture_Count
enum OVR_Avatar.h.ovrAvatarMaterialLayerBlendMode
Material Layer Blend Modes.
Enumerator
ovrAvatarMaterialLayerBlendMode_Add
The color value of this layer is added to the layers before it.
ovrAvatarMaterialLayerBlendMode_Multiply
The color value of this layer is multiplied with the layers before it.
ovrAvatarMaterialLayerBlendMode_Count
enum OVR_Avatar.h.ovrAvatarMaterialLayerSampleMode
Material Layer Sample Modes.
Enumerator
ovrAvatarMaterialLayerSampleMode_Color
This layer's color value comes from the color constant.
ovrAvatarMaterialLayerSampleMode_Texture
This layer's color value comes from the layer's texture sampler.
ovrAvatarMaterialLayerSampleMode_TextureSingleChannel
This layer's color value comes from a channel in the layer's texture sampler specified by the sample parameters.
ovrAvatarMaterialLayerSampleMode_Parallax
This layer's color value comes from the layer's texture sampler with coordinates modified by the material's parallax texture.
ovrAvatarMaterialLayerSampleMode_RDSM
This layer's color value comes from the layer's texture sampler with coordinates modified by the material's roughness texture.
ovrAvatarMaterialLayerSampleMode_Count
enum OVR_Avatar.h.ovrAvatarMaterialMaskType
Material Mask Types Masks programmatically control which portions of the surface this layer is applied to.
Enumerator
ovrAvatarMaterialMaskType_None
No mask is applied to this layer.
ovrAvatarMaterialMaskType_Positional
A mask is applied to this based on vertex position.
ovrAvatarMaterialMaskType_ViewReflection
A mask is applied to this based on reflection of view vector.
ovrAvatarMaterialMaskType_Fresnel
A mask is applied based on view direction's angle of incidence.
ovrAvatarMaterialMaskType_Pulse
Like positional, but varying over time.
ovrAvatarMaterialMaskType_Count
enum OVR_Avatar.h.ovrAvatarVisibilityFlags
Visibility flags for avatar components.
Enumerator
ovrAvatarVisibilityFlag_FirstPerson
Visible in the first person view.
ovrAvatarVisibilityFlag_ThirdPerson
Visible in the third person view.
ovrAvatarVisibilityFlag_SelfOccluding
Is self occluding.
enum OVR_Avatar.h.ovrAvatarRenderPartType
Render part types.
Enumerator
ovrAvatarRenderPartType_SkinnedMeshRender
Skinned Mesh Component.
ovrAvatarRenderPartType_SkinnedMeshRenderPBS
Skinned Mesh Component with Physically Based Renderer.
ovrAvatarRenderPartType_ProjectorRender
Projector Component.
ovrAvatarRenderPartType_SkinnedMeshRenderPBS_V2
Physically Based Render Component Version 2.
ovrAvatarRenderPartType_Count
Total number of render part types.
enum OVR_Avatar.h.ovrAvatarAssetType
Asset types.
Enumerator
ovrAvatarAssetType_Mesh
Mesh asset.
ovrAvatarAssetType_Texture
Texture asset.
ovrAvatarAssetType_Pose
Internal type (to be removed in a future version)
ovrAvatarAssetType_Material
Material asset.
ovrAvatarAssetType_CombinedMesh
Combined Mesh asset.
ovrAvatarAssetType_PBSMaterial
PBS Material asset.
ovrAvatarAssetType_FailedLoad
Indicates the asset failed to load.
ovrAvatarAssetType_Count
Count of different asset types.
enum OVR_Avatar.h.ovrAvatarTextureFormat
Texture Format.
Enumerator
ovrAvatarTextureFormat_RGB24
RGB 24bit uncompressed texture.
ovrAvatarTextureFormat_DXT1
DXT1 compressed texture.
ovrAvatarTextureFormat_DXT5
DXT5 compressed texture.
ovrAvatarTextureFormat_ASTC_RGB_6x6_DEPRECATED
Deprecated: ASTC compressed texture. 16 bytes of header data at the beginning. No mipmap data.
ovrAvatarTextureFormat_ASTC_RGB_6x6_MIPMAPS
ASTC compressed texture with mipmaps included directly afterwards. No header data included.
ovrAvatarTextureFormat_Count
Count of different texture formats.

Typedef Documentation

typedef uint64_t ovrAvatarAssetID ( )
Opaque types.
typedef struct ovrAvatarMessage_ ovrAvatarMessage ( )
typedef struct ovrAvatarSpecification_ ovrAvatarSpecification ( )
typedef struct ovrAvatarAsset_ ovrAvatarAsset ( )
typedef struct ovrAvatar_ ovrAvatar ( )
typedef struct ovrAvatarRenderPart_ ovrAvatarRenderPart ( )
typedef struct ovrAvatarPacket_ ovrAvatarPacket ( )
typedef struct ovrAvatarSpecificationRequest _ovrAvatarSpecificationRequest ( )
uint32_t VOICE_SAMPLES_ ( )
Update the voice visualization component of the avatar.
Parameters
avatar
an opaque pointer to the avatar state
voiceSampleCount
number of samples passed in
voiceSamples
array of voice samples
BUFFER_ ( )
Read a packet out of a buffer.
Parameters
bufferSize
size of the buffer in bytes
buffer
the buffer to read from
opaque pointer to the new packet
typedef void(* LoggingCallback) (const char *str) ( )

Variable Documentation

bool useCombinedMesh ( )
ovrAvatarCapabilities capabilities ( )
ovrAvatarTransform headPose ( )
uint32_t voiceSampleCount ( )
ovrAvatarHandInputState * inputStateLeft ( )
ovrAvatarHandInputState ovrAvatarHandInputState * inputStateRight ( )
ovrAvatarHandInputState ovrAvatarHandInputState ovrAvatarControllerType type ( )
float deltaSeconds ( )
bool visible ( )
ovrAvatarHandGesture gesture ( )
uint32_t jointCount ( )
uint32_t const ovrAvatarTransform * customJointTransforms ( )
ovrAvatarVector3f position ( )
uint32_t index ( )
ovrAvatarAssetID* textureID ( )
ovrAvatarAssetID ovrAvatarVector4f* offset ( )
uint32_t * count ( )
uint32_t targetSize ( )
uint32_t uint8_t* targetBuffer ( )
const ovrAvatarPacket* packet ( )
const ovrAvatarPacket float secondsFromPacketStart ( )
uint32_t jointIndex ( )

Function Documentation

OVRN_EXPORT ( void )
Initialize the SDK.
Update avatar pose from packet.
Free the packet.
Begin packet recording.
Begin loading asset.
Get the clothing alpha values for the combined body mesh.
Set a custom base position for the avatar.
Use the default base position for the avatar.
Set the currently active capabilities for an avatar.
Set the right hand custom gesture.
Set the left hand custom gesture.
Set the right hand gesture.
Set the left hand gesture.
Set the right hand's visibility.
Set the left hand's visibility.
Set the right controller's visibility.
Set the left controller's visibility.
Finalize the updates to the avatar's pose.
Update the hand components of the avatar.
Update the pose for the body component of the avatar.
Destroy an avatar when you no longer need it.
Request the avatar specification for a given specification request.
Avatar Specification Request Functions.
Set the Combine Meshes Flag on the spec.
Destroy the Specification Request.
Free the message when you're done processing the contents.
Shut down the SDK.
Parameters
appId
the Oculus application ID.
msg
the message
specificationRequest the
specification request to be destroyed.
request
to set the field
useCombinedMesh
Request the avatar specification for a given user ID.
Parameters
userID
the Oculus user ID for the avatar This will dispatch an async request for the avatar specification. When it's done, it will return via the message system.
Parameters
spec the
spec for the avatar you are requesting This will dispatch an async request for the avatar specification. When it's done, it will return via the message system.
Parameters
avatar
an opaque pointer to the avatar state
See Also:
ovrAvatar_Create
Parameters
avatar
an opaque pointer to the avatar state
headPose
the transform of the center eye (half way between the two eyes)
avatar
an opaque pointer to the avatar state
inputStateLeft
the input state of the left touch controller
inputStateRight
the input state of the right touch controller
avatar
an opaque pointer to the avatar state
inputStateLeft
the input state of a 3Dof controller left hand
inputStateRight
the input state of the 3Dof controller right hand
type
the type of 3dof controller being updated
avatar
an opaque pointer to the avatar state
deltaSeconds
number of seconds that have elapsed since the last call to this function
avatar
an opaque pointer to the avatar state
visible
boolean controlling visibility
avatar
an opaque pointer to the avatar state
gesture
the gesture to set for the left hand - specifying ovrAvatarHandGesture_Default enables default hand animations and poses, other gestures disable them
See Also:
ovrAvatar_SetLeftHandCustomGesture
Parameters
avatar
an opaque pointer to the avatar state
gesture
the gesture to set for the right hand - specifying ovrAvatarHandGesture_Default enables default hand animations and poses, other gestures disable them
See Also:
ovrAvatar_SetRightHandCustomGesture
Using this disables the default hand animations. To restore them, use ovrAvatar_SetLeftHandGesture with ovrAvatarHandGesture_Default.
Parameters
avatar
an opaque pointer to the avatar state
jointCount
length of the joint array being passed in - this should be the same as the number of joints in the hand
customJointTransforms
an array of transforms for the joints in the hand
See Also:
ovrAvatar_SetLeftHandGesture
Using this disables the default hand animations. To restore them, use ovrAvatar_SetRightHandGesture with ovrAvatarHandGesture_Default.
Parameters
avatar
an opaque pointer to the avatar state
jointCount
length of the joint array being passed in - this should be the same as the number of joints in the hand
customJointTransforms
an array of transforms for the joints in the hand
See Also:
ovrAvatar_SetRightHandGesture
Parameters
avatar
an opaque pointer to the avatar state
capabilities
mask of currently active capabilities - toggling a capability toggles that capability being rendered for the avatar, this can be any subset of the capabilities specified at creation time
See Also:
ovrAvatar_Create
Parameters
avatar
an opaque pointer to the avatar state
See Also:
ovrAvatar_SetCustomBasePosition
Parameters
avatar
an opaque pointer to the avatar state
position
the position of the base of the avatar
See Also:
ovrAvatar_ClearCustomBasePosition
Parameters
Avatar
to get values from
reference
to the texture asset ID
reference
to the alpha offset vector.
assetID
asset ID
avatar
opaque pointer to the avatar
packet
opaque pointer to the packet
avatar
an opaque pointer to the avatar state
packet
an opaque pointer to the packet
secondsFromPacketStart
time to update the pose to within the packet
OVRN_EXPORT ( ovrAvatarMessage * )
Remove a message from the message queue if there are any.
the opaque message, or null if nothing is there
OVRN_EXPORT ( ovrAvatarMessageType )
Find the type of an opaque message.
Parameters
msg
the message
the message type
OVRN_EXPORT ( const ovrAvatarMessage_AvatarSpecification * )
Get the avatar specification message contents.
Parameters
msg
the message
the avatar specification message contents
OVRN_EXPORT ( const ovrAvatarMessage_AssetLoaded * )
Get the asset loaded message.
Parameters
msg
the message
the asset loaded message contents
OVRN_EXPORT ( ovrAvatarSpecificationRequest * )
Create a new Specification Request.
Parameters
userID
of the User spec to load
OVRN_EXPORT ( ovrAvatar * )
Create an avatar.
Parameters
avatarSpecification
the avatar specification.
See Also:
ovrAvatar_RequestAvatarSpecification
Parameters
capabilities
the capabilities set for this avatar - these capabilities can be toggled on and off later with ovrAvatar_SetActiveCapabilities
an opaque pointer to the avatar state
See Also:
ovrAvatar_SetActiveCapabilities
See Also:
ovrAvatar_Destroy
OVRN_EXPORT ( uint32_t )
Get the count of assets that are referenced by this avatar.
Get the size of a recorded packet.
Get number of components for the avatar.
Parameters
avatar
an opaque pointer to the avatar state
asset count
See Also:
ovrAvatar_GetReferencedAsset
Parameters
avatar
opaque pointer to the avatar
count of avatar components
Parameters
packet
opaque pointer to the packet
size of the packet in bytes
OVRN_EXPORT ( ovrAvatarAssetID )
Get the referenced asset for an index.
Parameters
avatar
an opaque pointer to the avatar state
index
the index of the referenced asset to get - must be between 0 and the asset count - 1, inclusive
asset id
See Also:
ovrAvatar_GetReferencedAssetCount
OVRN_EXPORT ( const ovrAvatarPBSMaterialState * )
Get the materials for the body.
Get PBS material asset data.
Parameters
Avatar
to get values from
asset
opaque pointer to asset
material asset data
OVRN_EXPORT ( ovrAvatarRenderPartType )
Get the type of a render part.
Parameters
renderPart
an opaque pointer to the render part
type of the render part
OVRN_EXPORT ( const ovrAvatarRenderPart_SkinnedMeshRender * )
Get the skinned mesh render part.
Parameters
renderPart
an opaque pointer to the render part
skinned mesh render part
Get the skinned mesh with physically based rendering part.
Parameters
renderPart
an opaque pointer to the render part
skinned mesh render PBS part
Get the skinned mesh with physically based rendering part.
Parameters
renderPart
an opaque pointer to the render part
skinned mesh render PBS V2 part
OVRN_EXPORT ( const ovrAvatarRenderPart_ProjectorRender * )
Get the projector render part.
Parameters
renderPart
an opaque pointer to the render part
projector render part
OVRN_EXPORT ( const ovrAvatarComponent * )
Get avatar component at a given index.
Parameters
avatar
opaque pointer to the avatar
index
the index of the component to get
count of avatar components
OVRN_EXPORT ( const ovrAvatarBodyComponent * )
Get the Body Component.
Parameters
avatar
opaque pointer to the avatar
the body component
OVRN_EXPORT ( const ovrAvatarBaseComponent * )
Get the Base Component.
Parameters
avatar
opaque pointer to the avatar
the base component
OVRN_EXPORT ( const ovrAvatarControllerComponent * )
Get the Left Controller Component.
Get the Right Controller Component.
Parameters
avatar
opaque pointer to the avatar
the left controller component
Parameters
avatar
opaque pointer to the avatar
the right controller component
OVRN_EXPORT ( const ovrAvatarHandComponent * )
Get the Left Hand Component.
Get the Right Hand Component.
Parameters
avatar
opaque pointer to the avatar
the left hand component
Parameters
avatar
opaque pointer to the avatar
the right hand component
OVRN_EXPORT ( ovrAvatarAssetType )
Get asset type.
Parameters
asset
opaque pointer to asset
the type of asset
OVRN_EXPORT ( const ovrAvatarMeshAssetData * )
Get mesh asset data.
Parameters
asset
opaque pointer to asset
mesh asset data
OVRN_EXPORT ( const ovrAvatarMeshAssetDataV2 * )
Get combined mesh asset data.
Parameters
asset
opaque pointer to asset
mesh asset data
OVRN_EXPORT ( const ovrAvatarAssetID * )
Get combined mesh asset IDs.
Parameters
asset
opaque pointer to asset
count the
number of assets used to combine the mesh
array of asset IDs of size count.
OVRN_EXPORT ( const ovrAvatar * )
OVRN_EXPORT ( const ovrAvatarTextureAssetData * )
Get texture asset data.
Parameters
asset
opaque pointer to asset
texture asset data
OVRN_EXPORT ( const ovrAvatarMaterialState * )
Get material asset data.
Parameters
asset
opaque pointer to asset
material asset data
OVRN_EXPORT ( ovrAvatarPacket * )
Finish packet recording.
Parameters
avatar
opaque pointer to the avatar
opaque pointer to the freshly recorded packet
OVRN_EXPORT ( bool )
Write a packet to a buffer.
Parameters
packet
opaque pointer to the packet
targetSize
size of the buffer to write to
targetBuffer
the buffer to write to
size of the packet in bytes
OVRN_EXPORT ( float )
Get duration of packet.
Parameters
packet
opaque pointer to the packet
duration in seconds
OVRN_EXPORT ( ovrAvatarTransform )
Integration section.
These functions are used to allow csharp (unity) to access internal members without needing to marshal
OVRN_EXPORT ( ovrAvatarMaterialState )
OVRN_EXPORT ( ovrAvatarPBSMaterialState )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
22
23
24
25
26
27
28
29
30
33
34
35
36
40
41
42
43
44
45
46
47
50
51
52
53
56
57
58
59
60
61
62
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
86
87
88
89
90
93
94
95
96
97
98
102
103
108
109
110
115
116
117
122
123
124
128
129
130
133
134
135
136
137
138
139
140
141
142
143
147
148
149
153
154
155
160
161
162
163
165
170
171
172
177
178
179
187
188
189
190
195
196
199
200
201
202
205
206
207
208
211
212
213
214
217
218
219
220
221
222
225
226
227
228
229
230
231
234
235
236
237
238
239
240
241
242
243
246
247
248
249
250
251
252
253
254
255
256
259
260
261
262
263
264
265
266
267
268
269
274
275
276
282
283
284
285
286
287
293
294
295
296
303
304
305
306
307
312
313
314
315
320
321
326
327
332
333
338
339
340
341
342
345
346
347
348
349
350
351
357
358
364
365
372
373
380
381
387
388
389
390
395
396
402
403
404
405
406
412
413
420
421
426
427
428
429
430
431
432
435
436
437
438
439
440
443
444
445
446
447
448
449
450
451
456
457
458
459
460
461
462
463
464
467
468
469
470
471
472
473
474
475
476
477
478
481
482
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
523
524
525
526
527
528
529
532
533
534
535
536
537
540
541
542
543
544
545
546
547
550
551
552
553
554
555
556
557
558
561
562
563
564
565
566
567
570
571
572
573
574
575
576
577
580
581
582
583
584
585
586
589
590
591
592
593
594
595
596
599
600
601
602
607
608
609
614
615
616
621
622
623
628
629
630
635
636
637
642
643
649
650
651
652
653
656
657
658
659
660
661
662
665
666
667
668
669
672
673
674
675
676
679
680
681
682
683
688
689
690
695
696
697
702
703
704
709
710
711
716
717
718
723
724
725
726
727
730
731
732
733
734
735
736
737
738
739
740
741
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
786
787
788
789
790
791
792
793
796
797
798
799
800
801
802
803
806
807
808
809
810
811
812
813
814
817
818
819
820
821
822
823
824
825
829
830
831
836
837
838
843
844
845
850
851
852
858
859
860
861
862
863
864
869
870
871
876
877
878
883
884
885
886
887
891
892
897
898
903
904
911
912
913
914
920
921
922
923
924
929
930
931
935
936
942
943
944
945
946
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
/**************************************************
\file      OVR_Avatar.h
\brief     OVR Avatar SDK public header file
\copyright 2016 Oculus VR, LLC All Rights reserved.
***************************************************/
#ifndef OVR_Avatar_h
#define OVR_Avatar_h

#include "OVR_Avatar_Defs.h"

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

#ifdef __cplusplus
extern"C" {
#endif


typedef uint64_t ovrAvatarAssetID;
typedefstruct ovrAvatarMessage_ ovrAvatarMessage;
typedefstruct ovrAvatarSpecification_ ovrAvatarSpecification;
typedefstruct ovrAvatarAsset_ ovrAvatarAsset;
typedefstruct ovrAvatar_ ovrAvatar;
typedefstruct ovrAvatarRenderPart_ ovrAvatarRenderPart;
typedefstruct ovrAvatarPacket_ ovrAvatarPacket;
typedefstruct ovrAvatarSpecificationRequest _ovrAvatarSpecificationRequest;

#define OVR_AVATAR_MAXIMUM_JOINT_COUNT 64

//Basic plugin management

OVRN_EXPORT (void) ovrAvatar_Initialize(constchar* appId);

#ifdef __ANDROID__
#include <jni.h>
OVRN_EXPORT (void) ovrAvatar_InitializeAndroid(constchar* appId, jobject activity, JNIEnv* jni);
OVRN_EXPORT (void) ovrAvatar_InitializeAndroidUnity(constchar* appId);
#endif

OVRN_EXPORT (void) ovrAvatar_Shutdown();

//Message system

typedefenum ovrAvatarMessageType_ {
    ovrAvatarMessageType_AvatarSpecification, 
    ovrAvatarMessageType_AssetLoaded,         
    ovrAvatarMessageType_Count
} ovrAvatarMessageType;


typedefenum ovrAvatarLogLevel_ {
    ovrAvatarLogLevel_Unknown = 0,
    ovrAvatarLogLevel_Default, 
    ovrAvatarLogLevel_Verbose,
    ovrAvatarLogLevel_Debug,
    ovrAvatarLogLevel_Info,
    ovrAvatarLogLevel_Warn,
    ovrAvatarLogLevel_Error,
    ovrAvatarLogLevel_Fatal,
    ovrAvatarLogLevel_Silent,

} ovrAvatarLogLevel;

typedefenum ovrAvatarAssetLevelOfDetail_ {
    ovrAvatarAssetLevelOfDetail_One = 1,
    ovrAvatarAssetLevelOfDetail_Three = 3,
    ovrAvatarAssetLevelOfDetail_Five = 5
} ovrAvatarAssetLevelOfDetail;

typedefstruct ovrAvatarMessage_AvatarSpecification_ {
    ovrAvatarSpecification* avatarSpec;   
    uint64_t                oculusUserID; 
} ovrAvatarMessage_AvatarSpecification;

typedefstruct ovrAvatarMessage_AssetLoaded_ {
    ovrAvatarAssetID assetID;           
    ovrAvatarAsset* asset;              
    ovrAvatarAssetLevelOfDetail lod;    
} ovrAvatarMessage_AssetLoaded;

OVRN_EXPORT (ovrAvatarMessage*) ovrAvatarMessage_Pop();

OVRN_EXPORT (ovrAvatarMessageType) ovrAvatarMessage_GetType(
const ovrAvatarMessage* msg);

OVRN_EXPORT (const ovrAvatarMessage_AvatarSpecification*) ovrAvatarMessage_GetAvatarSpecification(
const ovrAvatarMessage* msg);

OVRN_EXPORT (const ovrAvatarMessage_AssetLoaded*) ovrAvatarMessage_GetAssetLoaded(
const ovrAvatarMessage* msg);

OVRN_EXPORT (void) ovrAvatarMessage_Free(
const ovrAvatarMessage* msg);

typedefenum ovrAvatarCapabilities_ {
    ovrAvatarCapability_Body = 1 << 0,  
    ovrAvatarCapability_Hands = 1 << 1, 
    ovrAvatarCapability_Base = 1 << 2,  
    ovrAvatarCapability_Voice = 1 << 3, 
    ovrAvatarCapability_BodyTilt = 1 << 4, 
    ovrAvatarCapability_All = -1        
}ovrAvatarCapabilities;

//Avatar creation and destruction

OVRN_EXPORT(ovrAvatarSpecificationRequest*) ovrAvatarSpecificationRequest_Create(
    uint64_t userID);

OVRN_EXPORT(void) ovrAvatarSpecificationRequest_Destroy(
    ovrAvatarSpecificationRequest* specificationRequest);

OVRN_EXPORT(void) ovrAvatarSpecificationRequest_SetCombineMeshes(
    ovrAvatarSpecificationRequest* request, 
bool useCombinedMesh);


OVRN_EXPORT (void) ovrAvatar_RequestAvatarSpecification(
    uint64_t userID);

OVRN_EXPORT(void) ovrAvatar_RequestAvatarSpecificationFromSpecRequest(
    ovrAvatarSpecificationRequest* spec);

OVRN_EXPORT (ovrAvatar*) ovrAvatar_Create(
const ovrAvatarSpecification* avatarSpecification,
    ovrAvatarCapabilities capabilities);

OVRN_EXPORT (void) ovrAvatar_Destroy(ovrAvatar* avatar);

typedefstruct ovrAvatarVector3f_ {
float x, y, z;
} ovrAvatarVector3f;

typedefstruct ovrAvatarVector4f_ {
float x, y, z, w;
} ovrAvatarVector4f;

typedefstruct ovrAvatarQuatf_ {
float x, y, z, w;
} ovrAvatarQuatf;

typedefstruct ovrAvatarTransform_ {
    ovrAvatarVector3f position;
    ovrAvatarQuatf orientation;
    ovrAvatarVector3f scale;
} ovrAvatarTransform;

typedefenum ovrAvatarButton_ {
    ovrAvatarButton_One = 0x0001,      
    ovrAvatarButton_Two = 0x0002,      
    ovrAvatarButton_Three = 0x0004,    
    ovrAvatarButton_Joystick = 0x0008, 
} ovrAvatarButton;

typedefenum ovrAvatarTouch_ {
    ovrAvatarTouch_One = 0x0001,       
    ovrAvatarTouch_Two = 0x0002,       
    ovrAvatarTouch_Joystick = 0x0004,  
    ovrAvatarTouch_ThumbRest = 0x0008, 
    ovrAvatarTouch_Index = 0x0010,     
    ovrAvatarTouch_Pointing = 0x0040,  
    ovrAvatarTouch_ThumbUp = 0x0080,   
} ovrAvatarTouch;

typedefenum ovrAvatarControllerType_
{
    ovrAvatarControllerType_Touch,
    ovrAvatarControllerType_Malibu,
    ovrAvatarControllerType_Go,

    ovrAvatarControllerType_Count,
} ovrAvatarControllerType;



typedefstruct ovrAvatarHandInputState_ {
    ovrAvatarTransform transform; 
    uint32_t buttonMask;          
    uint32_t touchMask;           
float joystickX;              
float joystickY;              
float indexTrigger;           
float handTrigger;            
bool isActive;                
} ovrAvatarHandInputState;

OVRN_EXPORT (void) ovrAvatarPose_UpdateBody(ovrAvatar* avatar,
                                          ovrAvatarTransform headPose);

typedefconstfloat VOICE_SAMPLES_[];
OVRN_EXPORT (void) ovrAvatarPose_UpdateVoiceVisualization(
    ovrAvatar* avatar,
    uint32_t voiceSampleCount,
    VOICE_SAMPLES_);

OVRN_EXPORT (void) ovrAvatarPose_UpdateHands(ovrAvatar* avatar,
                                           ovrAvatarHandInputState inputStateLeft,
                                           ovrAvatarHandInputState inputStateRight);

OVRN_EXPORT(void) ovrAvatarPose_Update3DofHands(ovrAvatar* avatar,
    ovrAvatarHandInputState* inputStateLeft,
    ovrAvatarHandInputState* inputStateRight,
    ovrAvatarControllerType type);

OVRN_EXPORT (void) ovrAvatarPose_Finalize(ovrAvatar* avatar, float deltaSeconds);

//Showing controllers

OVRN_EXPORT (void) ovrAvatar_SetLeftControllerVisibility(ovrAvatar* avatar, bool visible);

OVRN_EXPORT (void) ovrAvatar_SetRightControllerVisibility(ovrAvatar* avatar, bool visible);

OVRN_EXPORT (void) ovrAvatar_SetLeftHandVisibility(ovrAvatar* avatar, bool visible);

OVRN_EXPORT (void) ovrAvatar_SetRightHandVisibility(ovrAvatar* avatar, bool visible);


//Hand poses/grips

typedefenum ovrAvatarHandGesture_ {
    ovrAvatarHandGesture_Default,
    ovrAvatarHandGesture_GripSphere,
    ovrAvatarHandGesture_GripCube,
    ovrAvatarHandGesture_Count
} ovrAvatarHandGesture;

OVRN_EXPORT (void) ovrAvatar_SetLeftHandGesture(ovrAvatar* avatar, ovrAvatarHandGesture gesture);

OVRN_EXPORT (void) ovrAvatar_SetRightHandGesture(ovrAvatar* avatar, ovrAvatarHandGesture gesture);

OVRN_EXPORT (void) ovrAvatar_SetLeftHandCustomGesture(ovrAvatar* avatar, uint32_t jointCount, const ovrAvatarTransform *customJointTransforms);

OVRN_EXPORT (void) ovrAvatar_SetRightHandCustomGesture(ovrAvatar* avatar, uint32_t jointCount, const ovrAvatarTransform *customJointTransforms);

OVRN_EXPORT (void) ovrAvatar_SetActiveCapabilities(ovrAvatar* avatar, ovrAvatarCapabilities capabilities);

//Base manipulation

OVRN_EXPORT (void) ovrAvatar_ClearCustomBasePosition(ovrAvatar* avatar);

OVRN_EXPORT (void) ovrAvatar_SetCustomBasePosition(ovrAvatar* avatar, ovrAvatarVector3f position);

// Asset manifest helpers


OVRN_EXPORT (uint32_t) ovrAvatar_GetReferencedAssetCount(ovrAvatar* avatar);

OVRN_EXPORT (ovrAvatarAssetID) ovrAvatar_GetReferencedAsset(ovrAvatar* avatar, uint32_t index);

OVRN_EXPORT(void) ovrAvatar_GetCombinedMeshAlphaData(
const ovrAvatar* avatar,
    ovrAvatarAssetID* textureID,
    ovrAvatarVector4f* offset);

//Avatar rendering

typedefenum ovrAvatarMaterialLayerBlendMode_ {
    ovrAvatarMaterialLayerBlendMode_Add,      
    ovrAvatarMaterialLayerBlendMode_Multiply, 
    ovrAvatarMaterialLayerBlendMode_Count
} ovrAvatarMaterialLayerBlendMode;

typedefenum ovrAvatarMaterialLayerSampleMode_ {
    ovrAvatarMaterialLayerSampleMode_Color,                
    ovrAvatarMaterialLayerSampleMode_Texture,              
    ovrAvatarMaterialLayerSampleMode_TextureSingleChannel, 
    ovrAvatarMaterialLayerSampleMode_Parallax,             
    ovrAvatarMaterialLayerSampleMode_RDSM,                 
    ovrAvatarMaterialLayerSampleMode_Count
} ovrAvatarMaterialLayerSampleMode;

typedefenum ovrAvatarMaterialMaskType_ {
    ovrAvatarMaterialMaskType_None,           
    ovrAvatarMaterialMaskType_Positional,     
    ovrAvatarMaterialMaskType_ViewReflection, 
    ovrAvatarMaterialMaskType_Fresnel,        
    ovrAvatarMaterialMaskType_Pulse,          
    ovrAvatarMaterialMaskType_Count
} ovrAvatarMaterialMaskType;

typedefstruct ovrAvatarMaterialLayerState_ {
    ovrAvatarMaterialLayerBlendMode     blendMode;         
    ovrAvatarMaterialLayerSampleMode    sampleMode;        
    ovrAvatarMaterialMaskType           maskType;          
    ovrAvatarVector4f                   layerColor;        
    ovrAvatarVector4f                   sampleParameters;  
    ovrAvatarAssetID                    sampleTexture;     
    ovrAvatarVector4f                   sampleScaleOffset; 
    ovrAvatarVector4f                   maskParameters;    
    ovrAvatarVector4f                   maskAxis;          
} ovrAvatarMaterialLayerState;

#define OVR_AVATAR_MAX_MATERIAL_LAYER_COUNT 8

typedefstruct ovrAvatarMaterialState_ {
    ovrAvatarVector4f           baseColor;               
    ovrAvatarMaterialMaskType   baseMaskType;            
    ovrAvatarVector4f           baseMaskParameters;      
    ovrAvatarVector4f           baseMaskAxis;            
    ovrAvatarAssetID            alphaMaskTextureID;      
    ovrAvatarVector4f           alphaMaskScaleOffset;    
    ovrAvatarAssetID            normalMapTextureID;      
    ovrAvatarVector4f           normalMapScaleOffset;    
    ovrAvatarAssetID            parallaxMapTextureID;    
    ovrAvatarVector4f           parallaxMapScaleOffset;  
    ovrAvatarAssetID            roughnessMapTextureID;   
    ovrAvatarVector4f           roughnessMapScaleOffset; 
    uint32_t                    layerCount;              
    ovrAvatarMaterialLayerState layers[OVR_AVATAR_MAX_MATERIAL_LAYER_COUNT]; 
} ovrAvatarMaterialState;


typedefstruct ovrAvatarPBSMaterialState_ {
    ovrAvatarVector4f               baseColor;               
    ovrAvatarAssetID                albedoTextureID;         
    ovrAvatarVector4f               albedoMultiplier;        
    ovrAvatarAssetID                metallicnessTextureID;   
float                           glossinessScale;         
    ovrAvatarAssetID                normalTextureID;         
    ovrAvatarAssetID                heightTextureID;         
    ovrAvatarAssetID                occlusionTextureID;      
    ovrAvatarAssetID                emissionTextureID;       
    ovrAvatarVector4f               emissionMultiplier;      
    ovrAvatarAssetID                detailMaskTextureID;     
    ovrAvatarAssetID                detailAlbedoTextureID;   
    ovrAvatarAssetID                detailNormalTextureID;   
} ovrAvatarPBSMaterialState;

typedefstruct ovrAvatarSkinnedMeshPose_ {
    uint32_t jointCount; 
    ovrAvatarTransform jointTransform[OVR_AVATAR_MAXIMUM_JOINT_COUNT]; 
int jointParents[OVR_AVATAR_MAXIMUM_JOINT_COUNT]; 
constchar * jointNames[OVR_AVATAR_MAXIMUM_JOINT_COUNT]; 
} ovrAvatarSkinnedMeshPose;

typedefenum ovrAvatarVisibilityFlags_ {
    ovrAvatarVisibilityFlag_FirstPerson = 1 << 0, 
    ovrAvatarVisibilityFlag_ThirdPerson = 1 << 1, 
    ovrAvatarVisibilityFlag_SelfOccluding = 1 << 2, 
} ovrAvatarVisibilityFlags;

typedefstruct ovrAvatarRenderPart_SkinnedMeshRender_ {
    ovrAvatarTransform       localTransform; 
    uint32_t                 visibilityMask; 
    ovrAvatarAssetID         meshAssetID;    
    ovrAvatarMaterialState   materialState;  
    ovrAvatarSkinnedMeshPose skinnedPose;    
} ovrAvatarRenderPart_SkinnedMeshRender;

typedefstruct ovrAvatarRenderPart_SkinnedMeshRenderPBS_ {
    ovrAvatarTransform       localTransform;        
    uint32_t                 visibilityMask;        
    ovrAvatarAssetID         meshAssetID;           
    ovrAvatarAssetID         albedoTextureAssetID;  
    ovrAvatarAssetID         surfaceTextureAssetID; 
    ovrAvatarSkinnedMeshPose skinnedPose;           
} ovrAvatarRenderPart_SkinnedMeshRenderPBS;

typedefstruct ovrAvatarRenderPart_ProjectorRender_ {
    ovrAvatarTransform      localTransform;  
    uint32_t                componentIndex;  
    uint32_t                renderPartIndex; 
    ovrAvatarMaterialState  materialState;   
} ovrAvatarRenderPart_ProjectorRender;

typedefstruct ovrAvatarRenderPart_SkinnedMeshRenderPBSV2_ {
    ovrAvatarTransform          localTransform; 
    uint32_t                    visibilityMask; 
    ovrAvatarAssetID            meshAssetID;    
    ovrAvatarPBSMaterialState   materialState;  
    ovrAvatarSkinnedMeshPose    skinnedPose;    
} ovrAvatarRenderPart_SkinnedMeshRenderPBS_V2;

typedefstruct ovrAvatarComponent_ {
    ovrAvatarTransform transform; 
    uint32_t renderPartCount;     
const ovrAvatarRenderPart* const* renderParts; 
constchar* name;             
} ovrAvatarComponent;

typedefenum ovrAvatarRenderPartType_ {
    ovrAvatarRenderPartType_SkinnedMeshRender,            
    ovrAvatarRenderPartType_SkinnedMeshRenderPBS,         
    ovrAvatarRenderPartType_ProjectorRender,              
    ovrAvatarRenderPartType_SkinnedMeshRenderPBS_V2,      
    ovrAvatarRenderPartType_Count                         
} ovrAvatarRenderPartType;

OVRN_EXPORT(const ovrAvatarPBSMaterialState*) ovrAvatar_GetBodyPBSMaterialStates(
const ovrAvatarRenderPart* renderPart,
    uint32_t* count);

OVRN_EXPORT (ovrAvatarRenderPartType) ovrAvatarRenderPart_GetType(
const ovrAvatarRenderPart* renderPart);

OVRN_EXPORT (const ovrAvatarRenderPart_SkinnedMeshRender*) ovrAvatarRenderPart_GetSkinnedMeshRender(
const ovrAvatarRenderPart* renderPart);

OVRN_EXPORT (const ovrAvatarRenderPart_SkinnedMeshRenderPBS*) ovrAvatarRenderPart_GetSkinnedMeshRenderPBS(
const ovrAvatarRenderPart* renderPart);

OVRN_EXPORT(const ovrAvatarRenderPart_SkinnedMeshRenderPBS_V2*) ovrAvatarRenderPart_GetSkinnedMeshRenderPBSV2(
const ovrAvatarRenderPart* renderPart);

OVRN_EXPORT (const ovrAvatarRenderPart_ProjectorRender*) ovrAvatarRenderPart_GetProjectorRender(
const ovrAvatarRenderPart* renderPart);

OVRN_EXPORT (uint32_t) ovrAvatarComponent_Count(const ovrAvatar* avatar);

OVRN_EXPORT (const ovrAvatarComponent*) ovrAvatarComponent_Get(
const ovrAvatar* avatar, uint32_t index);

//Avatar semantic information

typedefstruct ovrAvatarBodyComponent_ {
    ovrAvatarTransform  leftEyeTransform;      
    ovrAvatarTransform  rightEyeTransform;     
    ovrAvatarTransform  centerEyeTransform;    
const ovrAvatarComponent* renderComponent; 
} ovrAvatarBodyComponent;

typedefstruct ovrAvatarControllerComponent_ {
    ovrAvatarHandInputState inputState;        
const ovrAvatarComponent* renderComponent; 
} ovrAvatarControllerComponent;

typedefstruct ovrAvatarBaseComponent_ {
    ovrAvatarVector3f basePosition;            
const ovrAvatarComponent* renderComponent; 
} ovrAvatarBaseComponent;

typedefstruct ovrAvatarHandComponent_ {
    ovrAvatarHandInputState inputState;        
const ovrAvatarComponent* renderComponent; 
} ovrAvatarHandComponent;

OVRN_EXPORT (const ovrAvatarBodyComponent*) ovrAvatarPose_GetBodyComponent(
    ovrAvatar* avatar);

OVRN_EXPORT (const ovrAvatarBaseComponent*) ovrAvatarPose_GetBaseComponent(
    ovrAvatar* avatar);

OVRN_EXPORT (const ovrAvatarControllerComponent*) ovrAvatarPose_GetLeftControllerComponent(
    ovrAvatar* avatar);

OVRN_EXPORT (const ovrAvatarControllerComponent*) ovrAvatarPose_GetRightControllerComponent(
    ovrAvatar* avatar);

OVRN_EXPORT (const ovrAvatarHandComponent*) ovrAvatarPose_GetLeftHandComponent(
    ovrAvatar* avatar);

OVRN_EXPORT (const ovrAvatarHandComponent*) ovrAvatarPose_GetRightHandComponent(
    ovrAvatar* avatar);

//Assets

typedefenum ovrAvatarAssetType_ {
    ovrAvatarAssetType_Mesh,         
    ovrAvatarAssetType_Texture,      
    ovrAvatarAssetType_Pose,         
    ovrAvatarAssetType_Material,     
    ovrAvatarAssetType_CombinedMesh, 
    ovrAvatarAssetType_PBSMaterial,  

    ovrAvatarAssetType_FailedLoad,   
    ovrAvatarAssetType_Count         
} ovrAvatarAssetType;

typedefstruct ovrAvatarMeshVertex_ {
float   x;  
float   y;  
float   z;  
float   nx; 
float   ny; 
float   nz; 
float   tx; 
float   ty; 
float   tz; 
float   tw; 
float   u;  
float   v;  
    uint8_t blendIndices[4]; 
float   blendWeights[4]; 
} ovrAvatarMeshVertex;

typedefstruct ovrAvatarMeshVertexV2_ {
float   x;  
float   y;  
float   z;  
float   nx; 
float   ny; 
float   nz; 
float   tx; 
float   ty; 
float   tz; 
float   tw; 
float   u;  
float   v;  
float   r;  
float   g;  
float   b;  
float   a;  
    uint8_t blendIndices[4]; 
float   blendWeights[4]; 
} ovrAvatarMeshVertexV2;

typedefstruct ovrAvatarMeshAssetData_ {
    uint32_t                   vertexCount;     
const ovrAvatarMeshVertex* vertexBuffer;    
    uint32_t                   indexCount;      
const uint16_t*            indexBuffer;     
    ovrAvatarSkinnedMeshPose   skinnedBindPose; 
} ovrAvatarMeshAssetData;

typedefstruct ovrAvatarMeshAssetDataV2_ {
    uint32_t                            vertexCount;     
const ovrAvatarMeshVertexV2*        vertexBuffer;    
    uint32_t                            indexCount;      
const uint16_t*                     indexBuffer;     
    ovrAvatarSkinnedMeshPose            skinnedBindPose; 
} ovrAvatarMeshAssetDataV2;

typedefenum ovrAvatarTextureFormat_ {
    ovrAvatarTextureFormat_RGB24 = 0,                   
    ovrAvatarTextureFormat_DXT1 = 1,                    
    ovrAvatarTextureFormat_DXT5 = 2,                    
    ovrAvatarTextureFormat_ASTC_RGB_6x6_DEPRECATED = 3, 
    ovrAvatarTextureFormat_ASTC_RGB_6x6_MIPMAPS = 4,    
    ovrAvatarTextureFormat_Count                        
}ovrAvatarTextureFormat;

typedefstruct ovrAvatarTextureAssetData_ {
    ovrAvatarTextureFormat  format;          
    uint32_t                sizeX;           
    uint32_t                sizeY;           
    uint32_t                mipCount;        
    uint64_t                textureDataSize; 
const uint8_t*          textureData;     
} ovrAvatarTextureAssetData;

OVRN_EXPORT (void) ovrAvatarAsset_BeginLoading(
    ovrAvatarAssetID assetID);

OVRN_EXPORT (ovrAvatarAssetType) ovrAvatarAsset_GetType(
const ovrAvatarAsset* asset);

OVRN_EXPORT (const ovrAvatarMeshAssetData*) ovrAvatarAsset_GetMeshData(
const ovrAvatarAsset* asset);

OVRN_EXPORT(const ovrAvatarMeshAssetDataV2*) ovrAvatarAsset_GetCombinedMeshData(
const ovrAvatarAsset* asset);

OVRN_EXPORT(const ovrAvatarAssetID*) ovrAvatarAsset_GetCombinedMeshIDs(
const ovrAvatarAsset* asset,
    uint32_t* count);

OVRN_EXPORT(const ovrAvatar*) ovrAvatarAsset_GetAvatar(
const ovrAvatarAsset* asset);

OVRN_EXPORT (const ovrAvatarTextureAssetData*) ovrAvatarAsset_GetTextureData(
const ovrAvatarAsset* asset);

OVRN_EXPORT(const ovrAvatarMaterialState*) ovrAvatarAsset_GetMaterialData(
const ovrAvatarAsset* assetHandle);

OVRN_EXPORT(const ovrAvatarPBSMaterialState*) ovrAvatarAsset_GetPBSMaterialData(
const ovrAvatarAsset* assetHandle);

//Avatar recording and playback

OVRN_EXPORT (void) ovrAvatarPacket_BeginRecording(ovrAvatar* avatar);

OVRN_EXPORT (ovrAvatarPacket*) ovrAvatarPacket_EndRecording(ovrAvatar* avatar);

OVRN_EXPORT (uint32_t) ovrAvatarPacket_GetSize(const ovrAvatarPacket* packet);

OVRN_EXPORT (bool) ovrAvatarPacket_Write(const ovrAvatarPacket* packet,
                                       uint32_t targetSize,
                                       uint8_t* targetBuffer);

typedefconst uint8_t BUFFER_[];
OVRN_EXPORT (ovrAvatarPacket*) ovrAvatarPacket_Read(
    uint32_t bufferSize,
    BUFFER_);

OVRN_EXPORT (float) ovrAvatarPacket_GetDurationSeconds(
const ovrAvatarPacket* packet);

OVRN_EXPORT (void) ovrAvatarPacket_Free(ovrAvatarPacket* packet);

OVRN_EXPORT (void) ovrAvatar_UpdatePoseFromPacket(
    ovrAvatar* avatar,
const ovrAvatarPacket* packet,
float secondsFromPacketStart);


OVRN_EXPORT (ovrAvatarTransform) ovrAvatarSkinnedMeshRender_GetTransform(const ovrAvatarRenderPart* renderPart);
OVRN_EXPORT (ovrAvatarTransform) ovrAvatarSkinnedMeshRenderPBS_GetTransform(const ovrAvatarRenderPart* renderPart);
OVRN_EXPORT (ovrAvatarTransform) ovrAvatarSkinnedMeshRenderPBSV2_GetTransform(const ovrAvatarRenderPart* renderPart);
OVRN_EXPORT (uint32_t) ovrAvatarSkinnedMeshRender_GetVisibilityMask(const ovrAvatarRenderPart* renderPart);
OVRN_EXPORT (uint32_t) ovrAvatarSkinnedMeshRenderPBS_GetVisibilityMask(const ovrAvatarRenderPart* renderPart);
OVRN_EXPORT (uint32_t) ovrAvatarSkinnedMeshRenderPBSV2_GetVisibilityMask(const ovrAvatarRenderPart* renderPart);
OVRN_EXPORT (bool) ovrAvatarSkinnedMeshRender_MaterialStateChanged(const ovrAvatarRenderPart* renderPart);
OVRN_EXPORT (bool) ovrAvatarSkinnedMeshRenderPBSV2_MaterialStateChanged(const ovrAvatarRenderPart* renderPart);
OVRN_EXPORT (ovrAvatarMaterialState) ovrAvatarSkinnedMeshRender_GetMaterialState(const ovrAvatarRenderPart* renderPart);
OVRN_EXPORT (ovrAvatarPBSMaterialState) ovrAvatarSkinnedMeshRenderPBSV2_GetPBSMaterialState(const ovrAvatarRenderPart* renderPart);
OVRN_EXPORT (uint64_t) ovrAvatarSkinnedMeshRender_GetDirtyJoints(const ovrAvatarRenderPart* renderPart);
OVRN_EXPORT (uint64_t) ovrAvatarSkinnedMeshRenderPBS_GetDirtyJoints(const ovrAvatarRenderPart* renderPart);
OVRN_EXPORT (uint64_t) ovrAvatarSkinnedMeshRenderPBSV2_GetDirtyJoints(const ovrAvatarRenderPart* renderPart);
OVRN_EXPORT (ovrAvatarTransform) ovrAvatarSkinnedMeshRender_GetJointTransform(const ovrAvatarRenderPart* renderPart, uint32_t jointIndex);
OVRN_EXPORT (ovrAvatarTransform) ovrAvatarSkinnedMeshRenderPBS_GetJointTransform(const ovrAvatarRenderPart* renderPart, uint32_t jointIndex);
OVRN_EXPORT (ovrAvatarTransform) ovrAvatarSkinnedMeshRenderPBSV2_GetJointTransform(const ovrAvatarRenderPart* renderPart, uint32_t jointIndex);
OVRN_EXPORT (ovrAvatarAssetID) ovrAvatarSkinnedMeshRenderPBS_GetAlbedoTextureAssetID(const ovrAvatarRenderPart* renderPart);
OVRN_EXPORT (ovrAvatarAssetID) ovrAvatarSkinnedMeshRenderPBS_GetSurfaceTextureAssetID(const ovrAvatarRenderPart* renderPart);

typedef void (* LoggingCallback) (constchar * str);
OVRN_EXPORT(void) ovrAvatar_RegisterLoggingCallback(LoggingCallback callback);
OVRN_EXPORT(void) ovrAvatar_SetLoggingLevel(ovrAvatarLogLevel level);

#ifdef __cplusplus
}
#endif

#endif // OVR_Avatar_h
The documentation for this file was generated from the following file: Include/OVR_Avatar.h