Vector3d

class Vector3d(x, y, z)[source]

Bases: object

A simple 3D vector (x, y, z) used by Cuboid3d.

Stores three coordinates and supports JSON (de)serialization via to_json() / from_json().

Parameters:
x

int

y

int

z

int

Methods

clone

from_json

The function from_json convert Vector3d from json format(dict) to Vector3d class object.

to_json

The function to_json convert Vector3d class object to json format(dict) :returns: Vector3d in json format

Attributes

x

y

z

classmethod from_json(data)[source]

The function from_json convert Vector3d from json format(dict) to Vector3d class object. :param data: Vector3d in json format(dict) :returns: Vector3d from json. :rtype: Vector3d

clone()[source]
to_json()[source]

The function to_json convert Vector3d class object to json format(dict) :returns: Vector3d in json format

property x
property y
property z