Package | com.smartfoxserver.v2.entities.data |
Class | public class Vec3D |
Inheritance | Vec3D Object |
Positions along the X,Y,Z axes can be expressed as Integers or Floats. Due to the fact that ActionScript 3 doesn't make a clear distinction between these types, while SmartFoxServer 2X does, it is necessary to declare what type will be used by means of the useFloatCoordinates static field.Long and Doubles are not supported on the server side.
Property | Defined By | ||
---|---|---|---|
px : Number [read-only]
Returns the position along the X axis. | Vec3D | ||
py : Number [read-only]
Returns the position along the Y axis. | Vec3D | ||
pz : Number [read-only]
Returns the position along the Z axis. | Vec3D | ||
useFloatCoordinates : Boolean = false [static]
Forces the API to send all Vec3D instances as floating point coordinates. | Vec3D |
Method | Defined By | ||
---|---|---|---|
Vec3D(px:Number, py:Number, pz:Number = 0)
Creates a new Vec3D instance. | Vec3D |
px | property |
px:Number
[read-only] Returns the position along the X axis.
public function get px():Number
py | property |
py:Number
[read-only] Returns the position along the Y axis.
public function get py():Number
pz | property |
pz:Number
[read-only] Returns the position along the Z axis.
public function get pz():Number
useFloatCoordinates | property |
public static var useFloatCoordinates:Boolean = false
Forces the API to send all Vec3D instances as floating point coordinates. This should be set in the application before the first MMORoom is created or joined.
Vec3D | () | Constructor |
public function Vec3D(px:Number, py:Number, pz:Number = 0)
Creates a new Vec3D instance. The position along the Z axis is optional for 2D environments.
Parameterspx:Number — The position along the X axis.
| |
py:Number — The position along the Y axis.
| |
pz:Number (default = 0 ) — The position along the Z axis (optional).
|