A port of Ezy-Slicer for the Godot game engine

Godot-Slicer

A port of Ezy-Slicer for the Godot game engine.

Example Image

About

Built as a Godot module in C++, Slicer is a port of David Arayan's Ezy-Slicer Unity plugin (who deserves all credit). It allows for the dynamic slicing of convex meshes along a plane. Built against Godot version 3.2.1.

Installing

Slicer follows the installation procedure defined in the Godot custom module documentation guide. It can be built into a compilation of the engine by cloning the repo into Godot's modules folder:

git clone [email protected]:cj-dimaggio/godot-slicer.git <godot-repo>/modules/slicer

Using

After building Godot with the Slicer module a Slicer node will now be available under Spatial. A Slicer instance can then be used to trigger slices of Mesh geometry like so:

extends RigidBody

class_name Sliceable

export(Material) var cross_section_material
export(Mesh) var mesh_override

func _ready():
	if mesh_override:
		$MeshInstance.mesh = mesh_override

	# Setup the collision shape to be the mesh's shape
	var shape = ConvexPolygonShape.new()
	shape.points = $MeshInstance.mesh.surface_get_arrays(0)[Mesh.ARRAY_VERTEX]
	shape.margin = 0.015
	var owner_id = self.create_shape_owner(self)
	self.shape_owner_add_shape(owner_id, shape)

func cut(plane_origin: Vector3, plane_normal: Vector3):
	var sliced: SlicedMesh = $Slicer.slice($MeshInstance.mesh, self.transform, plane_origin, plane_normal, cross_section_material)

    if not sliced:
        print("No slice occurred")
    
    if sliced.upper_mesh:
        print("Instantiate the upper cut mesh somewhere")

    if sliced.lower_mesh:
        print("Instantiate the lower cut mesh somewhere")

An example project can also be found at: https://github.com/cj-dimaggio/godot-slicer-example-project

Development

For development purposes, Slicer can be built as a dynamic library by passing in the slicer_shared=no option to SCons and using the slicer-shared build alias, such as:

scons slicer_shared=yes slicer-shared

which will build a new dynamic library artifact into Godot's ./bin folder.

There is also a test suite that can be built and run on Unix systems using:

scons platform=osx slicer_tests=yes

For more information on the testing framework and development see the corresponding readme.

Similar Resources

Port of HawkAPI's cloudscraper

hawk-go Port of HawkAPI's cloudscraper Everything is exposed to give access to modification, this is subject to change. Installation: go get github.co

Nov 11, 2022

port close check scanner. detects open ports, sends alert with slack.

aite9 (port close check scanner) サーバのポートが空いてないことを確認するポートスキャナー たくさんのサーバを管理していると設定ミスで内部利用ポートが外部に公開されてしまっている可能性があり、それに早く気付くためのチェックツールです。 サーバのリストを標準入力で渡すと

Feb 3, 2022

TCP Port Scanner in GO lang

Port-Scanner-GO Simple TCP port scanner in golang. Installation & Build You have to have GO version 1.13 run: go build port-scanner-go.go Run single

Jun 6, 2022

Port Scanner & Banner Identify From TianXiang

Port Scanner & Banner Identify From TianXiang

TXPortMap Port Scanner & Banner Identify From TianXiang ./TxPortMap -h 新增加彩色文字输出格式 对http/https协议进行title以及报文长度打印,获取title失败打印报文前20字节 新增日志文件以及扫描结果文件 T

Jan 5, 2023

A port scanner written in go

GoScanner A poor mans port scanner written in go Why? To help learn go Try and build something "somewhat" functional from the command line 🤷 To not s

Sep 15, 2021

golang script to check server & port status

netcheck Simple script to check if host alive by sending ICMP messages & TCP Port checks. ICMP messages not working without sudo privileges. usage net

Sep 2, 2022

A basic port scanner written in go

go-port-scanner A ultra basic port scanner written in go, written for the advanced Go course in Platzi. Compilation Just as any go program go build ma

Oct 21, 2021

Port scanner written in Go

The result will be similar to that: Result of function ScanPort (scan specific port): 1024 Port result: {tcp/1024 Closed} Result of function InitialS

Oct 6, 2021
Comments
  • make into plugin / convert c++ scripts to gd script

    make into plugin / convert c++ scripts to gd script

    this is an absolutely amazing module , but it is unfortunate that it cannot be used by a majority as it involves recompiling godot , moreover it doesn't seem to work well for VR so converting this to a portable gdnative plugin will be a great alternative

Related tags
Lobby - A Nox game lobby which exposes a simple HTTP API for both listing and registering Nox game servers

Nox lobby server This project provides a Nox game lobby which exposes a simple H

Mar 6, 2022
grobotstxt is a native Go port of Google's robots.txt parser and matcher library.

grobotstxt grobotstxt is a native Go port of Google's robots.txt parser and matcher C++ library. Direct function-for-function conversion/port Preserve

Dec 27, 2022
Simple HTTP tunnel using SSH remote port forwarding

Simple HTTP tunnel using SSH remote port forwarding

Nov 18, 2022
A fast port forwarding or reverse forwarding tool over HTTP1.0/HTTP1.1
A fast port forwarding or reverse forwarding tool over HTTP1.0/HTTP1.1

gogw What's gogw ? gogw is a port forwarding/reverse forwarding tool over HTTP implements by golang. port forwarding/port reverse forwarding support T

Sep 27, 2022
rconn is a multiplatform program for creating generic reverse connections. Lets you consume services that are behind firewall or NAT without opening ports or port-forwarding.
rconn is a multiplatform program for creating generic reverse connections. Lets you consume services that are behind firewall or NAT without opening ports or port-forwarding.

rconn (r[everse] conn[ection]) is a multiplatform program for creating reverse connections. It lets you consume services that are behind NAT and/or fi

Jan 1, 2023
Capture packet request/response pairs for a port and/or IP to aid in Network protocol based Nuclei Templates creation.

network-fingerprint Capture packet request/response pairs for a port and/or IP to aid in Network protocol based Nuclei Templates creation. Resources I

Nov 15, 2022
Partial port of Python difflib package to Go

go-difflib THIS PACKAGE IS NO LONGER MAINTAINED. At this point, I have no longer the time nor the interest to work on go-difflib. I apologize for the

Dec 10, 2022
A simple port scanner written in go

Scan27 A simple port scanner written in go Features: V1 it Scans the given Ip or Host name for open ports Usage ./scan27 Enter IP address or Host name

Jul 23, 2022
Yet another TCP Port Scanner, but lightning faster.

Fast TCP Port Scanner A highly concurrent TCP port scanner. Run Tests with Code Coverage (Linux) go test -cover Compile (Linux) go build -v -o fglps R

Jul 23, 2022