TPoint3D Class Reference

#include <e32cmn.h>

class TPoint3D
Public Attributes
TInt iX
TInt iY
TInt iZ
Public Member Enumerations
enumTUninitialized { EUninitialized }
Public Member Functions
TPoint3D(TUninitialized)
TPoint3D()
TPoint3D(TInt, TInt, TInt)
TPoint3D(const TPoint &)
IMPORT_C TPointAsPoint()
IMPORT_C voidSetPoint(const TPoint &)
IMPORT_C voidSetXYZ(TInt, TInt, TInt)
IMPORT_C TBooloperator!=(const TPoint3D &)
IMPORT_C TPoint3Doperator+(const TPoint3D &)
IMPORT_C TPoint3Doperator+(const TPoint &)
IMPORT_C TPoint3D &operator+=(const TPoint3D &)
IMPORT_C TPoint3D &operator+=(const TPoint &)
IMPORT_C TPoint3Doperator-(const TPoint3D &)
IMPORT_C TPoint3Doperator-(const TPoint &)
IMPORT_C TPoint3Doperator-()
IMPORT_C TPoint3D &operator-=(const TPoint3D &)
IMPORT_C TPoint3D &operator-=(const TPoint &)
IMPORT_C TBooloperator==(const TPoint3D &)

Detailed Description

Stores a three-dimensional point in Cartesian or polar co-ordinates. Its data members (iX, iY and iZ) are public and can be manipulated directly.

Member Attribute Documentation

iX

TInt iX

The x co-ordinate.

iY

TInt iY

The y co-ordinate.

iZ

TInt iZ

The z co-ordinate.

Member Enumeration Documentation

Enum TUninitialized

EnumeratorValueDescription
EUninitialized

Constructor & Destructor Documentation

TPoint3D ( TUninitialized )

TPoint3D(TUninitialized)[inline]

TUninitialized Constructor

TPoint3D ( )

TPoint3D()[inline]

Constructs default TPoint3D, initialising its iX , iY and iZ members to zero.

Constructs default 3Dpoint, initialising its iX, iY and iZ members to zero.

TPoint3D ( TInt, TInt, TInt )

TPoint3D(TIntaX,
TIntaY,
TIntaZ
)[inline]

Constructs TPoint3D with the specified x,y and z co-ordinates.

Constructs TPoint3D with the specified x,y and z co-ordinates.

ParameterDescription
aXThe x co-ordinate value.
aYThe y co-ordinate value.
aZThe z co-ordinate value.

TPoint3D ( const TPoint & )

TPoint3D(const TPoint &aPoint)[inline]

Copy Construct from TPoint , initialises Z co-ordinate to Zero

Member Function Documentation

AsPoint ( )

IMPORT_C TPointAsPoint()const

Returns TPoint from TPoint3D

Gets Tpoint from Tpoint3D

Returns: TPoint from X and Y cordinates of Tpoint3D

SetPoint ( const TPoint & )

IMPORT_C voidSetPoint(const TPoint &aPoint)

TPoint3D from TPoint, sets the Z co-ordinate to Zero

SetXYZ ( TInt, TInt, TInt )

IMPORT_C voidSetXYZ(TIntaX,
TIntaY,
TIntaZ
)

Set Method to set the xyz co-ordinates of TPoint3D

Sets the x , y and z co-ordinates for this point.

ParameterDescription
aXThe value to assign to the x co-ordinate.
aYThe value to assign to the y co-ordinate.
aZThe value to assign to the z co-ordinate.

operator!= ( const TPoint3D & )

IMPORT_C TBooloperator!=(const TPoint3D &aPoint3D)const

Compares two 3D points for inequality.

For two points to be unequal, their x or y or z co-ordinate values must be different.

ParameterDescription
aPoint3DThe point to be compared with this point.

Returns: True, if the two points are unequal; false, otherwise.

operator+ ( const TPoint3D & )

IMPORT_C TPoint3Doperator+(const TPoint3D &aPoint3D)const

The operator adds the specified point to this point, and returns the resulting value.

ParameterDescription
aPoint3DThe point to be added to this point.

Returns: the point(TPoint3D) which is the result of the operation.

operator+ ( const TPoint & )

IMPORT_C TPoint3Doperator+(const TPoint &aPoint)const

TPoint addition operator.

The operator adds the specified TPoint to this point, and returns the resulting value.

Returns: the point(TPoint3D) which is the result of the operation.

operator+= ( const TPoint3D & )

IMPORT_C TPoint3D &operator+=(const TPoint3D &aPoint3D)

TPoint3D addition assignment operator.

The operator adds the specified point to this point, and assigns the result back to this point.

ParameterDescription
aPoint3DThe point to be added.

Returns: A reference to this point object.

operator+= ( const TPoint & )

IMPORT_C TPoint3D &operator+=(const TPoint &aPoint)

TPoint addition assignment operator.

The operator adds the specified TPoint to this point, and assigns the result back to this point.

The operation proceeds by: adding x and y cordinates of the TPoin to this point and no changes to the Z-coordinatete value

ParameterDescription
aPointThe TPoint to be added to this point.

Returns: A reference to this point object.

operator- ( const TPoint3D & )

IMPORT_C TPoint3Doperator-(const TPoint3D &aPoint3D)const

TPoint3D subtraction operator.

The operator subtracts the specified point from this point, and returns the resulting value.

ParameterDescription
aPoint3DThe point to be subtracted from this point.

Returns: the point(TPoint3D) which is the result of the operation.

operator- ( const TPoint & )

IMPORT_C TPoint3Doperator-(const TPoint &aPoint)const

TPoint subtraction operator.

The operator subtracts the specified TPoint from this point, and returns the resulting value.

ParameterDescription
aPointThe TPoint to be subtracted.

Returns: the point(TPoint3D) which is the result of the operation.

operator- ( )

IMPORT_C TPoint3Doperator-()const

Unary minus operator. The operator returns the negation of this Point3D

Unary minus operator.

The operator returns the negation of this point.

Returns: the point(TPoint3D) which is the result of Unary minus operation.

operator-= ( const TPoint3D & )

IMPORT_C TPoint3D &operator-=(const TPoint3D &aPoint3D)

TPoint3D subtraction assignment operator.

The operator subtracts the specified point from this point, and assigns the result back to this point.

Returns: A reference to this point object.

operator-= ( const TPoint & )

IMPORT_C TPoint3D &operator-=(const TPoint &aPoint)

TPoint subtraction assignment operator.

The operator subtracts the specified TPoint from this point(TPoint3D), and assigns the result back to this point.

The operation proceeds by subtracting x and y cordinates of the TPoin to this point and no changes to the Z-coordinatete value

ParameterDescription
aPointThe aPoint to be subtracted.

Returns: A reference to this point object.

operator== ( const TPoint3D & )

IMPORT_C TBooloperator==(const TPoint3D &aPoint3D)const

Compares two 3D points(TPoint3D) for equality.

For two TPoint3D to be equal, their x , y and zco-ordinate values must be equal.

ParameterDescription
aPoint3DThe point to be compared with this point.

Returns: True, if the two points are equal; false, otherwise.