check

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNeedGeometryV2         = errors.New("NEED_GEOMETRY_V2")
	ErrGeometryUnreviewed     = errors.New("GEOMETRY_UNREVIEWED")
	ErrRoomGeometryUnreviewed = errors.New("ROOM_GEOMETRY_UNREVIEWED")
	ErrContactMappingRequired = errors.New("CONTACT_SURFACE_MAPPING_REQUIRED")
)

Functions

This section is empty.

Types

type ContactResult added in v0.9.1

type ContactResult struct {
	RequirementID string
	Contact       string
	SurfaceID     string
	Codes         []string
	Gap           float64
	Penetration   float64
	Alignment     float64
	Support       float64
}

type ContactSurface added in v0.9.1

type ContactSurface struct {
	RequirementID string
	SurfaceID     string
}

func ParseContactSurfaces added in v0.9.1

func ParseContactSurfaces(value string) ([]ContactSurface, error)

ParseContactSurfaces parses the stable CLI/bridge form "requirement-id=surface-id,...". Requirement IDs, rather than contact kinds, keep multiple requirements of the same kind unambiguous.

type PlacementResult

type PlacementResult struct {
	Clear      bool
	Placement  bounds.AABB
	OverlapIDs []int64
}

func CheckPlacement

func CheckPlacement(manifest bounds.Manifest, prefabPath string, position bounds.Vec3) (PlacementResult, error)

type SpatialRequest added in v0.9.1

type SpatialRequest struct {
	Manifest  bounds.Manifest
	Prefab    string
	Position  bounds.Vec3
	Rotation  bounds.Quat
	SurfaceID string
	Contact   string
	// ContactSurfaces enables holistic validation of every required contact.
	// RequirementID is the stable key from SpatialProfile.Contacts. The legacy
	// SurfaceID/Contact pair above remains supported for single-contact callers.
	ContactSurfaces []ContactSurface
}

type SpatialResult added in v0.9.1

type SpatialResult struct {
	Clear       bool
	OverlapIDs  []int64
	Codes       []string
	Gap         float64
	Penetration float64
	Alignment   float64
	Support     float64
	Contacts    []ContactResult
}

func CheckSingleContactEvidence added in v0.9.1

func CheckSingleContactEvidence(req SpatialRequest) (SpatialResult, error)

CheckSingleContactEvidence is for planners while they construct a complete simultaneous mapping. It validates one legacy contact but must not be used as the final placement gate.

func CheckSpatialPlacement added in v0.9.1

func CheckSpatialPlacement(req SpatialRequest) (SpatialResult, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL