Assembly: VRage.Game.dll

public interface IMyCamera

Describes camera (mods interface)

Properties

Member Description
FarPlaneDistance Gets farplane is set by MyObjectBuilder_SessionSettings.ViewDistance
FieldOfViewAngle Gets field of view angle in degrees
FovWithZoom Gets field of view with zoom
NearPlaneDistance Gets near plane distance
Position Gets camera position
PreviousPosition Gets camera previous position
ProjectionMatrix Gets projection matrix
ViewMatrix Gets view matrix when camera in real position
ViewportOffset Gets camera viewport offset
ViewportSize Gets camera viewport size
WorldMatrix Gets camera world matrix
FieldOfViewAngleForNearObjects Obsolete
FovWithZoomForNearObjects Obsolete
ProjectionMatrixForNearObjects Obsolete

Methods

Member Description
GetDistanceWithFOV(Vector3D) Gets distance from point. Equals to Distance(Vector3D, Vector3D)
IsInFrustum(ref BoundingBoxD) Checks if specified bounding box is in actual bounding frustum IMPORTANT: If you observe bad result of this test, check how you transform your bounding box. Don't use BoundingBox.Transform. Instead transform box manualy and then create new box.
IsInFrustum(ref BoundingSphereD) Checks if specified bounding sphere is in actual bounding frustum IMPORTANT: If you observe bad result of this test, check how you transform your bounding sphere. Don't use BoundingSphere.Transform. Instead transform sphere center manualy and then create new sphere.
IsInFrustum(BoundingBoxD) Checks if specified bounding box is in actual bounding frustum IMPORTANT: If you observe bad result of this test, check how you transform your bounding box. Don't use BoundingBox.Transform. Instead transform box manualy and then create new box.
WorldLineFromScreen(Vector2) Gets normalized world space line from screen space coordinates.
WorldToScreen(ref Vector3D) Gets screen coordinates of 3d world pos in 0 - 1 distance where 1.0 is screen width(for X) or height(for Y). WARNING: Y is from bottom to top.