[core] allow changing the orientation
You can now change the orientation of north to be to the right, bottom, left in addition to the default of top
This commit is contained in:
@@ -133,6 +133,10 @@ public:
|
||||
void setPitch(double pitch, const Duration& = Duration::zero());
|
||||
double getPitch() const;
|
||||
|
||||
// North Orientation
|
||||
void setNorthOrientation(NorthOrientation);
|
||||
NorthOrientation getNorthOrientation() const;
|
||||
|
||||
// Size
|
||||
uint16_t getWidth() const;
|
||||
uint16_t getHeight() const;
|
||||
|
||||
@@ -50,6 +50,8 @@ private:
|
||||
static std::shared_ptr<const mbgl::SpriteImage>
|
||||
makeSpriteImage(int width, int height, float pixelRatio);
|
||||
|
||||
void nextOrientation();
|
||||
|
||||
void addRandomPointAnnotations(int count);
|
||||
void addRandomShapeAnnotations(int count);
|
||||
void addRandomCustomPointAnnotations(int count);
|
||||
|
||||
@@ -100,6 +100,14 @@ struct MetersBounds {
|
||||
}
|
||||
};
|
||||
|
||||
// Determines the orientation of the map.
|
||||
enum class NorthOrientation : uint8_t {
|
||||
Upwards, // Default
|
||||
Rightwards,
|
||||
Downwards,
|
||||
Leftwards,
|
||||
};
|
||||
|
||||
} // namespace mbgl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,6 +38,7 @@ void perspective(mat4& out, double fovy, double aspect, double near, double far)
|
||||
void copy(mat4& out, const mat4& a);
|
||||
void translate(mat4& out, const mat4& a, double x, double y, double z);
|
||||
void rotate_x(mat4& out, const mat4& a, double rad);
|
||||
void rotate_y(mat4& out, const mat4& a, double rad);
|
||||
void rotate_z(mat4& out, const mat4& a, double rad);
|
||||
void scale(mat4& out, const mat4& a, double x, double y, double z);
|
||||
void multiply(mat4& out, const mat4& a, const mat4& b);
|
||||
|
||||
Reference in New Issue
Block a user