Banuba SDK
BNBMeshInstance.h
Go to the documentation of this file.
1 // AUTOGENERATED FILE - DO NOT MODIFY!
2 // This file was generated by Djinni from scene.djinni
3 
4 #import "BNBAnimationMode.h"
5 #import <Foundation/Foundation.h>
6 @class BNBComponent;
7 @class BNBMaterial;
8 @class BNBMesh;
9 @class BNBMeshInstance;
10 @class BNBPhysicsSimulator;
11 
12 
13 /**class which is the container for meshes and materials and provide interface for animation controlling. Subclass of component */
14 
15 #ifndef DJINNI_EXPORT
16  #define DJINNI_EXPORT __attribute__((__visibility__("default")))
17 #endif
18 
20 @interface BNBMeshInstance : NSObject
21 
22 /**
23  *Fabric method for mesh_instance creating.
24  *@return mesh_instance component (mesh_instance)
25  */
26 + (nullable BNBMeshInstance *)create;
27 
28 /**
29  *set mesh visibility flag. Will be overridden if entity with mesh_instance component is child of entity with face_tracker component.
30  *@param visible(bool) visibility flag.
31  */
32 - (void)setVisible:(BOOL)visible;
33 
34 /**@return visibility flag (bool) */
35 - (BOOL)isVisible;
36 
37 /**
38  *set for mesh sub geometry with specified name specified material if sub geometry with given name exists.
39  *@param subGeometryName (string) sub geometry name.
40  *@param material (material) sub geometry material.
41  */
42 - (void)setSubGeometryMaterial:(nonnull NSString *)subGeometryName
43  material:(nullable BNBMaterial *)material;
44 
45 /**
46  *returns material from mesh sub geometry with specified name if it exist, null otherwise
47  *@param subGeometryName (string) sub geometry name.
48  *@return sub geometry material (material).
49  */
50 - (nullable BNBMaterial *)getSubGeometryMaterial:(nonnull NSString *)subGeometryName;
51 
52 /**
53  *get materials for each sub geometry
54  *@return materials (list<material>)
55  */
56 - (nonnull NSArray<BNBMaterial *> *)getMaterials;
57 
58 /**
59  *set mesh for given mesh instance. Of some mesh was settled before need to re set all materials.
60  *@param mesh (mesh) new mesh.
61  */
62 - (void)setMesh:(nullable BNBMesh *)mesh;
63 
64 /**@return mesh (mesh). */
65 - (nullable BNBMesh *)getMesh;
66 
67 /**
68  *Change current animation if animation with specified name exist.
69  *@param name (string) new animation.
70  *@param mode (animation_mode).
71  */
72 - (void)animationChange:(nonnull NSString *)animation
73  mode:(BNBAnimationMode)mode;
74 
75 /**Start animation playback. */
76 - (void)animationPlay;
77 
78 /**pause animation playback. */
79 - (void)animationPause;
80 
81 /**
82  *Set current animation playback position.
83  *@param positionNs (long): position in ns.
84  */
85 - (void)animationSeek:(int64_t)positionNs;
86 
87 /**
88  *True if animation playback was started.
89  *@return animation playback active flag (bool).
90  */
91 - (BOOL)isAnimationPlaying;
92 
93 /**
94  *True if animation playback stop.
95  *@return animation playback active flag (bool).
96  */
97 - (BOOL)isAnimationEnded;
98 
99 /**@return current setted animation name (string). */
100 - (nonnull NSString *)getAnimation;
101 
102 /**@return current setted animation mode (animation_mode). Can be off loop once once_reversed fixed. */
103 - (BNBAnimationMode)getAnimationMode;
104 
105 /**@return current animation playback position (long). */
106 - (int64_t)getAnimationPositionNs;
107 
108 /**@return current animation playback duration (long). */
109 - (int64_t)getAnimationDurationNs;
110 
111 /**
112  *Returns current animation playback time offset from begin(0). Typycally equals animation position mod animation duration.
113  *@return animation playback time offset (long).
114  */
115 - (int64_t)getAnimationTimeOffsetNs;
116 
117 /**
118  *Set current animation playback time offset from begin(0). duration.
119  *@param timeNs (long): animation playback time offset.
120  */
121 - (void)setAnimationTimeOffsetNs:(int64_t)timeNs;
122 
123 /**@return physics_simulator of current mesh_instance */
125 
126 /**@return upcast to base type */
127 - (nullable BNBComponent *)asComponent;
128 
129 @end
+[BNBMeshInstance create]
nullable BNBMeshInstance * create()
Fabric method for mesh_instance creating.
-[BNBMeshInstance getAnimationTimeOffsetNs]
int64_t getAnimationTimeOffsetNs()
Returns current animation playback time offset from begin(0).
-[BNBMeshInstance getAnimation]
nonnull NSString * getAnimation()
-[BNBMeshInstance getPhysicsSimulator]
nullable BNBPhysicsSimulator * getPhysicsSimulator()
BNBComponent
Definition: BNBComponent.h:21
-[BNBMeshInstance getAnimationDurationNs]
int64_t getAnimationDurationNs()
BNBMaterial
Class, represents material interface.
Definition: BNBMaterial.h:19
-[BNBMeshInstance getMesh]
nullable BNBMesh * getMesh()
-[BNBMeshInstance isVisible]
BOOL isVisible()
BNBMeshInstance
Definition: BNBMeshInstance.h:20
-[BNBMeshInstance isAnimationPlaying]
BOOL isAnimationPlaying()
True if animation playback was started.
-[BNBMeshInstance animationPause]
void animationPause()
pause animation playback.
BNBMesh
Definition: BNBMesh.h:14
-[BNBMeshInstance animationPlay]
void animationPlay()
Start animation playback.
-[BNBMeshInstance getAnimationMode]
BNBAnimationMode getAnimationMode()
-[BNBMeshInstance isAnimationEnded]
BOOL isAnimationEnded()
True if animation playback stop.
-[BNBMeshInstance asComponent]
nullable BNBComponent * asComponent()
-[BNBMeshInstance getMaterials]
nonnull NSArray< BNBMaterial * > * getMaterials()
get materials for each sub geometry
BNBPhysicsSimulator
Interface for adjustment physics simulation.
Definition: BNBPhysicsSimulator.h:15
BNBAnimationMode.h
DJINNI_EXPORT
#define DJINNI_EXPORT
class which is the container for meshes and materials and provide interface for animation controlling...
Definition: BNBMeshInstance.h:16
-[BNBMeshInstance getAnimationPositionNs]
int64_t getAnimationPositionNs()