Documentation
¶
Overview ¶
Package CSGShape3D provides methods for working with CSGShape3D object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AsCSGShape3D() Instance
- func (self Instance) AsGeometryInstance3D() GeometryInstance3D.Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsNode3D() Node3D.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance
- func (self Instance) CalculateTangents() bool
- func (self Instance) CollisionLayer() int
- func (self Instance) CollisionMask() int
- func (self Instance) CollisionPriority() Float.X
- func (self Instance) GetCollisionLayerValue(layer_number int) bool
- func (self Instance) GetCollisionMaskValue(layer_number int) bool
- func (self Instance) GetMeshes() []any
- func (self Instance) IsRootShape() bool
- func (self Instance) Operation() gdclass.CSGShape3DOperation
- func (self Instance) SetCalculateTangents(value bool)
- func (self Instance) SetCollisionLayer(value int)
- func (self Instance) SetCollisionLayerValue(layer_number int, value bool)
- func (self Instance) SetCollisionMask(value int)
- func (self Instance) SetCollisionMaskValue(layer_number int, value bool)
- func (self Instance) SetCollisionPriority(value Float.X)
- func (self Instance) SetOperation(value gdclass.CSGShape3DOperation)
- func (self Instance) SetSnap(value Float.X)
- func (self Instance) SetUseCollision(value bool)
- func (self Instance) Snap() Float.X
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) UseCollision() bool
- func (self Instance) Virtual(name string) reflect.Value
- type Operation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Instance ¶
type Instance [1]gdclass.CSGShape3D
This is the CSG base class that provides CSG operation support to the various CSG nodes in Godot. [b]Note:[/b] 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.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsCSGShape3D ¶
func (Instance) AsGeometryInstance3D ¶
func (self Instance) AsGeometryInstance3D() GeometryInstance3D.Instance
func (Instance) AsVisualInstance3D ¶
func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance
func (Instance) CalculateTangents ¶
func (Instance) CollisionLayer ¶
func (Instance) CollisionMask ¶
func (Instance) CollisionPriority ¶
func (Instance) GetCollisionLayerValue ¶
Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [param layer_number] between 1 and 32.
func (Instance) GetCollisionMaskValue ¶
Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32.
func (Instance) GetMeshes ¶
Returns an [Array] with two elements, the first is the [Transform3D] of this node and the second is the root [Mesh] of this node. Only works when this node is the root shape.
func (Instance) IsRootShape ¶
Returns [code]true[/code] if this is a root shape and is thus the object that is rendered.
func (Instance) Operation ¶
func (self Instance) Operation() gdclass.CSGShape3DOperation
func (Instance) SetCalculateTangents ¶
func (Instance) SetCollisionLayer ¶
func (Instance) SetCollisionLayerValue ¶
Based on [param value], enables or disables the specified layer in the [member collision_layer], given a [param layer_number] between 1 and 32.
func (Instance) SetCollisionMask ¶
func (Instance) SetCollisionMaskValue ¶
Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32.
func (Instance) SetCollisionPriority ¶
func (Instance) SetOperation ¶
func (self Instance) SetOperation(value gdclass.CSGShape3DOperation)
func (Instance) SetUseCollision ¶
func (*Instance) UnsafePointer ¶
func (Instance) UseCollision ¶
type Operation ¶
type Operation = gdclass.CSGShape3DOperation //gd:CSGShape3D.Operation
const ( /*Geometry of both primitives is merged, intersecting geometry is removed.*/ OperationUnion Operation = 0 /*Only intersecting geometry remains, the rest is removed.*/ OperationIntersection Operation = 1 /*The second shape is subtracted from the first, leaving a dent with its shape.*/ OperationSubtraction Operation = 2 )