Top Description Inners Fields Constructors Methods
org.apache.commons.math3.geometry.euclidean.threed

public Class PolyhedronsSet

extends AbstractRegion<Euclidean3D, Euclidean2D>
Class Inheritance
Imports
java.util.ArrayList, .Arrays, .Collection, .List, org.apache.commons.math3.exception.MathIllegalArgumentException, .NumberIsTooSmallException, org.apache.commons.math3.exception.util.LocalizedFormats, org.apache.commons.math3.geometry.Point, org.apache.commons.math3.geometry.euclidean.oned.Euclidean1D, org.apache.commons.math3.geometry.euclidean.twod.Euclidean2D, .PolygonsSet, .SubLine, .Vector2D, org.apache.commons.math3.geometry.partitioning.AbstractRegion, .BSPTree, .BSPTreeVisitor, .BoundaryAttribute, .Hyperplane, .Region, .RegionFactory, .SubHyperplane, .Transform, org.apache.commons.math3.util.FastMath

This class represents a 3D region: a set of polyhedrons.
Since
3.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
PolyhedronsSet.FacetsContributionVisitor

Visitor computing geometrical properties.

private static class
PolyhedronsSet.RotationTransform

3D rotation as a Transform.

private static class
PolyhedronsSet.TranslationTransform

3D translation as a transform.

Field Summary

Modifier and TypeField and Description
private static final double
DEFAULT_TOLERANCE

Default value for tolerance.

Constructor Summary

AccessConstructor and Description
public
PolyhedronsSet(final double
tolerance below which points are considered identical
tolerance
)

Build a polyhedrons set representing the whole real line.

public
PolyhedronsSet(final BSPTree<Euclidean3D>
inside/outside BSP tree representing the region
tree
,
final double
tolerance below which points are considered identical
tolerance
)

Build a polyhedrons set from a BSP tree.

public
PolyhedronsSet(final Collection<SubHyperplane<Euclidean3D>>
collection of boundary elements, as a collection of SubHyperplane objects
boundary
,
final double
tolerance below which points are considered identical
tolerance
)

Build a polyhedrons set from a Boundary REPresentation (B-rep) specified by sub-hyperplanes.

public
PolyhedronsSet(final List<Vector3D>
list of polyhedrons set vertices
vertices
,
final List<int[]>
list of facets, as vertices indices in the vertices list
facets
,
final double
tolerance below which points are considered identical
tolerance
)

Build a polyhedrons set from a Boundary REPresentation (B-rep) specified by connected vertices.

public
PolyhedronsSet(final double
low bound along the x direction
xMin
,
final double
high bound along the x direction
xMax
,
final double
low bound along the y direction
yMin
,
final double
high bound along the y direction
yMax
,
final double
low bound along the z direction
zMin
,
final double
high bound along the z direction
zMax
,
final double
tolerance below which points are considered identical
tolerance
)

Build a parallellepipedic box.

public
PolyhedronsSet()
Deprecated as of 3.3, replaced with PolyhedronsSet(double)

Build a polyhedrons set representing the whole real line.

public
PolyhedronsSet(final BSPTree<Euclidean3D>
inside/outside BSP tree representing the region
tree
)
Deprecated as of 3.3, replaced with PolyhedronsSet(BSPTree, double)

Build a polyhedrons set from a BSP tree.

public
PolyhedronsSet(final Collection<SubHyperplane<Euclidean3D>>
collection of boundary elements, as a collection of SubHyperplane objects
boundary
)
Deprecated as of 3.3, replaced with PolyhedronsSet(Collection, double)

Build a polyhedrons set from a Boundary REPresentation (B-rep).

public
PolyhedronsSet(final double
low bound along the x direction
xMin
,
final double
high bound along the x direction
xMax
,
final double
low bound along the y direction
yMin
,
final double
high bound along the y direction
yMax
,
final double
low bound along the z direction
zMin
,
final double
high bound along the z direction
zMax
)

Build a parallellepipedic box.

Method Summary

