-some cleanups
-added tesselation function to curve and curve2d
This commit is contained in:
parent
7773d70f44
commit
21939ce08b
@ -55,6 +55,7 @@ def get_opts():
|
||||
('use_leak_sanitizer','Use llvm compiler sanitize memory leaks','no'),
|
||||
('pulseaudio','Detect & Use pulseaudio','yes'),
|
||||
('new_wm_api', 'Use experimental window management API','no'),
|
||||
('debug_release', 'Add debug symbols to release version','no'),
|
||||
]
|
||||
|
||||
def get_flags():
|
||||
@ -109,7 +110,10 @@ def configure(env):
|
||||
|
||||
if (env["target"]=="release"):
|
||||
|
||||
env.Append(CCFLAGS=['-O2','-ffast-math','-fomit-frame-pointer'])
|
||||
if (env["debug_release"]):
|
||||
env.Append(CCFLAGS=['-g2','-fomit-frame-pointer'])
|
||||
else:
|
||||
env.Append(CCFLAGS=['-O2','-ffast-math','-fomit-frame-pointer'])
|
||||
|
||||
elif (env["target"]=="release_debug"):
|
||||
|
||||
|
@ -216,6 +216,7 @@ void Camera2D::_notification(int p_what) {
|
||||
} break;
|
||||
case NOTIFICATION_ENTER_TREE: {
|
||||
|
||||
|
||||
viewport = NULL;
|
||||
Node *n=this;
|
||||
while(n){
|
||||
@ -526,6 +527,7 @@ Camera2D::Camera2D() {
|
||||
drag_margin[MARGIN_RIGHT]=0.2;
|
||||
drag_margin[MARGIN_BOTTOM]=0.2;
|
||||
camera_pos=Vector2();
|
||||
first=true;
|
||||
|
||||
smoothing=0.0;
|
||||
zoom = Vector2(1, 1);
|
||||
|
@ -516,7 +516,8 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2& p_start, const Vect
|
||||
apex_poly=p;
|
||||
portal_left=apex_point;
|
||||
portal_right=apex_point;
|
||||
path.push_back(apex_point);
|
||||
if (path[path.size()-1].distance_to(apex_point)>CMP_EPSILON)
|
||||
path.push_back(apex_point);
|
||||
skip=true;
|
||||
}
|
||||
}
|
||||
@ -536,7 +537,8 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2& p_start, const Vect
|
||||
apex_poly=p;
|
||||
portal_right=apex_point;
|
||||
portal_left=apex_point;
|
||||
path.push_back(apex_point);
|
||||
if (path[path.size()-1].distance_to(apex_point)>CMP_EPSILON)
|
||||
path.push_back(apex_point);
|
||||
}
|
||||
}
|
||||
|
||||
@ -547,7 +549,7 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2& p_start, const Vect
|
||||
|
||||
}
|
||||
|
||||
if (path[path.size()-1]!=begin_point)
|
||||
if (path[path.size()-1].distance_to(begin_point)>CMP_EPSILON)
|
||||
path.push_back(begin_point);
|
||||
|
||||
path.invert();
|
||||
|
@ -798,6 +798,7 @@ void Curve2D::_bind_methods() {
|
||||
ObjectTypeDB::bind_method(_MD("get_baked_length"),&Curve2D::get_baked_length);
|
||||
ObjectTypeDB::bind_method(_MD("interpolate_baked","offset","cubic"),&Curve2D::interpolate_baked,DEFVAL(false));
|
||||
ObjectTypeDB::bind_method(_MD("get_baked_points"),&Curve2D::get_baked_points);
|
||||
ObjectTypeDB::bind_method(_MD("tesselate","max_stages","tolerance_degrees"),&Curve2D::tesselate,DEFVAL(5),DEFVAL(4));
|
||||
|
||||
ObjectTypeDB::bind_method(_MD("_get_data"),&Curve2D::_get_data);
|
||||
ObjectTypeDB::bind_method(_MD("_set_data"),&Curve2D::_set_data);
|
||||
@ -1330,6 +1331,7 @@ void Curve3D::_bind_methods() {
|
||||
ObjectTypeDB::bind_method(_MD("interpolate_baked","offset","cubic"),&Curve3D::interpolate_baked,DEFVAL(false));
|
||||
ObjectTypeDB::bind_method(_MD("get_baked_points"),&Curve3D::get_baked_points);
|
||||
ObjectTypeDB::bind_method(_MD("get_baked_tilts"),&Curve3D::get_baked_tilts);
|
||||
ObjectTypeDB::bind_method(_MD("tesselate","max_stages","tolerance_degrees"),&Curve3D::tesselate,DEFVAL(5),DEFVAL(4));
|
||||
|
||||
ObjectTypeDB::bind_method(_MD("_get_data"),&Curve3D::_get_data);
|
||||
ObjectTypeDB::bind_method(_MD("_set_data"),&Curve3D::_set_data);
|
||||
|
Loading…
Reference in New Issue
Block a user