01_user_documentation:07_rgg_xl:02_xl:10_rgg_addition:04_operator_overload:volumes
Volumes
The operator and is overloaded for all de.grogra.vecmath.geom.Volume.
And
Volume & Volumecompute the intersection volume of the two.Line & Volumecompute the intersection between the line and the volume
Or
Volume | Volumecreates a CSGUnion object that holds both volumes.
This operator can be used with all classes that extends VolumeBase.
In
Tuple3d in Volumereturn true if the 3d coordinate as global are in the volume.
com
~volumecreates a complementary version of the volume. (inverted)
sub
volume - volumecreates the difference between the first volume and the second one. Meaning that the new volume covers all space that is in the first one but not in the second one.
example:
// import other compiled files (.rgg, .java, .xl) without subdirectory path. import parameters.*; import de.grogra.vecmath.geom.Volume; module A(float len) extends Sphere(0.5) { {setShader(GREEN);} } protected void init () [ Axiom ==> F(1,.2) A(parameters.length); ] public void run () { Volume v = volume(first((*A*))); v= v&volume(first((*F*))); Point3d p = new Point3d(0,0,0); println(p in v); println(p in ~v); }
01_user_documentation/07_rgg_xl/02_xl/10_rgg_addition/04_operator_overload/volumes.txt ยท Last modified: 2026/03/27 17:30 by Tim