Modifier and TypeMethod and Description
private SubHyperplane<Euclidean3D>

Returns:

the boundary facet this points belongs to (or null if it does not belong to any boundary facet)
boundaryFacet
(final Vector3D
point to check
point
,
final BSPTree<Euclidean3D>
node containing the boundary facet to check
node
)

Check if a point belongs to the boundary part of a node.

private static BSPTree<Euclidean3D>

Returns:

boundary tree
buildBoundary
(final double
low bound along the x direction
xMin
,
final double
high bound along the x direction
xMax
,
final double
low bound along the y direction
yMin
,
final double
high bound along the y direction
yMax
,
final double
low bound along the z direction
zMin
,
final double
high bound along the z direction
zMax
,
final double
tolerance below which points are considered identical
tolerance
)

Build a parallellepipedic box boundary.

private static List<SubHyperplane<Euclidean3D>>

Returns:

boundary as a list of sub-hyperplanes
buildBoundary
(final List<Vector3D>
list of polyhedrons set vertices
vertices
,
final List<int[]>
list of facets, as vertices indices in the vertices list
facets
,
final double
tolerance below which points are considered identical
tolerance
)

Build boundary from vertices and facets.

public PolyhedronsSet
buildNew(final BSPTree<Euclidean3D>
inside/outside BSP tree representing the new region
tree
)

Implements abstract org.apache.commons.math3.geometry.partitioning.AbstractRegion.buildNew.

Implements org.apache.commons.math3.geometry.partitioning.Region.buildNew.

Build a region using the instance as a prototype.

protected void
private static int[][]

Returns:

references array such that r[v][k] = f for some k if facet f contains vertex v
findReferences
(final List<Vector3D>
list of polyhedrons set vertices
vertices
,
final List<int[]>
list of facets, as vertices indices in the vertices list
facets
)

Find the facets that reference each edges.

public SubHyperplane<Euclidean3D>

Returns:

the first sub-hyperplane crossed by the line after the given point, or null if the line does not intersect any sub-hyperplane
firstIntersection
(final Vector3D
start point of the part of the line considered
point
,
final Line
line to consider (contains point)
line
)

Get the first sub-hyperplane crossed by a semi-infinite line.

private SubHyperplane<Euclidean3D>

Returns:

the first sub-hyperplane crossed by the line after the given point, or null if the line does not intersect any sub-hyperplane
recurseFirstIntersection
(final BSPTree<Euclidean3D>
current node
node
,
final Vector3D
start point of the part of the line considered
point
,
final Line
line to consider (contains point)
line
)

Get the first sub-hyperplane crossed by a semi-infinite line.

public PolyhedronsSet

Returns:

a new instance representing the rotated region
rotate
(final Vector3D
rotation center
center
,
final Rotation
vectorial rotation operator
rotation
)

Rotate the region around the specified point.

private static int[][]

Returns:

indices of vertices that follow vertex v in some facet (the array may contain extra entries at the end, set to negative indices)
successors
(final List<Vector3D>
list of polyhedrons set vertices
vertices
,
final List<int[]>
list of facets, as vertices indices in the vertices list
facets
,
final int[][]
facets references array
references
)

Find the successors of all vertices among all facets they belong to.

public PolyhedronsSet

Returns:

a new instance representing the translated region
translate
(final Vector3D
translation to apply
translation
)

Translate the region by the specified amount.

Inherited from org.apache.commons.math3.geometry.partitioning.AbstractRegion:
applyTransformcheckPointcheckPointcheckPointcheckPointcontainscopySelfgetBarycentergetBoundarySizegetSizegetTolerancegetTreeintersectionisEmptyisEmptyisFullisFullprojectToBoundarysetBarycentersetBarycentersetSizeside

Field Detail

DEFAULT_TOLERANCEback to summary
private static final double DEFAULT_TOLERANCE

Default value for tolerance.

Constructor Detail

PolyhedronsSetback to summary
public PolyhedronsSet(final double tolerance)

Build a polyhedrons set representing the whole real line.

