Inherits from NSObject
Declared in Vec3D.h
Vec3D.m

Overview

The Vec3D object represents a position in a 2D or 3D space.

This class is used to express a position inside a virtual environment with no specific unit of measure (could be pixels, feet, meters, etc).

Positions along the X,Y,Z axes can be expressed as ints or floats. Although Objective-C can handle both ints and floats under the NSNumber class, SmartFoxServer 2X needs to recognize the specific types. For this reason we recommend to initialize the object with the proper literals to declare which type you are using.

For instance (x:@10, y:@10, z:@10) will use integers while (x:@10F, y:@10F, z:@10F) will use the same coordinates but with a floating point type.

Long and Doubles are not supported for this type of coordinate values.

See SetUserPositionRequest, MMORoom, MMOItem

Tasks

Properties

floatX

The X coordinate as Float

@property (readonly) NSNumber *floatX

Discussion

The X coordinate as Float

Declared In

Vec3D.h

floatY

The Y coordinate as Float

@property (readonly) NSNumber *floatY

Discussion

The Y coordinate as Float

Declared In

Vec3D.h

floatZ

The Z coordinate as Float

@property (readonly) NSNumber *floatZ

Discussion

The Z coordinate as Float

Declared In

Vec3D.h

intX

The X coordinate as Integer

@property (readonly) NSInteger intX

Discussion

The X coordinate as Integer

Declared In

Vec3D.h

intY

The Y coordinate as Integer

@property (readonly) NSInteger intY

Discussion

The Y coordinate as Integer

Declared In

Vec3D.h

intZ

The Z coordinate as Integer

@property (readonly) NSInteger intZ

Discussion

The Z coordinate as Integer

Declared In

Vec3D.h

Class Methods

vectorWithX:Y:

2D Constructor

+ (id)vectorWithX:(NSNumber *)x Y:(NSNumber *)y

Parameters

x

the x coordinate

y

the y coordinate

Discussion

2D Constructor

Declared In

Vec3D.h

vectorWithX:Y:Z:

3D Constructor

+ (id)vectorWithX:(NSNumber *)x Y:(NSNumber *)y Z:(NSNumber *)z

Parameters

x

the x coordinate

y

the y coordinate

z

the z coordinate

Discussion

3D Constructor

Declared In

Vec3D.h

Instance Methods

isFloat

Checks if the object uses Floating point or Integer values

- (BOOL)isFloat

Return Value

YES if the floats are used.

Discussion

Checks if the object uses Floating point or Integer values

Declared In

Vec3D.h