Uses of Class
raymarcher.Vector3
| Package | Description |
|---|---|
| raymarcher | |
| raymarcher.meshes |
-
Uses of Vector3 in raymarcher
Fields in raymarcher declared as Vector3 Modifier and Type Field Description private Vector3Camera. directionThe vector of the direction the camera is looking.private Vector3Ray. directionThe direction in which this ray will be castprivate Vector3Camera. positionThe position of the camera in 3D spaceprivate Vector3Ray. positionThe ray's starting positionprivate Vector3Camera. rightDirectionThe vector which represents the rightward direction of the cameraprivate Vector3Camera. upDirectionThe vector which represents the upwards direction for the camera, perpendicualr to the camera's looking directionMethods in raymarcher that return Vector3 Modifier and Type Method Description Vector3Vector3. abs()Returns the absolute value of the current vectorVector3Vector3. add(Vector3 v2)Gives the resultant of adding two vectors togetherVector3Vector3. addInPlace(Vector3 v2)Translates the current vector by adding a given vector to it.Vector3Vector3. clone()Clones the current vectorVector3Vector3. crossProduct(Vector3 v2)Gives the vector that results from the cross product of two vectors.Vector3Vector3. differenceVector(Vector3 v2)Gives the vector difference from the first vector to the second vector.Vector3Camera. getDirection()Vector3Ray. getDirection()Vector3Camera. getPosition()Vector3Ray. getPosition()Vector3Vector3. getUnitVector()Gives the unit vector for the current vector.Vector3Camera. getUpDirection()Vector3Vector3. multiply(double factor)Performs a scalar multiplication on the vector.Vector3Vector3. multiplyByVector(Vector3 factor)Multiplies each of the vector's components using scalar multiplication by their respective component in the factor vector.Vector3Vector3. projection(Vector3 v2)Gives the vector result of a projection of the first vector onto the second vectorVector3Vector3. rotateInPlaceX(double angle)Performs a Euler rotation on the current vector about the x-axis (Changes the current vector)Vector3Vector3. rotateInPlaceY(double angle)Performs a Euler rotation on the current vector about the y-axis (Changes the current vector)Vector3Vector3. rotateInPlaceZ(double angle)Performs a Euler rotation on the current vector about the z-axis (Changes the current vector)Vector3Vector3. rotateX(double angle)Give the result vector of a Euler rotation about the x-axisVector3Vector3. rotateY(double angle)Give the result vector of a Euler rotation about the y-axisVector3Vector3. rotateZ(double angle)Give the result vector of a Euler rotation about the z-axisVector3Vector3. scale(double factor)Scales the current vector by performing a scalar multiplication on it.Vector3Vector3. scaleByVector(Vector3 factor)Scales each of the current vector's components using scalar multiplication by their respective component in the factor vector.Vector3Vector3. subtract(Vector3 v2)Gives the resultant vector of subtracting two vectorsVector3Vector3. subtractInPlace(Vector3 v2)Translates the current vector by subtracting a given vector from it.Vector3Vector3. translate(double x, double y, double z)Translates the current vector by the given values (Changes the current vector)Methods in raymarcher with parameters of type Vector3 Modifier and Type Method Description Vector3Vector3. add(Vector3 v2)Gives the resultant of adding two vectors togetherVector3Vector3. addInPlace(Vector3 v2)Translates the current vector by adding a given vector to it.doubleVector3. angleBetween(Vector3 v2)Gives the angle between two vectors, in radians.Vector3Vector3. crossProduct(Vector3 v2)Gives the vector that results from the cross product of two vectors.Vector3Vector3. differenceVector(Vector3 v2)Gives the vector difference from the first vector to the second vector.doubleVector3. distance(Vector3 v2)Gives the distance between two points represented by vectorsdoubleVector3. dotProduct(Vector3 v2)Gives the dot product between two vectorsbooleanVector3. equals(Vector3 v2)Checks if two vectors are equal to each otherdoubleVector3. findFactor(Vector3 v2)Finds the factor by which a scalar multiplication must be applied to the first vector in order to get the passed vectorvoidCamera. move(Vector3 shift)Shift's the camera's position by a given vectorVector3Vector3. multiplyByVector(Vector3 factor)Multiplies each of the vector's components using scalar multiplication by their respective component in the factor vector.Vector3Vector3. projection(Vector3 v2)Gives the vector result of a projection of the first vector onto the second vectorvoidVector3. replace(Vector3 newVector)Replaces the current vector with the values of a new Vector (Changes the current vector)doubleVector3. scalarProjection(Vector3 v2)Gives the scalar projection of the first vector onto the second vector.Vector3Vector3. scaleByVector(Vector3 factor)Scales each of the current vector's components using scalar multiplication by their respective component in the factor vector.doubleMesh. sdf(Vector3 position)The signed distance function for the mesh, which tells the mesh's distance to a point in 3D spacedoubleMeshGroup.IntersectionGroup. sdf(Vector3 position)doubleMeshGroup. sdf(Vector3 position)doubleMeshGroup.SubtractGroup. sdf(Vector3 position)doubleMeshGroup.UnionGroup. sdf(Vector3 position)voidCamera. setDirection(Vector3 direction)voidRay. setDirection(Vector3 direction)voidCamera. setPosition(Vector3 position)voidRay. setPosition(Vector3 position)voidCamera. setUpDirection(Vector3 upDirection)Vector3Vector3. subtract(Vector3 v2)Gives the resultant vector of subtracting two vectorsVector3Vector3. subtractInPlace(Vector3 v2)Translates the current vector by subtracting a given vector from it.Constructors in raymarcher with parameters of type Vector3 Constructor Description Camera(Vector3 position, Vector3 direction, Vector3 upDirection, double screenDistance, Scene scene)Creates a camera in the given position and directionRay(Vector3 position, Vector3 direction, double renderDistance)Creates a ray with a given start position and directionVector3(Vector3 unitVector, double length)Creates a Vector3 in the direction of the given unit vector and with the given lentgh (magnitude) -
Uses of Vector3 in raymarcher.meshes
Fields in raymarcher.meshes declared as Vector3 Modifier and Type Field Description private Vector3Box. positionThe position of the box's centerprivate Vector3RoundedBox. positionThe position of the box's centerprivate Vector3Sphere. positionThe position of the sphere's centerprivate Vector3Torus. positionThe position of the mesh's centerprivate Vector3TriangularPrism. positionThe position of the triangular prismprivate Vector3Box. sizeA vector representing the box's dimensionsprivate Vector3RoundedBox. sizeA vector representing the box's dimensionsMethods in raymarcher.meshes that return Vector3 Modifier and Type Method Description Vector3Box. getPosition()Vector3RoundedBox. getPosition()Vector3Sphere. getPosition()Vector3Torus. getPosition()Vector3TriangularPrism. getPosition()Vector3Box. getSize()Vector3RoundedBox. getSize()Methods in raymarcher.meshes with parameters of type Vector3 Modifier and Type Method Description doubleBox. sdf(Vector3 position)doubleRoundedBox. sdf(Vector3 position)doubleSphere. sdf(Vector3 position)doubleTorus. sdf(Vector3 position)doubleTriangularPrism. sdf(Vector3 position)voidBox. setPosition(Vector3 position)voidRoundedBox. setPosition(Vector3 position)voidSphere. setPosition(Vector3 position)voidTorus. setPosition(Vector3 position)voidTriangularPrism. setPosition(Vector3 position)voidBox. setSize(Vector3 size)voidRoundedBox. setSize(Vector3 size)Constructors in raymarcher.meshes with parameters of type Vector3 Constructor Description Box(Vector3 position, Vector3 size, java.awt.Color meshColor)Create a box meshRoundedBox(Vector3 position, Vector3 size, double radius, java.awt.Color meshColor)Create a box mesh with rounded cornersSphere(Vector3 position, double radius, java.awt.Color meshColor)Create a sphere meshTorus(Vector3 position, double radius, double thickness, java.awt.Color meshColor)Create a torus meshTriangularPrism(Vector3 position, double height, double length, java.awt.Color meshColor)Create a triangular prism mesh