Struct nannou::draw::Drawing [−][src]
pub struct Drawing<'a, T, S = DefaultScalar> where
T: IntoDrawn<S>,
S: 'a + BaseFloat, { /* fields omitted */ }
A Drawing in progress.
Drawing provides a way of chaining together method calls describing properties of the thing that we are drawing. Drawing ends when the instance is Dropped, at which point the properties of the drawing are inserted into the Draw type.
When a Drawing begins, a node is immediately created for the drawing within the Draw's inner geom::Graph. This ensures the correct instantiation order is maintained within the graph. As a result, each Drawing is associated with a single, unique node. Thus a Drawing can be thought of as a way of specifying properties for a node.
Methods
impl<'a, T, S> Drawing<'a, T, S> where
T: IntoDrawn<S>,
S: BaseFloat,
[src]
impl<'a, T, S> Drawing<'a, T, S> where
T: IntoDrawn<S>,
S: BaseFloat,
pub fn finish(self) -> Result<(), WouldCycle<S>>
[src]
pub fn finish(self) -> Result<(), WouldCycle<S>>
Complete the drawing and insert it into the parent Draw instance.
This will be called when the Drawing is Dropped if it has not yet been called.
pub fn id(self) -> Index
[src]
pub fn id(self) -> Index
Complete the drawing and return its unique identifier.
Panics if adding the edge would cause a cycle in the graph.
pub fn map_ty<F, T2>(self, map: F) -> Drawing<'a, T2, S> where
F: FnOnce(T) -> T2,
T2: IntoDrawn<S> + Into<Primitive<S>>,
Primitive<S>: Into<Option<T>>,
[src]
pub fn map_ty<F, T2>(self, map: F) -> Drawing<'a, T2, S> where
F: FnOnce(T) -> T2,
T2: IntoDrawn<S> + Into<Primitive<S>>,
Primitive<S>: Into<Option<T>>,
Apply the given function to the type stored within Draw.
The function is only applied if the node has not yet been Drawn.
Panics if the primitive does not contain type T.
impl<'a, T, S> Drawing<'a, T, S> where
T: IntoDrawn<S> + SetColor<ColorScalar> + Into<Primitive<S>>,
Primitive<S>: Into<Option<T>>,
S: BaseFloat,
[src]
impl<'a, T, S> Drawing<'a, T, S> where
T: IntoDrawn<S> + SetColor<ColorScalar> + Into<Primitive<S>>,
Primitive<S>: Into<Option<T>>,
S: BaseFloat,
pub fn color<C>(self, color: C) -> Self where
C: IntoRgba<ColorScalar>,
[src]
pub fn color<C>(self, color: C) -> Self where
C: IntoRgba<ColorScalar>,
Specify a color.
This method supports any color type that can be converted into RGBA.
Colors that have no alpha channel will be given an opaque alpha channel value 1.0
.
pub fn rgb(self, r: ColorScalar, g: ColorScalar, b: ColorScalar) -> Self
[src]
pub fn rgb(self, r: ColorScalar, g: ColorScalar, b: ColorScalar) -> Self
Specify the color via red, green and blue channels.
pub fn rgba(
self,
r: ColorScalar,
g: ColorScalar,
b: ColorScalar,
a: ColorScalar
) -> Self
[src]
pub fn rgba(
self,
r: ColorScalar,
g: ColorScalar,
b: ColorScalar,
a: ColorScalar
) -> Self
Specify the color via red, green, blue and alpha channels.
pub fn hsl(self, h: ColorScalar, s: ColorScalar, l: ColorScalar) -> Self
[src]
pub fn hsl(self, h: ColorScalar, s: ColorScalar, l: ColorScalar) -> Self
Specify the color via hue, saturation and luminance.
If you're looking for HSVA or HSBA, use the hsva
method instead.
The given hue expects a value between 0.0
and 1.0
where 0.0
is 0 degress and 1.0
is
360 degrees (or 2 PI radians).
See the wikipedia entry for more details on this color space.
pub fn hsla(
self,
h: ColorScalar,
s: ColorScalar,
l: ColorScalar,
a: ColorScalar
) -> Self
[src]
pub fn hsla(
self,
h: ColorScalar,
s: ColorScalar,
l: ColorScalar,
a: ColorScalar
) -> Self
Specify the color via hue, saturation, luminance and an alpha channel.
If you're looking for HSVA or HSBA, use the hsva
method instead.
The given hue expects a value between 0.0
and 1.0
where 0.0
is 0 degress and 1.0
is
360 degrees (or 2 PI radians).
See the wikipedia entry for more details on this color space.
pub fn hsv(self, h: ColorScalar, s: ColorScalar, v: ColorScalar) -> Self
[src]
pub fn hsv(self, h: ColorScalar, s: ColorScalar, v: ColorScalar) -> Self
Specify the color via hue, saturation and value (brightness).
This is sometimes also known as "hsb".
The given hue expects a value between 0.0
and 1.0
where 0.0
is 0 degress and 1.0
is
360 degrees (or 2 PI radians).
See the wikipedia entry for more details on this color space.
pub fn hsva(
self,
h: ColorScalar,
s: ColorScalar,
v: ColorScalar,
a: ColorScalar
) -> Self
[src]
pub fn hsva(
self,
h: ColorScalar,
s: ColorScalar,
v: ColorScalar,
a: ColorScalar
) -> Self
Specify the color via hue, saturation, value (brightness) and an alpha channel.
This is sometimes also known as "hsba".
The given hue expects a value between 0.0
and 1.0
where 0.0
is 0 degress and 1.0
is
360 degrees (or 2 PI radians).
See the wikipedia entry for more details on this color space.
impl<'a, T, S> Drawing<'a, T, S> where
T: IntoDrawn<S> + SetDimensions<S> + Into<Primitive<S>>,
Primitive<S>: Into<Option<T>>,
S: BaseFloat,
[src]
impl<'a, T, S> Drawing<'a, T, S> where
T: IntoDrawn<S> + SetDimensions<S> + Into<Primitive<S>>,
Primitive<S>: Into<Option<T>>,
S: BaseFloat,
pub fn x_dimension(self, x: Dimension<S>) -> Self
[src]
pub fn x_dimension(self, x: Dimension<S>) -> Self
Set the length along the x axis.
pub fn y_dimension(self, y: Dimension<S>) -> Self
[src]
pub fn y_dimension(self, y: Dimension<S>) -> Self
Set the length along the y axis.
pub fn z_dimension(self, z: Dimension<S>) -> Self
[src]
pub fn z_dimension(self, z: Dimension<S>) -> Self
Set the length along the z axis.
pub fn width(self, w: S) -> Self
[src]
pub fn width(self, w: S) -> Self
Set the absolute width for the node.
pub fn height(self, h: S) -> Self
[src]
pub fn height(self, h: S) -> Self
Set the absolute height for the node.
pub fn depth(self, d: S) -> Self
[src]
pub fn depth(self, d: S) -> Self
Set the absolute depth for the node.
pub fn w(self, w: S) -> Self
[src]
pub fn w(self, w: S) -> Self
Short-hand for the width method.
pub fn h(self, h: S) -> Self
[src]
pub fn h(self, h: S) -> Self
Short-hand for the height method.
pub fn d(self, d: S) -> Self
[src]
pub fn d(self, d: S) -> Self
Short-hand for the depth method.
pub fn wh(self, v: Vector2<S>) -> Self
[src]
pub fn wh(self, v: Vector2<S>) -> Self
Set the x and y dimensions for the node.
pub fn whd(self, v: Vector3<S>) -> Self
[src]
pub fn whd(self, v: Vector3<S>) -> Self
Set the x, y and z dimensions for the node.
pub fn w_h(self, x: S, y: S) -> Self
[src]
pub fn w_h(self, x: S, y: S) -> Self
Set the width and height for the node.
pub fn w_h_d(self, x: S, y: S, z: S) -> Self
[src]
pub fn w_h_d(self, x: S, y: S, z: S) -> Self
Set the width and height for the node.
pub fn x_dimension_relative(self, other: Index, x: Relative<S>) -> Self
[src]
pub fn x_dimension_relative(self, other: Index, x: Relative<S>) -> Self
Some relative dimension along the x axis.
pub fn y_dimension_relative(self, other: Index, y: Relative<S>) -> Self
[src]
pub fn y_dimension_relative(self, other: Index, y: Relative<S>) -> Self
Some relative dimension along the y axis.
pub fn z_dimension_relative(self, other: Index, z: Relative<S>) -> Self
[src]
pub fn z_dimension_relative(self, other: Index, z: Relative<S>) -> Self
Some relative dimension along the z axis.
pub fn w_of(self, other: Index) -> Self
[src]
pub fn w_of(self, other: Index) -> Self
Set the x-axis dimension as the width of the node at the given index.
pub fn h_of(self, other: Index) -> Self
[src]
pub fn h_of(self, other: Index) -> Self
Set the y-axis dimension as the height of the node at the given index.
pub fn d_of(self, other: Index) -> Self
[src]
pub fn d_of(self, other: Index) -> Self
Set the z-axis dimension as the depth of the node at the given index.
pub fn wh_of(self, other: Index) -> Self
[src]
pub fn wh_of(self, other: Index) -> Self
Set the dimensions as the dimensions of the node at the given index.
pub fn whd_of(self, other: Index) -> Self
[src]
pub fn whd_of(self, other: Index) -> Self
Set the dimensions as the dimensions of the node at the given index.
pub fn padded_w_of(self, other: Index, pad: S) -> Self
[src]
pub fn padded_w_of(self, other: Index, pad: S) -> Self
Set the width as the width of the node at the given index padded at both ends by the given Scalar.
pub fn padded_h_of(self, other: Index, pad: S) -> Self
[src]
pub fn padded_h_of(self, other: Index, pad: S) -> Self
Set the height as the height of the node at the given index padded at both ends by the given Scalar.
pub fn padded_d_of(self, other: Index, pad: S) -> Self
[src]
pub fn padded_d_of(self, other: Index, pad: S) -> Self
Set the depth as the depth of the node at the given index padded at both ends by the given Scalar.
pub fn padded_wh_of(self, other: Index, pad: S) -> Self where
S: Clone,
[src]
pub fn padded_wh_of(self, other: Index, pad: S) -> Self where
S: Clone,
Set the dimensions as the dimensions of the node at the given index with each dimension padded by the given scalar.
pub fn padded_whd_of(self, other: Index, pad: S) -> Self where
S: Clone,
[src]
pub fn padded_whd_of(self, other: Index, pad: S) -> Self where
S: Clone,
Set the dimensions as the dimensions of the node at the given index with each dimension padded by the given scalar.
pub fn scaled_w_of(self, other: Index, scale: S) -> Self
[src]
pub fn scaled_w_of(self, other: Index, scale: S) -> Self
Set the width as the width of the node at the given index multiplied by the given scale Scalar value.
pub fn scaled_h_of(self, other: Index, scale: S) -> Self
[src]
pub fn scaled_h_of(self, other: Index, scale: S) -> Self
Set the height as the height of the node at the given index multiplied by the given scale Scalar value.
pub fn scaled_d_of(self, other: Index, scale: S) -> Self
[src]
pub fn scaled_d_of(self, other: Index, scale: S) -> Self
Set the depth as the depth of the node at the given index multiplied by the given scale Scalar value.
pub fn scaled_wh_of(self, other: Index, scale: S) -> Self where
S: Clone,
[src]
pub fn scaled_wh_of(self, other: Index, scale: S) -> Self where
S: Clone,
Set the dimensions as the dimensions of the node at the given index multiplied by the given scale Scalar value.
pub fn scaled_whd_of(self, other: Index, scale: S) -> Self where
S: Clone,
[src]
pub fn scaled_whd_of(self, other: Index, scale: S) -> Self where
S: Clone,
Set the dimensions as the dimensions of the node at the given index multiplied by the given scale Scalar value.
impl<'a, T, S> Drawing<'a, T, S> where
T: IntoDrawn<S> + SetPosition<S> + Into<Primitive<S>>,
Primitive<S>: Into<Option<T>>,
S: BaseFloat,
[src]
impl<'a, T, S> Drawing<'a, T, S> where
T: IntoDrawn<S> + SetPosition<S> + Into<Primitive<S>>,
Primitive<S>: Into<Option<T>>,
S: BaseFloat,
pub fn x_position(self, position: Position<S>) -> Self
[src]
pub fn x_position(self, position: Position<S>) -> Self
Build with the given Position along the x axis.
pub fn y_position(self, position: Position<S>) -> Self
[src]
pub fn y_position(self, position: Position<S>) -> Self
Build with the given Position along the y axis.
pub fn z_position(self, position: Position<S>) -> Self
[src]
pub fn z_position(self, position: Position<S>) -> Self
Build with the given Position along the z axis.
pub fn x(self, x: S) -> Self
[src]
pub fn x(self, x: S) -> Self
Build with the given Absolute Position along the x axis.
pub fn y(self, y: S) -> Self
[src]
pub fn y(self, y: S) -> Self
Build with the given Absolute Position along the y axis.
pub fn z(self, z: S) -> Self
[src]
pub fn z(self, z: S) -> Self
Build with the given Absolute Position along the z axis.
pub fn xy(self, p: Point2<S>) -> Self
[src]
pub fn xy(self, p: Point2<S>) -> Self
Set the Position with some two-dimensional point.
pub fn xyz(self, p: Point3<S>) -> Self
[src]
pub fn xyz(self, p: Point3<S>) -> Self
Set the Position with some three-dimensional point.
pub fn x_y(self, x: S, y: S) -> Self
[src]
pub fn x_y(self, x: S, y: S) -> Self
Set the Position with x y coordinates.
pub fn x_y_z(self, x: S, y: S, z: S) -> Self
[src]
pub fn x_y_z(self, x: S, y: S, z: S) -> Self
Set the Position with x y z coordinates.
pub fn x_position_relative(self, x: Relative<S>) -> Self
[src]
pub fn x_position_relative(self, x: Relative<S>) -> Self
Set the x Position Relative to the previous node.
pub fn y_position_relative(self, y: Relative<S>) -> Self
[src]
pub fn y_position_relative(self, y: Relative<S>) -> Self
Set the y Position Relative to the previous node.
pub fn z_position_relative(self, z: Relative<S>) -> Self
[src]
pub fn z_position_relative(self, z: Relative<S>) -> Self
Set the z Position Relative to the previous node.
pub fn x_y_position_relative(self, x: Relative<S>, y: Relative<S>) -> Self
[src]
pub fn x_y_position_relative(self, x: Relative<S>, y: Relative<S>) -> Self
Set the x and y Positions Relative to the previous node.
pub fn x_y_z_position_relative(
self,
x: Relative<S>,
y: Relative<S>,
z: Relative<S>
) -> Self
[src]
pub fn x_y_z_position_relative(
self,
x: Relative<S>,
y: Relative<S>,
z: Relative<S>
) -> Self
Set the x, y and z Positions Relative to the previous node.
pub fn x_position_relative_to(self, other: Index, x: Relative<S>) -> Self
[src]
pub fn x_position_relative_to(self, other: Index, x: Relative<S>) -> Self
Set the x Position Relative to the given node.
pub fn y_position_relative_to(self, other: Index, y: Relative<S>) -> Self
[src]
pub fn y_position_relative_to(self, other: Index, y: Relative<S>) -> Self
Set the y Position Relative to the given node.
pub fn z_position_relative_to(self, other: Index, z: Relative<S>) -> Self
[src]
pub fn z_position_relative_to(self, other: Index, z: Relative<S>) -> Self
Set the y Position Relative to the given node.
pub fn x_y_position_relative_to(
self,
other: Index,
x: Relative<S>,
y: Relative<S>
) -> Self
[src]
pub fn x_y_position_relative_to(
self,
other: Index,
x: Relative<S>,
y: Relative<S>
) -> Self
Set the x and y Positions Relative to the given node.
pub fn x_y_z_position_relative_to(
self,
other: Index,
x: Relative<S>,
y: Relative<S>,
z: Relative<S>
) -> Self
[src]
pub fn x_y_z_position_relative_to(
self,
other: Index,
x: Relative<S>,
y: Relative<S>,
z: Relative<S>
) -> Self
Set the x, y and z Positions Relative to the given node.
pub fn x_relative(self, x: S) -> Self
[src]
pub fn x_relative(self, x: S) -> Self
Set the Position as a Scalar along the x axis Relative to the middle of previous node.
pub fn y_relative(self, y: S) -> Self
[src]
pub fn y_relative(self, y: S) -> Self
Set the Position as a Scalar along the y axis Relative to the middle of previous node.
pub fn z_relative(self, z: S) -> Self
[src]
pub fn z_relative(self, z: S) -> Self
Set the Position as a Scalar along the z axis Relative to the middle of previous node.
pub fn xy_relative(self, p: Point2<S>) -> Self
[src]
pub fn xy_relative(self, p: Point2<S>) -> Self
Set the Position as a Point Relative to the middle of the previous node.
pub fn xyz_relative(self, p: Point3<S>) -> Self
[src]
pub fn xyz_relative(self, p: Point3<S>) -> Self
Set the Position as a Point Relative to the middle of the previous node.
pub fn x_y_relative(self, x: S, y: S) -> Self
[src]
pub fn x_y_relative(self, x: S, y: S) -> Self
Set the Position as Scalars along the x and y axes Relative to the middle of the previous node.
pub fn x_y_z_relative(self, x: S, y: S, z: S) -> Self
[src]
pub fn x_y_z_relative(self, x: S, y: S, z: S) -> Self
Set the Position as Scalars along the x, y and z axes Relative to the middle of the previous node.
pub fn x_relative_to(self, other: Index, x: S) -> Self
[src]
pub fn x_relative_to(self, other: Index, x: S) -> Self
Set the position relative to the node with the given node::Index.
pub fn y_relative_to(self, other: Index, y: S) -> Self
[src]
pub fn y_relative_to(self, other: Index, y: S) -> Self
Set the position relative to the node with the given node::Index.
pub fn z_relative_to(self, other: Index, z: S) -> Self
[src]
pub fn z_relative_to(self, other: Index, z: S) -> Self
Set the position relative to the node with the given node::Index.
pub fn xy_relative_to(self, other: Index, p: Point2<S>) -> Self
[src]
pub fn xy_relative_to(self, other: Index, p: Point2<S>) -> Self
Set the position relative to the node with the given node::Index.
pub fn xyz_relative_to(self, other: Index, p: Point3<S>) -> Self
[src]
pub fn xyz_relative_to(self, other: Index, p: Point3<S>) -> Self
Set the position relative to the node with the given node::Index.
pub fn x_y_relative_to(self, other: Index, x: S, y: S) -> Self
[src]
pub fn x_y_relative_to(self, other: Index, x: S, y: S) -> Self
Set the position relative to the node with the given node::Index.
pub fn x_y_z_relative_to(self, other: Index, x: S, y: S, z: S) -> Self
[src]
pub fn x_y_z_relative_to(self, other: Index, x: S, y: S, z: S) -> Self
Set the position relative to the node with the given node::Index.
pub fn x_direction(self, direction: Direction, x: S) -> Self
[src]
pub fn x_direction(self, direction: Direction, x: S) -> Self
Build with the Position along the x axis as some distance from another node.
pub fn y_direction(self, direction: Direction, y: S) -> Self
[src]
pub fn y_direction(self, direction: Direction, y: S) -> Self
Build with the Position along the y axis as some distance from another node.
pub fn z_direction(self, direction: Direction, z: S) -> Self
[src]
pub fn z_direction(self, direction: Direction, z: S) -> Self
Build with the Position along the z axis as some distance from another node.
pub fn left(self, x: S) -> Self
[src]
pub fn left(self, x: S) -> Self
Build with the Position as some distance to the left of another node.
pub fn right(self, x: S) -> Self
[src]
pub fn right(self, x: S) -> Self
Build with the Position as some distance to the right of another node.
pub fn down(self, y: S) -> Self
[src]
pub fn down(self, y: S) -> Self
Build with the Position as some distance below another node.
pub fn up(self, y: S) -> Self
[src]
pub fn up(self, y: S) -> Self
Build with the Position as some distance above another node.
pub fn backwards(self, z: S) -> Self
[src]
pub fn backwards(self, z: S) -> Self
Build with the Position as some distance in front of another node.
pub fn forwards(self, z: S) -> Self
[src]
pub fn forwards(self, z: S) -> Self
Build with the Position as some distance behind another node.
pub fn x_direction_from(self, other: Index, direction: Direction, x: S) -> Self
[src]
pub fn x_direction_from(self, other: Index, direction: Direction, x: S) -> Self
Build with the Position along the x axis as some distance from the given node.
pub fn y_direction_from(self, other: Index, direction: Direction, y: S) -> Self
[src]
pub fn y_direction_from(self, other: Index, direction: Direction, y: S) -> Self
Build with the Position along the y axis as some distance from the given node.
pub fn z_direction_from(self, other: Index, direction: Direction, z: S) -> Self
[src]
pub fn z_direction_from(self, other: Index, direction: Direction, z: S) -> Self
Build with the Position along the z axis as some distance from the given node.
pub fn left_from(self, other: Index, x: S) -> Self
[src]
pub fn left_from(self, other: Index, x: S) -> Self
Build with the Position as some distance to the left of the given node.
pub fn right_from(self, other: Index, x: S) -> Self
[src]
pub fn right_from(self, other: Index, x: S) -> Self
Build with the Position as some distance to the right of the given node.
pub fn down_from(self, other: Index, y: S) -> Self
[src]
pub fn down_from(self, other: Index, y: S) -> Self
Build with the Position as some distance below the given node.
pub fn up_from(self, other: Index, y: S) -> Self
[src]
pub fn up_from(self, other: Index, y: S) -> Self
Build with the Position as some distance above the given node.
pub fn backwards_from(self, other: Index, z: S) -> Self
[src]
pub fn backwards_from(self, other: Index, z: S) -> Self
Build with the Position as some distance in front of the given node.
pub fn forwards_from(self, other: Index, z: S) -> Self
[src]
pub fn forwards_from(self, other: Index, z: S) -> Self
Build with the Position as some distance above the given node.
pub fn x_align(self, align: Align<S>) -> Self
[src]
pub fn x_align(self, align: Align<S>) -> Self
Align the Position of the node along the x axis.
pub fn y_align(self, align: Align<S>) -> Self
[src]
pub fn y_align(self, align: Align<S>) -> Self
Align the Position of the node along the y axis.
pub fn z_align(self, align: Align<S>) -> Self
[src]
pub fn z_align(self, align: Align<S>) -> Self
Align the Position of the node along the z axis.
pub fn align_left(self) -> Self
[src]
pub fn align_left(self) -> Self
Align the position to the left.
pub fn align_left_with_margin(self, margin: S) -> Self
[src]
pub fn align_left_with_margin(self, margin: S) -> Self
Align the position to the left.
pub fn align_middle_x(self) -> Self
[src]
pub fn align_middle_x(self) -> Self
Align the position to the middle.
pub fn align_right(self) -> Self
[src]
pub fn align_right(self) -> Self
Align the position to the right.
pub fn align_right_with_margin(self, margin: S) -> Self
[src]
pub fn align_right_with_margin(self, margin: S) -> Self
Align the position to the right.
pub fn align_bottom(self) -> Self
[src]
pub fn align_bottom(self) -> Self
Align the position to the bottom.
pub fn align_bottom_with_margin(self, margin: S) -> Self
[src]
pub fn align_bottom_with_margin(self, margin: S) -> Self
Align the position to the bottom.
pub fn align_middle_y(self) -> Self
[src]
pub fn align_middle_y(self) -> Self
Align the position to the middle.
pub fn align_top(self) -> Self
[src]
pub fn align_top(self) -> Self
Align the position to the top.
pub fn align_top_with_margin(self, margin: S) -> Self
[src]
pub fn align_top_with_margin(self, margin: S) -> Self
Align the position to the top.
pub fn align_front(self) -> Self
[src]
pub fn align_front(self) -> Self
Align the position to the front.
pub fn align_front_with_margin(self, margin: S) -> Self
[src]
pub fn align_front_with_margin(self, margin: S) -> Self
Align the position to the front.
pub fn align_middle_z(self) -> Self
[src]
pub fn align_middle_z(self) -> Self
Align the position to the middle.
pub fn align_back(self) -> Self
[src]
pub fn align_back(self) -> Self
Align the position to the back.
pub fn align_back_with_margin(self, margin: S) -> Self
[src]
pub fn align_back_with_margin(self, margin: S) -> Self
Align the position to the back.
pub fn x_align_to(self, other: Index, align: Align<S>) -> Self
[src]
pub fn x_align_to(self, other: Index, align: Align<S>) -> Self
Align the Position of the node with the given node along the x axis.
pub fn y_align_to(self, other: Index, align: Align<S>) -> Self
[src]
pub fn y_align_to(self, other: Index, align: Align<S>) -> Self
Align the Position of the node with the given node along the y axis.
pub fn z_align_to(self, other: Index, align: Align<S>) -> Self
[src]
pub fn z_align_to(self, other: Index, align: Align<S>) -> Self
Align the Position of the node with the given node along the z axis.
pub fn align_left_of(self, other: Index) -> Self
[src]
pub fn align_left_of(self, other: Index) -> Self
Align the position to the left.
pub fn align_left_of_with_margin(self, other: Index, margin: S) -> Self
[src]
pub fn align_left_of_with_margin(self, other: Index, margin: S) -> Self
Align the position to the left.
pub fn align_middle_x_of(self, other: Index) -> Self
[src]
pub fn align_middle_x_of(self, other: Index) -> Self
Align the position to the middle.
pub fn align_right_of(self, other: Index) -> Self
[src]
pub fn align_right_of(self, other: Index) -> Self
Align the position to the right.
pub fn align_right_of_with_margin(self, other: Index, margin: S) -> Self
[src]
pub fn align_right_of_with_margin(self, other: Index, margin: S) -> Self
Align the position to the right.
pub fn align_bottom_of(self, other: Index) -> Self
[src]
pub fn align_bottom_of(self, other: Index) -> Self
Align the position to the bottom.
pub fn align_bottom_of_with_margin(self, other: Index, margin: S) -> Self
[src]
pub fn align_bottom_of_with_margin(self, other: Index, margin: S) -> Self
Align the position to the bottom.
pub fn align_middle_y_of(self, other: Index) -> Self
[src]
pub fn align_middle_y_of(self, other: Index) -> Self
Align the position to the middle.
pub fn align_top_of(self, other: Index) -> Self
[src]
pub fn align_top_of(self, other: Index) -> Self
Align the position to the top.
pub fn align_top_of_with_margin(self, other: Index, margin: S) -> Self
[src]
pub fn align_top_of_with_margin(self, other: Index, margin: S) -> Self
Align the position to the top.
pub fn align_front_of(self, other: Index) -> Self
[src]
pub fn align_front_of(self, other: Index) -> Self
Align the position to the front.
pub fn align_front_of_with_margin(self, other: Index, margin: S) -> Self
[src]
pub fn align_front_of_with_margin(self, other: Index, margin: S) -> Self
Align the position to the front.
pub fn align_middle_z_of(self, other: Index) -> Self
[src]
pub fn align_middle_z_of(self, other: Index) -> Self
Align the position to the middle.
pub fn align_back_of(self, other: Index) -> Self
[src]
pub fn align_back_of(self, other: Index) -> Self
Align the position to the back.
pub fn align_back_of_with_margin(self, other: Index, margin: S) -> Self
[src]
pub fn align_back_of_with_margin(self, other: Index, margin: S) -> Self
Align the position to the back.
pub fn middle(self) -> Self
[src]
pub fn middle(self) -> Self
Align the node to the middle of the last node.
pub fn bottom_left(self) -> Self
[src]
pub fn bottom_left(self) -> Self
Align the node to the bottom left of the last node.
pub fn mid_left(self) -> Self
[src]
pub fn mid_left(self) -> Self
Align the node to the middle left of the last node.
pub fn top_left(self) -> Self
[src]
pub fn top_left(self) -> Self
Align the node to the top left of the last node.
pub fn mid_top(self) -> Self
[src]
pub fn mid_top(self) -> Self
Align the node to the middle top of the last node.
pub fn top_right(self) -> Self
[src]
pub fn top_right(self) -> Self
Align the node to the top right of the last node.
pub fn mid_right(self) -> Self
[src]
pub fn mid_right(self) -> Self
Align the node to the middle right of the last node.
pub fn bottom_right(self) -> Self
[src]
pub fn bottom_right(self) -> Self
Align the node to the bottom right of the last node.
pub fn mid_bottom(self) -> Self
[src]
pub fn mid_bottom(self) -> Self
Align the node to the middle bottom of the last node.
pub fn middle_of(self, other: Index) -> Self
[src]
pub fn middle_of(self, other: Index) -> Self
Align the node in the middle of the given Node.
pub fn bottom_left_of(self, other: Index) -> Self
[src]
pub fn bottom_left_of(self, other: Index) -> Self
Align the node to the bottom left of the given Node.
pub fn mid_left_of(self, other: Index) -> Self
[src]
pub fn mid_left_of(self, other: Index) -> Self
Align the node to the middle left of the given Node.
pub fn top_left_of(self, other: Index) -> Self
[src]
pub fn top_left_of(self, other: Index) -> Self
Align the node to the top left of the given Node.
pub fn mid_top_of(self, other: Index) -> Self
[src]
pub fn mid_top_of(self, other: Index) -> Self
Align the node to the middle top of the given Node.
pub fn top_right_of(self, other: Index) -> Self
[src]
pub fn top_right_of(self, other: Index) -> Self
Align the node to the top right of the given Node.
pub fn mid_right_of(self, other: Index) -> Self
[src]
pub fn mid_right_of(self, other: Index) -> Self
Align the node to the middle right of the given Node.
pub fn bottom_right_of(self, other: Index) -> Self
[src]
pub fn bottom_right_of(self, other: Index) -> Self
Align the node to the bottom right of the given Node.
pub fn mid_bottom_of(self, other: Index) -> Self
[src]
pub fn mid_bottom_of(self, other: Index) -> Self
Align the node to the middle bottom of the given Node.
impl<'a, T, S> Drawing<'a, T, S> where
T: IntoDrawn<S> + SetOrientation<S> + Into<Primitive<S>>,
Primitive<S>: Into<Option<T>>,
S: BaseFloat,
[src]
impl<'a, T, S> Drawing<'a, T, S> where
T: IntoDrawn<S> + SetOrientation<S> + Into<Primitive<S>>,
Primitive<S>: Into<Option<T>>,
S: BaseFloat,
pub fn look_at(self, target: LookAt<S>) -> Self
[src]
pub fn look_at(self, target: LookAt<S>) -> Self
Describe orientation via the vector that points to the given target.
pub fn look_at_node(self, node: Index) -> Self
[src]
pub fn look_at_node(self, node: Index) -> Self
Describe orientation via the vector that points to the given node.
pub fn look_at_point(self, point: Point3<S>) -> Self
[src]
pub fn look_at_point(self, point: Point3<S>) -> Self
Describe orientation via the vector that points to the given point.
pub fn x_orientation(self, orientation: Orientation<S>) -> Self
[src]
pub fn x_orientation(self, orientation: Orientation<S>) -> Self
Build with the given Orientation along the x axis.
pub fn y_orientation(self, orientation: Orientation<S>) -> Self
[src]
pub fn y_orientation(self, orientation: Orientation<S>) -> Self
Build with the given Orientation along the y axis.
pub fn z_orientation(self, orientation: Orientation<S>) -> Self
[src]
pub fn z_orientation(self, orientation: Orientation<S>) -> Self
Build with the given Orientation along the z axis.
pub fn x_radians(self, x: S) -> Self
[src]
pub fn x_radians(self, x: S) -> Self
Specify the orientation around the x axis as an absolute value in radians.
pub fn y_radians(self, y: S) -> Self
[src]
pub fn y_radians(self, y: S) -> Self
Specify the orientation around the y axis as an absolute value in radians.
pub fn z_radians(self, z: S) -> Self
[src]
pub fn z_radians(self, z: S) -> Self
Specify the orientation around the z axis as an absolute value in radians.
pub fn x_degrees(self, x: S) -> Self where
S: BaseFloat,
[src]
pub fn x_degrees(self, x: S) -> Self where
S: BaseFloat,
Specify the orientation around the x axis as an absolute value in radians.
pub fn y_degrees(self, y: S) -> Self where
S: BaseFloat,
[src]
pub fn y_degrees(self, y: S) -> Self where
S: BaseFloat,
Specify the orientation around the y axis as an absolute value in radians.
pub fn z_degrees(self, z: S) -> Self where
S: BaseFloat,
[src]
pub fn z_degrees(self, z: S) -> Self where
S: BaseFloat,
Specify the orientation around the z axis as an absolute value in radians.
pub fn x_turns(self, x: S) -> Self where
S: BaseFloat,
[src]
pub fn x_turns(self, x: S) -> Self where
S: BaseFloat,
Specify the orientation around the x axis as a number of turns around the axis.
pub fn y_turns(self, y: S) -> Self where
S: BaseFloat,
[src]
pub fn y_turns(self, y: S) -> Self where
S: BaseFloat,
Specify the orientation around the y axis as a number of turns around the axis.
pub fn z_turns(self, z: S) -> Self where
S: BaseFloat,
[src]
pub fn z_turns(self, z: S) -> Self where
S: BaseFloat,
Specify the orientation around the z axis as a number of turns around the axis.
pub fn radians(self, v: Vector3<S>) -> Self
[src]
pub fn radians(self, v: Vector3<S>) -> Self
Specify the orientation along each axis with the given Vector of radians.
This has the same affect as calling self.x_radians(v.x).y_radians(v.y).z_radians(v.z)
.
pub fn degrees(self, v: Vector3<S>) -> Self where
S: BaseFloat,
[src]
pub fn degrees(self, v: Vector3<S>) -> Self where
S: BaseFloat,
Specify the orientation along each axis with the given Vector of degrees.
This has the same affect as calling self.x_degrees(v.x).y_degrees(v.y).z_degrees(v.z)
.
pub fn turns(self, v: Vector3<S>) -> Self where
S: BaseFloat,
[src]
pub fn turns(self, v: Vector3<S>) -> Self where
S: BaseFloat,
Specify the orientation along each axis with the given Vector of "turns".
This has the same affect as calling self.x_turns(v.x).y_turns(v.y).z_turns(v.z)
.
pub fn euler<A>(self, e: Euler<A>) -> Self where
S: BaseFloat,
A: Angle + Into<Rad<S>>,
[src]
pub fn euler<A>(self, e: Euler<A>) -> Self where
S: BaseFloat,
A: Angle + Into<Rad<S>>,
Specify the orientation with the given Euler.
The euler can be specified in either radians (via Rad) or degrees (via Deg).
pub fn quaternion(self, q: Quaternion<S>) -> Self where
S: BaseFloat,
[src]
pub fn quaternion(self, q: Quaternion<S>) -> Self where
S: BaseFloat,
Specify the orientation with the given Quaternion.
pub fn x_radians_relative(self, x: S) -> Self
[src]
pub fn x_radians_relative(self, x: S) -> Self
Specify the orientation around the x axis as a relative value in radians.
pub fn y_radians_relative(self, y: S) -> Self
[src]
pub fn y_radians_relative(self, y: S) -> Self
Specify the orientation around the y axis as a relative value in radians.
pub fn z_radians_relative(self, z: S) -> Self
[src]
pub fn z_radians_relative(self, z: S) -> Self
Specify the orientation around the z axis as a relative value in radians.
pub fn x_radians_relative_to(self, other: Index, x: S) -> Self
[src]
pub fn x_radians_relative_to(self, other: Index, x: S) -> Self
Specify the orientation around the x axis as a relative value in radians.
pub fn y_radians_relative_to(self, other: Index, y: S) -> Self
[src]
pub fn y_radians_relative_to(self, other: Index, y: S) -> Self
Specify the orientation around the y axis as a relative value in radians.
pub fn z_radians_relative_to(self, other: Index, z: S) -> Self
[src]
pub fn z_radians_relative_to(self, other: Index, z: S) -> Self
Specify the orientation around the z axis as a relative value in radians.
pub fn x_degrees_relative(self, x: S) -> Self where
S: BaseFloat,
[src]
pub fn x_degrees_relative(self, x: S) -> Self where
S: BaseFloat,
Specify the orientation around the x axis as a relative value in degrees.
pub fn y_degrees_relative(self, y: S) -> Self where
S: BaseFloat,
[src]
pub fn y_degrees_relative(self, y: S) -> Self where
S: BaseFloat,
Specify the orientation around the y axis as a relative value in degrees.
pub fn z_degrees_relative(self, z: S) -> Self where
S: BaseFloat,
[src]
pub fn z_degrees_relative(self, z: S) -> Self where
S: BaseFloat,
Specify the orientation around the z axis as a relative value in degrees.
pub fn x_degrees_relative_to(self, other: Index, x: S) -> Self where
S: BaseFloat,
[src]
pub fn x_degrees_relative_to(self, other: Index, x: S) -> Self where
S: BaseFloat,
Specify the orientation around the x axis as a relative value in degrees.
pub fn y_degrees_relative_to(self, other: Index, y: S) -> Self where
S: BaseFloat,
[src]
pub fn y_degrees_relative_to(self, other: Index, y: S) -> Self where
S: BaseFloat,
Specify the orientation around the y axis as a relative value in degrees.
pub fn z_degrees_relative_to(self, other: Index, z: S) -> Self where
S: BaseFloat,
[src]
pub fn z_degrees_relative_to(self, other: Index, z: S) -> Self where
S: BaseFloat,
Specify the orientation around the z axis as a relative value in degrees.
pub fn x_turns_relative(self, x: S) -> Self where
S: BaseFloat,
[src]
pub fn x_turns_relative(self, x: S) -> Self where
S: BaseFloat,
Specify the relative orientation around the x axis as a number of turns around the axis.
pub fn y_turns_relative(self, y: S) -> Self where
S: BaseFloat,
[src]
pub fn y_turns_relative(self, y: S) -> Self where
S: BaseFloat,
Specify the relative orientation around the y axis as a number of turns around the axis.
pub fn z_turns_relative(self, z: S) -> Self where
S: BaseFloat,
[src]
pub fn z_turns_relative(self, z: S) -> Self where
S: BaseFloat,
Specify the relative orientation around the z axis as a number of turns around the axis.
pub fn x_turns_relative_to(self, other: Index, x: S) -> Self where
S: BaseFloat,
[src]
pub fn x_turns_relative_to(self, other: Index, x: S) -> Self where
S: BaseFloat,
Specify the relative orientation around the x axis as a number of turns around the axis.
pub fn y_turns_relative_to(self, other: Index, y: S) -> Self where
S: BaseFloat,
[src]
pub fn y_turns_relative_to(self, other: Index, y: S) -> Self where
S: BaseFloat,
Specify the relative orientation around the y axis as a number of turns around the axis.
pub fn z_turns_relative_to(self, other: Index, z: S) -> Self where
S: BaseFloat,
[src]
pub fn z_turns_relative_to(self, other: Index, z: S) -> Self where
S: BaseFloat,
Specify the relative orientation around the z axis as a number of turns around the axis.
pub fn radians_relative(self, v: Vector3<S>) -> Self
[src]
pub fn radians_relative(self, v: Vector3<S>) -> Self
Specify a relative orientation along each axis with the given Vector of radians.
This has the same affect as the following:
self.x_radians_relative(v.x) .y_radians_relative(v.y) .z_radians_relative(v.z)
pub fn radians_relative_to(self, other: Index, v: Vector3<S>) -> Self
[src]
pub fn radians_relative_to(self, other: Index, v: Vector3<S>) -> Self
Specify a relative orientation along each axis with the given Vector of radians.
This has the same affect as the following:
self.x_radians_relative_to(other, v.x) .y_radians_relative_to(other, v.y) .z_radians_relative_to(other, v.z)
pub fn degrees_relative(self, v: Vector3<S>) -> Self where
S: BaseFloat,
[src]
pub fn degrees_relative(self, v: Vector3<S>) -> Self where
S: BaseFloat,
Specify a relative orientation along each axis with the given Vector of degrees.
This has the same affect as the following:
self.x_degrees_relative(v.x) .y_degrees_relative(v.y) .z_degrees_relative(v.z)
pub fn degrees_relative_to(self, other: Index, v: Vector3<S>) -> Self where
S: BaseFloat,
[src]
pub fn degrees_relative_to(self, other: Index, v: Vector3<S>) -> Self where
S: BaseFloat,
Specify a relative orientation along each axis with the given Vector of degrees.
This has the same affect as the following:
self.x_degrees_relative_to(other, v.x) .y_degrees_relative_to(other, v.y) .z_degrees_relative_to(other, v.z)
pub fn turns_relative(self, v: Vector3<S>) -> Self where
S: BaseFloat,
[src]
pub fn turns_relative(self, v: Vector3<S>) -> Self where
S: BaseFloat,
Specify a relative orientation along each axis with the given Vector of "turns".
This has the same affect as the following:
self.x_turns_relative(v.x) .y_turns_relative(v.y) .z_turns_relative(v.z)
pub fn turns_relative_to(self, other: Index, v: Vector3<S>) -> Self where
S: BaseFloat,
[src]
pub fn turns_relative_to(self, other: Index, v: Vector3<S>) -> Self where
S: BaseFloat,
Specify a relative orientation along each axis with the given Vector of "turns".
This has the same affect as the following:
self.x_turns_relative_to(other, v.x) .y_turns_relative_to(other, v.y) .z_turns_relative_to(other, v.z)
pub fn euler_relative<A>(self, e: Euler<A>) -> Self where
S: BaseFloat,
A: Angle + Into<Rad<S>>,
[src]
pub fn euler_relative<A>(self, e: Euler<A>) -> Self where
S: BaseFloat,
A: Angle + Into<Rad<S>>,
Specify a relative orientation with the given Euler.
The euler can be specified in either radians (via Rad) or degrees (via Deg).
pub fn euler_relative_to<A>(self, other: Index, e: Euler<A>) -> Self where
S: BaseFloat,
A: Angle + Into<Rad<S>>,
[src]
pub fn euler_relative_to<A>(self, other: Index, e: Euler<A>) -> Self where
S: BaseFloat,
A: Angle + Into<Rad<S>>,
Specify a relative orientation with the given Euler.
The euler can be specified in either radians (via Rad) or degrees (via Deg).
pub fn pitch(self, pitch: S) -> Self
[src]
pub fn pitch(self, pitch: S) -> Self
Specify the "pitch" of the orientation in radians.
This has the same effect as calling x_radians
.
pub fn yaw(self, yaw: S) -> Self
[src]
pub fn yaw(self, yaw: S) -> Self
Specify the "yaw" of the orientation in radians.
This has the same effect as calling y_radians
.
pub fn roll(self, roll: S) -> Self
[src]
pub fn roll(self, roll: S) -> Self
Specify the "roll" of the orientation in radians.
This has the same effect as calling z_radians
.
pub fn rotate(self, radians: S) -> Self
[src]
pub fn rotate(self, radians: S) -> Self
Assuming we're looking at a 2D plane, positive values cause a clockwise rotation where the given value is specified in radians.
This is equivalent to calling the z_radians
or roll
methods.
impl<'a, S> Drawing<'a, Ellipse<S>, S> where
S: BaseFloat,
[src]
impl<'a, S> Drawing<'a, Ellipse<S>, S> where
S: BaseFloat,
pub fn radius(self, radius: S) -> Self
[src]
pub fn radius(self, radius: S) -> Self
Specify the width and height of the Ellipse via a given radius.
pub fn resolution(self, resolution: usize) -> Self
[src]
pub fn resolution(self, resolution: usize) -> Self
The number of sides used to draw the ellipse.
impl<'a, S> Drawing<'a, Line<S>, S> where
S: BaseFloat,
[src]
impl<'a, S> Drawing<'a, Line<S>, S> where
S: BaseFloat,
pub fn thickness(self, thickness: S) -> Self
[src]
pub fn thickness(self, thickness: S) -> Self
Specify the thickness of the Line.
pub fn half_thickness(self, half_thickness: S) -> Self
[src]
pub fn half_thickness(self, half_thickness: S) -> Self
Specify half the thickness of the Line.
As the half-thickness is used more commonly within Line geometric calculations, this
can be slightly more efficient than the full thickness
method.
pub fn start(self, start: Point2<S>) -> Self
[src]
pub fn start(self, start: Point2<S>) -> Self
Specify the start
point for the line.
pub fn end(self, end: Point2<S>) -> Self
[src]
pub fn end(self, end: Point2<S>) -> Self
Specify the end
point for the line.
pub fn points(self, start: Point2<S>, end: Point2<S>) -> Self
[src]
pub fn points(self, start: Point2<S>, end: Point2<S>) -> Self
Use the given four points as the vertices (corners) of the quad.
pub fn caps_round(self) -> Self
[src]
pub fn caps_round(self) -> Self
Draw rounded caps on the ends of the line.
The radius of the semi-circle is equal to the line's half_thickness
.
pub fn caps_round_with_resolution(self, resolution: usize) -> Self
[src]
pub fn caps_round_with_resolution(self, resolution: usize) -> Self
Draw rounded caps on the ends of the line.
The radius of the semi-circle is equal to the line's half_thickness
.
pub fn caps_square(self) -> Self
[src]
pub fn caps_square(self) -> Self
Draw squared caps on the ends of the line.
The length of the protrusion is equal to the line's half_thickness
.
impl<'a, S> Drawing<'a, Vertexless, S> where
S: BaseFloat,
[src]
impl<'a, S> Drawing<'a, Vertexless, S> where
S: BaseFloat,
pub fn tris<I, V>(self, tris: I) -> Drawing<'a, Mesh<S>, S> where
I: IntoIterator<Item = Tri<V>>,
V: Vertex + IntoVertex<S>,
[src]
pub fn tris<I, V>(self, tris: I) -> Drawing<'a, Mesh<S>, S> where
I: IntoIterator<Item = Tri<V>>,
V: Vertex + IntoVertex<S>,
Describe the mesh with the given sequence of triangles.
pub fn indexed<V, I>(self, vertices: V, indices: I) -> Drawing<'a, Mesh<S>, S> where
V: IntoIterator,
V::Item: IntoVertex<S>,
I: IntoIterator<Item = [usize; 3]>,
[src]
pub fn indexed<V, I>(self, vertices: V, indices: I) -> Drawing<'a, Mesh<S>, S> where
V: IntoIterator,
V::Item: IntoVertex<S>,
I: IntoIterator<Item = [usize; 3]>,
Describe the mesh with the given sequence of indexed vertices.
impl<'a, S> Drawing<'a, Pointless, S> where
S: BaseFloat,
[src]
impl<'a, S> Drawing<'a, Pointless, S> where
S: BaseFloat,
pub fn points<P>(self, points: P) -> Drawing<'a, Polygon<Fill, S>, S> where
P: IntoIterator,
P::Item: Into<Point<S>>,
S: BaseFloat,
[src]
pub fn points<P>(self, points: P) -> Drawing<'a, Polygon<Fill, S>, S> where
P: IntoIterator,
P::Item: Into<Point<S>>,
S: BaseFloat,
Describe the polygon's edges with the given list of consecutive vertices that join them.
pub fn colored_points<P>(
self,
points: P
) -> Drawing<'a, Polygon<PerVertex, S>, S> where
P: IntoIterator,
P::Item: Into<ColoredPoint<S>>,
S: BaseFloat,
[src]
pub fn colored_points<P>(
self,
points: P
) -> Drawing<'a, Polygon<PerVertex, S>, S> where
P: IntoIterator,
P::Item: Into<ColoredPoint<S>>,
S: BaseFloat,
Describe the polygon's edges with the given list of consecutive vertices that join them.
Each vertex may be colored uniquely.
impl<'a, S> Drawing<'a, Quad<S>, S> where
S: BaseFloat,
[src]
impl<'a, S> Drawing<'a, Quad<S>, S> where
S: BaseFloat,
pub fn points<P>(self, a: P, b: P, c: P, d: P) -> Self where
P: IntoPoint<S>,
[src]
pub fn points<P>(self, a: P, b: P, c: P, d: P) -> Self where
P: IntoPoint<S>,
Use the given points as the vertices (corners) of the quad.
impl<'a, S> Drawing<'a, Tri<S>, S> where
S: BaseFloat,
[src]
impl<'a, S> Drawing<'a, Tri<S>, S> where
S: BaseFloat,
pub fn points<P>(self, a: P, b: P, c: P) -> Self where
P: IntoPoint<S>,
[src]
pub fn points<P>(self, a: P, b: P, c: P) -> Self where
P: IntoPoint<S>,
Use the given points as the vertices (corners) of the triangle.
Trait Implementations
impl<'a, T: Debug, S: Debug> Debug for Drawing<'a, T, S> where
T: IntoDrawn<S>,
S: 'a + BaseFloat,
[src]
impl<'a, T: Debug, S: Debug> Debug for Drawing<'a, T, S> where
T: IntoDrawn<S>,
S: 'a + BaseFloat,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a, T, S> Drop for Drawing<'a, T, S> where
T: IntoDrawn<S>,
S: BaseFloat,
[src]
impl<'a, T, S> Drop for Drawing<'a, T, S> where
T: IntoDrawn<S>,
S: BaseFloat,