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

Class for drawing a 3D mesh. More...

Inheritance diagram for _3DRadSpaceDll.Skinmesh:
_3DRadSpaceDll.GameObject

Public Member Functions

 Skinmesh (string name, bool active, string resource, Vector3 position=default, Vector3 rotation=default, Vector3 scale=default, bool fog_affected=true, BoundingBox box=default, BoundingSphere sphere=default)
 Creates a new Skinmesh object More...
 
 Skinmesh ()
 Empty Skinmesh constructor; More...
 
override void Load (ContentManager content)
 Loads the model. Uses Monogame's content pipeline. More...
 
override void Draw (SpriteBatch spriteBatch, Matrix? view, Matrix? projection)
 Draws the mesh. More...
 
override void EditorDraw (SpriteBatch spriteBatch, Matrix? view, Matrix? projection)
 Draws the mesh in the editor. The only difference from Draw() is the missing condition. 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 Update (MouseState mouse, KeyboardState keyboard, GameTime time)
 Object update logic 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

Model Model [get]
 The Model itself. More...
 
Vector3 FogColor [get, set]
 Fog effect color. From IEffectFog. More...
 
bool FogEnabled [get, set]
 Checks if the Skinmesh allows fogs. More...
 
float FogEnd [get, set]
 Fog end distance. More...
 
float FogStart [get, set]
 Fog start distance. More...
 
bool FogExists = false [get, set]
 Determines if fog is defined More...
 
Vector3 Scale [get, set]
 Model scale. Default is (1,1,1). More...
 
BoundingBox BoundingBox [get, set]
 
BoundingSphere BoundingSphere [get, set]
 Custom user defined Bounding Sphere. 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...
 

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...
 
- 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...
 
- 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

Class for drawing a 3D mesh.

Constructor & Destructor Documentation

◆ Skinmesh() [1/2]

_3DRadSpaceDll.Skinmesh.Skinmesh ( string  name,
bool  active,
string  resource,
Vector3  position = default,
Vector3  rotation = default,
Vector3  scale = default,
bool  fog_affected = true,
BoundingBox  box = default,
BoundingSphere  sphere = default 
)

Creates a new Skinmesh object

Parameters
nameObject's name.
activeChecks if the skinmesh will get drawn.
resourceResource name, from the 'root'/Content/ without the xnb extension.
positionObject position
rotationObject rotation in Euler Angles measured in radians.
scaleObject scale. (1,1,1) is default.
fog_affectedAllows or not fogs.
boxBounding box for intersections and collisions.
sphereUser-defined bounding sphere for intersections and collisions.

◆ Skinmesh() [2/2]

_3DRadSpaceDll.Skinmesh.Skinmesh ( )

Empty Skinmesh constructor;

Member Function Documentation

◆ Draw()

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

Draws the mesh.

Parameters
spriteBatchNot used.
viewNecessary for model drawing.
projectionNecessary for model drawing.

Reimplemented from _3DRadSpaceDll.GameObject.

◆ EditorDraw()

override void _3DRadSpaceDll.Skinmesh.EditorDraw ( SpriteBatch  spriteBatch,
Matrix?  view,
Matrix?  projection 
)
virtual

Draws the mesh in the editor. The only difference from Draw() is the missing condition.

Parameters
spriteBatchNot used.
viewView Matrix.
projectionProjection Matrix

Reimplemented from _3DRadSpaceDll.GameObject.

◆ Load()

override void _3DRadSpaceDll.Skinmesh.Load ( ContentManager  content)
virtual

Loads the model. Uses Monogame's content pipeline.

Parameters
contentContentManager from the game instance.

Reimplemented from _3DRadSpaceDll.GameObject.

Property Documentation

◆ BoundingBox

BoundingBox _3DRadSpaceDll.Skinmesh.BoundingBox
getset

Bounding Box allowing basic hitbox/collision detection.

Note: Please note that this object doesn't use physics

◆ BoundingSphere

BoundingSphere _3DRadSpaceDll.Skinmesh.BoundingSphere
getset

Custom user defined Bounding Sphere.

◆ FogColor

Vector3 _3DRadSpaceDll.Skinmesh.FogColor
getset

Fog effect color. From IEffectFog.

◆ FogEnabled

bool _3DRadSpaceDll.Skinmesh.FogEnabled
getset

Checks if the Skinmesh allows fogs.

◆ FogEnd

float _3DRadSpaceDll.Skinmesh.FogEnd
getset

Fog end distance.

◆ FogExists

bool _3DRadSpaceDll.Skinmesh.FogExists = false
getset

Determines if fog is defined

◆ FogStart

float _3DRadSpaceDll.Skinmesh.FogStart
getset

Fog start distance.

◆ Model

Model _3DRadSpaceDll.Skinmesh.Model
get

The Model itself.

◆ Scale

Vector3 _3DRadSpaceDll.Skinmesh.Scale
getset

Model scale. Default is (1,1,1).