Click or drag to resize
Camera Class
This component implements a 3d camera.
Inheritance Hierarchy

Namespace:  GeonBit.ECS.Components.Graphics
Assembly:  GeonBit (in GeonBit.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class Camera : BaseComponent

The Camera type exposes the following members.

Constructors
  NameDescription
Public methodCamera
Create the camera component.
Top
Properties
  NameDescription
Public property_GameObject
Get the game object this component is attached to.
(Inherited from BaseComponent.)
Public propertyBackward
Get a vector representing camera current backward direction.
Public propertyCameraType
Set / get camera type.
Public propertyEnabled
Is this component currently enabled.
(Inherited from BaseComponent.)
Public propertyFarPlane
Far clip plane distance.
Public propertyForceScreenSize
If defined, this will be used as screen size (affect aspect ratio in perspective camera, and view size in Orthographic camera. If not set, default screen size will be used.
Public propertyForward
Get a vector representing camera current forward direction.
Public propertyIsActiveCamera
Get if this camera is the active camera in its scene. Note: it doesn't mean that the scene this camera belongs to is currently active.
Public propertyName
Get / set the name of this component.
(Inherited from IComponent.)
Public propertyNearPlane
Near clip plane distance.
Public propertyPosition
Get camera current position.
Public propertyProjection
Get camera projection matrix.
Public propertyView
Get camera view matrix.
Public propertyViewFrustum
Get camera view frustum.
Top
Methods
  NameDescription
Public methodClone
Clone this component.
(Overrides BaseComponentClone.)
Public methodCollisionEnd
Called when this physical body stop colliding with another body.
(Inherited from BaseComponent.)
Public methodCollisionProcess
Called while this physical body is colliding with another body.
(Inherited from BaseComponent.)
Public methodCollisionStart
Called when this physical body start colliding with another body.
(Inherited from BaseComponent.)
Public methodDestroy
Destroy this component.
(Inherited from BaseComponent.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodFixedUpdate
Just like Update(), but called every constant amount of time regardless of FPS and Vsync.
(Inherited from BaseComponent.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetImplementedFrameBasedEvents
Get a list of frame-based events this component implements.
(Inherited from BaseComponent.)
Public methodGetMouseRay
Get the 3d ray that starts from camera position and directed at current mouse position.
Public methodGetRay(Vector2)
Get the 3d ray that starts from camera position and directed at a given 2d position.
Public methodGetRay(Vector3)
Get the 3d ray that starts from camera position and directed at a given 3d position.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHasMethodImplemented
Return if this component has a method implemented.
(Inherited from BaseComponent.)
Public methodHeartbeat
An event that triggers every X miliseconds (defined per GameObject instance).
(Inherited from BaseComponent.)
Public methodRemoveFromParent
Remove this component from parent.
(Inherited from BaseComponent.)
Public methodSendMessage
Send message to this component.
(Inherited from BaseComponent.)
Public methodSetAsActive
Set this camera as the currently active camera.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdate
Update this component (called every frame parent is active).
(Inherited from BaseComponent.)
Public methodUpdateCameraView
Update camera view matrix.
Top
Fields
  NameDescription
Public fieldAsDebug
If true, it means this component was added to its parent in debug mode.
(Inherited from BaseComponent.)
Public fieldLookAt
If set, camera will always look at this point, regardless of scene node rotation.
Public fieldLookAtTarget
Set a target that the camera will always look at, regardless of scene node rotation. Note: this override the LookAt position, even if set.
Public fieldLookAtTargetOffset
If 'LookAtTarget' is used, this vector will be offset from target position. For example, if you want the camera to look at 5 units above target, set this to Vector3(0, 5, 0).
Top
See Also