summaryrefslogtreecommitdiff
path: root/scene/resources/curve.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/curve.h')
-rw-r--r--scene/resources/curve.h30
1 files changed, 19 insertions, 11 deletions
diff --git a/scene/resources/curve.h b/scene/resources/curve.h
index d45f9e202f..83a4357bfb 100644
--- a/scene/resources/curve.h
+++ b/scene/resources/curve.h
@@ -91,10 +91,6 @@ public:
static const char *SIGNAL_RANGE_CHANGED;
-#ifdef TOOLS_ENABLED
- bool _disable_set_data;
-#endif
-
enum TangentMode {
TANGENT_FREE = 0,
TANGENT_LINEAR,
@@ -115,12 +111,17 @@ public:
right_mode = TANGENT_FREE;
}
- Point(Vector2 p, real_t left = 0, real_t right = 0) {
- pos = p;
- left_tangent = left;
- right_tangent = right;
- left_mode = TANGENT_FREE;
- right_mode = TANGENT_FREE;
+ Point(Vector2 p_pos,
+ real_t p_left = 0,
+ real_t p_right = 0,
+ TangentMode p_left_mode = TANGENT_FREE,
+ TangentMode p_right_mode = TANGENT_FREE) {
+
+ pos = p_pos;
+ left_tangent = p_left;
+ right_tangent = p_right;
+ left_mode = p_left_mode;
+ right_mode = p_right_mode;
}
};
@@ -128,7 +129,12 @@ public:
int get_point_count() const { return _points.size(); }
- int add_point(Vector2 p_pos, real_t left_tangent = 0, real_t right_tangent = 0);
+ int add_point(Vector2 p_pos,
+ real_t left_tangent = 0,
+ real_t right_tangent = 0,
+ TangentMode left_mode = TANGENT_FREE,
+ TangentMode right_mode = TANGENT_FREE);
+
void remove_point(int p_index);
void clear_points();
@@ -138,6 +144,8 @@ public:
int set_point_offset(int p_index, float offset);
Vector2 get_point_pos(int p_index) const;
+ Point get_point(int p_index) const;
+
float get_min_value() const { return _min_value; }
void set_min_value(float p_min);