Appearance
Public API Reference
Alpha notice: this SDK API is still prone to change while the public surface stabilizes.
This page is generated from the C# files compiled into ViziverseAI.SDK:
Template-Project/Assets/ViziverseAI/CV/SDK/ViziverseVision.csTemplate-Project/Assets/ViziverseAI/CV/SDK/Person.csTemplate-Project/Assets/ViziverseAI/CV/SDK/BodyPoint.cs
Only the public ViziverseAI namespace API is documented here. Protected implementation details, editor-only code, and template code are intentionally omitted.
Call SDK methods and read SDK data from the Unity main thread.
ViziverseVision
Static entry point for ViziverseAI person tracking. All members are in the ViziverseAI namespace.
Kind: static class
Properties
| Name | Type | Description |
|---|---|---|
IsRunning | static bool | True when the SDK has active tracked people. |
People | static IReadOnlyList<Person> | Current tracked people as a reusable read-only list. |
PeopleCount | static int | Number of currently tracked people. |
Methods
| Name | Signature | Description |
|---|---|---|
Initialize | static void Initialize() | Subscribes the SDK wrapper to the runtime and starts public event delivery. Safe to call more than once. |
Shutdown | static void Shutdown() | Unsubscribes the SDK wrapper, clears cached people, and resets public event delivery. |
GetPerson | static Person? GetPerson(int index) | Gets a person by zero-based index, or null when no active person exists at that index. |
GetPersonById | static Person? GetPersonById(int trackId) | Gets a person by stable tracked ID, or null when that ID is not active. |
IsPersonActive | static bool IsPersonActive(int trackId) | Returns true when the specified tracked ID is currently active. |
EnableBackgroundRemoval | static void EnableBackgroundRemoval() | Enables background removal for all tracked people. |
DisableBackgroundRemoval | static void DisableBackgroundRemoval() | Disables background removal for all tracked people. |
SetBackgroundRemoval | static void SetBackgroundRemoval(int personId, bool enabled) | Enables or disables background removal for one tracked person. |
IsBackgroundRemovalEnabled | static bool IsBackgroundRemovalEnabled(int personId) | Returns true when background removal is enabled for one tracked person. |
Events
| Name | Type | Description |
|---|---|---|
OnPersonEntered | Action<Person>? | Raised when a person starts tracking. |
OnPersonLeft | Action<Person>? | Raised when a person stops tracking. |
OnPersonMoved | Action<Person>? | Raised when a tracked person receives updated point data. |
OnFrameProcessed | Action? | Raised after all tracked people have been updated for a frame. |
Person
Represents one tracked person managed by the SDK. All members are in the ViziverseAI namespace.
Kind: sealed class
Properties
| Name | Type | Description |
|---|---|---|
Id | int | Stable tracked ID while the person remains active. |
IsActive | bool | True while this person is currently tracked. |
Confidence | float | Overall confidence from 0.0 to 1.0. |
Center | Vector2 | Center of the person in image-space pixels. |
CenterNormalized | Vector2 | Center of the person in normalized image coordinates. |
BoundingSize | float | Approximate tracked body size. |
LastUpdatedFrame | int | Unity frame number for the latest update. |
PointCount | int | Number of available tracked points. |
ShoulderWidth | float | Relative distance between shoulders. |
HipWidth | float | Relative distance between hips. |
TorsoHeight | float | Relative distance from shoulders to hips. |
HeadDirection | Vector2 | 2D direction vector for the head. |
IsStanding | bool | True when the body appears upright. |
IsLeftArmRaised | bool | True when the left arm is raised above shoulder level. |
IsRightArmRaised | bool | True when the right arm is raised above shoulder level. |
Methods
| Name | Signature | Description |
|---|---|---|
GetPoint | Vector2 GetPoint(BodyPoint point) | Gets a tracked point in image-space pixels. |
GetPoint3D | Vector3 GetPoint3D(BodyPoint point) | Gets a tracked point in normalized-metric coordinates. This is not Unity world space. |
GetPointConfidence | float GetPointConfidence(BodyPoint point) | Gets confidence for a tracked point from 0.0 to 1.0. |
IsPointVisible | bool IsPointVisible(BodyPoint point, float threshold = 0.5f) | Returns true when tracked point confidence is greater than the threshold. |
GetDistanceBetween | float GetDistanceBetween(BodyPoint a, BodyPoint b) | Gets relative 2D distance between two tracked points. |
GetDistance3DBetween | float GetDistance3DBetween(BodyPoint a, BodyPoint b) | Gets relative 3D distance between two tracked points. |
BodyPoint
Identifies one tracked point. Use the named constants rather than relying on numeric values.
| Name | Description |
|---|---|
Head | Head |
LeftEyeInner | Left eye inner corner |
LeftEye | Left eye center |
LeftEyeOuter | Left eye outer corner |
RightEyeInner | Right eye inner corner |
RightEye | Right eye center |
RightEyeOuter | Right eye outer corner |
LeftEar | Left ear |
RightEar | Right ear |
MouthLeft | Left mouth corner |
MouthRight | Right mouth corner |
LeftShoulder | Left shoulder |
RightShoulder | Right shoulder |
LeftElbow | Left elbow |
RightElbow | Right elbow |
LeftWrist | Left wrist |
RightWrist | Right wrist |
LeftPinky | Left pinky finger |
RightPinky | Right pinky finger |
LeftIndex | Left index finger |
RightIndex | Right index finger |
LeftThumb | Left thumb |
RightThumb | Right thumb |
LeftHip | Left hip |
RightHip | Right hip |
LeftKnee | Left knee |
RightKnee | Right knee |
LeftAnkle | Left ankle |
RightAnkle | Right ankle |
LeftHeel | Left heel |
RightHeel | Right heel |
LeftToe | Left toe |
RightToe | Right toe |