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

    Fields
    Modifier and Type Field Description
    private Mesh mesh1
    The first mesh to be used for the operation in this mesh group
    private Mesh mesh2
    The second mesh to be used for the operation in this mesh group
    private java.awt.Color meshColor
    The color of the mesh group
  • 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 color
    double sdf​(Vector3 position)
    The signed distance function for the mesh, which tells the mesh's distance to a point in 3D space

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • mesh1

      private Mesh mesh1
      The first mesh to be used for the operation in this mesh group
    • mesh2

      private Mesh mesh2
      The second mesh to be used for the operation in this mesh group
    • meshColor

      private java.awt.Color meshColor
      The color of the mesh group
  • Constructor Details

    • IntersectionGroup

      public IntersectionGroup​(Mesh mesh1, Mesh mesh2, java.awt.Color meshColor)
      Creates a intersection between two meshes
      Parameters:
      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 - 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 interface Mesh
      Returns:
      The color of the mesh
    • sdf

      public double sdf​(Vector3 position)
      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 interface Mesh
      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.