Basics
Guides
API Reference
Basics
Guides
API Reference
[15:7] extends: CustomShape3D
Wraps FXGL's Torus, a CustomShape3D donut-shaped primitive defined by an outer radius (from center to tube center), a tube radius (cross-section), and a division count that controls the tessellation.
Torus (double Radius = 0.6, double TubeRadius = 0.4, int NumDivisions = 64)
Creates a new Torus.
Radius is the donut radius (center to tube center).TubeRadius is the cross-section radius.NumDivisions is the tessellation count.getRadius ()
Returns the outer radius.
A double.getTubeRadius ()
Returns the tube radius.
A double.getNumDivisions ()
Returns the tessellation division count.
An int.setMaterial (object MaterialObj)
Sets the material.
MaterialObj is a Material wrapper.this objectsetRadius (double R)
Sets the outer radius.
R is the new radius.this objectsetTubeRadius (double R)
Sets the tube radius.
R is the new tube radius.this objectsetNumDivisions (int N)
Sets the tessellation division count.
N is the new count.this objectradiusProperty ()
Returns the radius DoubleProperty for binding.
tubeRadiusProperty ()
Returns the tube-radius DoubleProperty for binding.
numDivisionsProperty ()
Returns the divisions IntegerProperty for binding.
setPhongMaterial (object ColorObj)
Sets a PhongMaterial directly from a Color.
ColorObj is a Color wrapper.this objectgetTranslation ()
Returns the (x, y, z) translation.
setTranslation (double X, double Y, double Z)
Sets the (x, y, z) translation in one call.
getVertices ()
Returns the mesh vertex list.

Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.