Skip to content

Commit

Permalink
Fix internal API links, MkDocs always resolve them relative
Browse files Browse the repository at this point in the history
  • Loading branch information
Zylann committed Sep 12, 2023
1 parent 9f274fc commit 633e79a
Show file tree
Hide file tree
Showing 31 changed files with 112 additions and 104 deletions.
10 changes: 5 additions & 5 deletions doc/source/api/VoxelBlockSerializer.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Inherits: [RefCounted](https://docs.godotengine.org/en/stable/classes/class_refc

## Description:

Low-level utility to save and load the data within a [VoxelBuffer](api/VoxelBuffer.md). This can be useful to send data over the network, or to store it in a file.
Low-level utility to save and load the data within a [VoxelBuffer](VoxelBuffer.md). This can be useful to send data over the network, or to store it in a file.


To store into a file allocating a PackedByteArray:
Expand Down Expand Up @@ -59,18 +59,18 @@ Return

- [void](#)<span id="i_deserialize_from_byte_array"></span> **deserialize_from_byte_array**( [PackedByteArray](https://docs.godotengine.org/en/stable/classes/class_packedbytearray.html) bytes, [VoxelBuffer](VoxelBuffer.md) voxel_buffer, [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html) decompress )

Reads the data of a [VoxelBuffer](api/VoxelBuffer.md) from a [PackedByteArray](https://docs.godotengine.org/en/stable/classes/class_packedbytearray.html).
Reads the data of a [VoxelBuffer](VoxelBuffer.md) from a [PackedByteArray](https://docs.godotengine.org/en/stable/classes/class_packedbytearray.html).

- [void](#)<span id="i_deserialize_from_stream_peer"></span> **deserialize_from_stream_peer**( [StreamPeer](https://docs.godotengine.org/en/stable/classes/class_streampeer.html) peer, [VoxelBuffer](VoxelBuffer.md) voxel_buffer, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) size, [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html) decompress )

Reads the data of a [VoxelBuffer](api/VoxelBuffer.md) from a [StreamPeer](https://docs.godotengine.org/en/stable/classes/class_streampeer.html). You must provide the number of bytes to read.
Reads the data of a [VoxelBuffer](VoxelBuffer.md) from a [StreamPeer](https://docs.godotengine.org/en/stable/classes/class_streampeer.html). You must provide the number of bytes to read.

- [PackedByteArray](https://docs.godotengine.org/en/stable/classes/class_packedbytearray.html)<span id="i_serialize_to_byte_array"></span> **serialize_to_byte_array**( [VoxelBuffer](VoxelBuffer.md) voxel_buffer, [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html) compress )

Stores the data of a [VoxelBuffer](api/VoxelBuffer.md) into a [PackedByteArray](https://docs.godotengine.org/en/stable/classes/class_packedbytearray.html).
Stores the data of a [VoxelBuffer](VoxelBuffer.md) into a [PackedByteArray](https://docs.godotengine.org/en/stable/classes/class_packedbytearray.html).

- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_serialize_to_stream_peer"></span> **serialize_to_stream_peer**( [StreamPeer](https://docs.godotengine.org/en/stable/classes/class_streampeer.html) peer, [VoxelBuffer](VoxelBuffer.md) voxel_buffer, [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html) compress )

Stores the data of a [VoxelBuffer](api/VoxelBuffer.md) into a [StreamPeer](https://docs.godotengine.org/en/stable/classes/class_streampeer.html). Returns the number of written bytes.
Stores the data of a [VoxelBuffer](VoxelBuffer.md) into a [StreamPeer](https://docs.godotengine.org/en/stable/classes/class_streampeer.html). Returns the number of written bytes.

_Generated on Sep 12, 2023_
6 changes: 3 additions & 3 deletions doc/source/api/VoxelBlockyLibrary.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

Inherits: [VoxelBlockyLibraryBase](VoxelBlockyLibraryBase.md)

Contains a list of models that can be used by [VoxelMesherBlocky](api/VoxelMesherBlocky.md).
Contains a list of models that can be used by [VoxelMesherBlocky](VoxelMesherBlocky.md).

## Description:

Provides a list of models that can be used by [VoxelMesherBlocky](api/VoxelMesherBlocky.md). Each model corresponds to an ID in voxel data, and is generally defined from a mesh. Some extra properties can also be defined, such as how sides get culled by neighbor voxels, or how it is treated by some functionality of the voxel engine.
Provides a list of models that can be used by [VoxelMesherBlocky](VoxelMesherBlocky.md). Each model corresponds to an ID in voxel data, and is generally defined from a mesh. Some extra properties can also be defined, such as how sides get culled by neighbor voxels, or how it is treated by some functionality of the voxel engine.

If you create this library from code, it needs to be baked at the end using the [VoxelBlockyLibrary.bake](api/VoxelBlockyLibrary.md#i_bake) function.
If you create this library from code, it needs to be baked at the end using the [VoxelBlockyLibrary.bake](VoxelBlockyLibrary.md#i_bake) function.

The first model (at index 0) is conventionally used for "air" or "empty".

Expand Down
4 changes: 2 additions & 2 deletions doc/source/api/VoxelBlockyLibraryBase.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

Inherits: [Resource](https://docs.godotengine.org/en/stable/classes/class_resource.html)

Contains a list of models that can be used by [VoxelMesherBlocky](api/VoxelMesherBlocky.md).
Contains a list of models that can be used by [VoxelMesherBlocky](VoxelMesherBlocky.md).

## Description:

Models used by [VoxelMesherBlocky](api/VoxelMesherBlocky.md) must be baked before they can be used efficiently at runtime. The way this process happens depends on the implementation of this class. It can be a simple list of models, or a list of high-level types generating variant models. Check child classes for more information.
Models used by [VoxelMesherBlocky](VoxelMesherBlocky.md) must be baked before they can be used efficiently at runtime. The way this process happens depends on the implementation of this class. It can be a simple list of models, or a list of high-level types generating variant models. Check child classes for more information.

## Properties:

Expand Down
12 changes: 6 additions & 6 deletions doc/source/api/VoxelBlockyModel.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

Inherits: [Resource](https://docs.godotengine.org/en/stable/classes/class_resource.html)

Model stored in [VoxelBlockyLibrary](api/VoxelBlockyLibrary.md) and used by [VoxelMesherBlocky](api/VoxelMesherBlocky.md).
Model stored in [VoxelBlockyLibrary](VoxelBlockyLibrary.md) and used by [VoxelMesherBlocky](VoxelMesherBlocky.md).

## Description:

Represents a model to be used for voxels of a specific TYPE value. Such models must be contained within a [VoxelBlockyLibrary](api/VoxelBlockyLibrary.md) to be used with [VoxelTerrain](api/VoxelTerrain.md) or directly with a [VoxelMesherBlocky](api/VoxelMesherBlocky.md).
Represents a model to be used for voxels of a specific TYPE value. Such models must be contained within a [VoxelBlockyLibrary](VoxelBlockyLibrary.md) to be used with [VoxelTerrain](VoxelTerrain.md) or directly with a [VoxelMesherBlocky](VoxelMesherBlocky.md).

A model can be setup in various ways, see child classes.

Expand Down Expand Up @@ -52,19 +52,19 @@ enum **Side**:

- [AABB[]](https://docs.godotengine.org/en/stable/classes/class_aabb[].html)<span id="i_collision_aabbs"></span> **collision_aabbs** = []

List of bounding boxes relative to the model. They are used for box-based collision, using [VoxelBoxMover](api/VoxelBoxMover.md). They are not used with mesh-based collision.
List of bounding boxes relative to the model. They are used for box-based collision, using [VoxelBoxMover](VoxelBoxMover.md). They are not used with mesh-based collision.

- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_collision_mask"></span> **collision_mask** = 1

Collision mask used for box-based collision [VoxelBoxMover](api/VoxelBoxMover.md) and voxel raycasts ([VoxelToolTerrain](api/VoxelToolTerrain.md)). It is not used for mesh-based collisions.
Collision mask used for box-based collision [VoxelBoxMover](VoxelBoxMover.md) and voxel raycasts ([VoxelToolTerrain](VoxelToolTerrain.md)). It is not used for mesh-based collisions.

- [Color](https://docs.godotengine.org/en/stable/classes/class_color.html)<span id="i_color"></span> **color** = Color(1, 1, 1, 1)

Color of the model. It will be used to modulate its color when built into a voxel mesh.

- [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html)<span id="i_random_tickable"></span> **random_tickable** = false

If enabled, voxels having this ID in the TYPE channel will be used by [VoxelToolTerrain.run_blocky_random_tick](api/VoxelToolTerrain.md#i_run_blocky_random_tick).
If enabled, voxels having this ID in the TYPE channel will be used by [VoxelToolTerrain.run_blocky_random_tick](VoxelToolTerrain.md#i_run_blocky_random_tick).

- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_transparency_index"></span> **transparency_index** = 0

Expand All @@ -76,7 +76,7 @@ Equal indices culls the face, different indexes doesn't.

Tells if the model is transparent in the context of sides being culled by neighbor voxels.

This is a legacy property, [VoxelBlockyModel.transparency_index](api/VoxelBlockyModel.md#i_transparency_index) may be used instead.
This is a legacy property, [VoxelBlockyModel.transparency_index](VoxelBlockyModel.md#i_transparency_index) may be used instead.

## Method Descriptions

Expand Down
2 changes: 1 addition & 1 deletion doc/source/api/VoxelBlockyModelMesh.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Generates a model based on a custom mesh.

## Description:

[VoxelMesherBlocky](api/VoxelMesherBlocky.md) does not require models to be cubes. Ultimately, model visuals are all meshes. This is the most versatile option to make a model. The workflow is to make these models in a 3D editor such as Blender, making sure they are confined in a box going from (0,0) to (1,1). Textures are assigned with classic UV-mapping.
[VoxelMesherBlocky](VoxelMesherBlocky.md) does not require models to be cubes. Ultimately, model visuals are all meshes. This is the most versatile option to make a model. The workflow is to make these models in a 3D editor such as Blender, making sure they are confined in a box going from (0,0) to (1,1). Textures are assigned with classic UV-mapping.

## Properties:

Expand Down
8 changes: 4 additions & 4 deletions doc/source/api/VoxelBoxMover.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Return |

Gets the collision mask used to detect collidable voxels.

This collision mask is specific to this collision system, and is defined in [VoxelBlockyModel.collision_mask](api/VoxelBlockyModel.md#i_collision_mask).
This collision mask is specific to this collision system, and is defined in [VoxelBlockyModel.collision_mask](VoxelBlockyModel.md#i_collision_mask).

- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_get_max_step_height"></span> **get_max_step_height**( )

Expand All @@ -48,7 +48,7 @@ Given a motion vector, returns a modified vector telling you by how much to move

- [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html)<span id="i_has_stepped_up"></span> **has_stepped_up**( )

When step climbing is enabled, tells when the last call to [VoxelBoxMover.get_motion](api/VoxelBoxMover.md#i_get_motion) caused climbing to occur.
When step climbing is enabled, tells when the last call to [VoxelBoxMover.get_motion](VoxelBoxMover.md#i_get_motion) caused climbing to occur.

Climbing modifies the motion vector upwards so that the body is snapped on top of the step. This can have implications in character controller code, such as considering the character to be on the floor instead of having jumped.

Expand All @@ -62,14 +62,14 @@ Sets the collision mask used to detect collidable voxels.

Only voxels sharing at least one bit between the masks will be detected.

This collision mask is specific to this collision system, and is defined in [VoxelBlockyModel.collision_mask](api/VoxelBlockyModel.md#i_collision_mask).
This collision mask is specific to this collision system, and is defined in [VoxelBlockyModel.collision_mask](VoxelBlockyModel.md#i_collision_mask).

- [void](#)<span id="i_set_max_step_height"></span> **set_max_step_height**( [float](https://docs.godotengine.org/en/stable/classes/class_float.html) height )

Sets the maximum height that can be climbed like "stairs".

- [void](#)<span id="i_set_step_climbing_enabled"></span> **set_step_climbing_enabled**( [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html) enabled )

When enabled, [VoxelBoxMover.get_motion](api/VoxelBoxMover.md#i_get_motion) will attempt to climb up small steps. This allows to implement Minecraft-like stairs.
When enabled, [VoxelBoxMover.get_motion](VoxelBoxMover.md#i_get_motion) will attempt to climb up small steps. This allows to implement Minecraft-like stairs.

_Generated on Sep 12, 2023_
20 changes: 10 additions & 10 deletions doc/source/api/VoxelBuffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Inherits: [RefCounted](https://docs.godotengine.org/en/stable/classes/class_refc

## Description:

This contains dense voxels data storage (every single cell holds data, there is no sparse optimization of space). Works like a normal 3D grid containing a voxel value in each cell. Organized in channels of configurable bit depth. Values can be interpreted either as unsigned integers or normalized floats. See [VoxelBuffer.Depth](api/VoxelBuffer.md#enumerations) for more information.
This contains dense voxels data storage (every single cell holds data, there is no sparse optimization of space). Works like a normal 3D grid containing a voxel value in each cell. Organized in channels of configurable bit depth. Values can be interpreted either as unsigned integers or normalized floats. See [VoxelBuffer.Depth](VoxelBuffer.md#enumerations) for more information.

Arbitrary metadata can also be stored, either for the whole buffer, or per-voxel, at higher cost. This metadata can get saved and loaded along voxels, however you must make sure the data is serializable (i.e it should not contain nodes or arbitrary objects).

Expand Down Expand Up @@ -102,11 +102,11 @@ Finds channels that have the same value in all their voxels, and reduces memory

- [void](#)<span id="i_copy_channel_from"></span> **copy_channel_from**( [VoxelBuffer](VoxelBuffer.md) other, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) channel )

Copies all values from the channel of another [VoxelBuffer](api/VoxelBuffer.md) into the same channel for the current buffer. The depth formats must match.
Copies all values from the channel of another [VoxelBuffer](VoxelBuffer.md) into the same channel for the current buffer. The depth formats must match.

- [void](#)<span id="i_copy_channel_from_area"></span> **copy_channel_from_area**( [VoxelBuffer](VoxelBuffer.md) other, [Vector3i](https://docs.godotengine.org/en/stable/classes/class_vector3i.html) src_min, [Vector3i](https://docs.godotengine.org/en/stable/classes/class_vector3i.html) src_max, [Vector3i](https://docs.godotengine.org/en/stable/classes/class_vector3i.html) dst_min, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) channel )

Copies values from a channel's sub-region of another [VoxelBuffer](api/VoxelBuffer.md) into the same channel for the current buffer, at a specific location. The depth formats must match.
Copies values from a channel's sub-region of another [VoxelBuffer](VoxelBuffer.md) into the same channel for the current buffer, at a specific location. The depth formats must match.

If corners of the area represent a negative-size area, they will be sorted back.

Expand All @@ -116,7 +116,7 @@ Copying across the same buffer to overlapping areas is not supported. You may us

- [void](#)<span id="i_copy_voxel_metadata_in_area"></span> **copy_voxel_metadata_in_area**( [VoxelBuffer](VoxelBuffer.md) src_buffer, [Vector3i](https://docs.godotengine.org/en/stable/classes/class_vector3i.html) src_min_pos, [Vector3i](https://docs.godotengine.org/en/stable/classes/class_vector3i.html) src_max_pos, [Vector3i](https://docs.godotengine.org/en/stable/classes/class_vector3i.html) dst_min_pos )

Copies per-voxel metadata from a sub-region of another [VoxelBuffer](api/VoxelBuffer.md) into the the current buffer, at a specific location. Values will be a shallow copy.
Copies per-voxel metadata from a sub-region of another [VoxelBuffer](VoxelBuffer.md) into the the current buffer, at a specific location. Values will be a shallow copy.

If corners of the area represent a negative-size area, they will be sorted back.

Expand Down Expand Up @@ -163,7 +163,7 @@ Executes a function on every voxel in this buffer which have associated metadata

- [Variant](https://docs.godotengine.org/en/stable/classes/class_variant.html)<span id="i_get_block_metadata"></span> **get_block_metadata**( )

Gets metadata associated to this [VoxelBuffer](api/VoxelBuffer.md).
Gets metadata associated to this [VoxelBuffer](VoxelBuffer.md).

- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_get_channel_compression"></span> **get_channel_compression**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) channel )

Expand Down Expand Up @@ -191,7 +191,7 @@ Gets the metadata attached to a specific voxel in this buffer.

- [VoxelTool](VoxelTool.md)<span id="i_get_voxel_tool"></span> **get_voxel_tool**( )

Constructs a [VoxelTool](api/VoxelTool.md) instance bound to this buffer. This provides access to some extra common functions.
Constructs a [VoxelTool](VoxelTool.md) instance bound to this buffer. This provides access to some extra common functions.

- [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html)<span id="i_is_uniform"></span> **is_uniform**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) channel )

Expand All @@ -207,15 +207,15 @@ Checks if every voxel within a channel has the same value.

Sets arbitrary data on this buffer. Old data is replaced. Note, this is separate storage from per-voxel metadata.

If this [VoxelBuffer](api/VoxelBuffer.md) is saved, this metadata will also be saved along voxels, so make sure the data supports serialization (i.e you can't put nodes or arbitrary objects in it).
If this [VoxelBuffer](VoxelBuffer.md) is saved, this metadata will also be saved along voxels, so make sure the data supports serialization (i.e you can't put nodes or arbitrary objects in it).

- [void](#)<span id="i_set_channel_depth"></span> **set_channel_depth**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) channel, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) depth )

Changes the bit depth of a given channel. This controls the range of values a channel can hold. See [VoxelBuffer.Depth](api/VoxelBuffer.md#enumerations) for more information.
Changes the bit depth of a given channel. This controls the range of values a channel can hold. See [VoxelBuffer.Depth](VoxelBuffer.md#enumerations) for more information.

- [void](#)<span id="i_set_voxel"></span> **set_voxel**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) value, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) x, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) y, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) z, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) channel=0 )

Sets the raw value of a voxel. If you use smooth voxels, you may prefer using [VoxelBuffer.set_voxel_f](api/VoxelBuffer.md#i_set_voxel_f).
Sets the raw value of a voxel. If you use smooth voxels, you may prefer using [VoxelBuffer.set_voxel_f](VoxelBuffer.md#i_set_voxel_f).

- [void](#)<span id="i_set_voxel_f"></span> **set_voxel_f**( [float](https://docs.godotengine.org/en/stable/classes/class_float.html) value, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) x, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) y, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) z, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) channel=0 )

Expand All @@ -225,7 +225,7 @@ Sets the float value of a voxel. This method should be used if you work on SDF d

Attaches arbitrary data on a specific voxel. Old data is replaced.

If this [VoxelBuffer](api/VoxelBuffer.md) is saved, this metadata will also be saved along voxels, so make sure the data supports serialization (i.e you can't put nodes or arbitrary objects in it).
If this [VoxelBuffer](VoxelBuffer.md) is saved, this metadata will also be saved along voxels, so make sure the data supports serialization (i.e you can't put nodes or arbitrary objects in it).

- [void](#)<span id="i_set_voxel_v"></span> **set_voxel_v**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) value, [Vector3i](https://docs.godotengine.org/en/stable/classes/class_vector3i.html) pos, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) channel=0 )

Expand Down
Loading

0 comments on commit 633e79a

Please sign in to comment.