LuaDocs/MOSRotating

From Data Realms Wiki

Revision as of 17:14, 13 January 2012 by Weegee (Talk | contribs)
Jump to: navigation, search

Contents

Parent: MOSprite

Concrete Class. A sprite movable object that can rotate.

Go back to Class Index

Properties

ClassName

The class name of this Entity.A string with the friendly-formatted type name of this object.

Material

Read-only property. The main Material of this MOSRotating.The the Material of this MOSRotating.

RecoilForce

Read-only property. The current recoil impulse force Vector of this MOSprite.A const reference to the current recoil impulse force in kg * m/s.

RecoilOffset

Read-only property. The current recoil offset Vector of this MOSprite.A const reference to the current recoil offset.

IsGold

Read-only property. Indicates whether this MO is made of Gold or not.Whether this MovableObject is of Gold or not.


Functions

AddRecoil

Adds graphical recoil offset to this MOSprite according to its angle.

Arguments:

  • None.

Return value:

None.


SetRecoil

Adds recoil offset to this MOSprite.

Arguments:

  • A vector with the recoil impulse force in kg * m/s.
  • A vector with the recoil offset in pixels.
  • Whether recoil should be activated or not for the next Draw().

Return value:

None.


IsRecoiled

Returns whether this MOSprite is currently under the effects of recoil.

Arguments:

  • None.

Return value:

None.


EnableDeepCheck

Sets whether or not this MOSRotating should check for deep penetrations the terrain or not.

Arguments:

  • Whether to enable deep penetration checking or not.

Return value:

None.


ForceDeepCheck

Sets to force a deep checking of this' silhouette against the terrain and create an outline hole in the terrain, generating particles of the intersecting pixels in the terrain.

Arguments:

  • Whether to force a deep penetration check for this sim frame or not..

Return value:

None.


GibThis

Gibs this, effectively destroying it and creating multiple gibs or pieces in its place.

Arguments:

  • The impulse (kg * m/s) of the impact causing the gibbing to happen. blast impulse which will push the gibs away from the center.
  • A pointer to an MO which the gibs shuold not be colliding with!

Return value:

None.


MoveOutOfTerrain

Checks whether any of the Atom:s in this MovableObject are on top of terrain pixels, and if so, attempt to move this out so none of this' Atoms are on top of the terrain any more.

Arguments:

  • Only consider materials stronger than this in the terrain for intersections.

Return value:

Whether any intersection was successfully resolved. Will return true even if there wasn't any intersections to begin with.


ApplyForces

Gathers and applies the global and accumulated forces. Then it clears out the force list.Note that this does NOT apply the accumulated impulses (impulse forces)!

Arguments:

  • None.

Return value:

None.


ApplyImpulses

Gathers and applies the accumulated impulse forces. Then it clears out the impulse list.Note that this does NOT apply the accumulated regular forces (non-impulse forces)!

Arguments:

  • None.

Return value:

None.


AttachEmitter

Attaches an AEmitter to this MOSRotating.

Arguments:

  • The AEmitter to attach, ownership IS transferred!
  • The offset from the origin of this MOSRotating to where the AEmitter's joint is attached.
  • Whether to check if this added emitter triggers the GibWoundLimit.. sometimes that's a bad idea if potentially gibbing this would cause the m_Attachables list to be messed with while it's being iterated.

Return value:

None.


IsOnScenePoint

Indicates whether this' current graphical representation overlaps a point in absolute scene coordinates.

Arguments:

  • The point in absolute scene coordinates.

Return value:

Whether this' graphical rep overlaps the scene point.


EraseFromTerrain

Cuts this' silhouette out from the terrain's material and color layers.

Arguments:

  • None.

Return value:

None.


Go back to Class Index

Personal tools