BaiduMap_IOSSDK_v7.0.0_Docs 7.0.0

BMK3DModelOverlay.h
浏览该文件的文档.
1 //
2 // BMK3DModelOverlay.h
3 // MapComponent
4 //
5 // Created by zhaoxiangru on 2021/4/28.
6 // Copyright © 2021 Baidu. All rights reserved.
7 //
8
9 #import "BMKOverlay.h"
10 #import "BMKShape.h"
11 #import "BMKMapAnimation.h"
12 #import "BMKRichView.h"
13
14 NS_ASSUME_NONNULL_BEGIN
16 enum BMK3DModelType
17 {
18 BMK3DModelTypeObj = 0,
19 BMK3DModelTypeGLTF,
20 };
21 typedef enum BMK3DModelType BMK3DModelType;
22
23 @interface BMK3DModelOption : NSObject <NSCopying>
25 @property (nonatomic, assign) CGFloat scale;
27 @property (nonatomic, assign) BOOL zoomFixed;
29 @property (nonatomic, assign) BOOL alwaysShow;
31 @property (nonatomic, assign) CGFloat rotateX;
32 @property (nonatomic, assign) CGFloat rotateY;
33 @property (nonatomic, assign) CGFloat rotateZ;
35 @property (nonatomic, assign) CGFloat offsetX;
36 @property (nonatomic, assign) CGFloat offsetY;
37 @property (nonatomic, assign) CGFloat offsetZ;
39 @property (nonatomic, assign) BMK3DModelType type;
41 @property (nonatomic, copy) NSString *modelPath;
43 @property (nonatomic, copy) NSString *modelName;
46 @property (nonatomic, assign) BOOL animationIsEnable;
48 @property (nonatomic, assign) NSInteger animationRepeatCount;
50 @property (nonatomic, assign) NSInteger animationIndex;
52 @property (nonatomic, assign) CGFloat animationSpeed;
53 @end
54
55 @interface BMK3DModelOverlay : BMKShape <BMKOverlay>
57 @property (nonatomic, assign) CLLocationCoordinate2D coordinate;
59 @property (nonatomic, strong) BMK3DModelOption *option;
61 @property (nonatomic, strong, nullable) BMKMapAnimation *animation;
62
66 + (nullable instancetype)modelOverlayWithCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate option:(BMK3DModelOption *)option;
67
71 - (void)setModelOverlayWithCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate option:(BMK3DModelOption *)option;
72
75 - (void)setModelOverlayWithAnimationIsEnable:(BOOL)animationIsEnable;
76
79 - (void)setModelOverlayWithAnimationRepeatCount:(NSInteger)animationRepeatCount;
80
83 - (void)setModelOverlayWithAnimationIndex:(NSInteger)animationIndex;
84
87 - (void)setModelOverlayWithAnimationSpeed:(CGFloat)animationSpeed;
88
89 - (BOOL)addRichView:(BMKRichView *)view;
90 - (BOOL)removeRichView:(BMKRichView *)view;
91 @end
92
93 NS_ASSUME_NONNULL_END
BMK3DModelOption::animationSpeed
CGFloat animationSpeed
模型动画倍速，默认：1.0，since 6.5.7
Definition: BMK3DModelOverlay.h:52
BMK3DModelOption::animationIndex
NSInteger animationIndex
当前模型动画索引值，since 6.5.7
Definition: BMK3DModelOverlay.h:50
BMK3DModelType
BMK3DModelType
3D模型文件格式
Definition: BMK3DModelOverlay.h:17
BMK3DModelOption::alwaysShow
BOOL alwaysShow
模型是否始终显示，避免被其它地图模型遮挡；默认NO（根据深度测试绘制）
Definition: BMK3DModelOverlay.h:29
BMKShape.h
BMK3DModelOption::animationIsEnable
BOOL animationIsEnable
Definition: BMK3DModelOverlay.h:46
BMKShape
该类为一个抽象类，定义了基于BMKAnnotation的BMKShape类的基本属性和行为，不能直接使用，必须子类化之后才能使用
Definition: BMKShape.h:13
BMKMapAnimation
Definition: BMKMapAnimation.h:70
BMKRichView.h
BMK3DModelOption::modelPath
NSString * modelPath
模型文件路径
Definition: BMK3DModelOverlay.h:41
BMKMapAnimation.h
BMKOverlay.h
BMK3DModelOption::scale
CGFloat scale
缩放比例，默认1.0
Definition: BMK3DModelOverlay.h:25
BMKOverlay-p
该类是地图覆盖物的基类，所有地图的覆盖物需要继承自此类
Definition: BMKOverlay.h:17
BMK3DModelOption::modelName
NSString * modelName
模型名
Definition: BMK3DModelOverlay.h:43
BMK3DModelOption::animationRepeatCount
NSInteger animationRepeatCount
模型动画重复执行次数，默认0：动画将一直执行动画，since 6.5.7
Definition: BMK3DModelOverlay.h:48
BMK3DModelOption::zoomFixed
BOOL zoomFixed
scale不随地图缩放而变化，默认为NO
Definition: BMK3DModelOverlay.h:27
BMK3DModelOption::rotateX
CGFloat rotateX
旋转角度，取值范围为[0.0f, 360.0f]，默认为0.0
Definition: BMK3DModelOverlay.h:31
BMK3DModelOption::rotateY
CGFloat rotateY
Definition: BMK3DModelOverlay.h:32
BMK3DModelTypeObj
@ BMK3DModelTypeObj
Definition: BMK3DModelOverlay.h:18
BMK3DModelOption
Definition: BMK3DModelOverlay.h:23
BMKRichView
Definition: BMKRichView.h:17
BMK3DModelOption::rotateZ
CGFloat rotateZ
Definition: BMK3DModelOverlay.h:33
BMK3DModelOption::offsetY
CGFloat offsetY
Definition: BMK3DModelOverlay.h:36
BMK3DModelTypeGLTF
@ BMK3DModelTypeGLTF
.obj
Definition: BMK3DModelOverlay.h:19
BMK3DModelOption::offsetX
CGFloat offsetX
偏移像素，默认为0.0
Definition: BMK3DModelOverlay.h:35
BMK3DModelOption::type
BMK3DModelType type
3D模型文件格式，默认BMK3DModelTypeObj
Definition: BMK3DModelOverlay.h:39
BMK3DModelOption::offsetZ
CGFloat offsetZ
Definition: BMK3DModelOverlay.h:37
BMK3DModelOverlay
Definition: BMK3DModelOverlay.h:55