ladybug_display.geometry3d.ray module

A ray that can be displayed in 3D space.

class ladybug_display.geometry3d.ray.DisplayRay3D(geometry, color=None)[source]

Bases: _SingleColorBase3D

A ray in 3D space with display properties.

Parameters
  • geometry – A ladybug-geometry Ray3D object.

  • color – A ladybug Color object. If None, a default black color will be used. (Default: None).

Properties:
  • geometry

  • color

  • p

  • v

  • user_data

ToString()
duplicate()

Get a copy of this object.

classmethod from_dict(data)[source]

Initialize a DisplayRay3D from a dictionary.

Parameters

data – A dictionary representation of an DisplayRay3D object.

move(moving_vec)

Move this geometry along a vector.

Parameters

moving_vec – A ladybug_geometry Vector with the direction and distance to move the geometry.

reflect(plane)

Reflect this geometry across a plane.

Parameters

plane – A ladybug_geometry Plane across which the object will be reflected.

reverse()[source]

Reverse this DisplayRay3D.

rotate(axis, angle, origin)

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.

  • origin – A ladybug_geometry Point3D for the origin around which the object will be rotated.

rotate_xy(angle, origin)

Rotate this geometry counterclockwise in the world XY plane by an angle.

Parameters
  • angle – An angle in degrees.

  • origin – A ladybug_geometry Point3D for the origin around which the object will be rotated.

scale(factor, origin=None)

Scale this geometry by a factor from an origin point.

Parameters
  • factor – A number representing how much the object should be scaled.

  • origin – A ladybug_geometry Point representing the origin from which to scale. If None, it will be scaled from the World origin.

to_dict()[source]

Return DisplayRay3D as a dictionary.

property color

Get or set a color for this object.

property geometry

Get a ladybug_geometry object.

property p

Get a Point3D representing the base of the ray.

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 v

Get a Vector3D representing the direction of the ray.