CsgTorus3D
A CSG Torus shape.
A CSG Torus shape.
This node allows you to create a torus for use with the CSG system.
Note: CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a MeshInstance3D with a PrimitiveMesh. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
CsgTorus3DConstructor
public CsgTorus3D();Properties6
InnerRadiusProperty
public float InnerRadius { get; set; }The inner radius of the torus.
MaterialProperty
public Material Material { get; set; }The material used to render the torus.
OuterRadiusProperty
public float OuterRadius { get; set; }The outer radius of the torus.
RingSidesProperty
public int RingSides { get; set; }The number of edges each ring of the torus is constructed of.
SidesProperty
public int Sides { get; set; }The number of slices the torus is constructed of.
SmoothFacesProperty
public bool SmoothFaces { get; set; }If true the normals of the torus are set to give a smooth effect making the torus seem rounded. If false the torus will have a flat shaded look.
Methods12
GetInnerRadiusfloat
public float GetInnerRadius();floatGetMaterialMaterial
public Material GetMaterial();MaterialGetOuterRadiusfloat
public float GetOuterRadius();floatGetRingSidesint
public int GetRingSides();intGetSidesint
public int GetSides();intGetSmoothFacesbool
public bool GetSmoothFaces();boolSetInnerRadiusvoid
public void SetInnerRadius(float radius);| Name | Type | Default |
|---|---|---|
radius | float | — |
SetMaterialvoid
public void SetMaterial(Material material);| Name | Type | Default |
|---|---|---|
material | Material | — |
SetOuterRadiusvoid
public void SetOuterRadius(float radius);| Name | Type | Default |
|---|---|---|
radius | float | — |
SetRingSidesvoid
public void SetRingSides(int sides);| Name | Type | Default |
|---|---|---|
sides | int | — |
SetSidesvoid
public void SetSides(int sides);| Name | Type | Default |
|---|---|---|
sides | int | — |
SetSmoothFacesvoid
public void SetSmoothFaces(bool smoothFaces);| Name | Type | Default |
|---|---|---|
smoothFaces | bool | — |