![]() |
3DRadSpace
v1.0.0a
Scripting documentation
|
3D Camera class. Allows drawing three dimensinal scenes. More...
Public Member Functions | |
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... | |
![]() | |
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 | Draw (SpriteBatch spriteBatch, Matrix? view, Matrix? projection) |
Unloads the resource. 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... | |
Properties | |
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... | |
![]() | |
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< ObjectBehiavour > | Behiavours [get, set] |
Relation with other objects More... | |
Quaternion | RotationQuaternion [get] |
Rotation in a Quaterion system. More... | |
string | Resource [get, set] |
Resource file More... | |
Additional Inherited Members | |
![]() | |
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... | |
![]() | |
Vector3 | Position |
Object position More... | |
Vector3 | Rotation |
Rotation in a Euler angles system. More... | |
List< int > | SelectedObjects |
Used for editor. More... | |
![]() | |
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... | |
3D Camera class. Allows drawing three dimensinal scenes.
_3DRadSpaceDll.Camera.Camera | ( | string | name, |
bool | Enabled, | ||
Vector3 | Pos, | ||
Vector3 | Rot, | ||
Vector3 | Targ, | ||
Vector3 | UpDir, | ||
float | FOV, | ||
float | nearplane, | ||
float | farplane | ||
) |
Camera object constructor.
name | Object name. |
Enabled | If camera is enabled. |
Pos | Camera position. |
Rot | Camera rotation. Also used to calculate the target. |
Targ | Camera Target. The point the camera is looking at. |
UpDir | Camera up direction. |
FOV | Field of view in radians. |
nearplane | Minumum draw distance. |
farplane | Maximum draw distance. |
_3DRadSpaceDll.Camera.Camera | ( | string | name, |
bool | Enabled, | ||
Vector3 | Pos, | ||
Vector3 | Rot, | ||
Vector3 | UpDir, | ||
float | FOV, | ||
float | nearplane, | ||
float | farplane | ||
) |
_3DRadSpaceDll.Camera.Camera | ( | string | name, |
Vector3 | Pos, | ||
Vector3 | Target, | ||
float | FOV, | ||
float | nearplane, | ||
float | farplane | ||
) |
Camera constructor used in the editor.
name | |
Pos | |
Target | |
FOV | |
nearplane | |
farplane |
_3DRadSpaceDll.Camera.Camera | ( | ) |
Empty constructor. Values are mostly default.
void _3DRadSpaceDll.Camera.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:
spriteBatch | Not used. |
view | Uses it's own view |
projection |
|
virtual |
Drawing code for the editor.
Reimplemented from _3DRadSpaceDll.GameObject.
float _3DRadSpaceDll.Camera.GetFOVDegrees | ( | ) |
Converts FOV to degrees.
|
virtual |
Loads the object. In this cases, initializes the DeltaPos used when the camera is 'chasing' an object.
content |
Reimplemented from _3DRadSpaceDll.GameObject.
void _3DRadSpaceDll.Camera.SetFOVDegrees | ( | float | deg | ) |
Sets the FOV with a degree value
deg | Degrees |
|
virtual |
Updates the Camera object. In this case, the Camera object is affected by it's 'relationship(s)'.
mouse | Not used |
keyboard | Not used |
time | Not used |
Reimplemented from _3DRadSpaceDll.GameObject.
|
getset |
Camera Rotation. This is a normalized 3D Vector (with the lenght equal or lower(?) to 1)
|
getset |
Look at point.
|
getset |
Fielf of view (Measured in radians).
|
getset |
Maximum drawing distance.
|
getset |
Minimum drawing distance. A recommended value is 0.1f.
|
staticgetset |
Expected to be loaded by the game editor. Not used in 3DRadSpacePlayer.
|
staticgetset |
Screen size. Used to calculate the projection's aspect ratio.