Skip to content

Add transformations#34

Open
Rinceri wants to merge 38 commits into
mainfrom
transformations
Open

Add transformations#34
Rinceri wants to merge 38 commits into
mainfrom
transformations

Conversation

@Rinceri
Copy link
Copy Markdown
Collaborator

@Rinceri Rinceri commented Apr 30, 2026

fixes #8

WIP

Comment thread src/rasdaq/Graphics/Renderer.cs Outdated

sprite.Shader.Use();

Camera.SetCameraThisFrame(windowSize, sprite.Entity.Transform._GetTransformation(elapsedTime), sprite.Shader);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this do

-hw,
-hh,
0.0f, // BL (repeated)
leftX, bottomY, 0, // BL
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice cleanup 👍

Comment thread src/rasdaq/Transformations/Camera.cs Outdated
return Matrix4.LookAt(CameraPosition, CameraPosition + front, up);
}

public static void SetCameraPosition(float x, float y)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can probably just rename to SetPosition, since calling Camera.SetCameraPosition is a bit verbose

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea

Comment thread src/rasdaq/Transformations/Camera.cs Outdated

public static class Camera
{
public static Vector3 CameraPosition { get; private set; } = new(0.0f, 0.0f, 3.0f);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should stop exposing types from OpenTK, as ideally we would want users to only have to depend on us, not also on OpenTK. See #26 for where i copy the Keys enum so that we don't use the one from OpenTK.

Would be worth extracting to our own Vector3 class AFTER this story is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transformations

2 participants