Documentation
¶
Overview ¶
Represents a physics shape as defined by the OMI_physics_shape or OMI_collider glTF extensions. This class is an intermediary between the glTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different glTF physics extensions in the future.
Index ¶
- type Advanced
- type Any
- type Expanded
- type Extension
- type ID
- type Instance
- func (self Instance) AsGLTFPhysicsShape() Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) Height() Float.X
- func (self Instance) ID() ID
- func (self Instance) ImporterMesh() ImporterMesh.Instance
- func (self Instance) IsTrigger() bool
- func (self Instance) MeshIndex() int
- func (self Instance) MoreArgs() MoreArgs
- func (self Instance) Radius() Float.X
- func (self Instance) SetHeight(value Float.X)
- func (self Instance) SetImporterMesh(value ImporterMesh.Instance)
- func (self Instance) SetIsTrigger(value bool)
- func (self Instance) SetMeshIndex(value int)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetRadius(value Float.X)
- func (self Instance) SetShapeType(value string)
- func (self Instance) SetSize(value Vector3.XYZ)
- func (self Instance) ShapeType() string
- func (self Instance) Size() Vector3.XYZ
- func (self Instance) ToDictionary() Structure
- func (self Instance) ToNode() CollisionShape3D.Instance
- func (self Instance) ToResource() Shape3D.Instance
- func (self Instance) Virtual(name string) reflect.Value
- type MoreArgs
- type Structure
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 Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsGLTFPhysicsShape ¶
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.GLTFPhysicsShape
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func FromDictionary ¶
Creates a new GLTFPhysicsShape instance by parsing the given data structure.
func FromNode ¶
func FromNode(shape_node CollisionShape3D.Instance) Instance
Creates a new GLTFPhysicsShape instance from the given Godot CollisionShape3D node.
func FromResource ¶
Creates a new GLTFPhysicsShape instance from the given Godot Shape3D resource.
func (Instance) AsGLTFPhysicsShape ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) ImporterMesh ¶
func (self Instance) ImporterMesh() ImporterMesh.Instance
func (Instance) MoreArgs ¶
MoreArgs enables certain functions to be called with additional 'optional' arguments.
func (Instance) SetImporterMesh ¶
func (self Instance) SetImporterMesh(value ImporterMesh.Instance)
func (Instance) SetIsTrigger ¶
func (Instance) SetMeshIndex ¶
func (Instance) SetShapeType ¶
func (Instance) ToDictionary ¶
Serializes this GLTFPhysicsShape instance into a data structure in the format defined by OMI_physics_shape.
func (Instance) ToNode ¶
func (self Instance) ToNode() CollisionShape3D.Instance
Converts this GLTFPhysicsShape instance into a Godot CollisionShape3D node.
func (Instance) ToResource ¶
Converts this GLTFPhysicsShape instance into a Godot Shape3D resource.
type MoreArgs ¶
type MoreArgs [1]gdclass.GLTFPhysicsShape
MoreArgs is a container for Instance functions with additional 'optional' arguments.
func (MoreArgs) ToNode ¶
func (self MoreArgs) ToNode(cache_shapes bool) CollisionShape3D.Instance
Converts this GLTFPhysicsShape instance into a Godot CollisionShape3D node.