Class CameraElement
Represents a game element that serves as a camera within the game world.
Inherited Members
Namespace: Genesis.Core.GameElements
Assembly: Genesis.dll
Syntax
public class CameraElement : GameElement
Constructors
CameraElement(string, Camera)
Initializes a new instance of the CameraElement class with an existing camera.
Declaration
public CameraElement(string name, Camera camera)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the camera element. |
Camera | camera | The camera object to associate with this element. |
CameraElement(string, Vec3, Vec3, float, float, CameraType)
Initializes a new instance of the CameraElement class with specified parameters.
Declaration
public CameraElement(string name, Vec3 location, Vec3 cameraSize, float near, float far, CameraType type)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the camera element. |
Vec3 | location | The initial location of the camera. |
Vec3 | cameraSize | The size of the camera. |
float | near | The near clipping plane distance of the camera. |
float | far | The far clipping plane distance of the camera. |
CameraType | type | The type of the camera (perspective or orthographic). |
Properties
Camera
Gets or sets the camera associated with this element.
Declaration
public Camera Camera { get; set; }
Property Value
Type | Description |
---|---|
Camera |
Location
Gets or sets the location of the camera within the game world.
Declaration
public Vec3 Location { get; set; }
Property Value
Type | Description |
---|---|
Vec3 |
Rotation
Gets or sets the rotation of the camera.
Declaration
public Vec3 Rotation { get; set; }
Property Value
Type | Description |
---|---|
Vec3 |
Size
Gets or sets the size of the camera.
Declaration
public Vec3 Size { get; set; }
Property Value
Type | Description |
---|---|
Vec3 |