Class NTxUtils
java.lang.Object
net.thevpc.ntexup.api.util.NTxUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.thevpc.nuts.elem.NElementaddCompilerDeclarationPath(net.thevpc.nuts.elem.NElement element, String path) static net.thevpc.nuts.elem.NElementaddCompilerDeclarationPath(net.thevpc.nuts.elem.NElement elem, NTxSource resource) static net.thevpc.nuts.elem.NElementaddCompilerDeclarationPathAnnotations(net.thevpc.nuts.elem.NElement yy, String source) static net.thevpc.nuts.elem.NElementaddCompilerDeclarationPathDummy(net.thevpc.nuts.elem.NElement element) static Doublestatic booleanasBoolean(net.thevpc.nuts.elem.NElement e) asListOfObjects(Object anyVal) static Doublestatic voidstatic voidstatic voidstatic voidstatic List<NTxPoint2D> createArc(double minX, double minY, double maxX, double maxY, double startDeg, double endDeg, int steps) Generates points along an elliptical arc.static List<NTxPoint2D> createArc2(double cx, double cy, double rx, double ry, double startDeg, double endDeg, int steps) static Doublestatic DoubledistanceDouble(Number a, Number b) static doublestatic final double[]dtimes(double min, double max, int times) static net.thevpc.nuts.util.NOptional<String> findCompilerDeclarationPath(net.thevpc.nuts.elem.NElement element) static NTxNodefindRootNode(NTxItem bullet) static NTxNodefirstNodeUp(NTxItem item) static ObjectfromElement(net.thevpc.nuts.elem.NElement v) static StringgetCompilerDeclarationPath(net.thevpc.nuts.elem.NElement element) static booleanhasCompilerDeclarationPath(net.thevpc.nuts.elem.NElement element) static intstatic booleanisComponentSlot(String name) static booleanisOneIndexed(net.thevpc.nuts.elem.NElement element) static Doublestatic Doublestatic ColorpaintAsColor(Paint paint) static NTxPoint2Dstatic net.thevpc.nuts.elem.NElementremoveCompilerDeclarationPathAnnotations(net.thevpc.nuts.elem.NElement yy) static PaintresolveForegroundColor(NTxTextOptions options, NTxRendererContext ctx) static net.thevpc.nuts.io.NPathresolvePath(net.thevpc.nuts.elem.NElement path, Object source) static voidsetNodeParent(NTxItem item, NTxNode parent) static Stringstatic Stringstatic Stringsnippet(net.thevpc.nuts.elem.NElement yy) static NTxSourcestatic Stringstatic net.thevpc.nuts.elem.NElementstatic Stringstatic Stringuid(net.thevpc.nuts.elem.NElement id) static String[]
-
Field Details
-
COMPONENT_SLOT_VAR_NAME
- See Also:
-
COMPILER_DECLARATION_PATH
- See Also:
-
-
Constructor Details
-
NTxUtils
public NTxUtils()
-
-
Method Details
-
isOneIndexed
public static boolean isOneIndexed(net.thevpc.nuts.elem.NElement element) -
hasCompilerDeclarationPath
public static boolean hasCompilerDeclarationPath(net.thevpc.nuts.elem.NElement element) -
getCompilerDeclarationPath
-
findCompilerDeclarationPath
public static net.thevpc.nuts.util.NOptional<String> findCompilerDeclarationPath(net.thevpc.nuts.elem.NElement element) -
point2DasRelative
-
createArc
public static List<NTxPoint2D> createArc(double minX, double minY, double maxX, double maxY, double startDeg, double endDeg, int steps) Generates points along an elliptical arc.- Parameters:
minX- bounding box leftminY- bounding box topmaxX- bounding box rightmaxY- bounding box bottomstartDeg- start angle in degrees (0° = right, increasing counterclockwise)endDeg- end angle in degreessteps- number of points along the curve- Returns:
- list of points along the arc
-
createArc2
public static List<NTxPoint2D> createArc2(double cx, double cy, double rx, double ry, double startDeg, double endDeg, int steps) -
addCompilerDeclarationPath
public static net.thevpc.nuts.elem.NElement addCompilerDeclarationPath(net.thevpc.nuts.elem.NElement elem, NTxSource resource) -
addCompilerDeclarationPathDummy
public static net.thevpc.nuts.elem.NElement addCompilerDeclarationPathDummy(net.thevpc.nuts.elem.NElement element) -
addCompilerDeclarationPath
public static net.thevpc.nuts.elem.NElement addCompilerDeclarationPath(net.thevpc.nuts.elem.NElement element, String path) -
nodePath
-
firstNodeUp
-
dtimes
public static final double[] dtimes(double min, double max, int times) -
resolvePath
public static net.thevpc.nuts.io.NPath resolvePath(net.thevpc.nuts.elem.NElement path, Object source) -
shortName
-
strSnapshot
-
min
-
max
-
distance
-
distanceDouble
-
center
-
addDouble
-
doubleOf
-
intOf
-
toElement
-
fromElement
-
uids
-
uid
-
uid
-
paintAsColor
-
resolveForegroundColor
-
asBoolean
public static boolean asBoolean(net.thevpc.nuts.elem.NElement e) -
asListOfObjects
-
sourceOf
-
removeCompilerDeclarationPathAnnotations
public static net.thevpc.nuts.elem.NElement removeCompilerDeclarationPathAnnotations(net.thevpc.nuts.elem.NElement yy) -
addCompilerDeclarationPathAnnotations
public static net.thevpc.nuts.elem.NElement addCompilerDeclarationPathAnnotations(net.thevpc.nuts.elem.NElement yy, String source) -
snippet
-
setNodeParent
-
snippet
-
checkNode
-
checkNode
-
checkNode
-
checkNode
-
isComponentSlot
-
findRootNode
-