3DRadSpace  v1.0.0a
Scripting documentation
_3DRadSpaceDll.FPVCamera Class Reference

Represents a First person view camera. More...

Inheritance diagram for _3DRadSpaceDll.FPVCamera:
_3DRadSpaceDll.Camera _3DRadSpaceDll.GameObject

Public Member Functions

 FPVCamera ()
 Default constructor. More...
 
 FPVCamera (string name, bool enabled, Vector3 pos, Vector3 up, Vector2 look_coords, float fov)
 
override void Draw (SpriteBatch spriteBatch, Matrix? view, Matrix? projection)
 
- Public Member Functions inherited from _3DRadSpaceDll.Camera
 Camera (string name, bool Enabled, Vector3 Pos, Vector3 Rot, Vector3 Targ, Vector3 UpDir, float FOV, float nearplane, float farplane)
 Camera object constructor. More...
 
 Camera (string name, bool Enabled, Vector3 Pos, Vector3 Rot, Vector3 UpDir, float FOV, float nearplane, float farplane)
 Creates a Camera object with the specified arguments. More...
 
 Camera (string name, Vector3 Pos, Vector3 Target, float FOV, float nearplane, float farplane)
 Camera constructor used in the editor. More...
 
 Camera ()
 Empty constructor. Values are mostly default. More...
 
override void Load (ContentManager content)
 Loads the object. In this cases, initializes the DeltaPos used when the camera is 'chasing' an object. More...
 
override void EditorDraw (SpriteBatch spriteBatch, Matrix? view, Matrix? projection)
 Drawing code for the editor. More...
 
void SetFOVDegrees (float deg)
 Sets the FOV with a degree value More...
 
float GetFOVDegrees ()
 Converts FOV to degrees. More...
 
override void Update (MouseState mouse, KeyboardState keyboard, GameTime time)
 Updates the Camera object. In this case, the Camera object is affected by it's 'relationship(s)'. More...
 
void Draw (SpriteBatch spriteBatch, out Matrix view, out Matrix projection)
 Camera drawing for game code. This method doesn't override the GameObject's Draw function. :thinking: More...
 
- Public Member Functions inherited from _3DRadSpaceDll.GameObject
 GameObject ()
 Default constructor. More...
 
void Enable ()
 Enables object. More...
 
void Disable ()
 Disables object. More...
 
void Toggle ()
 Switches object on/off state. More...
 
void Show ()
 Shows the object. More...
 
void Hide ()
 Hides the object. More...
 
virtual void Trigger ()
 This is specific to objects like ExitFade, NetServer,etc More...
 
override bool Equals (object obj)
 Determines whether the specified object is equal to the current object. More...
 
override int GetHashCode ()
 Returns the hash code calculated from a string representing the data inside the object. More...
 
override string ToString ()
 Returns the object's name More...
 
void RunOnce ()
 Runs the object one Update loop. If used on a active object it will be stopped. More...
 

Public Attributes

Vector2 CamScreenCoords
 Camera rotation coordinates related to screen. More...
 
float Bound
 Vertical rotaition bounds. More...
 
float MovementSpeed
 Movement speed. More...
 
float Sensibility
 Mouse sensiblity. More...
 
- Public Attributes inherited from _3DRadSpaceDll.GameObject
Vector3 Position
 Object position More...
 
Vector3 Rotation
 Rotation in a Euler angles system. More...
 
List< int > SelectedObjects
 Used for editor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from _3DRadSpaceDll.GameObject
static implicit operator bool (GameObject o)
 Checks if the object exists. Same as GameObject != null. More...
 
static bool operator== (GameObject a, GameObject b)
 Checks if two GameObjects are equal. More...
 
static bool operator!= (GameObject a, GameObject b)
 The opposite of the equality operator. More...
 
- Properties inherited from _3DRadSpaceDll.Camera
static Model model [get, set]
 Expected to be loaded by the game editor. Not used in 3DRadSpacePlayer. More...
 
Vector3 CameraTarget [get, set]
 Look at point. More...
 
Vector3 CameraRotation [get, set]
 Camera Rotation. This is a normalized 3D Vector (with the lenght equal or lower(?) to 1) More...
 
float FOV [get, set]
 Fielf of view (Measured in radians). More...
 
static Vector2 ScreenSize [get, set]
 Screen size. Used to calculate the projection's aspect ratio. More...
 
float MinDrawDist [get, set]
 Minimum drawing distance. A recommended value is 0.1f. More...
 
float MaxDrawDist [get, set]
 Maximum drawing distance. More...
 
- Properties inherited from _3DRadSpaceDll.GameObject
string Name [get, set]
 Object Name. Used as a string identifier. More...
 
object Tag [get, set]
 Tag object. More...
 
bool Enabled [get, set]
 Checks if object is enabled. More...
 
bool Hidden [get, set]
 Checks if object is being drawn. More...
 
List< ObjectBehiavourBehiavours [get, set]
 Relation with other objects More...
 
Quaternion RotationQuaternion [get]
 Rotation in a Quaterion system. More...
 
string Resource [get, set]
 Resource file More...
 
- Events inherited from _3DRadSpaceDll.GameObject
onDraw OnDraw
 Called when object is being drawn on frame. More...
 
onUpdate OnUpdate
 Called when object is being updated on the update logic loop. More...
 
onObjectDestroy OnRemoval
 Called when object is being deleted. More...
 
onObjectLoad OnObjectLoad
 Called when a object resource is being loaded. More...
 

Detailed Description

Represents a First person view camera.

Constructor & Destructor Documentation

◆ FPVCamera() [1/2]

_3DRadSpaceDll.FPVCamera.FPVCamera ( )

Default constructor.

◆ FPVCamera() [2/2]

_3DRadSpaceDll.FPVCamera.FPVCamera ( string  name,
bool  enabled,
Vector3  pos,
Vector3  up,
Vector2  look_coords,
float  fov 
)

Parameters
name
enabled
pos
up
look_coords
fov

Member Function Documentation

◆ Draw()

override void _3DRadSpaceDll.FPVCamera.Draw ( SpriteBatch  spriteBatch,
Matrix?  view,
Matrix?  projection 
)
virtual

Parameters
spriteBatch
view
projection

Reimplemented from _3DRadSpaceDll.GameObject.

Member Data Documentation

◆ Bound

float _3DRadSpaceDll.FPVCamera.Bound

Vertical rotaition bounds.

◆ CamScreenCoords

Vector2 _3DRadSpaceDll.FPVCamera.CamScreenCoords

Camera rotation coordinates related to screen.

◆ MovementSpeed

float _3DRadSpaceDll.FPVCamera.MovementSpeed

Movement speed.

◆ Sensibility

float _3DRadSpaceDll.FPVCamera.Sensibility

Mouse sensiblity.