-
Notifications
You must be signed in to change notification settings - Fork 0
BrushGenerator
Gaspar edited this page Jan 15, 2024
·
4 revisions
Class to generate primitive brushes.
Generates a cuboid brush.
Parameter | Type | Description |
---|---|---|
w |
float |
Width of the cuboid |
l |
float |
Length of the cuboid |
h |
float |
Height of the cuboid |
position |
Union[Point, List[float]] |
Position of the cuboid |
center |
bool |
Flag to center the cuboid at the position |
texture |
str |
Texture name for the cuboid faces |
# Generate a cube
cube_brush = BrushGenerator.cuboid(w=64, l=64, h=64, position=[0, 0, 0], center=False, texture='null')
Generates a room consisting of multiple brushes. Hollow cuboid
Parameter | Type | Description |
---|---|---|
width |
float |
Width of the room |
height |
float |
Height of the room |
length |
float |
Length of the room |
thickness |
float |
Thickness of the walls |
position |
Union[Point, List[float]] |
Position of the room |
center |
bool |
Flag to center the room at the position |
texture |
str |
Texture name for the room faces |
# Generate a room
room_brushes = BrushGenerator.room(width=200, height=100, length=300, thickness=5, position=[0, 0, 0], center=True)
Generates a sphere brush.
Parameter | Type | Description |
---|---|---|
radius |
float |
Radius of the sphere |
segments |
float |
Number of segments for sphere generation |
position |
Union[Point, List[float]] |
Position of the sphere |
texture |
str |
Texture name for the sphere faces |
# Generate a sphere
sphere_brush = BrushGenerator.sphere(radius=50, segments=32, position=Point(100, 100, 50), texture="STONE")
Generates a tetrahedron brush.
Parameter | Type | Description |
---|---|---|
edge_length |
float |
Edge length of the tetrahedron |
position |
Union[Point, List[float]] |
Position of the tetrahedron |
texture |
str |
Texture name for the tetrahedron faces |
tetrahedron_brush = BrushGenerator.tetrahedron(128, [0, 0, 0], texture='null')