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 Vector3
Camera. direction
The vector of the direction the camera is looking.private Vector3
Ray. direction
The direction in which this ray will be castprivate Vector3
Camera. position
The position of the camera in 3D spaceprivate Vector3
Ray. position
The ray's starting positionprivate Vector3
Camera. rightDirection
The vector which represents the rightward direction of the cameraprivate Vector3
Camera. upDirection
The 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 Vector3
Vector3. abs()
Returns the absolute value of the current vectorVector3
Vector3. add(Vector3 v2)
Gives the resultant of adding two vectors togetherVector3
Vector3. addInPlace(Vector3 v2)
Translates the current vector by adding a given vector to it.Vector3
Vector3. clone()
Clones the current vectorVector3
Vector3. crossProduct(Vector3 v2)
Gives the vector that results from the cross product of two vectors.Vector3
Vector3. differenceVector(Vector3 v2)
Gives the vector difference from the first vector to the second vector.Vector3
Camera. getDirection()
Vector3
Ray. getDirection()
Vector3
Camera. getPosition()
Vector3
Ray. getPosition()
Vector3
Vector3. getUnitVector()
Gives the unit vector for the current vector.Vector3
Camera. getUpDirection()
Vector3
Vector3. multiply(double factor)
Performs a scalar multiplication on the vector.Vector3
Vector3. multiplyByVector(Vector3 factor)
Multiplies each of the vector's components using scalar multiplication by their respective component in the factor vector.Vector3
Vector3. projection(Vector3 v2)
Gives the vector result of a projection of the first vector onto the second vectorVector3
Vector3. rotateInPlaceX(double angle)
Performs a Euler rotation on the current vector about the x-axis (Changes the current vector)Vector3
Vector3. rotateInPlaceY(double angle)
Performs a Euler rotation on the current vector about the y-axis (Changes the current vector)Vector3
Vector3. rotateInPlaceZ(double angle)
Performs a Euler rotation on the current vector about the z-axis (Changes the current vector)Vector3
Vector3. rotateX(double angle)
Give the result vector of a Euler rotation about the x-axisVector3
Vector3. rotateY(double angle)
Give the result vector of a Euler rotation about the y-axisVector3
Vector3. rotateZ(double angle)
Give the result vector of a Euler rotation about the z-axisVector3
Vector3. scale(double factor)
Scales the current vector by performing a scalar multiplication on it.Vector3
Vector3. scaleByVector(Vector3 factor)
Scales each of the current vector's components using scalar multiplication by their respective component in the factor vector.Vector3
Vector3. subtract(Vector3 v2)
Gives the resultant vector of subtracting two vectorsVector3
Vector3. subtractInPlace(Vector3 v2)
Translates the current vector by subtracting a given vector from it.Vector3
Vector3. 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 Vector3
Vector3. add(Vector3 v2)
Gives the resultant of adding two vectors togetherVector3
Vector3. addInPlace(Vector3 v2)
Translates the current vector by adding a given vector to it.double
Vector3. angleBetween(Vector3 v2)
Gives the angle between two vectors, in radians.Vector3
Vector3. crossProduct(Vector3 v2)
Gives the vector that results from the cross product of two vectors.Vector3
Vector3. differenceVector(Vector3 v2)
Gives the vector difference from the first vector to the second vector.double
Vector3. distance(Vector3 v2)
Gives the distance between two points represented by vectorsdouble
Vector3. dotProduct(Vector3 v2)
Gives the dot product between two vectorsboolean
Vector3. equals(Vector3 v2)
Checks if two vectors are equal to each otherdouble
Vector3. findFactor(Vector3 v2)
Finds the factor by which a scalar multiplication must be applied to the first vector in order to get the passed vectorvoid
Camera. move(Vector3 shift)
Shift's the camera's position by a given vectorVector3
Vector3. multiplyByVector(Vector3 factor)
Multiplies each of the vector's components using scalar multiplication by their respective component in the factor vector.Vector3
Vector3. projection(Vector3 v2)
Gives the vector result of a projection of the first vector onto the second vectorvoid
Vector3. replace(Vector3 newVector)
Replaces the current vector with the values of a new Vector (Changes the current vector)double
Vector3. scalarProjection(Vector3 v2)
Gives the scalar projection of the first vector onto the second vector.Vector3
Vector3. scaleByVector(Vector3 factor)
Scales each of the current vector's components using scalar multiplication by their respective component in the factor vector.double
Mesh. sdf(Vector3 position)
The signed distance function for the mesh, which tells the mesh's distance to a point in 3D spacedouble
MeshGroup.IntersectionGroup. sdf(Vector3 position)
double
MeshGroup. sdf(Vector3 position)
double
MeshGroup.SubtractGroup. sdf(Vector3 position)
double
MeshGroup.UnionGroup. sdf(Vector3 position)
void
Camera. setDirection(Vector3 direction)
void
Ray. setDirection(Vector3 direction)
void
Camera. setPosition(Vector3 position)
void
Ray. setPosition(Vector3 position)
void
Camera. setUpDirection(Vector3 upDirection)
Vector3
Vector3. subtract(Vector3 v2)
Gives the resultant vector of subtracting two vectorsVector3
Vector3. 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 Vector3
Box. position
The position of the box's centerprivate Vector3
RoundedBox. position
The position of the box's centerprivate Vector3
Sphere. position
The position of the sphere's centerprivate Vector3
Torus. position
The position of the mesh's centerprivate Vector3
TriangularPrism. position
The position of the triangular prismprivate Vector3
Box. size
A vector representing the box's dimensionsprivate Vector3
RoundedBox. size
A vector representing the box's dimensionsMethods in raymarcher.meshes that return Vector3 Modifier and Type Method Description Vector3
Box. getPosition()
Vector3
RoundedBox. getPosition()
Vector3
Sphere. getPosition()
Vector3
Torus. getPosition()
Vector3
TriangularPrism. getPosition()
Vector3
Box. getSize()
Vector3
RoundedBox. getSize()
Methods in raymarcher.meshes with parameters of type Vector3 Modifier and Type Method Description double
Box. sdf(Vector3 position)
double
RoundedBox. sdf(Vector3 position)
double
Sphere. sdf(Vector3 position)
double
Torus. sdf(Vector3 position)
double
TriangularPrism. sdf(Vector3 position)
void
Box. setPosition(Vector3 position)
void
RoundedBox. setPosition(Vector3 position)
void
Sphere. setPosition(Vector3 position)
void
Torus. setPosition(Vector3 position)
void
TriangularPrism. setPosition(Vector3 position)
void
Box. setSize(Vector3 size)
void
RoundedBox. 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