ladybug_display.geometry3d.vector module¶
A vector that can be displayed in 3D space.
- class ladybug_display.geometry3d.vector.DisplayVector3D(geometry, color=None)[source]¶
Bases:
_DisplayBase
A vector in 3D space with display properties.
- Parameters:
geometry – A ladybug-geometry Vector3D object.
color – A ladybug Color object. If None, a default black color will be used. (Default: None).
- Properties:
geometry
color
x
y
z
magnitude
user_data
- ToString()¶
- duplicate()¶
Get a copy of this object.
- classmethod from_dict(data)[source]¶
Initialize a DisplayVector3D from a dictionary.
- Parameters:
data – A dictionary representation of an DisplayVector3D object.
- reflect(normal)[source]¶
Reflect this geometry across a plane with the input normal vector.
- Parameters:
normal – A Vector3D representing the normal vector for the plane across which the vector will be reflected. THIS VECTOR MUST BE NORMALIZED.
- rotate(axis, angle)[source]¶
Rotate this geometry by a certain angle around an axis and origin.
- Parameters:
axis – A ladybug_geometry Vector3D axis representing the axis of rotation.
angle – An angle for rotation in degrees.
- rotate_xy(angle)[source]¶
Rotate this geometry counterclockwise in the world XY plane by an angle.
- Parameters:
angle – An angle in degrees.
- property color¶
Get or set a color for this object.
- property geometry¶
Get a ladybug_geometry object.
- property magnitude¶
Get the magnitude of the vector.
- property user_data¶
Get or set an optional dictionary for additional meta data for this object.
This will be None until it has been set. All keys and values of this dictionary should be of a standard Python type to ensure correct serialization of the object to/from JSON (eg. str, float, int, list, dict)
- property x¶
Get the X coordinate.
- property y¶
Get the Y coordinate.
- property z¶
Get the Z coordinate.