

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object de.grogra.rgg.Library
public class Library
This class contains a collection of methods and constants which are useful in RGG modelling, especially in 3D.
Field Summary  

static int 
branch
This is a redefinition of Graph.BRANCH_EDGE . 
static int 
contains
This is a redefinition of Graph.CONTAINMENT_EDGE . 
static double 
DEG
Conversion factor from degree to radians. 
static int 
EDGE_0

static int 
EDGE_1

static int 
EDGE_10

static int 
EDGE_11

static int 
EDGE_12

static int 
EDGE_13

static int 
EDGE_14

static int 
EDGE_2

static int 
EDGE_3

static int 
EDGE_4

static int 
EDGE_5

static int 
EDGE_6

static int 
EDGE_7

static int 
EDGE_8

static int 
EDGE_9

static Vector3d 
HEAD
Vector pointing in the zdirection (the turtle's head axis). 
static I18NBundle 
I18N
The resource bundle for the de.grogra.rgg package. 
static Vector3d 
LEFT
Vector pointing in the xdirection (the turtle's left axis). 
static RGGProducer.Creator 
makeGraph

static int 
mark
This is a redefinition of Graph.MARK_EDGE . 
static int 
master
This is a redefinition of Instance3D.MASTER . 
static int 
notifies
This is a redefinition of Graph.NOTIFIES_EDGE . 
static Point3d 
ORIGIN
Point having coordinates (0, 0, 0). 
static java.io.PrintWriter 
out
This field provides a PrintWriter to write
to the XL console. 
static double 
R2D
Conversion factor from radians to degree. 
static int 
refine
This is a redefinition of Graph.REFINEMENT_EDGE . 
static byte 
SKIN
Constant for NURBSSurface.NURBSSurface(byte) indicating a
skinned surface (defined by a set of profile curves in space). 
static int 
successor
This is a redefinition of Graph.SUCCESSOR_EDGE . 
static byte 
SWEEP
Constant for NURBSSurface.NURBSSurface(byte) indicating a
swept surface (defined by a set of vertices in space). 
static Vector3d 
UP
Vector pointing in the ydirection (the turtle's up axis). 
static int 
updates
This is a redefinition of FieldUpdater.UPDATES . 
Constructor Summary  

Library()

Method Summary  

static void 
allowNoninjectiveMatchesByDefault(boolean value)


static void 
allowNoninjectiveMatchesForNextQuery(boolean value)
Deprecated. 

static

ancestor(Node n,
java.lang.Class<C> t)
Returns the nearest ancestor of n which is an instance
of t . 

static Node 
ancestor(Node n,
ObjectToBoolean<? super Node> condition)
Returns the nearest ancestor of n which fulfills
condition . 

static double 
angle(Node node)
Computes the rotation angle in degrees of the transformation defined by node . 

static double 
angle(Tuple3d a,
Tuple3d b)


static DisposableIterator 
apply(int count)
This finish iterator (see the XL Language Specification) is used in a for statement to execute its body
count times. 

static DisposableIterator 
applyUntilFinished()
This finish iterator (see the XL Language Specification) is used in a for statement to execute its body
as long as the body makes modifications to the graph. 

static Node 
axisparent(Node child)


static boolean 
booleanValue(Node w)
Returns the boolean value which is wrapped
in w if w is an instance of
BooleanNode . 

static byte 
byteValue(Node w)
Returns the byte value which is wrapped
in w if w is an instance of
ByteNode . 

static void 
chart(DatasetRef ds,
int type)
Shows the data referenced by ds in a chart panel. 

static char 
charValue(Node w)
Returns the char value which is wrapped
in w if w is an instance of
CharNode . 

static Node 
cloneNode(Node node)


static Node 
cloneSubgraph(Node root)
This method clones the subgraph starting at root
and returns the cloned node which corresponds to root . 

static void 
closeWorkbench()
Closes the currently active Workbench if such a workbench
exists. 

static Cone 
cone(Node node,
boolean end,
double angle)
Returns a cone whose tip is defined by the location of node . 

static Cone 
cone(Tuple3d origin,
Vector3d direction,
double angle)
Returns a cone whose tip is located at origin ,
whose central axis has direction as direction,
and whose half opening angle is angle (in degrees). 

static Console 
console()
Returns the currently active Console . 

static CurveRef 
curve(java.lang.String name)
Returns a CurveRef instance which refers
to the curve named name . 

static DatasetRef 
dataset(java.lang.String name)
Returns a DatasetRef instance which refers
to the dataset named name . 

static void 
defer(java.lang.Runnable r)
Put runnable into modification queue and execute later when derive() is called. 

static void 
derive()
This method induces a transformation boundary on the current RGG extent (see the XL Language Specification). 

static

descendants(ObjectConsumer<? super T> cb,
Node n,
java.lang.Class<T> cls)
This generator method yields all descendants of n
which are instances of cls . 

static Vector3d 
direction(Node node)
Computes the growth direction of the turtle at node in global coordinates. 

static void 
direction(Tuple3d dir,
Node node,
boolean end)
Computes the growth direction of the turtle at node in global coordinates. 

static boolean 
directionalTropism(Matrix34d m,
Tuple3d direction,
float e,
Matrix4d out)
Computes the rotation matrix which implements a directional tropism towards a direction . 

static double 
distance(Node a,
Node b)
Computes the global distance between two nodes. 

static double 
distanceSquared(Node a,
Node b)
Calculate squared distance between node a an node b. 

static double 
distanceToLine(Tuple3d point,
Line line)
Returns the distance between point and
line . 

static int 
distribution(float[] probabilities)
Returns an integral pseudorandom number according to the discrete distribution probabilities . 

static double 
doubleValue(Node w)
Returns the double value which is wrapped
in w if w is an instance of
DoubleNode . 

static Vector3d 
enddirection(Node node)
Computes the growth direction of the turtle at the end of node in global coordinates. 

static Point3d 
endlocation(Node node)
Computes the end location of node in global coordinates. 

static RGGGraph 
extent()
Deprecated. 

static FileRef 
file(java.lang.String name)
Returns a FileRef instance which refers
to the file named name . 

static NodeFilter<Node> 
filter(java.lang.Class[] classes,
boolean isTrue)
Creates a condition which is fulfilled for an object iff it is an instance of at least one of the specified classes (or iff it is not an instance
in case isTrue is false ). 

static float 
floatValue(Node w)
Returns the float value which is wrapped
in w if w is an instance of
FloatNode . 

static FunctionRef 
function(java.lang.String name)
Returns a Function instance which refers
to the function named name . 

static GraphManager 
graph()
Returns the current project graph, i.e., the project graph of the currently active Workbench . 

static GraphState 
graphState()
Returns the current graph state, i.e., the current graph state of the project graph of the currently active Workbench . 

static double 
height(Volume volume,
double x,
double y)
This method returns the height of a volume at a point (x, y)
(in global coordinates). 

static void 
hide(Node root)
Hides the subgraph starting at root so that it is no
longer visible and will not be reported as part of graph queries
(and left hand sides of rules, thus). 

static ImageRef 
image(java.lang.String name)
Returns an ImageRef instance which refers
to the image named name . 

static double 
inclination(Node node)


static DisposableIterator 
interpretiveRules()


static IntersectionList 
intersect(Line line,
Volume volume)
Compute all intersections between line and the surface
of volume . 

static double 
intersectionLength(Line line,
Cone cone)
Determines the fraction of the line which
intersects the specified cone . 

static int 
intValue(Node w)
Returns the int value which is wrapped
in w if w is an instance of
IntNode . 

static int 
irandom(int min,
int max)
Returns a uniformly distributed integral pseudorandom number between min and max (inclusive). 

static boolean 
isAncestor(Node a,
Node d,
int edgeMask)
Tests whether a is an ancestor of d
(or d itself), i.e., if a can be reached
from d by a backward traversal of edges matching
edgeMask (see Edge.testEdgeBits(int) ). 

static boolean 
isSelected(Node n)
Determines if n has been selected in the
workbench by the user. 

static Parallelogram 
leaf(float length,
float width)
Returns a new, rectangular instance of Parallelogram
created by the constructor invocation
Parallogram(length, width) and having
RGBAShader.GREEN as its shader. 

static Point3d 
location(Node node)
Computes the location of node in global coordinates. 

static void 
location(Tuple3d loc,
Node node,
boolean end)
Computes the location of node in global coordinates. 

static double 
lognormal(double mu,
double sigma)


static long 
longValue(Node w)
Returns the long value which is wrapped
in w if w is an instance of
LongNode . 

static void 
makeRenderedImage(java.lang.String fileName)
Creates a rendered image of the actual scene with the default camera position and a fixed image size of 800x600. 

static void 
makeRenderedImage(java.lang.String fileName,
int width,
int height)
Creates a rendered image of the actual scene with the default camera position and a variable image size. 

static void 
makeRenderedImage(java.lang.String fileName,
java.lang.String cameraName,
int width,
int height)
Creates a rendered image of the actual scene with the specified camera and a variable image size. 

static void 
makeSnapshot(java.lang.String fileName)
Creates a snapshot of the actual scene. 

static MaterialRef 
material(java.lang.String name)
Deprecated. 

static void 
mean(Aggregate a,
Tuple3d value)
This aggregate method computes the mean of a sequence of Tuple3d 's. 

static void 
mean(Aggregate a,
Tuple3f value)
This aggregate method computes the mean of a sequence of Tuple3f 's. 

static void 
mergeNonTropismTransformations(Node root,
boolean allowShape)
This method replaces chains of transformation nodes with single Null node which perform
the aggregated transformation of the chain; however, transformation
nodes which are tropisms are not allowed to be part of the chains. 

static void 
mergeNonTropismTransformations(Node root,
ObjectToBoolean<? super Node> filter,
boolean allowShape)
This method replaces chains of transformation nodes passing filter with single Null nodes which perform
the aggregated transformation of the chains; however, transformation
nodes which are tropisms are not allowed to be part of the chains. 

static void 
mergeTransformations(Node root,
boolean allowShape)
This method replaces chains of transformation nodes with single Null nodes which perform
the aggregated transformation of the chains. 

static void 
mergeTransformations(Node root,
ObjectToBoolean<? super Node> filter,
boolean allowShape)
This method replaces chains of transformation nodes passing filter with single Null nodes which perform
the aggregated transformation of the chains. 

static

minDescendants(ObjectConsumer<? super T> cb,
Node n,
java.lang.Class<T> t)
This generator method yields all descendants of n
which are instances of t and which have no
other instance of t in their path to n . 

static void 
moveToExtent(RGGProducer ps,
Node root,
int index)
Sets the extentIndex property of
root and its subgraph spanned by
EdgePatternImpl.TREE to index . 

static Node 
namedNode(java.lang.String name)
Returns a node having the specified name . 

static GRSVertex 
newGRSVertices(ObjectConsumer<? super GRSVertex> cons)


static double 
normal(double mu,
double sigma)
Returns a pseudorandom number which is distributed according to a normal distribution with mean value mu and standard
deviation sigma . 

static float 
normal(float mu,
float sigma)
Returns a pseudorandom number which is distributed according to a normal distribution with mean value mu and standard
deviation sigma . 

static java.lang.Object 
objectValue(Node w)
Returns the Object value which is wrapped
in w if w is an instance of
ObjectNode , NURBSCurve (a
NURBSCurve node wraps its
contained BSplineCurve )
or NURBSSurface (a
NURBSSurface node wraps its
contained BSplineSurface ). 

static IntersectionList 
operator$and(Line line,
Volume volume)
This operator method is an alias for intersect(de.grogra.vecmath.geom.Line, de.grogra.vecmath.geom.Volume) . 

static boolean 
operator$ge(Node a,
Node b)
This operator method compares two nodes based on their id: It returns true iff
a.getId () >= b.getId () . 

static boolean 
operator$gt(Node a,
Node b)
This operator method compares two nodes based on their id: It returns true iff
a.getId () > b.getId () . 

static

operator$in(T value,
java.util.Collection<? super T> set)
This operator method returns true iff
set is not null and
set.contains(value) returns true . 

static boolean 
operator$index(BooleanList list,
int index)
This operator method is an alias for list.get(index) . 

static byte 
operator$index(ByteList list,
int index)
This operator method is an alias for list.get(index) . 

static char 
operator$index(CharList list,
int index)
This operator method is an alias for list.get(index) . 

static double 
operator$index(DoubleList list,
int index)
This operator method is an alias for list.get(index) . 

static float 
operator$index(FloatList list,
int index)
This operator method is an alias for list.get(index) . 

static float 
operator$index(FloatToFloat func,
float x)
This operator method is an alias for func.evaluateFloat(x) . 

static int 
operator$index(IntList list,
int index)
This operator method is an alias for list.get(index) . 

static long 
operator$index(LongList list,
int index)
This operator method is an alias for list.get(index) . 

static boolean 
operator$index(Node node,
BooleanAttribute attr)


static byte 
operator$index(Node node,
ByteAttribute attr)


static char 
operator$index(Node node,
CharAttribute attr)


static double 
operator$index(Node node,
DoubleAttribute attr)


static float 
operator$index(Node node,
FloatAttribute attr)


static Node 
operator$index(Node node,
int index)
This operator method is an alias for node.getChild(index) . 

static int 
operator$index(Node node,
IntAttribute attr)


static Point3d 
operator$index(Node n,
Location l)
This operator method returns the location of n . 

static long 
operator$index(Node node,
LongAttribute attr)


static double 
operator$index(Node n,
NodeToDouble f)
This operator method applies the function f to node n . 

static float 
operator$index(Node n,
NodeToFloat f)
This operator method applies the function f to node n . 

static int 
operator$index(Node n,
NodeToInt f)
This operator method applies the function f to node n . 

static

operator$index(Node node,
ObjectAttribute<T> attr)


static short 
operator$index(Node node,
ShortAttribute attr)


static short 
operator$index(ShortList list,
int index)
This operator method is an alias for list.get(index) . 

static boolean 
operator$le(Node a,
Node b)
This operator method compares two nodes based on their id: It returns true iff
a.getId () <= b.getId () . 

static boolean 
operator$lt(Node a,
Node b)
This operator method compares two nodes based on their id: It returns true iff
a.getId () < b.getId () . 

static BooleanList 
operator$shl(BooleanList list,
boolean value)
This operator method adds value as last element to
list . 

static ByteList 
operator$shl(ByteList list,
byte value)
This operator method adds value as last element to
list . 

static CharList 
operator$shl(CharList list,
char value)
This operator method adds value as last element to
list . 

static DoubleList 
operator$shl(DoubleList list,
double value)
This operator method adds value as last element to
list . 

static FloatList 
operator$shl(FloatList list,
float value)
This operator method adds value as last element to
list . 

static IntList 
operator$shl(IntList list,
int value)
This operator method adds value as last element to
list . 

static

operator$shl(java.util.List<E> list,
E value)
This operator method adds value as last element to
list . 

static LongList 
operator$shl(LongList list,
long value)
This operator method adds value as last element to
list . 

static java.io.PrintWriter 
operator$shl(java.io.PrintWriter w,
boolean v)
This operator method prints v on w . 

static java.io.PrintWriter 
operator$shl(java.io.PrintWriter w,
char v)
This operator method prints v on w . 

static java.io.PrintWriter 
operator$shl(java.io.PrintWriter w,
double v)
This operator method prints v on w . 

static java.io.PrintWriter 
operator$shl(java.io.PrintWriter w,
float v)
This operator method prints v on w . 

static java.io.PrintWriter 
operator$shl(java.io.PrintWriter w,
int v)
This operator method prints v on w . 

static java.io.PrintWriter 
operator$shl(java.io.PrintWriter w,
long v)
This operator method prints v on w . 

static java.io.PrintWriter 
operator$shl(java.io.PrintWriter w,
java.lang.Object v)
This operator method prints v on w . 

static ShortList 
operator$shl(ShortList list,
short value)
This operator method adds value as last element to
list . 

static boolean 
orthogonalTropism(Matrix34d m,
Tuple3d direction,
float e,
Matrix4d out)
Computes the rotation matrix which implements an orthogonal tropism into a plane perpendicular to direction . 

static boolean 
plot(Aggregate a,
double x,
double y)


static boolean 
plot(Aggregate a,
DoubleToDouble function,
double x)


static boolean 
plot(Aggregate a,
IntToDouble function,
int x)


static boolean 
plotPoints(Aggregate a,
double x,
double y)


static boolean 
positionalTropism(Matrix34d m,
Tuple3d target,
float e,
Matrix4d out)
Computes the rotation matrix which implements a positional tropism towards a target location. 

static void 
print(boolean v)
Prints v to the XL console. 

static void 
print(char v)
Prints v to the XL console. 

static void 
print(double v)
Prints v to the XL console. 

static void 
print(float v)
Prints v to the XL console. 

static void 
print(int v)
Prints v to the XL console. 

static void 
print(long v)
Prints v to the XL console. 

static void 
print(java.lang.Object v)
Prints v to the XL console. 

static void 
println()
Terminate the current line by writing the line separator string. 

static void 
println(boolean v)
Prints v to the XL console, then
terminates the line. 

static void 
println(char v)
Prints v to the XL console, then
terminates the line. 

static void 
println(double v)
Prints v to the XL console, then
terminates the line. 

static void 
println(float v)
Prints v to the XL console, then
terminates the line. 

static void 
println(int v)
Prints v to the XL console, then
terminates the line. 

static void 
println(long v)
Prints v to the XL console, then
terminates the line. 

static void 
println(java.lang.Object v)
Prints v to the XL console, then
terminates the line. 

static boolean 
probability(float p)
Returns the value of a boolean pseudorandom variable
whose probability for true is p . 

static float 
random(float min,
float max)
Returns a uniformly distributed pseudorandom number between min and max . 

static Vector3d 
randomDirection()
Pick a random point on the surface of a unit sphere and return it as direction vector. 

static void 
range(DoubleConsumer consumer,
double min,
double max)


static void 
range(DoubleConsumer consumer,
double min,
double max,
int n)


static Line 
ray(Tuple3d origin,
Tuple3d direction)
Constructs a Line which represents a ray emanating at
origin in the specified direction . 

static Reference 
reference(java.lang.String name)
Returns a Reference instance which refers
to the object named name . 

static void 
removeInterpretiveNodes()


static void 
removeLeaves(Node root,
ObjectToBoolean<? super Node> filter)
Removes all leaf nodes from the graph which pass filter , starting at root . 

static void 
removeTransformationLeaves(Node root)
Removes all leaf nodes from the graph which are pure transformation nodes (see removeTransformationLeaves(Node, ObjectToBoolean) ). 

static void 
removeTransformationLeaves(Node root,
ObjectToBoolean<? super Node> filter)
Removes all leaf nodes from the graph which are pure transformation nodes and which pass filter ,
starting at root (see removeLeaves(de.grogra.graph.impl.Node, de.grogra.xl.lang.ObjectToBoolean) ). 

static RGGGraph 
rggGraph()


static int 
select(Aggregate a,
Node value)


static void 
setDerivationMode(int mode)


static void 
setRandomTransform(Null target,
Transform3D center,
double sigma,
double minX,
double minY,
double maxX,
double maxY)


static void 
setSeed(long seed)
This method sets the seed for the pseudorandom number generator which is used by the random methods in this class. 

static void 
setStatus(java.lang.String text)
Displays text in the current status bar. 

static ShaderRef 
shader(java.lang.String name)
Returns a ShaderRef instance which refers
to the shader named name . 

static short 
shortValue(Node w)
Returns the short value which is wrapped
in w if w is an instance of
ShortNode . 

static Statistics 
statistics(Aggregate a,
double value)
This aggregate method computes a Statistics
object for a series of values a . 

static Node 
successor(Node n,
ObjectToBoolean<? super Node> condition)
Returns the nearest successor of n which fulfills
condition . 

static NURBSSurface 
Surface(BSplineCurve profile)
Deprecated. 

static NURBSSurface 
Surface(BSplineCurveList profiles)
Deprecated. 

static NURBSSurface 
Surface(BSplineCurve profile,
java.lang.String name,
boolean useRail)
Deprecated. 

static NURBSSurface 
Surface(BSplineSurface surface)
Deprecated. 

static NURBSSurface 
Surface(byte type)
Deprecated. 

static NURBSSurface 
Surface(byte type,
java.lang.String name,
boolean useRail)
Deprecated. 

static NURBSSurface 
Surface(float radius)
Deprecated. 

static SurfaceRef 
surface(java.lang.String name)
Returns a SurfaceRef instance which refers
to the surface named name . 

static

synthesize(T root,
ObjectToObjectGenerator<? super T,? extends T> generator,
ObjectToBoolean<BooleanSynth<? super T>> synth)
This method can be used to compute the values of a synthesized attribute for every node of a treelike structure. 

static

synthesize(T root,
ObjectToObjectGenerator<? super T,? extends T> generator,
ObjectToByte<ByteSynth<? super T>> synth)
This method can be used to compute the values of a synthesized attribute for every node of a treelike structure. 

static

synthesize(T root,
ObjectToObjectGenerator<? super T,? extends T> generator,
ObjectToChar<CharSynth<? super T>> synth)
This method can be used to compute the values of a synthesized attribute for every node of a treelike structure. 

static

synthesize(T root,
ObjectToObjectGenerator<? super T,? extends T> generator,
ObjectToDouble<DoubleSynth<? super T>> synth)
This method can be used to compute the values of a synthesized attribute for every node of a treelike structure. 

static

synthesize(T root,
ObjectToObjectGenerator<? super T,? extends T> generator,
ObjectToFloat<FloatSynth<? super T>> synth)
This method can be used to compute the values of a synthesized attribute for every node of a treelike structure. 

static

synthesize(T root,
ObjectToObjectGenerator<? super T,? extends T> generator,
ObjectToInt<IntSynth<? super T>> synth)
This method can be used to compute the values of a synthesized attribute for every node of a treelike structure. 

static

synthesize(T root,
ObjectToObjectGenerator<? super T,? extends T> generator,
ObjectToLong<LongSynth<? super T>> synth)
This method can be used to compute the values of a synthesized attribute for every node of a treelike structure. 

static

synthesize(T root,
ObjectToObjectGenerator<? super T,? extends T> generator,
ObjectToObject<ObjectSynth<? super T,? super V>,? extends V> synth)
This method can be used to compute the values of a synthesized attribute for every node of a treelike structure. 

static

synthesize(T root,
ObjectToObjectGenerator<? super T,? extends T> generator,
ObjectToShort<ShortSynth<? super T>> synth)
This method can be used to compute the values of a synthesized attribute for every node of a treelike structure. 

static Line 
toLine(Node node)
Returns a line which corresponds to the central line of node . 

static ObjectToDouble<double[]> 
toObjectToDouble(DoubleToDouble f)


static Point3d 
toPoint3d(IntersectionList list)
This autoconversion method returns the first intersection point of list , or null if list is empty. 

static Point3d 
toPoint3d(Node node)
The same as location(Node) . 

static Tuple3d 
toTuple3d(Node node)


static Matrix34d 
transformation(Node node)
Computes the global coordinate transformation of the node . 

static Matrix34d 
transformation(Node node,
boolean post)
Computes the global coordinate transformation of the node . 

static Null 
tropism(Node a,
Point3d target,
float e)
Return a new node with a transformation matrix set to the desired tropism. 

static Null 
tropism(Node a,
Vector3d direction,
float e)
Return a new node with a transformation matrix set to the desired tropism. 

static RGBAShader 
visualizeAsColor(double x)
Returns a color shader whose color represents the value of x which has to lie between 1 and 1. 

static Volume 
volume(Node node)
Returns a volume which corresponds to the shape of node . 

static IMPWorkbench 
workbench()
Returns the currently active Workbench . 
Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Field Detail 

public static final int branch
Graph.BRANCH_EDGE
.
public static final int contains
Graph.CONTAINMENT_EDGE
.
public static final double DEG
public static final int EDGE_0
public static final int EDGE_1
public static final int EDGE_10
public static final int EDGE_11
public static final int EDGE_12
public static final int EDGE_13
public static final int EDGE_14
public static final int EDGE_2
public static final int EDGE_3
public static final int EDGE_4
public static final int EDGE_5
public static final int EDGE_6
public static final int EDGE_7
public static final int EDGE_8
public static final int EDGE_9
public static final Vector3d HEAD
public static final I18NBundle I18N
de.grogra.rgg
package.
public static final Vector3d LEFT
public static final RGGProducer.Creator makeGraph
public static final int mark
Graph.MARK_EDGE
.
public static final int master
Instance3D.MASTER
.
public static final int notifies
Graph.NOTIFIES_EDGE
.
public static final Point3d ORIGIN
public static final java.io.PrintWriter out
PrintWriter
to write
to the XL console.
public static final double R2D
public static final int refine
Graph.REFINEMENT_EDGE
.
public static final byte SKIN
NURBSSurface.NURBSSurface(byte)
indicating a
skinned surface (defined by a set of profile curves in space).
public static final int successor
Graph.SUCCESSOR_EDGE
.
public static final byte SWEEP
NURBSSurface.NURBSSurface(byte)
indicating a
swept surface (defined by a set of vertices in space).
public static final Vector3d UP
public static final int updates
FieldUpdater.UPDATES
.
Constructor Detail 

public Library()
Method Detail 

public static void allowNoninjectiveMatchesByDefault(boolean value)
@Deprecated public static void allowNoninjectiveMatchesForNextQuery(boolean value)
public static <C extends Node> C ancestor(Node n, java.lang.Class<C> t)
n
which is an instance
of t
. Ancestors are those nodes which can be reached by
traversing successor
 or branch
edges backwards.
n
 a nodet
 the type so search for
t
, or null
public static Node ancestor(Node n, ObjectToBoolean<? super Node> condition)
n
which fulfills
condition
. Ancestors are those nodes which can be reached by
traversing successor
 or branch
edges backwards.
n
 a nodecondition
 a condition
condition
, or null
public static double angle(Node node)
node
. The computed value will be correct
if the transformation is a rotation, possibly combined with a uniform
scaling.
node
 a node
node
,
in degreespublic static double angle(Tuple3d a, Tuple3d b)
public static DisposableIterator apply(int count)
for
statement to execute its body
count
times. Each execution is surrounded
by a transformation boundary (see derive()
).
count
 number of iterations
public static DisposableIterator applyUntilFinished()
for
statement to execute its body
as long as the body makes modifications to the graph.
Each execution is surrounded
by a transformation boundary (see derive()
).
public static Node axisparent(Node child)
public static boolean booleanValue(Node w)
boolean
value which is wrapped
in w
if w
is an instance of
BooleanNode
. Otherwise this method returns
false.
w
 a node
boolean
value, or falsepublic static byte byteValue(Node w)
byte
value which is wrapped
in w
if w
is an instance of
ByteNode
. Otherwise this method returns
0.
w
 a node
byte
value, or 0public static void chart(DatasetRef ds, int type)
ds
in a chart panel.
type
is one of the constants declared in
ChartPanel
, this specifies the type of chart.
ds
 reference to a Dataset
type
 chart typepublic static char charValue(Node w)
char
value which is wrapped
in w
if w
is an instance of
CharNode
. Otherwise this method returns
0.
w
 a node
char
value, or 0public static Node cloneNode(Node node) throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
public static Node cloneSubgraph(Node root) throws java.lang.CloneNotSupportedException
root
and returns the cloned node which corresponds to root
.
The subgraph consists of all nodes which can be reached
by traversing edges in forward direction. Nodes are cloned
deeply, i.e., field values are cloned, too.
root
 root node of subgraph
java.lang.CloneNotSupportedException
public static void closeWorkbench()
Workbench
if such a workbench
exists. Note that unsaved modifications are lost, because the user is
not asked.
public static Cone cone(Node node, boolean end, double angle)
node
. Depending on end
, the location
or end location of node
is used
(see location(Tuple3d, Node, boolean)
).
The axis of the cone points into the local zdirection
of the coordinate system of node
or node
's children (again depending on end
).
The cone has no base plane, i.e., it extends to infinity.
node
 node which defines the cone's tipend
 use location or end location of node
angle
 half opening angle in degrees
Cone
corresponding to the specified geometrypublic static Cone cone(Tuple3d origin, Vector3d direction, double angle)
origin
,
whose central axis has direction
as direction,
and whose half opening angle is angle
(in degrees).
The cone has no base plane, i.e., it extends to infinity.
origin
 location of the cone's tipdirection
 direction of the cone's axisangle
 half opening angle in degrees
Cone
corresponding to the specified geometrypublic static Console console()
Console
. This may return
null
.
null
public static CurveRef curve(java.lang.String name)
CurveRef
instance which refers
to the curve named name
. The list of curves
in GroIMP is available in the panel
"Object Explorers/Math Objects/Curves".
name
 name of curve within GroIMP
CurveRef
referring to the named curvepublic static DatasetRef dataset(java.lang.String name)
DatasetRef
instance which refers
to the dataset named name
. The list of datasets
in GroIMP is available in the panel
"Object Explorers/Datasets".
name
 name of dataset within GroIMP
DatasetRef
referring to the named datasetpublic static void defer(java.lang.Runnable r)
r
 public static void derive()
public static <T> Node descendants(ObjectConsumer<? super T> cb, Node n, java.lang.Class<T> cls)
n
which are instances of cls
.
Descendants are those nodes which can be reached by
traversing successor
 or branch
edges forwards.
cb
 a consumer instance receiving the nodes (provided by the XL compiler)n
 a nodecls
 the type to seach for
null
public static Vector3d direction(Node node)
node
in global coordinates.
The direction is defined by the direction (0, 0, 1) in local coordinates.
node
 a node
node
direction(Tuple3d, Node, boolean)
public static void direction(Tuple3d dir, Node node, boolean end)
node
in global coordinates.
The computed value is written to direction
. The direction
is defined by the direction (0, 0, 1) in local coordinates of the
node
if end
is false
,
or of the node
's children if end
is true
.
dir
 receives the directionnode
 a nodeend
 use location or end location of node
public static boolean directionalTropism(Matrix34d m, Tuple3d direction, float e, Matrix4d out)
direction
. This is done as follows:
The matrix m
is interpreted as the transformation
matrix from local to global coordinates. Thus, the local zdirection
(the growth direction) has the value
v = (m.m02, m.m12, m.m22)
in global coordinates. Now the cross product
d = v^{0} × direction
,
where v^{0}
is the unit vector in direction of
v
, defines the axis about which
a rotation has to be performed in order to achieve the desired tropism. This
direction is transformed to the local coordinates of m
,
and out
is set to a rotation about this
transformed direction, its angle being the length
of d
multiplied by e
(in radians).
1e10
,
no rotation matrix is computed and this method returns
false
. Then out
does not
contain a valid rotation matrix and should be ignored.
This case happens when the growth direction
is (anti)parallel to the desired direction
of the tropism.
m
 transformation matrix from local to global coordinatesdirection
 direction of the tropism in global coordinatese
 strength of the tropismout
 the computed rotation matrix is placed in here (only
valid if the returned value is true
)
true
iff a rotation matrix has been computedpublic static double distance(Node a, Node b)
a
 first nodeb
 second node
public static double distanceSquared(Node a, Node b)
a
 node ab
 node b
public static double distanceToLine(Tuple3d point, Line line)
point
and
line
.
point
 a pointline
 a line
point
and line
Line.distance(Tuple3d)
public static int distribution(float[] probabilities)
probabilities
. The
value i
has the probability
probabilities[i]
for
0 <= i < probabilities.length
, the
value probabilities.length
has the
remaining probability, i.e., the difference between
the sum of probabilities
and 1
.
probabilities
 array of discrete probabilities
probabilities
setSeed(long)
public static double doubleValue(Node w)
double
value which is wrapped
in w
if w
is an instance of
DoubleNode
. Otherwise this method returns
0.
w
 a node
double
value, or 0public static Vector3d enddirection(Node node)
node
in global coordinates.
The direction is defined by the direction (0, 0, 1) in
local coordinates of node
's children.
node
 a node
node
's
childrendirection(Tuple3d, Node, boolean)
public static Point3d endlocation(Node node)
node
in global coordinates.
The end location is defined by the point (0, 0, 0) in local coordinates
of node
's children.
node
 a node
node
's end location in global coordinateslocation(Tuple3d, Node, boolean)
@Deprecated public static RGGGraph extent()
public static FileRef file(java.lang.String name)
FileRef
instance which refers
to the file named name
. The list of files
in GroIMP is available in the panel
"File Explorer".
name
does not contain the character '/'
or the character IO.SYSTEM_ID_SEPARATOR
,
name
is prefixed by
IO.PROJECT_FS
followed by IO.SYSTEM_ID_SEPARATOR
.
Thus, in this case name
is assumed to refer
to a file in the virtual file system of the
project.
name
 name of file within GroIMP
FileRef
referring to the named filepublic static NodeFilter<Node> filter(java.lang.Class[] classes, boolean isTrue)
classes
(or iff it is not an instance
in case isTrue
is false
).
classes
 list of classesisTrue
 condition value iff object is an instance of one of classes
public static float floatValue(Node w)
float
value which is wrapped
in w
if w
is an instance of
FloatNode
. Otherwise this method returns
0.
w
 a node
float
value, or 0public static FunctionRef function(java.lang.String name)
Function
instance which refers
to the function named name
. The list of functions
in GroIMP is available in the panel
"Object Explorers/Math Objects/Functions".
name
 name of function within GroIMP
FunctionRef
referring to the named functionpublic static GraphManager graph()
Workbench
. This may return
null
.
null
public static GraphState graphState()
Workbench
.
public static double height(Volume volume, double x, double y)
(x, y)
(in global coordinates). This is the maximum zcoordinate of the volume
at (x, y)
. If the volume does not contain a point with
matching xycoordinates, 0 is returned.
volume
 a volumex
 global xcoordinatey
 global ycoordinate
volume
at (x, y)
, or 0public static void hide(Node root)
root
so that it is no
longer visible and will not be reported as part of graph queries
(and left hand sides of rules, thus).
Technically, this behaviour is achieved by two steps: At first,
root
is reparented such that it becomes the child of
the RGGRoot
of this graph, the connection being established
by an edge of type Graph.MARK_EDGE
. This makes the subgraph
invisible. Afterwards, moveToExtent(de.grogra.rgg.model.RGGProducer, de.grogra.graph.impl.Node, int)
is invoked
in order to move the subgraph to the last list of the type extent. Under
normal operation, this excludes the subgraph from being returned
as part of graph queries.
The modifications are made as part of the active transaction of the graph.
root
 root node of subgraphpublic static ImageRef image(java.lang.String name)
ImageRef
instance which refers
to the image named name
. The list of images
in GroIMP is available in the panel
"Object Explorers/Images".
name
 name of image within GroIMP
ImageRef
referring to the named imagepublic static double inclination(Node node)
public static DisposableIterator interpretiveRules()
public static IntersectionList intersect(Line line, Volume volume)
line
and the surface
of volume
. The returned list is valid until the next
invocation of this method within the same thread.
line
 a linevolume
 a volume
public static double intersectionLength(Line line, Cone cone)
line
which
intersects the specified cone
.
line
 line to intersectcone
 cone to intersect
line
which intersects cone
public static int intValue(Node w)
int
value which is wrapped
in w
if w
is an instance of
IntNode
. Otherwise this method returns
0.
w
 a node
int
value, or 0public static int irandom(int min, int max)
min
and max
(inclusive).
min
 minimal valuemax
 maximal value
min
and max
setSeed(long)
public static boolean isAncestor(Node a, Node d, int edgeMask)
a
is an ancestor of d
(or d
itself), i.e., if a
can be reached
from d
by a backward traversal of edges matching
edgeMask
(see Edge.testEdgeBits(int)
).
Note that this method expects the relevant part of the subgraph
spanned by matching edges to be a tree.
a
 the potential ancestord
 the potential descendantedgeMask
 the edge mask to use
true
iff a
is an ancestor
of d
public static boolean isSelected(Node n)
n
has been selected in the
workbench by the user.
n
 a node
true
iff n
is contained
in the current selectionpublic static Parallelogram leaf(float length, float width)
Parallelogram
created by the constructor invocation
Parallogram(length, width)
and having
RGBAShader.GREEN
as its shader.
length
 length of rectanglewidth
 width of rectangle
public static Point3d location(Node node)
node
in global coordinates.
The location is defined by the point (0, 0, 0) in local coordinates.
node
 a node
node
's location in global coordinateslocation(Tuple3d, Node, boolean)
public static void location(Tuple3d loc, Node node, boolean end)
node
in global coordinates.
The computed value is written to location
. The location
is defined by the point (0, 0, 0) in local coordinates of the
node
if end
is false
,
or of the node
's children if end
is true
.
loc
 receives the locationnode
 a nodeend
 use location or end location of node
public static double lognormal(double mu, double sigma)
public static long longValue(Node w)
long
value which is wrapped
in w
if w
is an instance of
LongNode
. Otherwise this method returns
0.
w
 a node
long
value, or 0public static void makeRenderedImage(java.lang.String fileName)
fileName
 name of the output filepublic static void makeRenderedImage(java.lang.String fileName, int width, int height)
fileName
 name of the output filewidth
 height
 public static void makeRenderedImage(java.lang.String fileName, java.lang.String cameraName, int width, int height)
fileName
 name of the output filecameraName
 name of a specific camerawidth
 height
 public static void makeSnapshot(java.lang.String fileName)
fileName
 name of the output file@Deprecated public static MaterialRef material(java.lang.String name)
public static void mean(Aggregate a, Tuple3d value)
Tuple3d
's.
a
 aggregate instance (provided by the XL compiler)value
 a value of the sequence of valuespublic static void mean(Aggregate a, Tuple3f value)
Tuple3f
's.
a
 aggregate instance (provided by the XL compiler)value
 a value of the sequence of valuespublic static void mergeNonTropismTransformations(Node root, boolean allowShape)
Null
node which perform
the aggregated transformation of the chain; however, transformation
nodes which are tropisms are not allowed to be part of the chains.
This is the same
as mergeNonTropismTransformations(root, null)
.
root
 root node of subgraph where chains should be replacedallowShape
 store aggregated transformation in shape node at
chain end if possiblemergeNonTropismTransformations(Node, ObjectToBoolean, boolean)
public static void mergeNonTropismTransformations(Node root, ObjectToBoolean<? super Node> filter, boolean allowShape)
filter
with single Null
nodes which perform
the aggregated transformation of the chains; however, transformation
nodes which are tropisms are not allowed to be part of the chains.
Tropisms are defined by the subclasses of Tropism
.
root
 root node of subgraph where chains should be replacedfilter
 only merge nodes which pass this filter. If null
is specified, every nontropism transformation node is considered for mergingmergeTransformations(Node, ObjectToBoolean, boolean)
public static void mergeTransformations(Node root, boolean allowShape)
Null
nodes which perform
the aggregated transformation of the chains. This is the same
as mergeTransformations(root, null)
.
root
 root node of subgraph where chains should be replacedallowShape
 store aggregated transformation in shape node at
chain end if possiblemergeTransformations(Node, ObjectToBoolean, boolean)
public static void mergeTransformations(Node root, ObjectToBoolean<? super Node> filter, boolean allowShape)
filter
with single Null
nodes which perform
the aggregated transformation of the chains. A node is considered to be
a transformation node if it has a
transformation attribute,
but no
shape attribute.
If it additionally passes filter
and is part of a chain of
such nodes, this chain will be replaced by an equivalent single node of class
Null
.
root
 root node of subgraph where chains should be replacedfilter
 only merge nodes which pass this filter. If null
is specified, every transformation node is considered for mergingallowShape
 if possible, store aggregated transformation in
existing shape node at chain end
(instead of creating a new Null
node)public static <T> Node minDescendants(ObjectConsumer<? super T> cb, Node n, java.lang.Class<T> t)
n
which are instances of t
and which have no
other instance of t
in their path to n
.
Descendants are those nodes which can be reached by
traversing successor
 or branch
edges forwards.
cb
 a consumer instance receiving the nodes (provided by the XL compiler)n
 a nodet
 the type to seach for
null
public static void moveToExtent(RGGProducer ps, Node root, int index)
extentIndex
property of
root
and its subgraph spanned by
EdgePatternImpl.TREE
to index
. If ps
is null
, the property is modified as part of the
active transaction of the graph. Otherwise, the PropertyQueue
of ps
is used to enqueue the modifications.
Note that under normal operation, nodes at the Node.LAST_EXTENT_INDEX
of the type extent are not returned as part of graph queries.
ps
 producer to obtain a modification queue, or null
root
 root node of subgraphindex
 new value of the extentTail
property of the nodespublic static Node namedNode(java.lang.String name)
name
.
name
 name of a node
name
, or null
if no such node existsGraphManager.getNodeForName(java.lang.String)
public static GRSVertex newGRSVertices(ObjectConsumer<? super GRSVertex> cons)
public static double normal(double mu, double sigma)
mu
and standard
deviation sigma
.
mu
 mean valuesigma
 standard deviation
setSeed(long)
public static float normal(float mu, float sigma)
mu
and standard
deviation sigma
.
mu
 mean valuesigma
 standard deviation
setSeed(long)
public static java.lang.Object objectValue(Node w)
Object
value which is wrapped
in w
if w
is an instance of
ObjectNode
, NURBSCurve
(a
NURBSCurve
node wraps its
contained BSplineCurve
)
or NURBSSurface
(a
NURBSSurface
node wraps its
contained BSplineSurface
).
Otherwise this method returns null.
w
 a node
Object
value, or nullpublic static IntersectionList operator$and(Line line, Volume volume)
intersect(de.grogra.vecmath.geom.Line, de.grogra.vecmath.geom.Volume)
.
line
 a linevolume
 a volume
public static boolean operator$ge(Node a, Node b)
true
iff
a.getId () >= b.getId ()
.
a
 a nodeb
 another node
a.getId () >= b.getId ()
Node.getId()
public static boolean operator$gt(Node a, Node b)
true
iff
a.getId () > b.getId ()
.
a
 a nodeb
 another node
a.getId () > b.getId ()
Node.getId()
public static <T> boolean operator$in(T value, java.util.Collection<? super T> set)
true
iff
set
is not null
and
set.contains(value)
returns true
.
value
 a valueset
 a collection
true
iff value
is in set
public static boolean operator$index(BooleanList list, int index)
list.get(index)
.
list
 a listindex
 an index
index
in list
public static byte operator$index(ByteList list, int index)
list.get(index)
.
list
 a listindex
 an index
index
in list
public static char operator$index(CharList list, int index)
list.get(index)
.
list
 a listindex
 an index
index
in list
public static double operator$index(DoubleList list, int index)
list.get(index)
.
list
 a listindex
 an index
index
in list
public static float operator$index(FloatList list, int index)
list.get(index)
.
list
 a listindex
 an index
index
in list
public static float operator$index(FloatToFloat func, float x)
func.evaluateFloat(x)
.
func
 a functionx
 argument to the function
func
at x
public static int operator$index(IntList list, int index)
list.get(index)
.
list
 a listindex
 an index
index
in list
public static long operator$index(LongList list, int index)
list.get(index)
.
list
 a listindex
 an index
index
in list
public static boolean operator$index(Node node, BooleanAttribute attr)
public static byte operator$index(Node node, ByteAttribute attr)
public static char operator$index(Node node, CharAttribute attr)
public static double operator$index(Node node, DoubleAttribute attr)
public static float operator$index(Node node, FloatAttribute attr)
public static Node operator$index(Node node, int index)
node.getChild(index)
.
node
 a nodeindex
 an index
index
th child of code
Node.getBranchNode(int)
public static int operator$index(Node node, IntAttribute attr)
public static Point3d operator$index(Node n, Location l)
n
.
It is an alias for location(n)
.
n
 a nodel
 dummy parameter, its value is ignored
n
in global coordinateslocation(Node)
public static long operator$index(Node node, LongAttribute attr)
public static double operator$index(Node n, NodeToDouble f)
f
to node n
. It is an alias for
f.get(n)
.
n
 a nodef
 a function of nodes
f
at n
public static float operator$index(Node n, NodeToFloat f)
f
to node n
. It is an alias for
f.get(n)
.
n
 a nodef
 a function of nodes
f
at n
public static int operator$index(Node n, NodeToInt f)
f
to node n
. It is an alias for
f.get(n)
.
n
 a nodef
 a function of nodes
f
at n
public static <T> T operator$index(Node node, ObjectAttribute<T> attr)
public static short operator$index(Node node, ShortAttribute attr)
public static short operator$index(ShortList list, int index)
list.get(index)
.
list
 a listindex
 an index
index
in list
public static boolean operator$le(Node a, Node b)
true
iff
a.getId () <= b.getId ()
.
a
 a nodeb
 another node
a.getId () <= b.getId ()
Node.getId()
public static boolean operator$lt(Node a, Node b)
true
iff
a.getId () < b.getId ()
.
a
 a nodeb
 another node
a.getId () < b.getId ()
Node.getId()
public static BooleanList operator$shl(BooleanList list, boolean value)
value
as last element to
list
.
list
 a listvalue
 value to add as last element
list
public static ByteList operator$shl(ByteList list, byte value)
value
as last element to
list
.
list
 a listvalue
 value to add as last element
list
public static CharList operator$shl(CharList list, char value)
value
as last element to
list
.
list
 a listvalue
 value to add as last element
list
public static DoubleList operator$shl(DoubleList list, double value)
value
as last element to
list
.
list
 a listvalue
 value to add as last element
list
public static FloatList operator$shl(FloatList list, float value)
value
as last element to
list
.
list
 a listvalue
 value to add as last element
list
public static IntList operator$shl(IntList list, int value)
value
as last element to
list
.
list
 a listvalue
 value to add as last element
list
public static <E> java.util.List<E> operator$shl(java.util.List<E> list, E value)
value
as last element to
list
.
list
 a listvalue
 value to add as last element
list
public static LongList operator$shl(LongList list, long value)
value
as last element to
list
.
list
 a listvalue
 value to add as last element
list
public static java.io.PrintWriter operator$shl(java.io.PrintWriter w, boolean v)
v
on w
.
w
 a writerv
 value to be printed on w
w
public static java.io.PrintWriter operator$shl(java.io.PrintWriter w, char v)
v
on w
.
w
 a writerv
 value to be printed on w
w
public static java.io.PrintWriter operator$shl(java.io.PrintWriter w, double v)
v
on w
.
w
 a writerv
 value to be printed on w
w
public static java.io.PrintWriter operator$shl(java.io.PrintWriter w, float v)
v
on w
.
w
 a writerv
 value to be printed on w
w
public static java.io.PrintWriter operator$shl(java.io.PrintWriter w, int v)
v
on w
.
w
 a writerv
 value to be printed on w
w
public static java.io.PrintWriter operator$shl(java.io.PrintWriter w, long v)
v
on w
.
w
 a writerv
 value to be printed on w
w
public static java.io.PrintWriter operator$shl(java.io.PrintWriter w, java.lang.Object v)
v
on w
.
w
 a writerv
 value to be printed on w
w
public static ShortList operator$shl(ShortList list, short value)
value
as last element to
list
.
list
 a listvalue
 value to add as last element
list
public static boolean orthogonalTropism(Matrix34d m, Tuple3d direction, float e, Matrix4d out)
direction
. This is done as follows:
The matrix m
is interpreted as the transformation
matrix from local to global coordinates. Thus, the local zdirection
(the growth direction) has the value
v = (m.m02, m.m12, m.m22)
in global coordinates. Now the cross product
d = v^{0} × direction
,
where v^{0}
is the unit vector in direction of
v
, defines the axis about which
a rotation has to be performed in order to achieve the desired tropism. This
direction is transformed to the local coordinates of m
,
and out
is set to a rotation about this
transformed direction, its angle being the negated value
of the scalar product v^{0} · direction
multiplied by e
(in radians).
1e10
,
no rotation matrix is computed and this method returns
false
. Then out
does not
contain a valid rotation matrix and should be ignored.
This case happens when the growth direction
is (anti)parallel to the desired direction
of the tropism.
m
 transformation matrix from local to global coordinatesdirection
 direction of the tropism in global coordinatese
 strength of the tropismout
 the computed rotation matrix is placed in here (only
valid if the returned value is true
)
true
iff a rotation matrix has been computedpublic static boolean plot(Aggregate a, double x, double y)
public static boolean plot(Aggregate a, DoubleToDouble function, double x)
public static boolean plot(Aggregate a, IntToDouble function, int x)
public static boolean plotPoints(Aggregate a, double x, double y)
public static boolean positionalTropism(Matrix34d m, Tuple3d target, float e, Matrix4d out)
target
location. For the
details of computation, see directionalTropism(de.grogra.vecmath.Matrix34d, javax.vecmath.Tuple3d, float, javax.vecmath.Matrix4d)
,
where the direction
argument is the normalized
direction vector from the origin of the local coordinate system
(m.m03, m.m13, m.m23)
to target
.
target
, this method returns
false
. In this case, out
does not
contain a valid rotation matrix and should be ignored.
m
 transformation matrix from local to global coordinatestarget
 target location of the tropism in global coordinatese
 strength of the tropismout
 the computed rotation matrix is placed in here (only
valid if the returned value is true
)
true
iff a rotation matrix has been computedpublic static void print(boolean v)
v
to the XL console.
v
 value to be printedpublic static void print(char v)
v
to the XL console.
v
 value to be printedpublic static void print(double v)
v
to the XL console.
v
 value to be printedpublic static void print(float v)
v
to the XL console.
v
 value to be printedpublic static void print(int v)
v
to the XL console.
v
 value to be printedpublic static void print(long v)
v
to the XL console.
v
 value to be printedpublic static void print(java.lang.Object v)
v
to the XL console.
v
 an objectpublic static void println()
public static void println(boolean v)
v
to the XL console, then
terminates the line.
v
 value to be printedpublic static void println(char v)
v
to the XL console, then
terminates the line.
v
 value to be printedpublic static void println(double v)
v
to the XL console, then
terminates the line.
v
 value to be printedpublic static void println(float v)
v
to the XL console, then
terminates the line.
v
 value to be printedpublic static void println(int v)
v
to the XL console, then
terminates the line.
v
 value to be printedpublic static void println(long v)
v
to the XL console, then
terminates the line.
v
 value to be printedpublic static void println(java.lang.Object v)
v
to the XL console, then
terminates the line.
v
 an objectpublic static boolean probability(float p)
boolean
pseudorandom variable
whose probability for true
is p
.
p
 probability for true
setSeed(long)
public static float random(float min, float max)
min
and max
.
min
 minimal valuemax
 maximal value
min
and max
setSeed(long)
public static Vector3d randomDirection()
public static void range(DoubleConsumer consumer, double min, double max)
public static void range(DoubleConsumer consumer, double min, double max, int n)
public static Line ray(Tuple3d origin, Tuple3d direction)
Line
which represents a ray emanating at
origin
in the specified direction
. The
start
parameter of the line is set to 0, the
end
parameter is set to infinity.
origin
 origin of the raydirection
 direction of the ray
public static Reference reference(java.lang.String name)
Reference
instance which refers
to the object named name
. The list of objects
in GroIMP is available in the panel
"Object Explorers/Objects".
name
 name of object within GroIMP
Reference
referring to the named objectpublic static void removeInterpretiveNodes()
public static void removeLeaves(Node root, ObjectToBoolean<? super Node> filter)
filter
, starting at root
. A leaf is a node
which can be reached from the root
by traversing
branch
or successor
edges in forward direction and
which has no outgoing edge. If a node which passes filter
is no leaf initially, but becomes a leaf due to the removal of its
children, it is also removed itself. As a result, the graph finally
does not contain any leaves which pass filter
.
root
 root node of subgraph whose leaves shall be removedfilter
 only leaf nodes which pass this filter are removedpublic static void removeTransformationLeaves(Node root)
removeTransformationLeaves(Node, ObjectToBoolean)
).
root
 root node of subgraph whose leaves shall be removedremoveLeaves(de.grogra.graph.impl.Node, de.grogra.xl.lang.ObjectToBoolean)
public static void removeTransformationLeaves(Node root, ObjectToBoolean<? super Node> filter)
filter
,
starting at root
(see removeLeaves(de.grogra.graph.impl.Node, de.grogra.xl.lang.ObjectToBoolean)
).
A node is considered to be a pure transformation node if it has a
transformation attribute,
but no
shape attribute.
root
 root node of subgraph whose leaves shall be removedfilter
 only leaf nodes which pass this filter are removed.
If null
, all transformation nodes are consideredremoveLeaves(de.grogra.graph.impl.Node, de.grogra.xl.lang.ObjectToBoolean)
public static RGGGraph rggGraph()
public static int select(Aggregate a, Node value)
public static void setDerivationMode(int mode)
public static void setRandomTransform(Null target, Transform3D center, double sigma, double minX, double minY, double maxX, double maxY)
public static void setSeed(long seed)
Operators.getRandomGenerator()
within the current thread.
seed
 a seedpublic static void setStatus(java.lang.String text)
text
in the current status bar.
text
 a text to be displayedpublic static ShaderRef shader(java.lang.String name)
ShaderRef
instance which refers
to the shader named name
. The list of shaders
in GroIMP is available in the panel
"Object Explorers/3D/Shaders".
name
 name of shader within GroIMP
ShaderRef
referring to the named shaderpublic static short shortValue(Node w)
short
value which is wrapped
in w
if w
is an instance of
ShortNode
. Otherwise this method returns
0.
w
 a node
short
value, or 0public static Statistics statistics(Aggregate a, double value)
Statistics
object for a series of values a
.
a
 aggregate instance (provided by the XL compiler)value
 a value of the sequence of values
public static Node successor(Node n, ObjectToBoolean<? super Node> condition)
n
which fulfills
condition
. Successors are those nodes which can be reached by
traversing successor
edges forwards.
n
 a nodecondition
 a condition
condition
, or null
@Deprecated public static NURBSSurface Surface(BSplineCurve profile)
@Deprecated public static NURBSSurface Surface(BSplineCurveList profiles)
@Deprecated public static NURBSSurface Surface(BSplineCurve profile, java.lang.String name, boolean useRail)
@Deprecated public static NURBSSurface Surface(BSplineSurface surface)
@Deprecated public static NURBSSurface Surface(byte type)
@Deprecated public static NURBSSurface Surface(byte type, java.lang.String name, boolean useRail)
@Deprecated public static NURBSSurface Surface(float radius)
public static SurfaceRef surface(java.lang.String name)
SurfaceRef
instance which refers
to the surface named name
. The list of surfaces
in GroIMP is available in the panel
"Object Explorers/Math Objects/Surfaces".
name
 name of surface within GroIMP
SurfaceRef
referring to the named surfacepublic static <T> boolean synthesize(T root, ObjectToObjectGenerator<? super T,? extends T> generator, ObjectToBoolean<BooleanSynth<? super T>> synth)
root
defines the root of
the treelike structure, generator
is used to
obtain the children of a node, and synth
to compute
the value of the synthesized attribute at the current node,
where the values of its children have been computed previously
and are passed to synth
.
T
 the type of nodesroot
 root node of structuregenerator
 the generator is used to obtain the direct children
of the current nodesynth
 this function is used to compute the value of the
synthesized attribute at a node, given the values of its children
root
public static <T> byte synthesize(T root, ObjectToObjectGenerator<? super T,? extends T> generator, ObjectToByte<ByteSynth<? super T>> synth)
root
defines the root of
the treelike structure, generator
is used to
obtain the children of a node, and synth
to compute
the value of the synthesized attribute at the current node,
where the values of its children have been computed previously
and are passed to synth
.
T
 the type of nodesroot
 root node of structuregenerator
 the generator is used to obtain the direct children
of the current nodesynth
 this function is used to compute the value of the
synthesized attribute at a node, given the values of its children
root
public static <T> char synthesize(T root, ObjectToObjectGenerator<? super T,? extends T> generator, ObjectToChar<CharSynth<? super T>> synth)
root
defines the root of
the treelike structure, generator
is used to
obtain the children of a node, and synth
to compute
the value of the synthesized attribute at the current node,
where the values of its children have been computed previously
and are passed to synth
.
T
 the type of nodesroot
 root node of structuregenerator
 the generator is used to obtain the direct children
of the current nodesynth
 this function is used to compute the value of the
synthesized attribute at a node, given the values of its children
root
public static <T> double synthesize(T root, ObjectToObjectGenerator<? super T,? extends T> generator, ObjectToDouble<DoubleSynth<? super T>> synth)
root
defines the root of
the treelike structure, generator
is used to
obtain the children of a node, and synth
to compute
the value of the synthesized attribute at the current node,
where the values of its children have been computed previously
and are passed to synth
.
T
 the type of nodesroot
 root node of structuregenerator
 the generator is used to obtain the direct children
of the current nodesynth
 this function is used to compute the value of the
synthesized attribute at a node, given the values of its children
root
public static <T> float synthesize(T root, ObjectToObjectGenerator<? super T,? extends T> generator, ObjectToFloat<FloatSynth<? super T>> synth)
root
defines the root of
the treelike structure, generator
is used to
obtain the children of a node, and synth
to compute
the value of the synthesized attribute at the current node,
where the values of its children have been computed previously
and are passed to synth
.
T
 the type of nodesroot
 root node of structuregenerator
 the generator is used to obtain the direct children
of the current nodesynth
 this function is used to compute the value of the
synthesized attribute at a node, given the values of its children
root
public static <T> int synthesize(T root, ObjectToObjectGenerator<? super T,? extends T> generator, ObjectToInt<IntSynth<? super T>> synth)
root
defines the root of
the treelike structure, generator
is used to
obtain the children of a node, and synth
to compute
the value of the synthesized attribute at the current node,
where the values of its children have been computed previously
and are passed to synth
.
T
 the type of nodesroot
 root node of structuregenerator
 the generator is used to obtain the direct children
of the current nodesynth
 this function is used to compute the value of the
synthesized attribute at a node, given the values of its children
root
public static <T> long synthesize(T root, ObjectToObjectGenerator<? super T,? extends T> generator, ObjectToLong<LongSynth<? super T>> synth)
root
defines the root of
the treelike structure, generator
is used to
obtain the children of a node, and synth
to compute
the value of the synthesized attribute at the current node,
where the values of its children have been computed previously
and are passed to synth
.
T
 the type of nodesroot
 root node of structuregenerator
 the generator is used to obtain the direct children
of the current nodesynth
 this function is used to compute the value of the
synthesized attribute at a node, given the values of its children
root
public static <T,V> V synthesize(T root, ObjectToObjectGenerator<? super T,? extends T> generator, ObjectToObject<ObjectSynth<? super T,? super V>,? extends V> synth)
root
defines the root of
the treelike structure, generator
is used to
obtain the children of a node, and synth
to compute
the value of the synthesized attribute at the current node,
where the values of its children have been computed previously
and are passed to synth
.
T
 the type of nodesV
 the type of values of the synthesized attributeroot
 root node of structuregenerator
 the generator is used to obtain the direct children
of the current nodesynth
 this function is used to compute the value of the
synthesized attribute at a node, given the values of its children
root
public static <T> short synthesize(T root, ObjectToObjectGenerator<? super T,? extends T> generator, ObjectToShort<ShortSynth<? super T>> synth)
root
defines the root of
the treelike structure, generator
is used to
obtain the children of a node, and synth
to compute
the value of the synthesized attribute at the current node,
where the values of its children have been computed previously
and are passed to synth
.
T
 the type of nodesroot
 root node of structuregenerator
 the generator is used to obtain the direct children
of the current nodesynth
 this function is used to compute the value of the
synthesized attribute at a node, given the values of its children
root
public static Line toLine(Node node)
node
.
The central line starts at the location(Node)
of the node
and extends to the endlocation(Node)
of the node.
node
 a node
public static ObjectToDouble<double[]> toObjectToDouble(DoubleToDouble f)
public static Point3d toPoint3d(IntersectionList list)
list
, or null
if list
is empty.
The returned point may be modified.
list
 list of previously computed intersections
null
public static Point3d toPoint3d(Node node)
location(Node)
. This method is designed
as an autoconversion method.
node
 a node
node
's location in global coordinatespublic static Tuple3d toTuple3d(Node node)
public static Matrix34d transformation(Node node)
node
.
The returned matrix must not be modified.
node
 a node
public static Matrix34d transformation(Node node, boolean post)
node
.
If post
is false
, the transformation of
the node
itself is returned, otherwise the
transformation of its children. These may differ if node
induces a change of coordinates.
The returned matrix must not be modified.
node
 a nodepost
 true
iff the posttransformation (of the
node's children) shall be returned
public static Null tropism(Node a, Point3d target, float e)
a
 node containing original orientationtarget
 target location towards the tropism should orient toe
 strength of the tropism
positionalTropism(de.grogra.vecmath.Matrix34d, javax.vecmath.Tuple3d, float, javax.vecmath.Matrix4d)
public static Null tropism(Node a, Vector3d direction, float e)
a
 node containing original orientationdirection
 target direction towards the tropism should orient toe
 strength of the tropism
directionalTropism(de.grogra.vecmath.Matrix34d, javax.vecmath.Tuple3d, float, javax.vecmath.Matrix4d)
public static RGBAShader visualizeAsColor(double x)
x
which has to lie between 1 and 1. The color
is interpolated between green for 1, white for 0 and
red for 1.
x
 a value between 1 and 1
x
public static Volume volume(Node node)
node
. If node
has no shape, an empty
volume is returned.
node
 a node
node
's shapepublic static IMPWorkbench workbench()
Workbench
. This may return
null
.
null


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 