Parameters
tolerance:double

tolerance below which points are considered identical

Since
3.3
PolyhedronsSetback to summary
public PolyhedronsSet(final BSPTree<Euclidean3D> tree, final double tolerance)

Build a polyhedrons set from a BSP tree.

The leaf nodes of the BSP tree must have a Boolean attribute representing the inside status of the corresponding cell (true for inside cells, false for outside cells). In order to avoid building too many small objects, it is recommended to use the predefined constants Boolean.TRUE and Boolean.FALSE

This constructor is aimed at expert use, as building the tree may be a difficult task. It is not intended for general use and for performances reasons does not check thoroughly its input, as this would require walking the full tree each time. Failing to provide a tree with the proper attributes, will therefore generate problems like NullPointerException or ClassCastException only later on. This limitation is known and explains why this constructor is for expert use only. The caller does have the responsibility to provided correct arguments.

Parameters
tree:BSPTree<Euclidean3D>

inside/outside BSP tree representing the region

tolerance:double

tolerance below which points are considered identical

Since
3.3
PolyhedronsSetback to summary
public PolyhedronsSet(final Collection<SubHyperplane<Euclidean3D>> boundary, final double tolerance)

Build a polyhedrons set from a Boundary REPresentation (B-rep) specified by sub-hyperplanes.

The boundary is provided as a collection of sub-hyperplanes. Each sub-hyperplane has the interior part of the region on its minus side and the exterior on its plus side.

The boundary elements can be in any order, and can form several non-connected sets (like for example polyhedrons with holes or a set of disjoint polyhedrons considered as a whole). In fact, the elements do not even need to be connected together (their topological connections are not used here). However, if the boundary does not really separate an inside open from an outside open (open having here its topological meaning), then subsequent calls to the checkPoint method will not be meaningful anymore.

If the boundary is empty, the region will represent the whole space.

Parameters
boundary:Collection<SubHyperplane<Euclidean3D>>

collection of boundary elements, as a collection of SubHyperplane objects

tolerance:double

tolerance below which points are considered identical

Since
3.3
PolyhedronsSetback to summary
public PolyhedronsSet(final List<Vector3D> vertices, final List<int[]> facets, final double tolerance)

Build a polyhedrons set from a Boundary REPresentation (B-rep) specified by connected vertices.

The boundary is provided as a list of vertices and a list of facets. Each facet is specified as an integer array containing the arrays vertices indices in the vertices list. Each facet normal is oriented by right hand rule to the facet vertices list.

Some basic sanity checks are performed but not everything is thoroughly assessed, so it remains under caller responsibility to ensure the vertices and facets are consistent and properly define a polyhedrons set.

Parameters
vertices:List<Vector3D>

list of polyhedrons set vertices

facets:List<int[]>

list of facets, as vertices indices in the vertices list

tolerance:double

tolerance below which points are considered identical

Exceptions
MathIllegalArgumentException:
if some basic sanity checks fail
Since
3.5
PolyhedronsSetback to summary
public PolyhedronsSet(final double xMin, final double xMax, final double yMin, final double yMax, final double zMin, final double zMax, final double tolerance)

Build a parallellepipedic box.

Parameters
xMin:double

low bound along the x direction

xMax:double

high bound along the x direction

yMin:double

low bound along the y direction

yMax:double

high bound along the y direction

zMin:double

low bound along the z direction

zMax:double

high bound along the z direction

tolerance:double

tolerance below which points are considered identical

Since
3.3
PolyhedronsSetback to summary
public PolyhedronsSet()

Deprecated

as of 3.3, replaced with PolyhedronsSet(double)

Build a polyhedrons set representing the whole real line.

Annotations
@Deprecated
PolyhedronsSetback to summary
public PolyhedronsSet(final BSPTree<Euclidean3D> tree)

Deprecated

as of 3.3, replaced with PolyhedronsSet(BSPTree, double)

Build a polyhedrons set from a BSP tree.

