Geometry Library API - brombres/Rogue GitHub Wiki

Anchor.rogue

class Anchor [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( position:XY ) Anchor
create( px:Real, py:Real ) Anchor
operator*( anchor:Anchor, size:XY ) XY anchor * size -> delta (or the anchor position within the area (0,0,size)) Anchor.TOP_LEFT * Display.size -> XY(0,0) Anchor.BOTTOM_RIGHT * Display.size -> Display.size
operator*( size:XY, anchor:Anchor ) XY size * anchor -> delta (or the anchor position within the area (0,0,size)) Display.size * Anchor.TOP_LEFT -> XY(0,0) Display.size * Anchor.BOTTOM_RIGHT -> Display.size

Properties

Name Type Description
position XY

Methods

Signature Return Type Description
description() String
hashcode() Int
name() String
operator==( other:Anchor ) Logical
print_to( buffer:PrintWriter )
to<<Object>>() Boxed<<Anchor>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

BezierCurve.rogue

class BezierCurve

extends Object

Properties

Name Type Description
control_points XY[]
curve_points XY[]
is_modified Logical
precision Real? use 1.0 for pixel coordinates or e.g. 0.001 for normalized coordinates
work_points XY[]

Methods

Signature Return Type Description
add( point:XY )
at( t:Real ) XY
clear()
cloned() BezierCurve
count() Int
description() String
first() XY
get( index:Int ) XY
last() XY
set( index:Int, new_value:XY )
set_precision( precision:Real? )
to<<XY[]>>() XY[]
update_curve() XY[]

Box.rogue

class Box [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( corners:Corners ) Box
create( existing:Box ) Box Copy constructor. Boxes are immutable so this just returns the same box, but provided to ensure that Box(B) == B.
create( position:XY, size:XY ) Box
create( position:XY, width:Real, height:Real ) Box
create( size:XY ) Box
create( v:Variant ) Box
create( width:Real, height:Real ) Box
create( x:Real, y:Real, size:XY ) Box
create( x:Real, y:Real, width:Real, height:Real ) Box
from_corners( top_left:XY, bottom_right:XY ) Box

Properties

Name Type Description
position XY
size XY

Methods

Signature Return Type Description
at( anchor:Anchor ) XY
at( proportional_position:XY ) XY
at( proportional_subset:Box ) Box
at( u:Real, v:Real ) XY
at_random( [gen=Random:Random] ) XY
bottom() XY
bottom_left() XY
bottom_right() XY
bottommost( height:Real ) Box
cell( grid_index:XY, grid_size:XY ) Box Example:
  cell( XY(i,j), XY(3,3) ) returns the bounds of one of the following grid cells
  depending on the values of (i,j):

  (0,0) | (1,0) | (2,0)
  ------+-------+------
  (0,1) | (1,1) | (2,1)
  ------+-------+------
  (0,2) | (1,2) | (2,2)
center() XY
clamped( enclosing:Box, &shrink_to_fit ) Box Clamps this box to the enclosing box
containing( xy:XY ) Box
contains( other:Box ) Logical
contains( pos:XY ) Logical
cropped( delta:Real ) Box
cropped( left:Real, top:Real, right:Real, bottom:Real ) Box
cropped( size:XY ) Box
description() String
expanded( delta:Real ) Box
expanded( left:Real, top:Real, right:Real, bottom:Real ) Box
floor() Box
hashcode() Int
height() Real
intersection( rhs:Box ) Box? Returns the intersection of this box with another box.
intersects( circle:Circle ) Logical
intersects( line:Line ) Logical
intersects( other:Box ) Logical
intersects( quad:Quad ) Logical
intersects( triangle:Triangle ) Logical
left() XY
leftmost( width:Real ) Box
operator&( rhs:Box ) Box?
operator*( scale:Real ) Box
operator*( scale:XY ) Box
operator+( offset:XY ) Box
operator-( offset:XY ) Box
operator/( scale:Real ) Box
operator/( scale:XY ) Box
operator<>( other:Box ) Int
operator==( other:Box ) Logical
operator|( rhs:Box ) Box Returns the union of this box with another box.
positioned_within( enclosing:Box, [anchor=Anchor.CENTER:Anchor] ) Box
print_to( buffer:PrintWriter )
relative_to( anchor:Anchor ) Box Returns box of this.size that is positioned relative to its original position as an origin.

For example, if XY(640,480) is the center of the screen, then: - Box(640,480,100,100) places the top-left corner of the box on (640,480) - Box(640,480,100,100).relative_to(Anchor.CENTER) places the center of the box on (640,480) - Box(640,480,100,100).relative_to(Anchor.BOTTOM_RIGHT) places the bottom-right corner of the box on (640,480)
removing_bottommost( height:Real ) Box
removing_leftmost( width:Real ) Box
removing_rightmost( width:Real ) Box
removing_topmost( height:Real ) Box
right() XY
rightmost( width:Real ) Box
rotated( angle:Degrees ) Quad
rotated( angle:Radians ) Quad
round() Box
scaled_to_fill( other:Box ) Box
scaled_to_fill( other_size:XY ) Box
scaled_to_fit( other:Box ) Box
scaled_to_fit( other_size:XY ) Box
scaled_to_height( height:Real ) Box
scaled_to_width( width:Real ) Box
subset( subset_size:XY, [anchor=Anchor.CENTER:Anchor] ) Box
subset_x( new_width:Real, [anchor=Anchor.CENTER:Anchor] ) Box
subset_y( new_height:Real, [anchor=Anchor.CENTER:Anchor] ) Box
to<<Circle>>() Circle
to<<Object>>() Boxed<<Box>>
to<<Quad>>() Quad
to<<String>>() String
to<<Variant>>() Variant
top() XY
top_left() XY
top_right() XY
topmost( height:Real ) Box
type_info() TypeInfo
width() Real
with_height( new_height:Real ) Box
with_position( new_position:XY ) Box
with_size( new_size:XY ) Box
with_width( new_width:Real ) Box
x() Real
x1() Real
x2() Real
y() Real
y1() Real
y2() Real

Circle.rogue

class Circle [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( position:XY, radius:Real ) Circle
create( radius:Real ) Circle

Properties

Name Type Description
position XY
radius Real

Methods

Signature Return Type Description
at( angle:Degrees ) XY Returns the point along the edge of the circle at the given angle.

Example:
  one_oclock = circle.at( Degrees(360.0/12.0) )
at( angle:Radians ) XY Returns the point along the edge of the circle at the given angle.

Example:
  one_oclock = circle.at( 2*Radians(pi/12) )
at_random( [random=Random:Random] ) XY Returns a random point inside the circle. Results of repeated calls will be evenly distributed across the area of the circle.
bounding_box() Box
contains( box:Box ) Logical
contains( point:XY ) Logical
description() String
hashcode() Int
intersects( box:Box ) Logical
intersects( line:Line ) Logical
intersects( other:Circle ) Logical
intersects( quad:Quad ) Logical
intersects( triangle:Triangle ) Logical
operator*( scale:Real ) Circle
operator+( delta:XY ) Circle
operator-( delta:XY ) Circle
operator/( scale:Real ) Circle
operator<>( other:Circle ) Logical
operator==( other:Circle ) Logical
print_to( buffer:PrintWriter )
to<<Box>>() Box Returns a Box that encloses this Circle.
to<<Object>>() Boxed<<Circle>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

Corners.rogue

class Corners [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( bounds:Box ) Corners
create( top_left:XY, bottom_right:XY ) Corners

Properties

Name Type Description
bottom_right XY
top_left XY

Methods

Signature Return Type Description
at( p:XY ) XY
description() String
hashcode() Int
operator==( other:Corners ) Logical
print_to( buffer:PrintWriter )
to<<Box>>() Box
to<<Object>>() Boxed<<Corners>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

Ellipse.rogue

class Ellipse [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( position:XY, size:XY ) Ellipse

Properties

Name Type Description
position XY
size XY

Methods

Signature Return Type Description
description() String
hashcode() Int
operator==( other:Ellipse ) Logical
print_to( buffer:PrintWriter )
to<<Object>>() Boxed<<Ellipse>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

IntBox.rogue

class IntBox [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( corners:IntCorners ) IntBox
create( existing:IntBox ) IntBox Copy constructor. Boxes are immutable so this just returns the same box, but provided to ensure that IntBox(B) == B.
create( position:IntXY, size:IntXY ) IntBox
create( position:IntXY, width:Int, height:Int ) IntBox
create( size:IntXY ) IntBox
create( width:Int, height:Int ) IntBox
create( x:Int, y:Int, size:IntXY ) IntBox
create( x:Int, y:Int, width:Int, height:Int ) IntBox
from_corners( top_left:IntXY, bottom_right:IntXY ) IntBox

Properties

Name Type Description
position IntXY
size IntXY

Methods

Signature Return Type Description
at( anchor:Anchor ) IntXY
at( proportional_position:XY ) IntXY
at( u:Real, v:Real ) IntXY
at_random( [gen=Random:Random] ) IntXY
bottom() Int
bottom_left() IntXY
bottom_right() IntXY
bottommost( height:Int ) IntBox
cell( grid_index:IntXY, grid_size:IntXY ) IntBox Example:
  at( IntXY(i,j), IntXY(3,3) ) returns the bounds of one of the following grid cells:

  (0,0) | (1,0) | (2,0)
  ------+-------+------
  (0,1) | (1,1) | (2,1)
  ------+-------+------
  (0,2) | (1,2) | (2,2)
center() IntXY
clamped( enclosing:IntBox, &shrink_to_fit ) IntBox Clamps this box to the enclosing box
contains( other:IntBox ) Logical
contains( pos:IntXY ) Logical
cropped( delta:Int ) IntBox
cropped( left:Int, top:Int, right:Int, bottom:Int ) IntBox
description() String
expanded( delta:Int ) IntBox
expanded( left:Int, top:Int, right:Int, bottom:Int ) IntBox
hashcode() Int
height() Int
intersection( rhs:IntBox ) IntBox? Returns the intersection of this box with another box.
intersects( circle:Circle ) Logical
intersects( line:Line ) Logical
intersects( other:IntBox ) Logical
intersects( quad:Quad ) Logical
intersects( triangle:Triangle ) Logical
left() Int
leftmost( width:Int ) IntBox
operator&( rhs:IntBox ) IntBox?
operator*( scale:IntXY ) IntBox
operator*( scale:Real ) IntBox
operator+( offset:IntXY ) IntBox
operator-( offset:IntXY ) IntBox
operator/( scale:IntXY ) IntBox
operator/( scale:Real ) IntBox
operator==( other:IntBox ) Logical
operator|( rhs:IntBox ) IntBox Returns the union of this box with another box.
positioned_within( enclosing:IntBox, [anchor=Anchor.CENTER:Anchor] ) IntBox
print_to( buffer:PrintWriter )
relative_to( anchor:Anchor ) IntBox Returns box of this.size that is positioned relative to its original position as an origin.

For example, if IntXY(640,480) is the center of the screen, then: - IntBox(640,480,100,100) places the top-left corner of the box on (640,480) - IntBox(640,480,100,100).relative_to(Anchor.CENTER) places the center of the box on (640,480) - IntBox(640,480,100,100).relative_to(Anchor.BOTTOM_RIGHT) places the bottom-right corner of the box on (640,480)
right() Int
rightmost( width:Int ) IntBox
rotated( angle:Degrees ) Quad
rotated( angle:Radians ) Quad
subset( subset_size:IntXY, [anchor=Anchor.CENTER:Anchor] ) IntBox
subset_x( new_width:Int, [anchor=Anchor.CENTER:Anchor] ) IntBox
subset_y( new_height:Int, [anchor=Anchor.CENTER:Anchor] ) IntBox
to<<Box>>() Box
to<<Object>>() Boxed<<IntBox>>
to<<Quad>>() Quad
to<<String>>() String
to<<Variant>>() Variant
top() Int
top_left() IntXY
top_right() IntXY
topmost( height:Int ) IntBox
type_info() TypeInfo
width() Int
with_height( new_height:Int ) IntBox
with_position( new_position:IntXY ) IntBox
with_size( new_size:IntXY ) IntBox
with_width( new_width:Int ) IntBox
x() Int
x1() Int
x2() Int
y() Int
y1() Int
y2() Int

IntCorners.rogue

class IntCorners [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( bounds:IntBox ) IntCorners
create( top_left:IntXY, bottom_right:IntXY ) IntCorners

Properties

Name Type Description
bottom_right IntXY
top_left IntXY

Methods

Signature Return Type Description
description() String
hashcode() Int
operator==( other:IntCorners ) Logical
print_to( buffer:PrintWriter )
to<<IntBox>>() IntBox
to<<Object>>() Boxed<<IntCorners>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

IntXY.rogue

class IntXY [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( n:Int ) IntXY
create( r:Real, angle:Degrees ) IntXY
create( r:Real, angle:Radians ) IntXY
create( real_xy:XY ) IntXY
create( x:Int, y:Int ) IntXY
operator%( a:Int, b:IntXY ) IntXY
operator%( a:IntXY, b:Int ) IntXY
operator%( a:IntXY, b:IntXY ) IntXY
operator%( a:IntXY, b:XY ) XY
operator%( a:XY, b:IntXY ) XY
operator&( a:IntXY, b:Int ) IntXY
operator&( a:IntXY, b:IntXY ) IntXY
operator*( a:Int, b:IntXY ) IntXY
operator*( a:IntXY, b:Int ) IntXY
operator*( a:IntXY, b:IntXY ) IntXY
operator*( a:IntXY, b:Real ) XY
operator*( a:IntXY, b:XY ) XY
operator*( a:XY, b:IntXY ) XY
operator+( a:IntXY, b:IntXY ) IntXY
operator+( a:IntXY, b:XY ) XY
operator-( a:IntXY, b:IntXY ) IntXY
operator-( a:IntXY, b:XY ) XY
operator/( a:Int, b:IntXY ) IntXY
operator/( a:IntXY, b:Int ) IntXY
operator/( a:IntXY, b:IntXY ) IntXY
operator/( a:IntXY, b:Real ) XY
operator/( a:IntXY, b:XY ) XY
operator/( a:XY, b:IntXY ) XY
operator^( a:IntXY, b:Int ) IntXY
operator^( a:IntXY, b:IntXY ) IntXY
operator|( a:IntXY, b:Int ) IntXY
operator|( a:IntXY, b:IntXY ) IntXY
operator~( a:IntXY, b:Int ) IntXY
operator~( a:IntXY, b:IntXY ) IntXY

Properties

Name Type Description
x Int
y Int

Methods

Signature Return Type Description
abs() IntXY
clamped( low:IntXY, high:IntXY ) IntXY
clamped_high( limit:IntXY ) IntXY
clamped_low( limit:IntXY ) IntXY
cross( other:IntXY ) Int
degrees() Degrees
description() String
distance_to( other:IntXY ) Int
dot( other:IntXY ) Int
hashcode() Int
is_zero() Logical
magnitude() Int
magnitude_squared() Int
max() Int
max( other:IntXY ) IntXY Returns an IntXY containing the max X and the max Y of 'this' and 'other'.
min() Int
min( other:IntXY ) IntXY Returns an IntXY containing the min X and the min Y of 'this' and 'other'.
normal() IntXY Returns the normal of this vector.
normalized() IntXY
operator-() IntXY
operator?() Logical
operator<>( other:IntXY ) Int
operator==( other:IntXY ) Logical
or_larger( other:IntXY ) IntXY Returns the largest X and the largest Y between this value and the other value.
or_smaller( other:IntXY ) IntXY Returns the smaller X and the smaller Y between this value and the other value.
print_to( buffer:PrintWriter )
product() Int
radians() Radians
rotated( angle:Degrees ) IntXY
rotated( angle:Radians ) IntXY
sign() IntXY
sum() Int
to<<Object>>() Boxed<<IntXY>>
to<<String>>() String
to<<Variant>>() Variant
to<<XY>>() XY
type_info() TypeInfo
xv() IntXY
yv() IntXY
yx() IntXY

Line.rogue

class Line [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( a:XY, b:XY ) Line
create( ax:Real, ay:Real, bx:Real, by:Real ) Line

Properties

Name Type Description
a XY
b XY

Methods

Signature Return Type Description
at( p:Real ) XY
bounding_box() Box
description() String
direction() XY
hashcode() Int
intersection( circle:Circle ) Line? https://math.stackexchange.com/questions/311921/get-location-of-vector-circle-intersection
intersection( other:Line, &clamp=true ) XY? Returns the point of intersection between this line and another line.
intersects( box:Box ) Logical
intersects( circle:Circle ) Logical
intersects( other:Line ) Logical
intersects( quad:Quad ) Logical
intersects( triangle:Triangle ) Logical
normal() XY
operator&( other:Line ) XY?
operator*( scale:Real ) Line
operator*( scale:XY ) Line
operator+( position:XY ) Line
operator-( position:XY ) Line
operator/( scale:Real ) Line
operator/( scale:XY ) Line
operator<>( other:Line ) Int
operator==( other:Line ) Logical
print_to( buffer:PrintWriter )
reversed() Line
rotated( angle:Degrees ) Line
rotated( angle:Radians ) Line
to<<Object>>() Boxed<<Line>>
to<<Ray>>() Ray
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

class Line<<$DataType>> [compound]

augments Line<<$DataType>>

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( a:$DataType, b:$DataType ) Line<<$DataType>>

Properties

Name Type Description
a $DataType
b $DataType

Methods

Signature Return Type Description
description() String
operator==( other:Line<<$DataType>> ) Logical
print_to( buffer:PrintWriter )
to<<Object>>() Boxed<<Line<<$DataType>>>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

LineGenerator.rogue

class LineGenerator [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( a:XY, b:XY ) LineGenerator
create( line:Line ) LineGenerator
create( x1:Int, x2:Int, x:Int, step_x:Int, x_error:Int, y1:Int, y2:Int, y:Int, step_y:Int, y_error:Int, error:Int, is_horizontal:Logical, has_another:Logical ) LineGenerator

Properties

Name Type Description
error Int
has_another Logical
is_horizontal Logical
step_x Int
step_y Int
x Int
x1 Int
x2 Int
x_error Int
y Int
y1 Int
y2 Int
y_error Int

Methods

Signature Return Type Description
advance()
advance_x()
advance_y()
description() String
height() Int
is_finished() Logical
operator==( other:LineGenerator ) Logical
print_to( buffer:PrintWriter )
read() XY
steps_remaining() Int
to<<Object>>() Boxed<<LineGenerator>>
to<<String>>() String
to<<Variant>>() Variant
to<<XY>>() XY
type_info() TypeInfo
width() Int

Quad.rogue

class Quad [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create() Quad
create( a:XY, b:XY, c:XY, d:XY ) Quad
create( bounds:Box ) Quad

Properties

Name Type Description
a XY
b XY
c XY
d XY

Methods

Signature Return Type Description
at( p:XY ) XY
bounds() Box
centroid() XY
contains( point:XY ) Logical
description() String
hashcode() Int
intersects( box:Box ) Logical
intersects( circle:Circle ) Logical
intersects( line:Line ) Logical Returns true if this Quad quad and `line` intersect.
intersects( other:Quad ) Logical
intersects( triangle:Triangle ) Logical
operator*( scale:Real ) Quad
operator*( scale:XY ) Quad
operator+( position:XY ) Quad
operator-( position:XY ) Quad
operator/( scale:Real ) Quad
operator/( scale:XY ) Quad
operator==( other:Quad ) Logical
print_to( buffer:PrintWriter )
rotated( angle:Degrees ) Quad
rotated( angle:Radians ) Quad
to<<Box>>() Box
to<<Object>>() Boxed<<Quad>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

class Quad32 [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( a:XY32, b:XY32, c:XY32, d:XY32 ) Quad32
create( quad:Quad ) Quad32

Properties

Name Type Description
a XY32
b XY32
c XY32
d XY32

Methods

Signature Return Type Description
description() String
hashcode() Int
operator<>( other:Quad32 ) Int
operator==( other:Quad32 ) Logical
print_to( buffer:PrintWriter )
to<<Object>>() Boxed<<Quad32>>
to<<Quad>>() Quad
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

class Quad<<$DataType>> [compound]

augments Quad<<$DataType>>

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( a:$DataType, b:$DataType, c:$DataType, d:$DataType ) Quad<<$DataType>>

Properties

Name Type Description
a $DataType
b $DataType
c $DataType
d $DataType

Methods

Signature Return Type Description
description() String
operator==( other:Quad<<$DataType>> ) Logical
print_to( buffer:PrintWriter )
to<<Object>>() Boxed<<Quad<<$DataType>>>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

Ray.rogue

class Ray [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( position:XY, angle:Degrees ) Ray
create( position:XY, angle:Radians ) Ray
create( position:XY, direction:XY ) Ray

Properties

Name Type Description
direction XY
position XY

Methods

Signature Return Type Description
description() String
hashcode() Int
intersection( box:Box ) XY?
intersection( circle:Circle ) XY? https://math.stackexchange.com/questions/311921/get-location-of-vector-circle-intersection
intersection( line:Line ) XY?
intersection( other:Ray ) XY?
intersection( quad:Quad ) XY?
intersection( triangle:Triangle ) XY?
intersects( box:Box ) Logical
intersects( circle:Circle ) Logical
intersects( line:Line ) Logical
intersects( other:Ray ) Logical
intersects( quad:Quad ) Logical
intersects( triangle:Triangle ) Logical
operator+( offset:XY ) Ray
operator-( offset:XY ) Ray
operator==( other:Ray ) Logical
print_to( buffer:PrintWriter )
reflected( box:Box ) Ray
reflected( circle:Circle ) Ray
reflected( line:Line ) Ray
reflected( quad:Quad ) Ray
reflected( triangle:Triangle ) Ray
to<<Line>>() Line Returns a Line with this ray's position as the first endpoint with the second endpoint an arbitrary 10,000 units away.
to<<Object>>() Boxed<<Ray>>
to<<String>>() String
to<<Variant>>() Variant
to<<Line>>( length:Real64 ) Line
type_info() TypeInfo

Triangle.rogue

class Triangle [compound]

incorporates CommonCompoundMethods

Description

[a,b,c] should be defined in clockwise order to ensure visibility

Global Methods

Signature Return Type Description
create( a:XY, b:XY, c:XY ) Triangle

Properties

Name Type Description
a XY
b XY
c XY

Methods

Signature Return Type Description
bounding_box() Box
centroid() XY
contains( point:XY ) Logical Using Barycentric technique as described here:
  http://www.blackpawn.com/texts/pointinpoly/default.html
description() String
hashcode() Int
intersects( box:Box ) Logical
intersects( circle:Circle ) Logical
intersects( line:Line ) Logical
intersects( other:Triangle ) Logical
intersects( quad:Quad ) Logical
operator?() Logical
operator*( scale:Real ) Triangle
operator*( scale:XY ) Triangle
operator+( position:XY ) Triangle
operator-( position:XY ) Triangle
operator/( scale:Real ) Triangle
operator/( scale:XY ) Triangle
operator<>( other:Triangle ) Int
operator==( other:Triangle ) Logical
print_to( buffer:PrintWriter )
rotated( angle:Degrees ) Triangle
rotated( angle:Radians ) Triangle
to<<Object>>() Boxed<<Triangle>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

class Triangle<<$DataType>> [compound]

augments Triangle<<$DataType>>

incorporates CommonCompoundMethods

Description

[a,b,c] should be defined in clockwise order to ensure visibility

Global Methods

Signature Return Type Description
create( a:$DataType, b:$DataType, c:$DataType ) Triangle<<$DataType>>

Properties

Name Type Description
a $DataType
b $DataType
c $DataType

Methods

Signature Return Type Description
description() String
operator==( other:Triangle<<$DataType>> ) Logical
print_to( buffer:PrintWriter )
to<<Object>>() Boxed<<Triangle<<$DataType>>>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

XY.rogue

class DegreesXY [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( value:XY ) DegreesXY
create( x:Real, y:Real ) DegreesXY

Properties

Name Type Description
value XY

Methods

Signature Return Type Description
description() String
operator==( other:DegreesXY ) Logical
print_to( buffer:PrintWriter )
to<<Object>>() Boxed<<DegreesXY>>
to<<RadiansXY>>() RadiansXY
to<<String>>() String
to<<Variant>>() Variant
to<<XY>>() XY
type_info() TypeInfo

class RadiansXY [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( value:XY ) RadiansXY
create( x:Real, y:Real ) RadiansXY

Properties

Name Type Description
value XY

Methods

Signature Return Type Description
description() String
operator==( other:RadiansXY ) Logical
print_to( buffer:PrintWriter )
to<<DegreesXY>>() DegreesXY
to<<Object>>() Boxed<<RadiansXY>>
to<<String>>() String
to<<Variant>>() Variant
to<<XY>>() XY
type_info() TypeInfo

class XY [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( n:Real ) XY
create( r:Real, angle:Degrees ) XY
create( r:Real, angle:Radians ) XY
create( v:Variant ) XY
create( x:Real, y:Real ) XY
operator%( a:Real, b:XY ) XY
operator%( a:XY, b:Real ) XY
operator%( a:XY, b:XY ) XY
operator*( a:Real, b:XY ) XY
operator*( a:XY, b:Real ) XY
operator*( a:XY, b:XY ) XY
operator+( a:XY, b:XY ) XY
operator-( a:XY, b:XY ) XY
operator/( a:Real, b:XY ) XY
operator/( a:XY, b:Real ) XY
operator/( a:XY, b:XY ) XY
operator^( a:XY, b:Real ) XY
operator^( a:XY, b:XY ) XY

Properties

Name Type Description
x Real
y Real

Methods

Signature Return Type Description
abs() XY
bounding_box() Box
ceiling() XY
clamped( box:Box ) XY Adjusts this point to be within the boundaries of the given box.
clamped( line:Line ) XY Returns the point along the given line segment that is closest to this point.

Notes:

Points along the line are defined by:

  Line(t) = line.a + t * (line.b - line.a)

where t is 0 to 1. We can define t as:

  A = v - line.a
  B = line.b - line.a
  t = dot(A,B) / dot(B,B)

as this is the projection of A along and proportional to B.
clamped( low:XY, high:XY ) XY
clamped( ray:Ray ) XY Returns the point along the given ray that is closest to this point.

Notes:

Points along the ray are defined by:

  Ray(t) = ray.position + t * ray.direction

where t is 0 or higher. We can define t as:

  A = pt - line.position
  B = line.direction
  t = dot(A,B) / dot(B,B)

as this is the projection of A along and proportional to B.
clamped_high( limit:XY ) XY
clamped_low( limit:XY ) XY
cross( other:XY ) Real
degrees() Degrees
description() String
distance_to( other:XY ) Int
dot( other:XY ) Real
floor() XY
hashcode() Int
is_zero() Logical
log10() XY
log2() XY
log( n:Real ) XY
log( xy:XY ) XY
magnitude() Real
magnitude_squared() Real
max() Real
max( other:XY ) XY Returns an XY containing the max X and the max Y of 'this' and 'other'.
min() Real
min( other:XY ) XY Returns an XY containing the min X and the min Y of 'this' and 'other'.
normal() XY Returns the normal of this vector.
normalized() XY
operator-() XY
operator?() Logical
operator<>( other:XY ) Int
operator==( other:XY ) Logical
or_larger( other:XY ) XY Returns the largest X and the largest Y between this value and the other value.
or_smaller( other:XY ) XY Returns the smaller X and the smaller Y between this value and the other value.
print_to( buffer:PrintWriter )
product() Real
radians() Radians
reflected( surface_normal:XY ) XY
rotated( angle:Degrees ) XY
rotated( angle:Radians ) XY
round() XY
scaled_to_fill( other:XY ) XY Linearly scales this XY size so that the smallest dimension matches the smallest dimension of the specified other size.
scaled_to_fit( other:XY ) XY Linearly scales this XY size so that the largest dimension matches the largest dimension of the specified other size.
scaled_to_height( height:Real ) XY
scaled_to_width( width:Real ) XY
side( line:Line ) Int32 Returns 0 if on the line, 1 if on the same side as line.normal points out of, and -1 if on the opposite side
sign() XY
sum() Real
to<<Object>>() Boxed<<XY>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo
with_degrees( degrees:Degrees ) XY
with_magnitude( r:Real ) XY
with_radians( radians:Radians ) XY
with_x( x:Real ) XY
with_y( y:Real ) XY
xv() XY
yv() XY
yx() XY

class XY32 [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( x:Real32, y:Real32 ) XY32
create( xy:XY ) XY32

Properties

Name Type Description
x Real32
y Real32

Methods

Signature Return Type Description
description() String
hashcode() Int
operator?() Logical
operator<>( other:XY ) Int
operator==( other:XY32 ) Logical
print_to( buffer:PrintWriter )
to<<Object>>() Boxed<<XY32>>
to<<String>>() String
to<<Variant>>() Variant
to<<XY>>() XY
type_info() TypeInfo

XYZ.rogue

class DegreesXYZ [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( value:XYZ ) DegreesXYZ
create( x:Real, y:Real, z:Real ) DegreesXYZ

Properties

Name Type Description
value XYZ

Methods

Signature Return Type Description
description() String
operator==( other:DegreesXYZ ) Logical
print_to( buffer:PrintWriter )
to<<Object>>() Boxed<<DegreesXYZ>>
to<<RadiansXYZ>>() RadiansXYZ
to<<String>>() String
to<<Variant>>() Variant
to<<XYZ>>() XYZ
type_info() TypeInfo

class RadiansXYZ [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( value:XYZ ) RadiansXYZ
create( x:Real, y:Real, z:Real ) RadiansXYZ

Properties

Name Type Description
value XYZ

Methods

Signature Return Type Description
description() String
operator==( other:RadiansXYZ ) Logical
print_to( buffer:PrintWriter )
to<<DegreesXYZ>>() DegreesXYZ
to<<Object>>() Boxed<<RadiansXYZ>>
to<<String>>() String
to<<Variant>>() Variant
to<<XYZ>>() XYZ
type_info() TypeInfo

class XYZ [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create() XYZ
create( x:Real, y:Real, [z=0:Real] ) XYZ
create( xy:XY ) XYZ
create( xy:XY, z:Real ) XYZ
zero() XYZ

Properties

Name Type Description
x Real
y Real
z Real

Methods

Signature Return Type Description
cross( other:XYZ ) XYZ
description() String
dot( other:XYZ ) Real
hashcode() Int
magnitude() Real
magnitude_squared() Real
normalized() XYZ
operator-() XYZ
operator%( other:XYZ ) XYZ
operator%( value:Real ) XYZ
operator*( other:XYZ ) XYZ
operator*( value:Real ) XYZ
operator+( other:XYZ ) XYZ
operator+( value:Real ) XYZ
operator-( other:XYZ ) XYZ
operator-( value:Real ) XYZ
operator/( other:XYZ ) XYZ
operator/( value:Real ) XYZ
operator<>( other:XYZ ) Int
operator==( other:XYZ ) Logical
operator^( other:XYZ ) XYZ
operator^( value:Real ) XYZ
print_to( buffer:PrintWriter )
to<<Object>>() Boxed<<XYZ>>
to<<String>>() String
to<<Variant>>() Variant
to<<XY>>() XY
type_info() TypeInfo
xy() XY
xz() XY
yz() XY

class XYZ32 [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( x:Real32, y:Real32, z:Real32 ) XYZ32
create( xyz:XYZ ) XYZ32

Properties

Name Type Description
x Real32
y Real32
z Real32

Methods

Signature Return Type Description
description() String
hashcode() Int
operator?() Logical
operator<>( other:XY ) Int
operator==( other:XYZ32 ) Logical
print_to( buffer:PrintWriter )
to<<Object>>() Boxed<<XYZ32>>
to<<String>>() String
to<<Variant>>() Variant
to<<XYZ>>() XYZ
type_info() TypeInfo

XYZW.rogue

class XYZW [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create() XYZW
create( x:Real, y:Real, z:Real, [w=1:Real] ) XYZW
create( xy:XY ) XYZW
create( xy:XY, z:Real ) XYZW
create( xy:XY, z:Real, w:Real ) XYZW
create( xyz:XYZ ) XYZW
create( xyz:XYZ, w:Real ) XYZW

Properties

Name Type Description
w Real
x Real
y Real
z Real

Methods

Signature Return Type Description
description() String
hashcode() Int
operator-() XYZW
operator%( other:XYZW ) XYZW
operator%( value:Real ) XYZW
operator*( other:XYZW ) XYZW
operator*( value:Real ) XYZW
operator+( other:XYZW ) XYZW
operator+( value:Real ) XYZW
operator-( other:XYZW ) XYZW
operator-( value:Real ) XYZW
operator/( other:XYZW ) XYZW
operator/( value:Real ) XYZW
operator<>( other:XYZW ) Int
operator==( other:XYZW ) Logical
operator^( other:XYZW ) XYZW
operator^( value:Real ) XYZW
print_to( buffer:PrintWriter )
to<<Color>>() Color
to<<Object>>() Boxed<<XYZW>>
to<<String>>() String
to<<Variant>>() Variant
to<<XY>>() XY
to<<XYZ>>() XYZ
type_info() TypeInfo
xy() XY
xyz() XYZ
⚠️ **GitHub.com Fallback** ⚠️