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
Properties
Bounds
AABB bounds in model space (before scale/rotation/translation)
public Cuboidd Bounds { get; set; }
Property Value
FullPath
Full hierarchical path (e.g. "Root/Book/Spine/BookRight/Bookmarks/Bookmark1")
public string FullPath { get; set; }
Property Value
JointId
Joint ID for animation-aware raycasting
public int JointId { get; set; }
Property Value
Name
Simple element name (e.g. "Bookmark1")
public string Name { get; set; }
Property Value
Transform
Accumulated transformation matrix from all parent elements
public Matrixf Transform { get; set; }
Property Value
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
capiICoreClientAPItransformModelHitboxTransformwireframeCubeWireframeCubeshaderIShaderProgramcolorVec4f