Table of Contents

Class CompositeShape

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll
public class CompositeShape
Inheritance
CompositeShape
Inherited Members

Fields

Alternates

The block shape may consists of any amount of alternatives, one of which will be randomly chosen when the block is placed in the world.

public CompositeShape[] Alternates

Field Value

CompositeShape[]

BakedAlternates

Includes the base shape

public CompositeShape[] BakedAlternates

Field Value

CompositeShape[]

Base

public AssetLocation Base

Field Value

AssetLocation

Format

public EnumShapeFormat Format

Field Value

EnumShapeFormat

InsertBakedTextures

Whether or not to insert baked in textures for mesh formats such as gltf into the texture atlas.

public bool InsertBakedTextures

Field Value

bool

Overlays

public CompositeShape[] Overlays

Field Value

CompositeShape[]

QuantityElements

If non zero will only tesselate the first n elements of the shape

public int? QuantityElements

Field Value

int?

Scale

public float Scale

Field Value

float

SelectiveElements

If set will only tesselate elements with given name

public string[] SelectiveElements

Field Value

string[]

VoxelizeTexture

If true, the shape is created from a voxelized version of the first defined texture

public bool VoxelizeTexture

Field Value

bool

offsetX

public float offsetX

Field Value

float

offsetY

public float offsetY

Field Value

float

offsetZ

public float offsetZ

Field Value

float

rotateX

public float rotateX

Field Value

float

rotateY

public float rotateY

Field Value

float

rotateZ

public float rotateZ

Field Value

float

Properties

OffsetXYZCopy

public Vec3f OffsetXYZCopy { get; }

Property Value

Vec3f

RotateXYZCopy

public Vec3f RotateXYZCopy { get; }

Property Value

Vec3f

Methods

Clone()

Creates a deep copy of the composite shape

public CompositeShape Clone()

Returns

CompositeShape

CloneWithoutAlternates()

Creates a deep copy of the shape, but omitting its alternates (used to populate the alternates)

public CompositeShape CloneWithoutAlternates()

Returns

CompositeShape

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

LoadAlternates(IAssetManager, ILogger)

Expands the Composite Shape and populates the Baked field

public void LoadAlternates(IAssetManager assetManager, ILogger logger)

Parameters

assetManager IAssetManager
logger ILogger