CSGShape

The CSG base class.

This is the CSG base class that provides CSG operation support to the various CSG nodes in Godot.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

Constants
enum Constants
Operation
enum Operation

Functions

_updateShape
void _updateShape()
getCollisionLayer
long getCollisionLayer()
getCollisionLayerBit
bool getCollisionLayerBit(long bit)

Returns an individual bit on the collision mask.

getCollisionMask
long getCollisionMask()
getCollisionMaskBit
bool getCollisionMaskBit(long bit)

Returns an individual bit on the collision mask.

getMeshes
Array getMeshes()

Returns an Array with two elements, the first is the Transform of this node and the second is the root Mesh of this node. Only works when this node is the root shape.

getOperation
CSGShape.Operation getOperation()
getSnap
double getSnap()
isCalculatingTangents
bool isCalculatingTangents()
isRootShape
bool isRootShape()

Returns true if this is a root shape and is thus the object that is rendered.

isUsingCollision
bool isUsingCollision()
opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(CSGShape other)
opEquals
bool opEquals(typeof(null) n)
setCalculateTangents
void setCalculateTangents(bool enabled)
setCollisionLayer
void setCollisionLayer(long layer)
setCollisionLayerBit
void setCollisionLayerBit(long bit, bool value)

Sets individual bits on the layer mask. Use this if you only need to change one layer's value.

setCollisionMask
void setCollisionMask(long mask)
setCollisionMaskBit
void setCollisionMaskBit(long bit, bool value)

Sets individual bits on the collision mask. Use this if you only need to change one layer's value.

setOperation
void setOperation(long operation)
setSnap
void setSnap(double snap)
setUseCollision
void setUseCollision(bool operation)
toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

calculateTangents
bool calculateTangents [@property getter]
bool calculateTangents [@property setter]

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.

collisionLayer
long collisionLayer [@property getter]
long collisionLayer [@property setter]

The physics layers this area is in. Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. See url=https://docs.godotengine.org/en/3.3/tutorials/physics/physics_introduction.html#collision-layers-and-masksCollision layers and masks/url in the documentation for more information.

collisionMask
long collisionMask [@property getter]
long collisionMask [@property setter]

The physics layers this CSG shape scans for collisions. See url=https://docs.godotengine.org/en/3.3/tutorials/physics/physics_introduction.html#collision-layers-and-masksCollision layers and masks/url in the documentation for more information.

operation
CSGShape.Operation operation [@property getter]
long operation [@property setter]

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.

snap
double snap [@property getter]
double snap [@property setter]

Snap makes the mesh 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.

useCollision
bool useCollision [@property getter]
bool useCollision [@property setter]

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.

Static functions

_new
CSGShape _new()

Construct a new instance of CSGShape. Note: use memnew!CSGShape instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta