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.h27
1 files changed, 10 insertions, 17 deletions
diff --git a/scene/resources/curve.h b/scene/resources/curve.h
index b02466534c..57ddaf897d 100644
--- a/scene/resources/curve.h
+++ b/scene/resources/curve.h
@@ -68,7 +68,6 @@ public:
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;
@@ -149,11 +148,9 @@ private:
VARIANT_ENUM_CAST(Curve::TangentMode)
class Curve2D : public Resource {
-
GDCLASS(Curve2D, Resource);
struct Point {
-
Vector2 in;
Vector2 out;
Vector2 pos;
@@ -162,13 +159,12 @@ class Curve2D : public Resource {
Vector<Point> points;
struct BakedPoint {
-
float ofs;
Vector2 point;
};
mutable bool baked_cache_dirty;
- mutable PoolVector2Array baked_point_cache;
+ mutable PackedVector2Array baked_point_cache;
mutable float baked_max_ofs;
void _bake() const;
@@ -202,21 +198,19 @@ public:
float get_baked_length() const;
Vector2 interpolate_baked(float p_offset, bool p_cubic = false) const;
- PoolVector2Array get_baked_points() const; //useful for going through
+ PackedVector2Array get_baked_points() const; //useful for going through
Vector2 get_closest_point(const Vector2 &p_to_point) const;
float get_closest_offset(const Vector2 &p_to_point) const;
- PoolVector2Array tessellate(int p_max_stages = 5, float p_tolerance = 4) const; //useful for display
+ PackedVector2Array tessellate(int p_max_stages = 5, float p_tolerance = 4) const; //useful for display
Curve2D();
};
class Curve3D : public Resource {
-
GDCLASS(Curve3D, Resource);
struct Point {
-
Vector3 in;
Vector3 out;
Vector3 pos;
@@ -228,15 +222,14 @@ class Curve3D : public Resource {
Vector<Point> points;
struct BakedPoint {
-
float ofs;
Vector3 point;
};
mutable bool baked_cache_dirty;
- mutable PoolVector3Array baked_point_cache;
- mutable PoolRealArray baked_tilt_cache;
- mutable PoolVector3Array baked_up_vector_cache;
+ mutable PackedVector3Array baked_point_cache;
+ mutable PackedFloat32Array baked_tilt_cache;
+ mutable PackedVector3Array baked_up_vector_cache;
mutable float baked_max_ofs;
void _bake() const;
@@ -277,13 +270,13 @@ public:
Vector3 interpolate_baked(float p_offset, bool p_cubic = false) const;
float interpolate_baked_tilt(float p_offset) const;
Vector3 interpolate_baked_up_vector(float p_offset, bool p_apply_tilt = false) const;
- PoolVector3Array get_baked_points() const; //useful for going through
- PoolRealArray get_baked_tilts() const; //useful for going through
- PoolVector3Array get_baked_up_vectors() const;
+ PackedVector3Array get_baked_points() const; //useful for going through
+ PackedFloat32Array get_baked_tilts() const; //useful for going through
+ PackedVector3Array get_baked_up_vectors() const;
Vector3 get_closest_point(const Vector3 &p_to_point) const;
float get_closest_offset(const Vector3 &p_to_point) const;
- PoolVector3Array tessellate(int p_max_stages = 5, float p_tolerance = 4) const; //useful for display
+ PackedVector3Array tessellate(int p_max_stages = 5, float p_tolerance = 4) const; //useful for display
Curve3D();
};