The leaf nodes of the BSP tree must have a Boolean attribute representing the inside status of the corresponding cell (true for inside cells, false for outside cells). In order to avoid building too many small objects, it is recommended to use the predefined constants Boolean.TRUE and Boolean.FALSE

Parameters
tree:BSPTree<Euclidean3D>

inside/outside BSP tree representing the region

Annotations
@Deprecated
PolyhedronsSetback to summary
public PolyhedronsSet(final Collection<SubHyperplane<Euclidean3D>> boundary)

Deprecated

as of 3.3, replaced with PolyhedronsSet(Collection, double)

Build a polyhedrons set from a Boundary REPresentation (B-rep).

The boundary is provided as a collection of sub-hyperplanes. Each sub-hyperplane has the interior part of the region on its minus side and the exterior on its plus side.

The boundary elements can be in any order, and can form several non-connected sets (like for example polyhedrons with holes or a set of disjoint polyhedrons considered as a whole). In fact, the elements do not even need to be connected together (their topological connections are not used here). However, if the boundary does not really separate an inside open from an outside open (open having here its topological meaning), then subsequent calls to the checkPoint method will not be meaningful anymore.

If the boundary is empty, the region will represent the whole space.

Parameters
boundary:Collection<SubHyperplane<Euclidean3D>>

collection of boundary elements, as a collection of SubHyperplane objects

Annotations
@Deprecated
PolyhedronsSetback to summary
public PolyhedronsSet(final double xMin, final double xMax, final double yMin, final double yMax, final double zMin, final double zMax)

Build a parallellepipedic box.

Parameters
xMin:double

low bound along the x direction

xMax:double

high bound along the x direction

yMin:double

low bound along the y direction

yMax:double

high bound along the y direction

zMin:double

low bound along the z direction

zMax:double

high bound along the z direction

Annotations
@Deprecated

Method Detail

boundaryFacetback to summary
private SubHyperplane<Euclidean3D> boundaryFacet(final Vector3D point, final BSPTree<Euclidean3D> node)

Check if a point belongs to the boundary part of a node.

Parameters
point:Vector3D

point to check

node:BSPTree<Euclidean3D>

node containing the boundary facet to check

Returns:SubHyperplane<Euclidean3D>

the boundary facet this points belongs to (or null if it does not belong to any boundary facet)

buildBoundaryback to summary
private static BSPTree<Euclidean3D> buildBoundary(final double xMin, final double xMax, final double yMin, final double yMax, final double zMin, final double zMax, final double tolerance)

Build a parallellepipedic box boundary.

Parameters
xMin:double

low bound along the x direction

xMax:double

high bound along the x direction

yMin:double

low bound along the y direction

yMax:double

high bound along the y direction

zMin:double

low bound along the z direction

zMax:double

high bound along the z direction

tolerance:double

tolerance below which points are considered identical

Returns:BSPTree<Euclidean3D>

boundary tree

Since
3.3
buildBoundaryback to summary
private static List<SubHyperplane<Euclidean3D>> buildBoundary(final List<Vector3D> vertices, final List<int[]> facets, final double tolerance)

Build boundary from vertices and facets.

Parameters
vertices:List<Vector3D>

list of polyhedrons set vertices

facets:List<int[]>

list of facets, as vertices indices in the vertices list

tolerance:double

tolerance below which points are considered identical

Returns:List<SubHyperplane<Euclidean3D>>

boundary as a list of sub-hyperplanes

Exceptions
MathIllegalArgumentException:
if some basic sanity checks fail
Since
3.5
buildNewback to summary
public PolyhedronsSet buildNew(final BSPTree<Euclidean3D> tree)

Implements abstract org.apache.commons.math3.geometry.partitioning.AbstractRegion.buildNew.

Implements org.apache.commons.math3.geometry.partitioning.Region.buildNew.

Doc from org.apache.commons.math3.geometry.partitioning.AbstractRegion.buildNew.

Build a region using the instance as a prototype.

This method allow to create new instances without knowing exactly the type of the region. It is an application of the prototype design pattern.

