CSGShape3D

package
v0.0.0-...-c909628 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package CSGShape3D provides methods for working with CSGShape3D object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsCSGShape3D() Instance
}

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 New

func New() Instance

func (Instance) AsCSGShape3D

func (self Instance) AsCSGShape3D() Instance

func (Instance) AsGeometryInstance3D

func (self Instance) AsGeometryInstance3D() GeometryInstance3D.Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsNode3D

func (self Instance) AsNode3D() Node3D.Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsVisualInstance3D

func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance

func (Instance) CalculateTangents

func (self Instance) CalculateTangents() bool

func (Instance) CollisionLayer

func (self Instance) CollisionLayer() int

func (Instance) CollisionMask

func (self Instance) CollisionMask() int

func (Instance) CollisionPriority

func (self Instance) CollisionPriority() Float.X

func (Instance) GetCollisionLayerValue

func (self Instance) GetCollisionLayerValue(layer_number int) bool

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

func (self Instance) GetCollisionMaskValue(layer_number int) bool

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

func (self Instance) GetMeshes() []any

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

func (self Instance) IsRootShape() bool

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 (self Instance) SetCalculateTangents(value bool)

func (Instance) SetCollisionLayer

func (self Instance) SetCollisionLayer(value int)

func (Instance) SetCollisionLayerValue

func (self Instance) SetCollisionLayerValue(layer_number int, value bool)

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 (self Instance) SetCollisionMask(value int)

func (Instance) SetCollisionMaskValue

func (self Instance) SetCollisionMaskValue(layer_number int, value bool)

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 (self Instance) SetCollisionPriority(value Float.X)

func (Instance) SetOperation

func (self Instance) SetOperation(value gdclass.CSGShape3DOperation)

func (Instance) SetSnap

func (self Instance) SetSnap(value Float.X)

func (Instance) SetUseCollision

func (self Instance) SetUseCollision(value bool)

func (Instance) Snap

func (self Instance) Snap() Float.X

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) UseCollision

func (self Instance) UseCollision() bool

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

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
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL