Enumerationmigueldeicaza.swiftgodot 0.46.0SwiftGodot
Operation
CSGShape3D.swift:22enum Operation
Cases
case union
Geometry of both primitives is merged, intersecting geometry is removed.
case intersection
Only intersecting geometry remains, the rest is removed.
case subtraction
The second shape is subtracted from the first, leaving a dent with its shape.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (14) members.
Type members
Instance members
var calculateTangents: Bool
Calculate tangents for the CSG shape which allows the use of normal maps. This is only applied on the root shape, this setting is ignored on any child.
var collisionLayer: UInt32
The physics layers this area is in.
var collisionMask: UInt32
The physics layers this CSG shape scans for collisions. Only effective if
useCollision
istrue
. See Collision layers and masks in the documentation for more information.var collisionPriority: Double
The priority used to solve colliding when occurring penetration. Only effective if
useCollision
istrue
. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level.var operation: CSGShape3D.Operation
The operation that is performed on this shape. This is ignored for the first CSG child node as the operation is between this node and the previous child of this nodes parent.
var snap: Double
Snap makes the mesh vertices snap to a given distance so that the faces of two meshes can be perfectly aligned. A lower value results in greater precision but may be harder to adjust. The top-level CSG shape’s snap value is used for the entire CSG tree.
var useCollision: Bool
Adds a collision shape to the physics engine for our CSG shape. This will always act like a static body. Note that the collision shape is still active even if the CSG shape itself is hidden. See also
collisionMask
andcollisionPriority
.func getCollisionLayerValue(layerNumber: Int32
) -> Bool Returns whether or not the specified layer of the
collisionLayer
is enabled, given alayerNumber
between 1 and 32.func getCollisionMaskValue(layerNumber: Int32
) -> Bool Returns whether or not the specified layer of the
collisionMask
is enabled, given alayerNumber
between 1 and 32.func getMeshes(
) -> GArray Returns an
GArray
with two elements, the first is theTransform3D
of this node and the second is the rootMesh
of this node. Only works when this node is the root shape.func isRootShape(
) -> Bool Returns
true
if this is a root shape and is thus the object that is rendered.func setCollisionLayerValue(layerNumber: Int32, value: Bool
) Based on
value
, enables or disables the specified layer in thecollisionLayer
, given alayerNumber
between 1 and 32.func setCollisionMaskValue(layerNumber: Int32, value: Bool
) Based on
value
, enables or disables the specified layer in thecollisionMask
, given alayerNumber
between 1 and 32.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.