The leaf nodes of the BSP tree must have a Boolean attribute representing the inside status of the corresponding cell (true for inside cells, false for outside cells). In order to avoid building too many small objects, it is recommended to use the predefined constants Boolean.TRUE and Boolean.FALSE. The tree also must have either null internal nodes or internal nodes representing the boundary as specified in the getTree method).

Parameters
tree:BSPTree<Euclidean3D>

Doc from org.apache.commons.math3.geometry.partitioning.Region.buildNew.

inside/outside BSP tree representing the new region

Returns:PolyhedronsSet

Doc from org.apache.commons.math3.geometry.partitioning.Region.buildNew.

the built region

Annotations
@Override
computeGeometricalPropertiesback to summary
protected void computeGeometricalProperties()

Implements abstract org.apache.commons.math3.geometry.partitioning.AbstractRegion.computeGeometricalProperties.

Doc from org.apache.commons.math3.geometry.partitioning.AbstractRegion.computeGeometricalProperties.

Compute some geometrical properties.

The properties to compute are the barycenter and the size.

Annotations
@Override
findReferencesback to summary
private static int[][] findReferences(final List<Vector3D> vertices, final List<int[]> facets)

Find the facets that reference each edges.

Parameters
vertices:List<Vector3D>

list of polyhedrons set vertices

facets:List<int[]>

list of facets, as vertices indices in the vertices list

Returns:int[][]

references array such that r[v][k] = f for some k if facet f contains vertex v

Exceptions
MathIllegalArgumentException:
if some facets have fewer than 3 vertices
Since
3.5
firstIntersectionback to summary
public SubHyperplane<Euclidean3D> firstIntersection(final Vector3D point, final Line line)

Get the first sub-hyperplane crossed by a semi-infinite line.

Parameters
point:Vector3D

start point of the part of the line considered

line:Line

line to consider (contains point)

Returns:SubHyperplane<Euclidean3D>

the first sub-hyperplane crossed by the line after the given point, or null if the line does not intersect any sub-hyperplane

recurseFirstIntersectionback to summary
private SubHyperplane<Euclidean3D> recurseFirstIntersection(final BSPTree<Euclidean3D> node, final Vector3D point, final Line line)

Get the first sub-hyperplane crossed by a semi-infinite line.

Parameters
node:BSPTree<Euclidean3D>

current node

point:Vector3D

start point of the part of the line considered

line:Line

line to consider (contains point)

Returns:SubHyperplane<Euclidean3D>

the first sub-hyperplane crossed by the line after the given point, or null if the line does not intersect any sub-hyperplane

rotateback to summary
public PolyhedronsSet rotate(final Vector3D center, final Rotation rotation)

Rotate the region around the specified point.

The instance is not modified, a new instance is created.

Parameters
center:Vector3D

rotation center

rotation:Rotation

vectorial rotation operator

Returns:PolyhedronsSet

a new instance representing the rotated region

successorsback to summary
private static int[][] successors(final List<Vector3D> vertices, final List<int[]> facets, final int[][] references)

Find the successors of all vertices among all facets they belong to.

Parameters
vertices:List<Vector3D>

list of polyhedrons set vertices

facets:List<int[]>

list of facets, as vertices indices in the vertices list

references:int[][]

facets references array

Returns:int[][]

indices of vertices that follow vertex v in some facet (the array may contain extra entries at the end, set to negative indices)

Exceptions
MathIllegalArgumentException:
if the same vertex appears more than once in the successors list (which means one facet orientation is wrong)
Since
3.5
translateback to summary
public PolyhedronsSet translate(final Vector3D translation)

Translate the region by the specified amount.

The instance is not modified, a new instance is created.

Parameters
translation:Vector3D

translation to apply

Returns:PolyhedronsSet

a new instance representing the translated region

org.apache.commons.math3.geometry.euclidean.threed back to summary

private Class PolyhedronsSet.FacetsContributionVisitor

extends Object
implements BSPTreeVisitor<Euclidean3D>
Class Inheritance
  • java.lang.Object
  • org.apache.commons.math3.geometry.euclidean.threed.PolyhedronsSet.FacetsContributionVisitor
