User Tools

Site Tools


01_user_documentation:07_rgg_xl:02_xl:10_rgg_addition:04_operator_overload:volumes

This is an old revision of the document!


Table of Contents

Volumes

The operator and is overloaded for all de.grogra.vecmath.geom.Volume.

And

  • Volume & Volume compute the intersection volume of the two.
  • Line & Volume compute the intersection between the line and the volume

Or

  • Volume | Volume creates a CSGUnion object that holds both volumes.

This operator can be used with all classes that extends VolumeBase.

In

  • Tuple3d in Volume return true if the 3d coordinate as global are in the volume.

com

  • ~volume creates a complementary version of the volume.
// 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.1774628793.txt.gz ยท Last modified: 2026/03/27 17:26 by Tim