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
ovrAvatarCapabilities {
}
Avatar capabilities mask.
enum
ovrAvatarButton {
}
Button Mask.
enum
ovrAvatarTouch {
}
Touch Mask.
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_
const float
Update the voice visualization component of the avatar.
const uint8_t
BUFFER_ ( )
Read a packet out of a buffer.

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.
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 type of a render part.
Get the skinned mesh render 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 texture asset data.
Get texture 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.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.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_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_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
ASTC compressed texture. ASTC Header is included in texture data.
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 ( )
uint32_t VOICE_SAMPLES_ ( )
Update the voice visualization component of the avatar.
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.
bufferSize size of the buffer in bytes buffer the buffer to read from opaque pointer to the new packet

Variable Documentation

ovrAvatarCapabilities capabilities ( )
ovrAvatarTransform headPose ( )
uint32_t voiceSampleCount ( )
ovrAvatarHandInputState inputStateLeft ( )
ovrAvatarHandInputState ovrAvatarHandInputState inputStateRight ( )
float deltaSeconds ( )
bool visible ( )
ovrAvatarHandGesture gesture ( )
uint32_t jointCount ( )
uint32_t const ovrAvatarTransform * customJointTransforms ( )
ovrAvatarVector3f position ( )
uint32_t index ( )
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.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 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 user ID.Free the message when you're done processing the contents.Shut down the SDK. appId the Oculus application ID. msg the message 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. ovrAvatarMessage_AvatarSpecification avatar an opaque pointer to the avatar state ovrAvatar_Create 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 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 ovrAvatar_SetLeftHandCustomGesture 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 ovrAvatar_SetRightHandCustomGesture Using this disables the default hand animations. To restore them, use ovrAvatar_SetLeftHandGesture with ovrAvatarHandGesture_Default. 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 ovrAvatar_SetLeftHandGesture Using this disables the default hand animations. To restore them, use ovrAvatar_SetRightHandGesture with ovrAvatarHandGesture_Default. 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 ovrAvatar_SetRightHandGesture 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 ovrAvatar_Create avatar an opaque pointer to the avatar state ovrAvatar_SetCustomBasePosition avatar an opaque pointer to the avatar state position the position of the base of the avatar ovrAvatar_ClearCustomBasePosition 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.
msg the message the message type
OVRN_EXPORT ( const ovrAvatarMessage_AvatarSpecification * )
Get the avatar specification message contents.
msg the message the avatar specification message contents
OVRN_EXPORT ( const ovrAvatarMessage_AssetLoaded * )
Get the asset loaded message.
msg the message the asset loaded message contents
OVRN_EXPORT ( ovrAvatar * )
Create an avatar.
avatarSpecification the avatar specification. ovrAvatar_RequestAvatarSpecification 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 ovrAvatar_SetActiveCapabilities 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. avatar an opaque pointer to the avatar state asset count ovrAvatar_GetReferencedAsset avatar opaque pointer to the avatar count of avatar components packet opaque pointer to the packet size of the packet in bytes
OVRN_EXPORT ( ovrAvatarAssetID )
Get the referenced asset for an index.
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 ovrAvatar_GetReferencedAssetCount
OVRN_EXPORT ( ovrAvatarRenderPartType )
Get the type of a render part.
renderPart an opaque pointer to the render part type of the render part
OVRN_EXPORT ( const ovrAvatarRenderPart_SkinnedMeshRender * )
Get the skinned mesh render part.
renderPart an opaque pointer to the render part skinned mesh render part
Get the skinned mesh with physically based rendering part.
renderPart an opaque pointer to the render part skinned mesh render PBS part
OVRN_EXPORT ( const ovrAvatarRenderPart_ProjectorRender * )
Get the projector render part.
renderPart an opaque pointer to the render part projector render part
OVRN_EXPORT ( const ovrAvatarComponent * )
Get avatar component at a given index.
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.
avatar opaque pointer to the avatar the body component
OVRN_EXPORT ( const ovrAvatarBaseComponent * )
Get the Base Component.
avatar opaque pointer to the avatar the base component
OVRN_EXPORT ( const ovrAvatarControllerComponent * )
Get the Left Controller Component.
Get the Right Controller Component. avatar opaque pointer to the avatar the left controller component avatar opaque pointer to the avatar the right controller component
OVRN_EXPORT ( const ovrAvatarHandComponent * )
Get the Left Hand Component.
Get the Right Hand Component. avatar opaque pointer to the avatar the left hand component avatar opaque pointer to the avatar the right hand component
OVRN_EXPORT ( ovrAvatarAssetType )
Get asset type.
asset opaque pointer to asset the type of asset
OVRN_EXPORT ( const ovrAvatarMeshAssetData * )
Get mesh asset data.
asset opaque pointer to asset mesh asset data
OVRN_EXPORT ( const ovrAvatarTextureAssetData * )
Get texture asset data.
asset opaque pointer to asset texture asset data
OVRN_EXPORT ( const ovrAvatarMaterialState * )
Get texture asset data.
asset opaque pointer to asset material asset data
OVRN_EXPORT ( ovrAvatarPacket * )
Finish packet recording.
avatar opaque pointer to the avatar opaque pointer to the freshly recorded packet
OVRN_EXPORT ( bool )
Write a packet to a buffer.
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.
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 )
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
32
33
34
35
39
40
41
42
43
44
45
46
49
50
51
52
55
56
57
58
59
60
63
64
65
66
67
70
71
72
73
74
78
79
84
85
86
91
92
93
98
99
100
104
105
106
109
110
111
112
113
114
115
116
117
118
119
124
125
126
134
135
136
137
142
143
146
147
148
149
152
153
154
155
158
159
160
161
164
165
166
167
168
169
172
173
174
175
176
177
178
181
182
183
184
185
186
187
188
189
190
193
194
195
196
197
198
199
200
201
202
203
208
209
210
216
217
218
219
220
221
227
228
229
230
235
236
237
238
243
244
249
250
251
252
255
256
257
258
259
260
261
267
268
274
275
282
283
290
291
297
298
299
300
305
306
312
313
314
315
316
322
323
330
331
332
333
336
337
338
339
340
341
344
345
346
347
348
349
350
351
352
357
358
359
360
361
362
363
364
365
368
369
370
371
372
373
374
375
376
377
378
379
382
383
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
405
406
407
408
409
410
411
414
415
416
417
418
419
422
423
424
425
426
427
428
429
432
433
434
435
436
437
438
439
440
443
444
445
446
447
448
449
452
453
454
455
456
457
458
461
462
463
464
465
466
467
472
473
474
479
480
481
486
487
488
493
494
495
500
501
507
508
509
510
511
514
515
516
517
518
519
520
523
524
525
526
527
530
531
532
533
534
537
538
539
540
541
546
547
548
553
554
555
560
561
562
567
568
569
574
575
576
581
582
583
584
585
588
589
590
591
592
593
594
595
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
617
618
619
620
621
622
623
624
627
628
629
630
631
632
633
634
637
638
639
640
641
642
643
644
645
649
650
651
656
657
658
663
664
665
670
671
672
677
678
679
680
681
682
686
687
692
693
698
699
706
707
708
709
715
716
717
718
719
724
725
726
730
731
737
738
739
740
741
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
/**************************************************
\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;

#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;

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

typedefstruct ovrAvatarMessage_AssetLoaded_ {
    ovrAvatarAssetID assetID; 
    ovrAvatarAsset* asset;    
} 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 (void) ovrAvatar_RequestAvatarSpecification(
    uint64_t userID);

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;

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_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);

//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);

//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 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 ovrAvatarComponent_ {
    ovrAvatarTransform transform; 
    uint32_t renderPartCount;     
const ovrAvatarRenderPart* const* renderParts; 
constchar* name;             
} ovrAvatarComponent;

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

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_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_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 ovrAvatarMeshAssetData_ {
    uint32_t                   vertexCount;     
const ovrAvatarMeshVertex* vertexBuffer;    
    uint32_t                   indexCount;      
const uint16_t*            indexBuffer;     
    ovrAvatarSkinnedMeshPose   skinnedBindPose; 
} ovrAvatarMeshAssetData;

typedefenum ovrAvatarTextureFormat_ {
    ovrAvatarTextureFormat_RGB24,         
    ovrAvatarTextureFormat_DXT1,          
    ovrAvatarTextureFormat_DXT5,          
    ovrAvatarTextureFormat_ASTC_RGB_6x6,  
    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 ovrAvatarTextureAssetData*) ovrAvatarAsset_GetTextureData(
const ovrAvatarAsset* asset);

OVRN_EXPORT(const ovrAvatarMaterialState*) ovrAvatarAsset_GetMaterialData(
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 (uint32_t) ovrAvatarSkinnedMeshRender_GetVisibilityMask(const ovrAvatarRenderPart* renderPart);
OVRN_EXPORT (uint32_t) ovrAvatarSkinnedMeshRenderPBS_GetVisibilityMask(const ovrAvatarRenderPart* renderPart);
OVRN_EXPORT (bool) ovrAvatarSkinnedMeshRender_MaterialStateChanged(const ovrAvatarRenderPart* renderPart);
OVRN_EXPORT (ovrAvatarMaterialState) ovrAvatarSkinnedMeshRender_GetMaterialState(const ovrAvatarRenderPart* renderPart);
OVRN_EXPORT (uint64_t) ovrAvatarSkinnedMeshRender_GetDirtyJoints(const ovrAvatarRenderPart* renderPart);
OVRN_EXPORT (uint64_t) ovrAvatarSkinnedMeshRenderPBS_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 (ovrAvatarAssetID) ovrAvatarSkinnedMeshRenderPBS_GetAlbedoTextureAssetID(const ovrAvatarRenderPart* renderPart);
OVRN_EXPORT (ovrAvatarAssetID) ovrAvatarSkinnedMeshRenderPBS_GetSurfaceTextureAssetID(const ovrAvatarRenderPart* renderPart);

#ifdef __cplusplus
}
#endif

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