All Implemented Interfaces
org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor

Visitor computing geometrical properties.

Constructor Summary

AccessConstructor and Description
pack-priv
FacetsContributionVisitor()

Simple constructor.

Method Summary

Modifier and TypeMethod and Description
private void
addContribution(final SubHyperplane<Euclidean3D>
boundary facet
facet
,
final boolean
if true, the facet has the inside on its plus side
reversed
)

Add he contribution of a boundary facet.

public void
visitInternalNode(final BSPTree<Euclidean3D>
BSP node guaranteed to have a non null cut sub-hyperplane
node
)

Implements org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor.visitInternalNode.

Visit a BSP tree node node having a non-null sub-hyperplane.

public void
visitLeafNode(final BSPTree<Euclidean3D>
leaf BSP node having a null sub-hyperplane
node
)

Implements org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor.visitLeafNode.

Visit a leaf BSP tree node node having a null sub-hyperplane.

public BSPTreeVisitor.Order
visitOrder(final BSPTree<Euclidean3D>
BSP node guaranteed to have a non null cut sub-hyperplane
node
)

Implements org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor.visitOrder.

Determine the visit order for this node.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

FacetsContributionVisitorback to summary
pack-priv FacetsContributionVisitor()

Simple constructor.

Method Detail

addContributionback to summary
private void addContribution(final SubHyperplane<Euclidean3D> facet, final boolean reversed)

Add he contribution of a boundary facet.

Parameters
facet:SubHyperplane<Euclidean3D>

boundary facet

reversed:boolean

if true, the facet has the inside on its plus side

visitInternalNodeback to summary
public void visitInternalNode(final BSPTree<Euclidean3D> node)

Implements org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor.visitInternalNode.

Doc from org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor.visitInternalNode.

Visit a BSP tree node node having a non-null sub-hyperplane.

It is guaranteed that this method will be called after visitOrder has been called for a given node, it wil be called exactly once for each internal node.

Parameters
node:BSPTree<Euclidean3D>

BSP node guaranteed to have a non null cut sub-hyperplane

visitLeafNodeback to summary
public void visitLeafNode(final BSPTree<Euclidean3D> node)

Implements org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor.visitLeafNode.

Doc from org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor.visitLeafNode.

Visit a leaf BSP tree node node having a null sub-hyperplane.

Parameters
node:BSPTree<Euclidean3D>

leaf BSP node having a null sub-hyperplane

visitOrderback to summary
public BSPTreeVisitor.Order visitOrder(final BSPTree<Euclidean3D> node)

Implements org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor.visitOrder.

Doc from org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor.visitOrder.

Determine the visit order for this node.

Before attempting to visit an internal node, this method is called to determine the desired ordering of the visit. It is guaranteed that this method will be called before visitInternalNode for a given node, it will be called exactly once for each internal node.

Parameters
node:BSPTree<Euclidean3D>

BSP node guaranteed to have a non null cut sub-hyperplane

Returns:BSPTreeVisitor.Order

desired visit order, must be one of Order#PLUS_MINUS_SUB, Order#PLUS_SUB_MINUS, Order#MINUS_PLUS_SUB, Order#MINUS_SUB_PLUS, Order#SUB_PLUS_MINUS, Order#SUB_MINUS_PLUS

org.apache.commons.math3.geometry.euclidean.threed back to summary

private Class PolyhedronsSet.RotationTransform

extends Object
implements Transform<Euclidean3D, Euclidean2D>
Class Inheritance
  • java.lang.Object
  • org.apache.commons.math3.geometry.euclidean.threed.PolyhedronsSet.RotationTransform
All Implemented Interfaces
org.apache.commons.math3.geometry.partitioning.Transform

3D rotation as a Transform.

Field Summary

Modifier and TypeField and Description
private Plane
cachedOriginal

Cached original hyperplane.

private Transform<Euclidean2D, Euclidean1D>
cachedTransform

