A GPU renderer that draws 3-D wireframe lines, filled triangles, images, and text in world space.
Lua full name: lysa.Vector3DRenderer
|
| nil | draw_line (from: float3, to: float3, color: float4) |
| | Draws a colored line segment between two world-space points. More...
|
| |
| nil | draw_triangle (v1: float3, v2: float3, v3: float3, color: float4) |
| | Draws a filled colored triangle from three world-space vertices. More...
|
| |
| nil | draw_image (imageId: integer, position: float3, rotation: quaternion, size: float2, color: float4) |
| | Draws a textured quad at the given world-space position and rotation, tinted by color. Pass INVALID_ID for imageId to draw a solid-color quad. More...
|
| |
| nil | draw_text (text: string, font: Font, fontScale: number, position: float3, rotation: quaternion, color: float4, alignment: lysa.TextAlignment?, rotationGlobal: boolean?) |
| | Draws a UTF-8 string in world space. alignment defaults to LEFT (position = left edge), CENTER (position = center), or RIGHT (position = right edge). rotationGlobal=false (default) rotates locally around position; true rotates around the world origin. More...
|
| |
| nil | draw_spline (points: table, color: float4, segsPerSpan: integer?, tension: number?) |
| | Draws a cardinal spline through the given world-space control points (at least 2). segsPerSpan defaults to 16; tension in [0,1] where 0 = Catmull-Rom and 1 = straight segments (default 0). More...
|
| |
| integer | begin_draw (sessionId: integer?) |
| | Opens a new draw session and returns its id. If sessionId is provided and already exists, the session is cleared first. Omit or pass INVALID_ID to auto-generate a new id. More...
|
| |
| nil | end_draw () |
| | Closes the current draw session; all primitives recorded since begin_draw() are committed to it. More...
|
| |
| nil | set_visible (sessionId: integer, visible: boolean) |
| | Shows or hides the draw session with the given id. Hidden sessions are skipped by the GPU command generator but their primitives remain in the buffers so they can be shown again cheaply. More...
|
| |
| nil | clear_session (sessionId: integer) |
| | Erases all primitives belonging to the given session and compacts the internal vertex and params buffers. More...
|
| |
|
| boolean | use_camera |
| | Primitives are grouped into draw sessions (begin_draw/end_draw). Each session can be shown, hidden, or cleared independently without affecting other sessions.
|
| |
Primitives are grouped into draw sessions (begin_draw/end_draw). Each session can be shown, hidden, or cleared independently without affecting other sessions.
Constructor: Vector3DRenderer(rt) Vector3DRenderer(rt, useCamera, depthTest, filledTri, alphaBlend)