Package raymarcher
Class MeshGroup.IntersectionGroup
java.lang.Object
raymarcher.MeshGroup.IntersectionGroup
- All Implemented Interfaces:
Mesh
- Enclosing class:
- MeshGroup
public class MeshGroup.IntersectionGroup extends java.lang.Object implements Mesh
An inner class representing a mesh group made with the intersection operation
-
Field Summary
-
Constructor Summary
Constructors Constructor Description IntersectionGroup(Mesh mesh1, Mesh mesh2, java.awt.Color meshColor)
Creates a intersection between two meshes -
Method Summary
Modifier and Type Method Description java.awt.Color
getMeshColor()
Gives the mesh's colordouble
sdf(Vector3 position)
The signed distance function for the mesh, which tells the mesh's distance to a point in 3D spaceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
mesh1
The first mesh to be used for the operation in this mesh group -
mesh2
The second mesh to be used for the operation in this mesh group -
meshColor
private java.awt.Color meshColorThe color of the mesh group
-
-
Constructor Details
-
IntersectionGroup
Creates a intersection between two meshes- Parameters:
mesh1
- The first mesh to be used for the operation in this mesh groupmesh2
- The second mesh to be used for the operation in this mesh groupmeshColor
- The color of the mesh group
-
-
Method Details
-
getMeshColor
public java.awt.Color getMeshColor()Description copied from interface:Mesh
Gives the mesh's color- Specified by:
getMeshColor
in interfaceMesh
- Returns:
- The color of the mesh
-
sdf
Description copied from interface:Mesh
The signed distance function for the mesh, which tells the mesh's distance to a point in 3D space- Specified by:
sdf
in interfaceMesh
- Parameters:
position
- The vector representation of the position of the point to measure the distance to- Returns:
- The signed distance of the mesh to the point. Values > 0 indicate the point is outside the mesh, values = 0 are points on the surface, and values < 0 are points inside the mesh.
-