typerig.core.objects.line

typerig.core.objects.line (version 0.26.1)

# MODULE: TypeRig / Core / Line (Object)
# -----------------------------------------------------------
# (C) Vassil Kateliev, 2015-2020        (http://www.kateliev.com)
# (C) Karandash Type Foundry            (http://www.karandash.eu)
#------------------------------------------------------------
# www.typerig.com

Modules

  • math

Classes

class Line(builtin.object)

# - Classes -----------------------------

Methods

add(self, other)



and(self, other)



div(self, other)



init(self, *argv)



mul(self, other)



repr(self)



rmul = mul(self, other)
sub(self, other)



doSwap(self)

# -- Modifiers

doTransform(self, transform=None)



intersect_line(self, other_line)

Find intersection point (X, Y) for two lines.
Returns (None, None) if lines do not intersect.

lerp(self, time)



lerp_xy(self, time_x, time_y)



shift(self, dx, dy)

Shift coordinates by dx, dy

solve_point(self, time)

Find point on the line at given time

solve_slice(self, time)

Slice line at given time

solve_x(self, y)

Solve line equation for X coordinate.

solve_y(self, x)

Solve line equation for Y coordinate.

Descriptors

dict

dictionary for instance variables (if defined)

weakref

list of weak references to the object (if defined)

angle
diff_x
diff_y
height
length
points
slope
tuple
width
x
x_max
y
y_intercept

Get the Y intercept of a line segment

y_max

class Vector(Line)



Method resolution order:
Vector
Line
builtin.object

Methods

init(self, *argv)



repr(self)



getAngle(self)



getSlope(self)

# - Getters

Descriptors

angle
slope
x
y

Methods from Line

add(self, other)



and(self, other)



div(self, other)



mul(self, other)



rmul = mul(self, other)



sub(self, other)



doSwap(self)

# -- Modifiers

doTransform(self, transform=None)



intersect_line(self, other_line)

Find intersection point (X, Y) for two lines.
Returns (None, None) if lines do not intersect.

lerp(self, time)



lerp_xy(self, time_x, time_y)



shift(self, dx, dy)

Shift coordinates by dx, dy

solve_point(self, time)

Find point on the line at given time

solve_slice(self, time)

Slice line at given time

solve_x(self, y)

Solve line equation for X coordinate.

solve_y(self, x)

Solve line equation for Y coordinate.

Descriptors from Line

dict

dictionary for instance variables (if defined)

weakref

list of weak references to the object (if defined)

diff_x
diff_y
height
length
points
tuple
width
x_max
y_intercept

Get the Y intercept of a line segment

y_max

Line

typerig.core.objects.line.Line = class Line(__builtin__.object)

# - Classes -----------------------------

Methods

__add__(self, other)


__and__(self, other)


__div__(self, other)


__init__(self, *argv)


__mul__(self, other)


__repr__(self)


__rmul__ = __mul__(self, other)
__sub__(self, other)


doSwap(self)
# -- Modifiers
doTransform(self, transform=None)


intersect_line(self, other_line)
Find intersection point (X, Y) for two lines.
Returns (None, None) if lines do not intersect.
lerp(self, time)


lerp_xy(self, time_x, time_y)


shift(self, dx, dy)
Shift coordinates by dx, dy
solve_point(self, time)
Find point on the line at given time
solve_slice(self, time)
Slice line at given time
solve_x(self, y)
Solve line equation for X coordinate.
solve_y(self, x)
Solve line equation for Y coordinate.

Descriptors

__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)
angle
diff_x
diff_y
height
length
points
slope
tuple
width
x
x_max
y
y_intercept
Get the Y intercept of a line segment
y_max

y_intercept

typerig.core.objects.line.Line.y_intercept
Get the Y intercept of a line segment

solve_y

typerig.core.objects.line.Line.solve_y = solve_y(self, x) unbound typerig.core.objects.line.Line method
Solve line equation for Y coordinate.

solve_x

typerig.core.objects.line.Line.solve_x = solve_x(self, y) unbound typerig.core.objects.line.Line method
Solve line equation for X coordinate.

solve_point

typerig.core.objects.line.Line.solve_point = solve_point(self, time) unbound typerig.core.objects.line.Line method
Find point on the line at given time

solve_slice

typerig.core.objects.line.Line.solve_slice = solve_slice(self, time) unbound typerig.core.objects.line.Line method
Slice line at given time

intersect_line

typerig.core.objects.line.Line.intersect_line = intersect_line(self, other_line) unbound typerig.core.objects.line.Line method
Find intersection point (X, Y) for two lines.
Returns (None, None) if lines do not intersect.

shift

typerig.core.objects.line.Line.shift = shift(self, dx, dy) unbound typerig.core.objects.line.Line method
Shift coordinates by dx, dy