Type renames:
Matrix32 -> Transform2D Matrix3 -> Basis AABB -> Rect3 RawArray -> PoolByteArray IntArray -> PoolIntArray FloatArray -> PoolFloatArray Vector2Array -> PoolVector2Array Vector3Array -> PoolVector3Array ColorArray -> PoolColorArray
This commit is contained in:
@ -47,7 +47,7 @@ void Camera2D::_update_scroll() {
|
||||
|
||||
ERR_FAIL_COND( custom_viewport && !ObjectDB::get_instance(custom_viewport_id) );
|
||||
|
||||
Matrix32 xform = get_camera_transform();
|
||||
Transform2D xform = get_camera_transform();
|
||||
|
||||
if (viewport) {
|
||||
viewport->set_canvas_transform( xform );
|
||||
@ -71,12 +71,12 @@ Vector2 Camera2D::get_zoom() const {
|
||||
};
|
||||
|
||||
|
||||
Matrix32 Camera2D::get_camera_transform() {
|
||||
Transform2D Camera2D::get_camera_transform() {
|
||||
|
||||
if (!get_tree())
|
||||
return Matrix32();
|
||||
return Transform2D();
|
||||
|
||||
ERR_FAIL_COND_V( custom_viewport && !ObjectDB::get_instance(custom_viewport_id), Matrix32() );
|
||||
ERR_FAIL_COND_V( custom_viewport && !ObjectDB::get_instance(custom_viewport_id), Transform2D() );
|
||||
|
||||
Size2 screen_size = viewport->get_visible_rect().size;
|
||||
|
||||
@ -201,7 +201,7 @@ Matrix32 Camera2D::get_camera_transform() {
|
||||
|
||||
camera_screen_center=screen_rect.pos+screen_rect.size*0.5;
|
||||
|
||||
Matrix32 xform;
|
||||
Transform2D xform;
|
||||
if(rotating){
|
||||
xform.set_rotation(angle);
|
||||
}
|
||||
@ -272,7 +272,7 @@ void Camera2D::_notification(int p_what) {
|
||||
|
||||
if (is_current()) {
|
||||
if (viewport && !(custom_viewport && !ObjectDB::get_instance(custom_viewport_id))) {
|
||||
viewport->set_canvas_transform( Matrix32() );
|
||||
viewport->set_canvas_transform( Transform2D() );
|
||||
}
|
||||
}
|
||||
remove_from_group(group_name);
|
||||
@ -290,7 +290,7 @@ void Camera2D::_notification(int p_what) {
|
||||
if(current)
|
||||
area_axis_width = 3;
|
||||
|
||||
Matrix32 inv_camera_transform = get_camera_transform().affine_inverse();
|
||||
Transform2D inv_camera_transform = get_camera_transform().affine_inverse();
|
||||
Size2 screen_size = get_viewport_rect().size;
|
||||
|
||||
Vector2 screen_endpoints[4]= {
|
||||
@ -300,7 +300,7 @@ void Camera2D::_notification(int p_what) {
|
||||
inv_camera_transform.xform(Vector2(0, screen_size.height))
|
||||
};
|
||||
|
||||
Matrix32 inv_transform = get_global_transform().affine_inverse(); // undo global space
|
||||
Transform2D inv_transform = get_global_transform().affine_inverse(); // undo global space
|
||||
|
||||
for(int i=0;i<4;i++) {
|
||||
draw_line(inv_transform.xform(screen_endpoints[i]), inv_transform.xform(screen_endpoints[(i+1)%4]), area_axis_color, area_axis_width);
|
||||
|
||||
Reference in New Issue
Block a user