js-util

Home > rc-js-util > Range2d

Range2d class

2x2 matrix representing a 2d range.

Signature:

export declare abstract class Range2d<TArray extends TTypedArray> extends Mat2<TArray> 

Extends: Mat2

Remarks

See static properties for constructors. Instances are not an extension of this class, but of the static members.

Properties

Property Modifiers Type Description
“0”   number xMin
“1”   number xMax
“2”   number yMin
“3”   number yMax
constructor   IRange2dCtor<TArray>  
constructors static Map<TTypedArrayCtor, Function>  
f32 static IRange2dCtor<Float32Array>  
f64 static IRange2dCtor<Float64Array>  
i16 static IRange2dCtor<Int16Array>  
i32 static IRange2dCtor<Int32Array>  
i8 static IRange2dCtor<Int8Array>  
TTypeGuardRange2d   true  
u16 static IRange2dCtor<Uint16Array>  
u32 static IRange2dCtor<Uint32Array>  
u8 static IRange2dCtor<Uint8Array>  
u8c static IRange2dCtor<Uint8ClampedArray>  

Methods

Method Modifiers Description
bound(_boundTo)   Bound this range to the argument.
castToBaseType()   Although the typed array tuples extend a typed array, they are not structurally compatible. This function returns the argument passed without modification but cast as the underlying storage type, e.g. Float32Array.
containsRange(_range)    
copyFromBuffer(_memoryDataView, _pointer, _littleEndian)   If endianness is not supplied the platform’s endianness will be used.
copyToBuffer(_memoryDataView, _pointer, _littleEndian)   If endianness is not supplied the platform’s endianness will be used.
doesRangeIntersect(_range)    
ensureAABB()    
ensureMinRange(_xMinRange, _yMinRange)   Bound this range to be at least as large as the argument.
extendRange(_x, _y, _writeTo)    
getCenter(_result)    
getCtor(ctor) static  
getRange(_result)    
getRangeTransform(_toRange, _result)   Creates a transform matrix that maps values in this range onto _toRange.
getXCenter()    
getXMax()    
getXMaxAbs()    
getXMin()    
getXRange()    
getYCenter()    
getYMax()    
getYMaxAbs()    
getYMin()    
getYRange()    
isPointInRange(_point)    
mat3Multiply(_mat, _writeTo)    
scaleRelativeTo(_scalingFactor, _relativeTo, _result)   Scales the range relative to a point (may not be outside of the range).
setXMax(_value)    
setXMin(_value)    
setYMax(_value)    
setYMin(_value)    
translateBy(_dx, _dy)   Shifts the range by (dx, dy).
unionRange(_range, _writeTo)    
update(_args)