public static final class Parallelepiped.Builder extends Object
Parallelepiped
instances. Parallelepipeds are constructed
by transforming the vertices of a unit cube centered at the origin with a transform built from
the values configured here. The transformations applied are scaling, rotation,
and translation, in that order. When applied in this order, the scale factors determine
the width, height, and depth of the parallelepiped; the rotation determines the orientation; and the
translation determines the position of the center point.Modifier and Type | Method and Description |
---|---|
Parallelepiped |
build()
Build a new parallelepiped instance with the values configured in this builder.
|
Parallelepiped.Builder |
setPosition(Vector3D pos)
Set the center position of the created parallelepiped.
|
Parallelepiped.Builder |
setRotation(QuaternionRotation rot)
Set the rotation of the created parallelepiped.
|
Parallelepiped.Builder |
setScale(double scaleFactor)
Set the scaling for the created parallelepiped.
|
Parallelepiped.Builder |
setScale(double x,
double y,
double z)
Set the scaling for the created parallelepiped.
|
Parallelepiped.Builder |
setScale(Vector3D scaleFactors)
Set the scaling for the created parallelepiped.
|
public Parallelepiped.Builder setPosition(Vector3D pos)
pos
- center position of the created parallelepipedpublic Parallelepiped.Builder setScale(Vector3D scaleFactors)
scaleFactors
- scale factorspublic Parallelepiped.Builder setScale(double x, double y, double z)
x
- x scale factory
- y scale factorz
- z scale factorpublic Parallelepiped.Builder setScale(double scaleFactor)
scaleFactor
- scale factor for the x, y, and z directionspublic Parallelepiped.Builder setRotation(QuaternionRotation rot)
rot
- the rotation of the created parallelepipedpublic Parallelepiped build()
IllegalArgumentException
- if the length of any side of the parallelepiped is zero,
as determined by the configured precision contextParallelepiped.fromTransformedUnitCube(Transform, Precision.DoubleEquivalence)
Copyright © 2016–2021 The Apache Software Foundation. All rights reserved.