Harmony
Scripting Interface Documentation
Point3d Class Reference

The Point3d JavaScript class. Defines a three dimensional point. More...

Public Slots

void setXYZ (double x, double y, double z)
 Set the x, y, z coordinate to the given. More...
 
bool isOrigin ()
 Test if Point3d is at origin. More...
 
bool isEqual (Point3d p2)
 Test if current Point3d is equal to specified Point3d. More...
 
bool isNotEqual (Point3d p2)
 Test if current Point3d is not equal to specified Point3d. More...
 
double distance (Point3d p2)
 Calculate distance between current Point3d and specified Point3d. More...
 
double distanceSq (Point3d p2)
 Calculate square distance between current Point3d and specified Point3d. More...
 
Point3dround (double quantum)
 Round x, y coordinate to floor with the given resolution. More...
 
Point3dinterpolate (double t, Point3d p1, Point3d p2)
 Calculate Point3d as interpolation between two points. More...
 
Point3d add (Vector3d v)
 Add specified Vector3d to current Point3d. More...
 
Point3d minus (Vector3d v)
 Substracts current Point3d with specified Vector3d. More...
 
Vector3d minus (Point3d p2)
 Substracts current Point3d with specified Point3d. More...
 
Point3daddEq (Vector3d v)
 Add specified Vector3d to current Point3d. More...
 
Point3dminusEq (Vector3d v)
 Substract current Point3d with specified Vector3d. More...
 
Point2d toPoint2d ()
 Convert current Point3d to bi-dimensional Point2d. More...
 

Public Member Functions

 Point3d ()
 Create a new empty Point3d. More...
 
 Point3d (double x, double y, double z)
 Create a new Point3d. More...
 

Properties

double x
 
double y
 
double z
 

Detailed Description

The Point3d JavaScript class. Defines a three dimensional point.

@ The Point3d class defines a three dimensional point container. Point3d objects can be instantiated in the scripting environment.

Constructor & Destructor Documentation

◆ Point3d() [1/2]

Point3d::Point3d ( )

Create a new empty Point3d.

◆ Point3d() [2/2]

Point3d::Point3d ( double  x,
double  y,
double  z 
)

Create a new Point3d.

Parameters
xX value
yY value
zZ value

Member Function Documentation

◆ add

Point3d Point3d::add ( Vector3d  v)
slot

Add specified Vector3d to current Point3d.

Parameters
vVector3d
Returns
New Point3d containing result

◆ addEq

Point3d& Point3d::addEq ( Vector3d  v)
slot

Add specified Vector3d to current Point3d.

Parameters
vVector3d
Returns
Point3d reference

◆ distance

double Point3d::distance ( Point3d  p2)
slot

Calculate distance between current Point3d and specified Point3d.

Parameters
p2Second Point3d
Returns
Distance value

◆ distanceSq

double Point3d::distanceSq ( Point3d  p2)
slot

Calculate square distance between current Point3d and specified Point3d.

Parameters
p2Second Point3d
Returns
Square distance value

◆ interpolate

Point3d& Point3d::interpolate ( double  t,
Point3d  p1,
Point3d  p2 
)
slot

Calculate Point3d as interpolation between two points.

Parameters
tFactor of interpolation [ 0, 1 ]
p1First Point3d
p2Second Point3d
Returns
Point3d reference

◆ isEqual

bool Point3d::isEqual ( Point3d  p2)
slot

Test if current Point3d is equal to specified Point3d.

Parameters
p2Second Point3d
Returns
Result of test

◆ isNotEqual

bool Point3d::isNotEqual ( Point3d  p2)
slot

Test if current Point3d is not equal to specified Point3d.

Parameters
p2Second Point3d
Returns
Result of test

◆ isOrigin

bool Point3d::isOrigin ( )
slot

Test if Point3d is at origin.

Returns
Result of test

◆ minus [1/2]

Point3d Point3d::minus ( Vector3d  v)
slot

Substracts current Point3d with specified Vector3d.

Parameters
vVector3d
Returns
New Point3d containing result

◆ minus [2/2]

Vector3d Point3d::minus ( Point3d  p2)
slot

Substracts current Point3d with specified Point3d.

Parameters
p2Second Point3d
Returns
New Point3d containing result

◆ minusEq

Point3d& Point3d::minusEq ( Vector3d  v)
slot

Substract current Point3d with specified Vector3d.

Parameters
vVector3d
Returns
Point3d reference

◆ round

Point3d& Point3d::round ( double  quantum)
slot

Round x, y coordinate to floor with the given resolution.

◆ setXYZ

void Point3d::setXYZ ( double  x,
double  y,
double  z 
)
slot

Set the x, y, z coordinate to the given.

◆ toPoint2d

Point2d Point3d::toPoint2d ( )
slot

Convert current Point3d to bi-dimensional Point2d.

Returns
new Point2d

Property Documentation

◆ x

double Point3d::x
readwrite

◆ y

double Point3d::y
readwrite

◆ z

double Point3d::z
readwrite