GLTFPhysicsShape

package
v0.0.0-...-ff35923 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2025 License: MIT Imports: 27 Imported by: 0

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

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
	AsGLTFPhysicsShape() Instance
}

type Expanded

type Expanded [1]gdclass.GLTFPhysicsShape

func (Expanded) ToNode

func (self Expanded) ToNode(cache_shapes bool) CollisionShape3D.Instance

Converts this GLTFPhysicsShape instance into a Godot graphics.gd/classdb/CollisionShape3D node.

func (Expanded) ToResource

func (self Expanded) ToResource(cache_shapes bool) Shape3D.Instance

Converts this GLTFPhysicsShape instance into a Godot graphics.gd/classdb/Shape3D resource.

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

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 (self *Extension[T]) AsGLTFPhysicsShape() Instance

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsRefCounted

func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted

func (*Extension[T]) AsResource

func (self *Extension[T]) AsResource() Resource.Instance

type ID

type ID Object.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.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

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

func FromDictionary(dictionary Structure) Instance

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 graphics.gd/classdb/CollisionShape3D node.

func FromResource

func FromResource(shape_resource Shape3D.Instance) Instance

Creates a new GLTFPhysicsShape instance from the given Godot graphics.gd/classdb/Shape3D resource.

func New

func New() Instance

func (Instance) AsGLTFPhysicsShape

func (self Instance) AsGLTFPhysicsShape() Instance

func (Instance) AsObject

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

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) Height

func (self Instance) Height() Float.X

func (Instance) ID

func (self Instance) ID() ID

func (Instance) ImporterMesh

func (self Instance) ImporterMesh() ImporterMesh.Instance

func (Instance) IsTrigger

func (self Instance) IsTrigger() bool

func (Instance) MeshIndex

func (self Instance) MeshIndex() int

func (Instance) Radius

func (self Instance) Radius() Float.X

func (Instance) SetHeight

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

func (Instance) SetImporterMesh

func (self Instance) SetImporterMesh(value ImporterMesh.Instance)

func (Instance) SetIsTrigger

func (self Instance) SetIsTrigger(value bool)

func (Instance) SetMeshIndex

func (self Instance) SetMeshIndex(value int)

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) SetRadius

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

func (Instance) SetShapeType

func (self Instance) SetShapeType(value string)

func (Instance) SetSize

func (self Instance) SetSize(value Vector3.XYZ)

func (Instance) ShapeType

func (self Instance) ShapeType() string

func (Instance) Size

func (self Instance) Size() Vector3.XYZ

func (Instance) ToDictionary

func (self Instance) ToDictionary() Structure

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 graphics.gd/classdb/CollisionShape3D node.

func (Instance) ToResource

func (self Instance) ToResource() Shape3D.Instance

Converts this GLTFPhysicsShape instance into a Godot graphics.gd/classdb/Shape3D resource.

func (Instance) Virtual

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

type Structure

type Structure map[interface{}]interface{}

Jump to

Keyboard shortcuts

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