Skip to content

SegmentShape2D

Eduard Gushchin edited this page Jun 24, 2026 · 5 revisions

Home | API by Category | Complete API Index | API Compatibility

Field Value
Full name Electron2D.SegmentShape2D
Namespace Electron2D
Kind class
Category Physics

Overview

Provides a finite line segment 2D physics shape resource.

Syntax

public sealed class Electron2D.SegmentShape2D : Electron2D.Shape2D

Godot 4.7 C# profile compatibility

Profile: Electron2D 0.1.0 2D
Status: Partial / Not verified
Out of profile: yes
Godot reference: SegmentShape2D

Segment shape resource with endpoint validation, RID creation and AOT-safe serialization metadata.

Remarks

Segment shapes are useful for simple static boundaries. A segment must use two distinct finite points.

Thread Safety

This type is not synchronized. Create and mutate resources on the main scene thread.

Since

This type is available since Electron2D 0.1.0 Preview.

Members

Member Kind Summary
A Property Gets or sets the first segment endpoint.
B Property Gets or sets the second segment endpoint.
Electron2D.SegmentShape2D() Constructor Initializes a new instance of the SegmentShape2D type.

Member Details

A

Kind: Property

public Electron2D.Vector2 A { get; set; }

Summary

Gets or sets the first segment endpoint.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

The current a value.

Thread Safety

This property is not synchronized. Mutate it on the main scene thread.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.SegmentShape2D

B

Kind: Property

public Electron2D.Vector2 B { get; set; }

Summary

Gets or sets the second segment endpoint.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

The current b value.

Thread Safety

This property is not synchronized. Mutate it on the main scene thread.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.SegmentShape2D

Electron2D.SegmentShape2D()

Kind: Constructor

public Electron2D.SegmentShape2D()

Summary

Initializes a new instance of the SegmentShape2D type.

Remarks

The new instance follows the lifetime and validation rules of its declaring type.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.SegmentShape2D

Clone this wiki locally