Cached 2D transform valid inside the cached original hyperplane.

private Vector3D
center

Center point of the rotation.

private Rotation
rotation

Vectorial rotation.

Constructor Summary

AccessConstructor and Description
pack-priv
RotationTransform(final Vector3D
center point of the rotation
center
,
final Rotation
vectorial rotation
rotation
)

Build a rotation transform.

Method Summary

Modifier and TypeMethod and Description
public Vector3D
apply(final Point<Euclidean3D>
point to transform
point
)

Implements org.apache.commons.math3.geometry.partitioning.Transform.apply.

Transform a point of a space.

public Plane
apply(final Hyperplane<Euclidean3D>
hyperplane to transform
hyperplane
)

Implements org.apache.commons.math3.geometry.partitioning.Transform.apply.

Transform an hyperplane of a space.

public SubHyperplane<Euclidean2D>
apply(final SubHyperplane<Euclidean2D>
sub-hyperplane to transform
sub
,
final Hyperplane<Euclidean3D>
hyperplane in which the sub-hyperplane is defined (this is the original hyperplane, the transform has not been applied to it)
original
,
final Hyperplane<Euclidean3D>
hyperplane in which the sub-hyperplane is defined (this is the transformed hyperplane, the transform has been applied to it)
transformed
)

Implements org.apache.commons.math3.geometry.partitioning.Transform.apply.

Transform a sub-hyperplane embedded in an hyperplane.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cachedOriginalback to summary
private Plane cachedOriginal

Cached original hyperplane.

cachedTransformback to summary
private Transform<Euclidean2D, Euclidean1D> cachedTransform

Cached 2D transform valid inside the cached original hyperplane.

centerback to summary
private Vector3D center

Center point of the rotation.

rotationback to summary
private Rotation rotation

Vectorial rotation.

Constructor Detail

RotationTransformback to summary
pack-priv RotationTransform(final Vector3D center, final Rotation rotation)

Build a rotation transform.

Parameters
center:Vector3D

center point of the rotation

rotation:Rotation

vectorial rotation

Method Detail

applyback to summary
public Vector3D apply(final Point<Euclidean3D> point)

Implements org.apache.commons.math3.geometry.partitioning.Transform.apply.

Doc from org.apache.commons.math3.geometry.partitioning.Transform.apply.

Transform a point of a space.

Parameters
point:Point<Euclidean3D>

point to transform

Returns:Vector3D

a new object representing the transformed point

applyback to summary
public Plane apply(final Hyperplane<Euclidean3D> hyperplane)

Implements org.apache.commons.math3.geometry.partitioning.Transform.apply.

Doc from org.apache.commons.math3.geometry.partitioning.Transform.apply.

Transform an hyperplane of a space.

Parameters
hyperplane:Hyperplane<Euclidean3D>

hyperplane to transform

Returns:Plane

a new object representing the transformed hyperplane

applyback to summary
public SubHyperplane<Euclidean2D> apply(final SubHyperplane<Euclidean2D> sub, final Hyperplane<Euclidean3D> original, final Hyperplane<Euclidean3D> transformed)

Implements org.apache.commons.math3.geometry.partitioning.Transform.apply.

Doc from org.apache.commons.math3.geometry.partitioning.Transform.apply.

Transform a sub-hyperplane embedded in an hyperplane.

Parameters
sub:SubHyperplane<Euclidean2D>

sub-hyperplane to transform

original:Hyperplane<Euclidean3D>

hyperplane in which the sub-hyperplane is defined (this is the original hyperplane, the transform has not been applied to it)

transformed:Hyperplane<Euclidean3D>

hyperplane in which the sub-hyperplane is defined (this is the transformed hyperplane, the transform has been applied to it)

Returns:SubHyperplane<Euclidean2D>

a new object representing the transformed sub-hyperplane

org.apache.commons.math3.geometry.euclidean.threed back to summary

private Class PolyhedronsSet.TranslationTransform

extends Object
implements Transform<Euclidean3D, Euclidean2D>
Class Inheritance
  • java.lang.Object
  • org.apache.commons.math3.geometry.euclidean.threed.PolyhedronsSet.TranslationTransform
All Implemented Interfaces
org.apache.commons.math3.geometry.partitioning.Transform

3D translation as a transform.

Field Summary

Modifier and TypeField and Description
private Plane
cachedOriginal

Cached original hyperplane.

private Transform<Euclidean2D, Euclidean1D>
cachedTransform

Cached 2D transform valid inside the cached original hyperplane.

private Vector3D
translation

Translation vector.

Constructor Summary

AccessConstructor and Description
pack-priv
TranslationTransform(final Vector3D
translation vector
translation
)

Build a translation transform.

Method Summary

Modifier and TypeMethod and Description
public Vector3D
apply(final Point<Euclidean3D>
point to transform
point
)

Implements org.apache.commons.math3.geometry.partitioning.Transform.apply.

Transform a point of a space.

public Plane
apply(final Hyperplane<Euclidean3D>
hyperplane to transform
hyperplane
)

Implements org.apache.commons.math3.geometry.partitioning.Transform.apply.

Transform an hyperplane of a space.

public SubHyperplane<Euclidean2D>
apply(final SubHyperplane<Euclidean2D>
sub-hyperplane to transform
sub
,
final Hyperplane<Euclidean3D>
hyperplane in which the sub-hyperplane is defined (this is the original hyperplane, the transform has not been applied to it)
original
,
final Hyperplane<Euclidean3D>
hyperplane in which the sub-hyperplane is defined (this is the transformed hyperplane, the transform has been applied to it)
transformed
)

Implements org.apache.commons.math3.geometry.partitioning.Transform.apply.

Transform a sub-hyperplane embedded in an hyperplane.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cachedOriginalback to summary
private Plane cachedOriginal

Cached original hyperplane.

cachedTransformback to summary
private Transform<Euclidean2D, Euclidean1D> cachedTransform

Cached 2D transform valid inside the cached original hyperplane.

translationback to summary
private Vector3D translation

Translation vector.

Constructor Detail

TranslationTransformback to summary
pack-priv TranslationTransform(final Vector3D translation)

Build a translation transform.

Parameters
translation:Vector3D

translation vector

Method Detail

applyback to summary
public Vector3D apply(final Point<Euclidean3D> point)

Implements org.apache.commons.math3.geometry.partitioning.Transform.apply.

Doc from org.apache.commons.math3.geometry.partitioning.Transform.apply.

Transform a point of a space.

Parameters
point:Point<Euclidean3D>

point to transform

Returns:Vector3D

a new object representing the transformed point

applyback to summary
public Plane apply(final Hyperplane<Euclidean3D> hyperplane)

Implements org.apache.commons.math3.geometry.partitioning.Transform.apply.

Doc from org.apache.commons.math3.geometry.partitioning.Transform.apply.

Transform an hyperplane of a space.

Parameters
hyperplane:Hyperplane<Euclidean3D>

hyperplane to transform

Returns:Plane

a new object representing the transformed hyperplane

applyback to summary
public SubHyperplane<Euclidean2D> apply(final SubHyperplane<Euclidean2D> sub, final Hyperplane<Euclidean3D> original, final Hyperplane<Euclidean3D> transformed)

Implements org.apache.commons.math3.geometry.partitioning.Transform.apply.

Doc from org.apache.commons.math3.geometry.partitioning.Transform.apply.

Transform a sub-hyperplane embedded in an hyperplane.

Parameters
sub:SubHyperplane<Euclidean2D>

sub-hyperplane to transform

original:Hyperplane<Euclidean3D>

hyperplane in which the sub-hyperplane is defined (this is the original hyperplane, the transform has not been applied to it)

transformed:Hyperplane<Euclidean3D>

hyperplane in which the sub-hyperplane is defined (this is the transformed hyperplane, the transform has been applied to it)

Returns:SubHyperplane<Euclidean2D>

a new object representing the transformed sub-hyperplane