Implements Cube Rotation, lighting and back culling without using any frame but MVP matrix
It is a simple implementation of Cube rotation Windows Form APP using MVP matrix in .NET Core (C#). Due to the time, the coding structure is not beautiful and needs to be strengthened later. As an assignment, it shows my understanding of how matrix works in games.
This project is fully based on Math class slides, two great Blog Articles and one video from Youtube.
Link: https://www.bookstack.cn/read/shenjun-unity/98.md
Link:https://www.jianshu.com/p/ab71816f7d82
Link:https://www.youtube.com/watch?v=p4Iz0XJY-Qk
The rotate angle is hardcoded at Timer1_Tick method in MyFrom.cs, it rotate around all axis(default settings).
private void Timer1_Tick(object sender, EventArgs e)
{
//Angle per sec
a += 1;
double angle = a / 360.0 * Math.PI;
...
}
💡 You could choose the rotate axis by clicking the axis buttons below, for example:
Rotate around All axis:
none button chosen
Rotate around X axis:
choose Y and Z button
Rotate around Y axis:
choose X and Z button
Rotate around Z axis:
choose X and Y button
💡 Drag the slider bar on the top could scale the cube
I hope those could be useful !.
Ruikang Xu
✨ Download
All comments are described above each relevant code blocks
IDE: IntellJ Rider
Development Enviroment: .NET Core V3.1.402
Software operating environment: Windowns 10 64 bits👤 Ruikang Xu
- Github: @Bestitz
Copyright © 2020 Ruikang Xu.
