Table of Contents

Class ElementHitbox

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll

Represents an AABB hitbox for a model element with rendering capabilities. Open in GitHub

public class ElementHitbox
Inheritance
ElementHitbox
Inherited Members
Extension Methods

Constructors

ElementHitbox(string, string, Cuboidd, Matrixf)

public ElementHitbox(string name, string fullPath, Cuboidd bounds, Matrixf transform)

Parameters

name string
fullPath string
bounds Cuboidd
transform Matrixf

Properties

Bounds

AABB bounds in model space (before scale/rotation/translation)

public Cuboidd Bounds { get; set; }

Property Value

Cuboidd

FullPath

Full hierarchical path (e.g. "Root/Book/Spine/BookRight/Bookmarks/Bookmark1")

public string FullPath { get; set; }

Property Value

string

JointId

Joint ID for animation-aware raycasting

public int JointId { get; set; }

Property Value

int

Name

Simple element name (e.g. "Bookmark1")

public string Name { get; set; }

Property Value

string

Transform

Accumulated transformation matrix from all parent elements

public Matrixf Transform { get; set; }

Property Value

Matrixf

Methods

RenderWireframe(ICoreClientAPI, ModelHitboxTransform, WireframeCube, IShaderProgram, Vec4f)

Renders the hitbox wireframe using the provided transformation.

public void RenderWireframe(ICoreClientAPI capi, ModelHitboxTransform transform, WireframeCube wireframeCube, IShaderProgram shader, Vec4f color)

Parameters

capi ICoreClientAPI
transform ModelHitboxTransform
wireframeCube WireframeCube
shader IShaderProgram
color Vec4f