geom

GeomConeGeom.Nodes.Cone

Inherits: Node3D

C#: make one with the Geom.Nodes.Cone() factory, then set and read its properties by name with Set and Get, or in the Inspector, where the node is GeomCone.

A solid cone in 3D space, base at the origin and tip along +Y.

From code

The code used to generate this page's thumbnail.

var cone := GeomCone.new()
cone.position = Vector3(0, -0.9, 0)
cone.radius = 0.9
cone.length = 1.9
cone.color = TEAL
cone.blend_mode = Geom.BLEND_OPAQUE
add_child(cone)
var cone = Geom.Nodes.Cone();
cone.Position = new Vector3(0, -0.9f, 0);
cone.Set("radius", 0.9f);
cone.Set("length", 1.9f);
cone.Set("color", TEAL);
cone.Set("blend_mode", (int)Geom.BlendMode.Opaque);
AddChild(cone);

Properties

BlendMode blend_mode Geom.BLEND_OPAQUEGeom.BlendMode.Opaque
bool cap true
Color color Color(1, 1, 1, 1)
float length 1.0
int primitive_detail 24
float radius 0.5
float shading 0.75

Enumerations

enum Geom.BlendMode

Geom.BLEND_OPAQUEGeom.BlendMode.Opaque = 0
Sorts by position. Hard edges: no anti-aliasing, and alpha is ignored.
Geom.BLEND_TRANSPARENTGeom.BlendMode.Transparent = 1
Standard alpha blending. The default.
Geom.BLEND_ADDITIVEGeom.BlendMode.Additive = 2
Adds this color to what is behind.
Geom.BLEND_MULTIPLYGeom.BlendMode.Multiply = 3
Multiplies what is behind by this color.
Geom.BLEND_SUBTRACTGeom.BlendMode.Subtract = 4
Subtracts this color from the background.
Geom.BLEND_TRANSPARENT_DEPTHGeom.BlendMode.TransparentDepth = 5
Transparent, but writes depth, so shapes with alpha 1 sort by position with anti-aliased edges. A translucent color behaves like Transparent.

Property descriptions

BlendMode blend_mode = Geom.BLEND_OPAQUEGeom.BlendMode.Opaque

How the solid blends with what is behind it. Opaque, and Transparent Depth with an opaque color, sort by position; the rest draw in call order.

bool cap = true

Close the base with a disc. Off leaves the cone open underneath.

Color color = Color(1, 1, 1, 1)

Color.

float length = 1.0

Base to tip, in world units.

int primitive_detail = 24

Segments around the base. More is rounder and costs more vertices.

float radius = 0.5

Radius of the base, in world units.

float shading = 0.75

How strongly the solid is shaded, 0 flat to 1 full.