BNBScene
Objective-C
@interface BNBScene : NSObject
/** Set a new name for a scene. The name could be empty. */
- (void)setName:(nonnull NSString *)name;
/** Get a scene name. */
- (nonnull NSString *)getName;
/** Get the root of entities hierarchy. It always exists and has a name "Root". */
- (nullable BNBEntity *)getRoot;
/** Get the AssetManager of a current scene. It always exists. */
- (nullable BNBAssetManager *)getAssetManager;
- (void)addLayer:(nullable BNBLayer *)layer;
- (nonnull NSArray<BNBLayer *> *)getLayers;
/** Get all components present in this scene of specified type */
- (nonnull NSArray<BNBComponent *> *)getComponents:(BNBComponentType)type;
/** Return first found layer with name `layerName` or NULL if such layer doesn't exist. */
- (nullable BNBLayer *)getLayer:(nonnull NSString *)layerName;
- (void)removeLayer:(nullable BNBLayer *)layer;
- (void)setRenderList:(nullable BNBRenderList *)renderList;
- (nullable BNBRenderList *)getRenderList;
- (void)clearRenderList;
- (nullable BNBCamera *)getCamera;
- (void)enableRecognizerFeature:(BNBFeatureId)feature;
- (void)disableRecognizerFeature:(BNBFeatureId)feature;
- (void)addFeatureParam:(BNBFeatureId)feature
params:(nonnull NSArray<BNBFeatureParameter *> *)params;
- (void)addEffectEvent:(nonnull NSString *)name
params:(nonnull NSDictionary<NSString *, NSString *> *)params;
- (BNBTriggerStatusType)getTriggerStatus:(BNBTriggerType)trigger;
- (nullable BNBEntity *)createEntity:(nonnull NSString *)name;
- (int64_t)getNativeContext;
- (int32_t)getSurfaceWidth;
- (int32_t)getSurfaceHeight;
/**
*find global material parameter by name
*@param name (string)
*@return parameter (parameter) or null
*/
- (nullable BNBParameter *)findGlobalMaterialParameter:(nonnull NSString *)name;
@end
Swift
class BNBScene : NSObject
Undocumented
-
Set a new name for a scene. The name could be empty.
Declaration
Objective-C
- (void)setName:(nonnull NSString *)name;
Swift
func setName(_ name: String)
-
Get a scene name.
Declaration
Objective-C
- (nonnull NSString *)getName;
Swift
func getName() -> String
-
Get the AssetManager of a current scene. It always exists.
Declaration
Objective-C
- (nullable BNBAssetManager *)getAssetManager;
Swift
func getAssetManager() -> BNBAssetManager?
-
Get all components present in this scene of specified type
Declaration
Objective-C
- (nonnull NSArray<BNBComponent *> *)getComponents:(BNBComponentType)type;
Swift
func getComponents(_ type: BNBComponentType) -> [BNBComponent]
-
Undocumented
Declaration
Objective-C
- (void)setRenderList:(nullable BNBRenderList *)renderList;
Swift
func setRenderList(_ renderList: BNBRenderList?)
-
Undocumented
Declaration
Objective-C
- (nullable BNBRenderList *)getRenderList;
Swift
func getRenderList() -> BNBRenderList?
-
Undocumented
Declaration
Objective-C
- (void)clearRenderList;
Swift
func clearRenderList()
-
Undocumented
Declaration
Objective-C
- (void)enableRecognizerFeature:(BNBFeatureId)feature;
Swift
func enableRecognizerFeature(_ feature: BNBFeatureId)
-
Undocumented
Declaration
Objective-C
- (void)disableRecognizerFeature:(BNBFeatureId)feature;
Swift
func disableRecognizerFeature(_ feature: BNBFeatureId)
-
Undocumented
Declaration
Objective-C
- (void)addFeatureParam:(BNBFeatureId)feature params:(nonnull NSArray<BNBFeatureParameter *> *)params;
Swift
func addFeatureParam(_ feature: BNBFeatureId, params: [BNBFeatureParameter])
-
Undocumented
Declaration
Objective-C
- (void)addEffectEvent:(nonnull NSString *)name params:(nonnull NSDictionary<NSString *, NSString *> *)params;
Swift
func addEffectEvent(_ name: String, params: [String : String])
-
Undocumented
Declaration
Objective-C
- (BNBTriggerStatusType)getTriggerStatus:(BNBTriggerType)trigger;
Swift
func getTriggerStatus(_ trigger: BNBTriggerType) -> BNBTriggerStatusType
-
Undocumented
Declaration
Objective-C
- (int64_t)getNativeContext;
Swift
func getNativeContext() -> Int64
-
Undocumented
Declaration
Objective-C
- (int32_t)getSurfaceWidth;
Swift
func getSurfaceWidth() -> Int32
-
Undocumented
Declaration
Objective-C
- (int32_t)getSurfaceHeight;
Swift
func getSurfaceHeight() -> Int32
-
find global material parameter by name
Declaration
Objective-C
- (nullable BNBParameter *)findGlobalMaterialParameter:(nonnull NSString *)name;
Swift
func findGlobalMaterialParameter(_ name: String) -> BNBParameter?
Parameters
name
(string)
Return Value
parameter (parameter) or null