Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Gui.Point3 Class Reference

Immutable 3-component integer point. More...

Inheritance diagram for Dragengine.Gui.Point3:

Public Member Functions

Constructors
Point3 new ()
 Create point with all components set to 0.
Point3 new (int x, int y, int z)
 Create point with components.
Point3 new (Point3 point)
 Create copy of a point.
Operators
Point3 operator- ()
 Point3 with each component negated.
Point3 operator+ (Point3 point)
 Sum of two points.
Point3 operator- (Point3 point)
 Difference between two points.
Point3 operator* (int scalar)
 Point3 with each component scaled by a value.
Point3 operator/ (int scalar)
 Point3 with each component divided by a value.
int operator* (Point3 point)
 Dot product of two points.
bool operator< (Point3 point)
 Check if each component of this point is smaller than another point.
bool operator<= (Point3 point)
 Check if each component of this point is smaller than or equal to another point.
bool operator> (Point3 point)
 Check if each component of this point is larger than another point.
bool operator>= (Point3 point)
 Check if each component of this point is larger than or equal to another point.

Management

int getX ()
 X component.
int getY ()
 Y component.
int getZ ()
 Z component.
float getLength ()
 Length.
Point3 smallest (Point3 p)
 Point3 with smallest components of this point and another point.
Point3 smallest (int x, int y, int z)
 Point3 with smallest components of this point and another point.
Point3 largest (Point3 point)
 Point3 with largest components of this point and another point.
Point3 largest (int x, int y, int z)
 Point3 with largest components of this point and another point.
bool isEqualTo (Point3 point)
 Point3s are equal.
bool isAtLeast (int value)
 Both components are larger than or equal to a value.
bool isAtMost (int value)
 Both components are smaller than or equal to a value.
bool isZero ()
 Point is equal to zero point.
Point3 compMultiply (Point3 point)
 Multiply with point component wise.
Point3 compDivide (Point3 point)
 Divide by point component wise.
Vector toVector ()
 Convert to single precision vector with possible loss of precision.
DVector toDVector ()
 Convert to double precision vector with possible loss of precision.
void writeToFile (FileWriter writer)
 Write point to a file writer.
bool equals (Object other)
 Point3 is equal to another object.
int hashCode ()
 Hash code for use as dictionary keys.
String toString ()
 String representation of point.
static Point3 readFromFile (FileReader reader)
 Read point from a file reader.

Detailed Description

Immutable 3-component integer point.

This is a native class. It can not be subclassed.

Member Function Documentation

◆ compDivide()

Point3 Dragengine.Gui.Point3.compDivide ( Point3 point)

Divide by point component wise.

Exceptions
EDivisionByZeroA component of point is 0.

References isEqualTo().

Referenced by equals().

◆ compMultiply()

Point3 Dragengine.Gui.Point3.compMultiply ( Point3 point)

Multiply with point component wise.

References largest().

Referenced by writeToFile().

◆ equals()

bool Dragengine.Gui.Point3.equals ( Object other)

Point3 is equal to another object.

Implements Object.equals(Object).

Returns
true if other is of type Point3 and components are equal.

References compDivide().

Referenced by operator*().

◆ getLength()

float Dragengine.Gui.Point3.getLength ( )

Length.

Referenced by largest().

◆ getX()

int Dragengine.Gui.Point3.getX ( )

X component.

Referenced by getY().

◆ getY()

int Dragengine.Gui.Point3.getY ( )

Y component.

References getX().

Referenced by getZ().

◆ getZ()

int Dragengine.Gui.Point3.getZ ( )

Z component.

References getY().

Referenced by smallest().

◆ hashCode()

int Dragengine.Gui.Point3.hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

References toVector().

Referenced by operator<=().

◆ isAtLeast()

bool Dragengine.Gui.Point3.isAtLeast ( int value)

Both components are larger than or equal to a value.

Referenced by toVector().

◆ isAtMost()

bool Dragengine.Gui.Point3.isAtMost ( int value)

