2026-04-21 22:34:40 +08:00
|
|
|
using XCEngine.Rendering;
|
|
|
|
|
|
2026-03-27 13:07:39 +08:00
|
|
|
namespace XCEngine
|
|
|
|
|
{
|
|
|
|
|
public sealed class Camera : Component
|
|
|
|
|
{
|
|
|
|
|
internal Camera(ulong gameObjectUUID)
|
|
|
|
|
: base(gameObjectUUID)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float FieldOfView
|
|
|
|
|
{
|
|
|
|
|
get => InternalCalls.Camera_GetFieldOfView(GameObjectUUID);
|
|
|
|
|
set => InternalCalls.Camera_SetFieldOfView(GameObjectUUID, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float fieldOfView
|
|
|
|
|
{
|
|
|
|
|
get => FieldOfView;
|
|
|
|
|
set => FieldOfView = value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float NearClipPlane
|
|
|
|
|
{
|
|
|
|
|
get => InternalCalls.Camera_GetNearClipPlane(GameObjectUUID);
|
|
|
|
|
set => InternalCalls.Camera_SetNearClipPlane(GameObjectUUID, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float nearClipPlane
|
|
|
|
|
{
|
|
|
|
|
get => NearClipPlane;
|
|
|
|
|
set => NearClipPlane = value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float FarClipPlane
|
|
|
|
|
{
|
|
|
|
|
get => InternalCalls.Camera_GetFarClipPlane(GameObjectUUID);
|
|
|
|
|
set => InternalCalls.Camera_SetFarClipPlane(GameObjectUUID, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float farClipPlane
|
|
|
|
|
{
|
|
|
|
|
get => FarClipPlane;
|
|
|
|
|
set => FarClipPlane = value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float Depth
|
|
|
|
|
{
|
|
|
|
|
get => InternalCalls.Camera_GetDepth(GameObjectUUID);
|
|
|
|
|
set => InternalCalls.Camera_SetDepth(GameObjectUUID, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float depth
|
|
|
|
|
{
|
|
|
|
|
get => Depth;
|
|
|
|
|
set => Depth = value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool Primary
|
|
|
|
|
{
|
|
|
|
|
get => InternalCalls.Camera_GetPrimary(GameObjectUUID);
|
|
|
|
|
set => InternalCalls.Camera_SetPrimary(GameObjectUUID, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool primary
|
|
|
|
|
{
|
|
|
|
|
get => Primary;
|
|
|
|
|
set => Primary = value;
|
|
|
|
|
}
|
2026-04-21 21:42:03 +08:00
|
|
|
|
|
|
|
|
public CameraClearMode ClearMode
|
|
|
|
|
{
|
|
|
|
|
get =>
|
|
|
|
|
(CameraClearMode)InternalCalls
|
|
|
|
|
.Camera_GetClearMode(GameObjectUUID);
|
|
|
|
|
set =>
|
|
|
|
|
InternalCalls.Camera_SetClearMode(
|
|
|
|
|
GameObjectUUID,
|
|
|
|
|
(int)value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public CameraClearMode clearMode
|
|
|
|
|
{
|
|
|
|
|
get => ClearMode;
|
|
|
|
|
set => ClearMode = value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public CameraStackType StackType
|
|
|
|
|
{
|
|
|
|
|
get =>
|
|
|
|
|
(CameraStackType)InternalCalls
|
|
|
|
|
.Camera_GetStackType(GameObjectUUID);
|
|
|
|
|
set =>
|
|
|
|
|
InternalCalls.Camera_SetStackType(
|
|
|
|
|
GameObjectUUID,
|
|
|
|
|
(int)value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public CameraStackType stackType
|
|
|
|
|
{
|
|
|
|
|
get => StackType;
|
|
|
|
|
set => StackType = value;
|
|
|
|
|
}
|
2026-04-21 22:03:24 +08:00
|
|
|
|
|
|
|
|
public CameraProjectionType ProjectionType =>
|
|
|
|
|
(CameraProjectionType)InternalCalls
|
|
|
|
|
.Camera_GetProjectionType(GameObjectUUID);
|
|
|
|
|
|
|
|
|
|
public CameraProjectionType projectionType =>
|
|
|
|
|
ProjectionType;
|
|
|
|
|
|
|
|
|
|
public bool SkyboxEnabled =>
|
|
|
|
|
InternalCalls
|
|
|
|
|
.Camera_GetSkyboxEnabled(GameObjectUUID);
|
|
|
|
|
|
|
|
|
|
public bool skyboxEnabled =>
|
|
|
|
|
SkyboxEnabled;
|
|
|
|
|
|
|
|
|
|
public bool HasSkyboxMaterial =>
|
|
|
|
|
InternalCalls
|
|
|
|
|
.Camera_GetHasSkyboxMaterial(GameObjectUUID);
|
|
|
|
|
|
|
|
|
|
public bool hasSkyboxMaterial =>
|
|
|
|
|
HasSkyboxMaterial;
|
|
|
|
|
|
|
|
|
|
public Color SkyboxTopColor
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
InternalCalls
|
|
|
|
|
.Camera_GetSkyboxTopColor(
|
|
|
|
|
GameObjectUUID,
|
|
|
|
|
out Color value);
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Color skyboxTopColor =>
|
|
|
|
|
SkyboxTopColor;
|
|
|
|
|
|
|
|
|
|
public Color SkyboxHorizonColor
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
InternalCalls
|
|
|
|
|
.Camera_GetSkyboxHorizonColor(
|
|
|
|
|
GameObjectUUID,
|
|
|
|
|
out Color value);
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Color skyboxHorizonColor =>
|
|
|
|
|
SkyboxHorizonColor;
|
|
|
|
|
|
|
|
|
|
public Color SkyboxBottomColor
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
InternalCalls
|
|
|
|
|
.Camera_GetSkyboxBottomColor(
|
|
|
|
|
GameObjectUUID,
|
|
|
|
|
out Color value);
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Color skyboxBottomColor =>
|
|
|
|
|
SkyboxBottomColor;
|
2026-04-21 22:34:40 +08:00
|
|
|
|
|
|
|
|
public bool HasFinalColorOverrides =>
|
|
|
|
|
InternalCalls
|
|
|
|
|
.Camera_GetHasFinalColorOverrides(
|
|
|
|
|
GameObjectUUID);
|
|
|
|
|
|
|
|
|
|
public bool hasFinalColorOverrides =>
|
|
|
|
|
HasFinalColorOverrides;
|
|
|
|
|
|
|
|
|
|
public FinalColorOverrideSettings
|
|
|
|
|
GetFinalColorOverrideSettings()
|
|
|
|
|
{
|
|
|
|
|
InternalCalls
|
|
|
|
|
.Camera_GetFinalColorOverrideSettings(
|
|
|
|
|
GameObjectUUID,
|
|
|
|
|
out FinalColorOverrideSettings value);
|
|
|
|
|
return value;
|
|
|
|
|
}
|
2026-03-27 13:07:39 +08:00
|
|
|
}
|
|
|
|
|
}
|