dolphin
dolphin copied to clipboard
Scene module
This might be a lot of work in the backend, but I believe it would be super helpful to be able to slightly control some aspects of 3D rendering. Here are some possible methods I was thinking of.
def draw_point(pos: Position, color: int, size: int):
"""
Accepts X, Y, and Z, color, and point size. Draws a single point at that location in 3D. Useful for debugging.
"""
def draw_line(point1: Position, point2: Position, color: int, thickness: float = 1):
"""
Draws a line from point 1 to point 2 in 3D.
"""
def get_display_location(pos: Position):
"""
Returns a tuple (x,y) that has the position of the given 3D point on the 2D display.
"""
# and more...
# maybe
I was also thinking of a billboard text and a billboard texture method. They would display 2D text in the 3D scene that is facing the camera, and a 2D image in the 3D scene that is facing the camera, respectively. I do not know how hard it is to actually mess with the 3D scenes in Dolphin's code, but this would be pretty cool to see and use.