You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: addons/4d/doc_classes/Material4D.xml
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,12 @@
44
44
[b]Note:[/b] When making materials, use the high-level properties from the derived classes instead, such as [member WireMaterial4D.albedo_source] or [member TetraMaterial4D.albedo_source].
45
45
</description>
46
46
</method>
47
+
<methodname="get_cross_section_material">
48
+
<returntype="ShaderMaterial" />
49
+
<description>
50
+
Returns a 3D material to be used by the cross-section renderer. The returned material is automatically updated to match the properties of this material.
Copy file name to clipboardExpand all lines: addons/4d/doc_classes/Mesh4D.xml
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,12 @@
27
27
Callback method that should return the vertices of a mesh. Do not call this method. This can be overridden by derived classes when creating a custom mesh type in GDScript or another scripting language. See [method get_vertices] for details of the returned data.
Updates the 3D mesh this mesh uses for cross-section rendering. Can be called to force the cross-section mesh to be updated, but typically should only be called internally. Subclasses can override this, but most cases should be covered by the default implementation.
[b]Note[/b]: This only looks at edge indices. It does not remove duplicate vertices, nor does it have access to the vertices array.
49
55
</description>
50
56
</method>
57
+
<methodname="get_cross_section_mesh">
58
+
<returntype="ArrayMesh" />
59
+
<description>
60
+
Returns a 3D mesh that can be used to render 3D cross-sections of this mesh in the cross-section renderer. This mesh will only render properly with the cross-section material from [method Material4D.get_cross_section_material].
61
+
</description>
62
+
</method>
51
63
<methodname="get_edge_indices">
52
64
<returntype="PackedInt32Array" />
53
65
<description>
@@ -82,6 +94,12 @@
82
94
If a mesh has valid data, the result of the validation will be cached until the mesh data changes, so this method may be called multiple times without performance concerns. This also means this method should be called after generating a mesh. This especially useful when generating a mesh on a thread; calling this on the thread will avoid stalling the main thread with mesh validation during rendering.
83
95
</description>
84
96
</method>
97
+
<methodname="mark_cross_section_mesh_dirty">
98
+
<returntype="void" />
99
+
<description>
100
+
Marks the cross-section mesh as dirty, meaning it needs to be updated. Must be called by subclasses whenever the underlying 4D mesh data changes.
101
+
</description>
102
+
</method>
85
103
<methodname="reset_mesh_data_validation">
86
104
<returntype="void" />
87
105
<description>
@@ -101,6 +119,12 @@
101
119
Converts this Mesh4D to a [WireMesh4D]. This method will use the best conversion available. For example, a [BoxTetraMesh4D] will be converted to a [BoxWireMesh4D]. If no specialized conversion is available, the method will return an [ArrayWireMesh4D]. See [method to_array_wire_mesh] for more details.
102
120
</description>
103
121
</method>
122
+
<methodname="update_cross_section_mesh">
123
+
<returntype="void" />
124
+
<description>
125
+
Updates the 3D mesh this mesh uses for cross-section rendering. Can be called to force the cross-section mesh to be updated, but typically should only be called internally.
The albedo source of the material, an enum specific to tetrahedral meshes. Can be a single color, per-vertex, per-cell, per-cell UVW coordinates, 4D texture, or a combination of single color and the other color sources.
The albedo texture of the material as a Texture3D. Used by the cross-section renderer. Used when albedo_source is [constant TETRA_COLOR_SOURCE_CELL_UVW_ONLY] or [constant TETRA_COLOR_SOURCE_CELL_UVW_AND_SINGLE].
ADD_PROPERTY(PropertyInfo(Variant::INT, "albedo_source", PROPERTY_HINT_ENUM, "Single Color,Per Vertex Only,Per Cell Only,Cell UVW Only,Texture4D Only,Per Vertex and Single Color,Per Cell and Single Color,Cell UVW and Single Color,Texture4D and Single Color"), "set_albedo_source", "get_albedo_source");
0 commit comments