Skip to content

Commit

Permalink
Use SceneSpace, not deprecated World
Browse files Browse the repository at this point in the history
  • Loading branch information
michaliskambi committed Feb 12, 2025
1 parent d2eead4 commit 4deff85
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions castle_model_viewer.dpr
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ begin
We only transform selected stuff into scene coordinate-system. }
RenderSelected(
TShape(SelectedItem^.Shape).BoundingBox,
SelectedItem^.World.Triangle,
SelectedItem^.SceneSpace.Triangle,
SelectedPointWorld
);
end;
Expand Down Expand Up @@ -1361,7 +1361,7 @@ begin
{ We can keep SelectedItem, but we have to take into account that it's
transformation possibly changed. So world coordinates of this triangle
are different. }
SelectedItem^.UpdateWorld;
SelectedItem^.UpdateSceneSpace;
// update to SelectedItem^.UpdateSceneSpace for new

{ Also SelectedPointWorld changed now. To apply the change, convert
Expand Down Expand Up @@ -1769,7 +1769,7 @@ procedure TEventsHandler.MenuClick(const MenuItem: TMenuItem);
'Node''s bounding box is %s. ',
[
SelectedPointWorld.ToString,
SelectedItem^.World.Triangle.ToString,
SelectedItem^.SceneSpace.Triangle.ToString,
SelectedGeometry.X3DName,
SelectedShape.OriginalGeometry.X3DType,
SelectedGeometry.X3DType,
Expand Down Expand Up @@ -1857,7 +1857,7 @@ procedure TEventsHandler.MenuClick(const MenuItem: TMenuItem);
if ShadowingItem <> nil then
begin
s := s + Format('no, this light is blocked by triangle %s from shape %s.',
[ ShadowingItem^.World.Triangle.ToString,
[ ShadowingItem^.SceneSpace.Triangle.ToString,
TShape(ShadowingItem^.Shape).NiceName ])
end else
s := s + 'yes, no object blocks this light, it shines on selected point.';
Expand Down

0 comments on commit 4deff85

Please sign in to comment.