Struct rust_3d::Point3D [] [src]

pub struct Point3D {
    pub x: f64,
    pub y: f64,
    pub z: f64,
}

Point3D, a point / position within 3D space

Fields

Methods

impl Point3D
[src]

[src]

Trait Implementations

impl Default for Point3D
[src]

[src]

Returns the "default value" for a type. Read more

impl Debug for Point3D
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for Point3D
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl PartialOrd for Point3D
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Clone for Point3D
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for Point3D
[src]

impl Ord for Point3D
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Hash for Point3D
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<P> Add<P> for Point3D where
    P: Is3D
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<P> Sub<P> for Point3D where
    P: Is3D
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Mul<f64> for Point3D
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl IsMovable3D for Point3D
[src]

[src]

Should move the object by the given offset

impl IsND for Point3D
[src]

[src]

Should return the number of dimensions. E.g. 2 for points in 2D space, 3 for points in 3D space etc.

[src]

Should return the value of a given dimensions. E.g. for 2D position with x = 4.3, y = 1.8 the result for dimension = 1 should be 1.8

impl Is3D for Point3D
[src]

[src]

Should return the x-coordinate

[src]

Should return the y-coordinate

[src]

Should return the z-coordinate

[src]

Returns the Position as x,y,z tuple

[src]

Calculates the dot product with another Is3D

[src]

The absolute / length of this position

[src]

Calculates the angle to the other Is3D in radians

[src]

Transforms the position in a "x y z" string. E.g. "3.72 5.99 1.01"

impl IsBuildableND for Point3D
[src]

[src]

Should build an object from the correct number of coordinates

[src]

Should use the coordinates of another as its own

[src]

Returns the center between this and other

impl IsBuildable3D for Point3D
[src]

[src]

Should build an object from x, y and z coordinates

[src]

Should use the coordinates of another as its own

[src]

Applies a matrix to this

[src]

Returns this with normalized values

[src]

Creates this from a "x y z" string. E.g. "32.2 14.7 1.90"

impl IsEditableND for Point3D
[src]

[src]

Should set the coordinate / position at dimension to val

impl IsEditable3D for Point3D
[src]

[src]

Should set the position in x

[src]

Should set the position in y

[src]

Should set the position in z

[src]

Sets the position from a x, y and z values

[src]

Increases distance towards other by factor

[src]

Adds the coordinates of other onto this. x = x + other.x ...

[src]

Substracts the coordinates of other from this. x = x - other.x ...

[src]

Scales the coordinates by applying a factor to all of them

impl IsTransFormableTo2D for Point3D
[src]

[src]

Should create representation of self within the 2D space

impl Display for Point3D
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Point3D

impl Sync for Point3D