Both components are smaller than or equal to a value.

References largest().

Referenced by toVector().

◆ isEqualTo()

bool Dragengine.Gui.Point3.isEqualTo ( Point3 point)

Point3s are equal.

References smallest().

Referenced by compDivide().

◆ isZero()

bool Dragengine.Gui.Point3.isZero ( )

Point is equal to zero point.

Referenced by toDVector().

◆ largest() [1/2]

Point3 Dragengine.Gui.Point3.largest ( int x,
int y,
int z )

Point3 with largest components of this point and another point.

References smallest().

◆ largest() [2/2]

Point3 Dragengine.Gui.Point3.largest ( Point3 point)

Point3 with largest components of this point and another point.

References getLength().

Referenced by compMultiply(), and isAtMost().

◆ new() [1/3]

Point3 Dragengine.Gui.Point3.new ( )

Create point with all components set to 0.

References new().

Referenced by new(), new(), and new().

◆ new() [2/3]

Point3 Dragengine.Gui.Point3.new ( int x,
int y,
int z )

Create point with components.

References new().

◆ new() [3/3]

Point3 Dragengine.Gui.Point3.new ( Point3 point)

Create copy of a point.

References new().

◆ operator*() [1/2]

Point3 Dragengine.Gui.Point3.operator* ( int scalar)

Point3 with each component scaled by a value.

◆ operator*() [2/2]

int Dragengine.Gui.Point3.operator* ( Point3 point)

Dot product of two points.

References equals().

◆ operator+()

Point3 Dragengine.Gui.Point3.operator+ ( Point3 point)

Sum of two points.

References readFromFile().

◆ operator-() [1/2]

Point3 Dragengine.Gui.Point3.operator- ( )

Point3 with each component negated.

◆ operator-() [2/2]

Point3 Dragengine.Gui.Point3.operator- ( Point3 point)

Difference between two points.

References writeToFile().

◆ operator/()

Point3 Dragengine.Gui.Point3.operator/ ( int scalar)

Point3 with each component divided by a value.

Exceptions
EDivisionByZeroscalar is 0.

◆ operator<()

bool Dragengine.Gui.Point3.operator< ( Point3 point)

Check if each component of this point is smaller than another point.

◆ operator<=()

bool Dragengine.Gui.Point3.operator<= ( Point3 point)

Check if each component of this point is smaller than or equal to another point.

References hashCode().

◆ operator>()

bool Dragengine.Gui.Point3.operator> ( Point3 point)

Check if each component of this point is larger than another point.

◆ operator>=()

bool Dragengine.Gui.Point3.operator>= ( Point3 point)

Check if each component of this point is larger than or equal to another point.

References toString().

◆ readFromFile()

Point3 Dragengine.Gui.Point3.readFromFile ( FileReader reader)
static

Read point from a file reader.

Referenced by operator+().

◆ smallest() [1/2]

Point3 Dragengine.Gui.Point3.smallest ( int x,
int y,
int z )

Point3 with smallest components of this point and another point.

◆ smallest() [2/2]

Point3 Dragengine.Gui.Point3.smallest ( Point3 p)

Point3 with smallest components of this point and another point.

References getZ().

Referenced by isEqualTo(), and largest().

◆ toDVector()

DVector Dragengine.Gui.Point3.toDVector ( )

Convert to double precision vector with possible loss of precision.

Version
1.8

References isZero().

Referenced by toString().

◆ toString()

String Dragengine.Gui.Point3.toString ( )

String representation of point.

Implements Object.toString()

References toDVector().

Referenced by operator>=().

◆ toVector()

Vector Dragengine.Gui.Point3.toVector ( )

Convert to single precision vector with possible loss of precision.

Version
1.8

References isAtLeast(), and isAtMost().

Referenced by hashCode().

◆ writeToFile()

void Dragengine.Gui.Point3.writeToFile ( FileWriter writer)

Write point to a file writer.

References compMultiply().

Referenced by operator-().


The documentation for this class was generated from the following file: