GeomTorus
Inherits: Node3D
A solid torus in 3D space.
Drawing it
The code behind the picture above.
GeomDraw.matrix = Transform3D.IDENTITY
GeomDraw.blend_mode = Geom.BLEND_OPAQUE
GeomDraw.torus_colored(Vector3.ZERO, 0.95, 0.34, AMBER) Properties
| BlendMode | blend_mode | Geom.BLEND_OPAQUE |
| Color | color | Color(1, 1, 1, 1) |
| int | primitive_detail | 24 |
| float | radius | 0.5 |
| float | shading | 0.75 |
| float | thickness | 0.2 |
Enumerations
enum Geom.BlendMode
- Geom.BLEND_OPAQUE = 0
- Writes depth and sorts against other geometry; hard edges, no fade.
- Geom.BLEND_TRANSPARENT = 1
- Standard alpha compositing. The default.
- Geom.BLEND_ADDITIVE = 2
- Brightens what is behind. Good for glows.
- Geom.BLEND_MULTIPLY = 3
- Darkens what is behind. Good for tints.
- Geom.BLEND_SUBTRACT = 4
- Subtracts this color from the background.
- Geom.BLEND_TRANSPARENT_DEPTH = 5
- Transparent, but writing depth so shapes occlude by position.
Property descriptions
BlendMode blend_mode = Geom.BLEND_OPAQUE
How following shapes combine with what is already drawn.
Color color = Color(1, 1, 1, 1)
Fill color for the solid.
int primitive_detail = 24
Segments around the ring. Higher is rounder and costs more vertices.
float radius = 0.5
Distance from the center to the middle of the tube, in meters.
float shading = 0.75
How strongly the built-in key light shades the solid, 0 flat to 1 full.
float thickness = 0.2
Diameter of the tube, matching the ring convention.