java.lang.Object
org.bzdev.p3d.P3d.Rectangle
- Enclosing class:
- P3d
Class containing static methods for adding rectangles.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Model3DOps.Triangle,
M extends Model3DOps<T>>
voidaddFlippedH
(M m3d, double z, double x1, double y1, double x3, double y3) Add a "flipped" rectangle whose sides are horizontal.static <T extends Model3DOps.Triangle,
M extends Model3DOps<T>>
voidaddFlippedH
(M m3d, double z, double x1, double y1, double x3, double y3, Color color) Add a "flipped" rectangle whose sides are horizontal, given a Color.static <T extends Model3DOps.Triangle,
M extends Model3DOps<T>>
voidaddFlippedH
(M m3d, double z, double x1, double y1, double x3, double y3, Color color, Object tag) Add a "flipped" rectangle whose sides are horizontal, given a color and tag.static <T extends Model3DOps.Triangle,
M extends Model3DOps<T>>
voidaddFlippedV
(M m3d, double x1, double y1, double z1, double x3, double y3, double z3) Add a "flipped" rectangle whose sides are either vertical.static <T extends Model3DOps.Triangle,
M extends Model3DOps<T>>
voidaddFlippedV
(M m3d, double x1, double y1, double z1, double x3, double y3, double z3, Color color) Add a "flipped" rectangle whose sides are either vertical, given a Color.static <T extends Model3DOps.Triangle,
M extends Model3DOps<T>>
voidaddFlippedV
(M m3d, double x1, double y1, double z1, double x3, double y3, double z3, Color color, Object tag) Add a "flipped" rectangle whose sides are either vertical, given a color and tag.static <T extends Model3DOps.Triangle,
M extends Model3DOps<T>>
voidaddH
(M m3d, double z, double x1, double y1, double x3, double y3) Add a rectangle whose sides are horizontal.static <T extends Model3DOps.Triangle,
M extends Model3DOps<T>>
voidAdd a rectangle whose sides are horizontal, given a Color.static <T extends Model3DOps.Triangle,
M extends Model3DOps<T>>
voidAdd a rectangle whose sides are horizontal, given a color and tag.static <T extends Model3DOps.Triangle,
M extends Model3DOps<T>>
voidaddV
(M m3d, double x1, double y1, double z1, double x3, double y3, double z3) Add a rectangle whose sides are vertical.static <T extends Model3DOps.Triangle,
M extends Model3DOps<T>>
voidAdd a rectangle whose sides are vertical, given a Color.static <T extends Model3DOps.Triangle,
M extends Model3DOps<T>>
voidaddV
(M m3d, double x1, double y1, double z1, double x3, double y3, double z3, Color color, Object tag) Add a rectangle whose sides are vertical, given a color and tag.
-
Constructor Details
-
Rectangle
public Rectangle()
-
-
Method Details
-
addV
public static <T extends Model3DOps.Triangle,M extends Model3DOps<T>> void addV(M m3d, double x1, double y1, double z1, double x3, double y3, double z3) Add a rectangle whose sides are vertical. The vertices are numbered 1 to 4, traversed counterclockwise when looking at the side of the rectangle that will be on the outside of a closed manifold. The order of the vertices is(x1,y1,z1)---->(x3,y3,z1)---->(x3,y3,z3)---->(x1,y1,z3),
circling the normal vector in the counterclockwise direction when viewed from the direction the normal vector points and corresponding to the use of a right-hand rule for determining the direction of the normal vector.- Type Parameters:
T
- the type of an implementation ofModel3DOps.Triangle
M
- the type of an implementation ofModel3DOps<T>
- Parameters:
m3d
- the model to which the rectangle should be added.x1
- the x coordinate of the first vertex.y1
- the y coordinate of the first vertex.z1
- the z coordinate of the first vertex.x3
- the x coordinate of the third vertex.y3
- the y coordinate of the third vertex.z3
- the z coordinate of the third vertex.
-
addFlippedV
public static <T extends Model3DOps.Triangle,M extends Model3DOps<T>> void addFlippedV(M m3d, double x1, double y1, double z1, double x3, double y3, double z3) Add a "flipped" rectangle whose sides are either vertical. The vertices are numbered 1 to 4, traversed counterclockwise when looking at the side of the rectangle that will be on the inside of a closed manifold. The order of the vertices is(x1,y1,z1)---->(x3,y3,z1)---->(x3,y3,z3)---->(z1,y1,z3),
circling the normal vector in the clockwise direction when viewed from the direction the normal vector points.Flipped rectangles are useful when paired with one that is not flipped, as most of the arguments will be the same.
- Type Parameters:
T
- the type of an implementation ofModel3DOps.Triangle
M
- the type of an implementation ofModel3DOps<T>
- Parameters:
m3d
- the model to which the rectangle should be added.x1
- the x coordinate of the first vertex.y1
- the y coordinate of the first vertex.z1
- the z coordinate of the first vertex.x3
- the x coordinate of the third vertex.y3
- the y coordinate of the third vertex.z3
- the z coordinate of the third vertex.
-
addH
public static <T extends Model3DOps.Triangle,M extends Model3DOps<T>> void addH(M m3d, double z, double x1, double y1, double x3, double y3) Add a rectangle whose sides are horizontal. The vertices are numbered 1 to 4, traversed counterclockwise when looking at the side of the rectangle that will be on the outside of a closed manifold. The order in which the vertices are traversed is(x1, y1, z)---->(x3,y1,z)---->(x3,y3,z)---->(x1,y3,z)
- Type Parameters:
T
- the type of an implementation ofModel3DOps.Triangle
M
- the type of an implementation ofModel3DOps<T>
- Parameters:
m3d
- the model to which the rectangle should be added.z
- the z coordinate of the rectangle's vertices.x1
- the x coordinate of the first vertex.y1
- the y coordinate of the first vertex.x3
- the x coordinate of the third vertex.y3
- the y coordinate of the third vertex.
-
addFlippedH
public static <T extends Model3DOps.Triangle,M extends Model3DOps<T>> void addFlippedH(M m3d, double z, double x1, double y1, double x3, double y3) Add a "flipped" rectangle whose sides are horizontal. The vertices are numbered 1 to 4, traversed counterclockwise when looking at the side of the rectangle that will be on the inside of a closed manifold.Flipped rectangles are useful when paired with one that is not flipped, as most of the arguments will be the same.
- Type Parameters:
T
- the type of an implementation ofModel3DOps.Triangle
M
- the type of an implementation ofModel3DOps<T>
- Parameters:
m3d
- the model to which the rectangle should be added.z
- the z coordinate of the rectangle's vertices.x1
- the x coordinate of the first vertex.y1
- the y coordinate of the first vertex.x3
- the x coordinate of the third vertex.y3
- the y coordinate of the third vertex.
-
addV
public static <T extends Model3DOps.Triangle,M extends Model3DOps<T>> void addV(M m3d, double x1, double y1, double z1, double x3, double y3, double z3, Color color) Add a rectangle whose sides are vertical, given a Color. The vertices are numbered 1 to 4, traversed counterclockwise when looking at the side of the rectangle that will be on the outside of a closed manifold. The order of the vertices is(x1,y1,z1)---->(x3,y3,z1)---->(x3,y3,z3)---->(x1,y1,z3),
circling the normal vector in the counterclockwise direction when viewed from the direction the normal vector points and corresponding to the use of a right-hand rule for determining the direction of the normal vector.- Type Parameters:
T
- the type of an implementation ofModel3DOps.Triangle
M
- the type of an implementation ofModel3DOps<T>
- Parameters:
m3d
- the model to which the rectangle should be added.x1
- the x coordinate of the first vertex.y1
- the y coordinate of the first vertex.z1
- the z coordinate of the first vertex.x3
- the x coordinate of the third vertex.y3
- the y coordinate of the third vertex.z3
- the z coordinate of the third vertex.color
- the color for the rectangle; null if none is specified
-
addFlippedV
public static <T extends Model3DOps.Triangle,M extends Model3DOps<T>> void addFlippedV(M m3d, double x1, double y1, double z1, double x3, double y3, double z3, Color color) Add a "flipped" rectangle whose sides are either vertical, given a Color. The vertices are numbered 1 to 4, traversed counterclockwise when looking at the side of the rectangle that will be on the inside of a closed manifold. The order of the vertices is(x1,y1,z1)---->(x3,y3,z1)---->(x3,y3,z3)---->(z1,y1,z3),
circling the normal vector in the clockwise direction when viewed from the direction the normal vector points.Flipped rectangles are useful when paired with one that is not flipped, as most of the arguments will be the same.
- Type Parameters:
T
- the type of an implementation ofModel3DOps.Triangle
M
- the type of an implementation ofModel3DOps<T>
- Parameters:
m3d
- the model to which the rectangle should be added.x1
- the x coordinate of the first vertex.y1
- the y coordinate of the first vertex.z1
- the z coordinate of the first vertex.x3
- the x coordinate of the third vertex.y3
- the y coordinate of the third vertex.z3
- the z coordinate of the third vertex.color
- the color for the rectangle; null if none is specified
-
addH
public static <T extends Model3DOps.Triangle,M extends Model3DOps<T>> void addH(M m3d, double z, double x1, double y1, double x3, double y3, Color color) Add a rectangle whose sides are horizontal, given a Color. The vertices are numbered 1 to 4, traversed counterclockwise when looking at the side of the rectangle that will be on the outside of a closed manifold. The order in which the vertices are traversed is(x1, y1, z)---->(x3,y1,z)---->(x3,y3,z)---->(x1,y3,z)
- Type Parameters:
T
- the type of an implementation ofModel3DOps.Triangle
M
- the type of an implementation ofModel3DOps<T>
- Parameters:
m3d
- the model to which the rectangle should be added.z
- the z coordinate of the rectangle's vertices.x1
- the x coordinate of the first vertex.y1
- the y coordinate of the first vertex.x3
- the x coordinate of the third vertex.y3
- the y coordinate of the third vertex.color
- the color for the rectangle; null if none is specified
-
addFlippedH
public static <T extends Model3DOps.Triangle,M extends Model3DOps<T>> void addFlippedH(M m3d, double z, double x1, double y1, double x3, double y3, Color color) Add a "flipped" rectangle whose sides are horizontal, given a Color. The vertices are numbered 1 to 4, traversed counterclockwise when looking at the side of the rectangle that will be on the inside of a closed manifold.Flipped rectangles are useful when paired with one that is not flipped, as most of the arguments will be the same.
- Type Parameters:
T
- the type of an implementation ofModel3DOps.Triangle
M
- the type of an implementation ofModel3DOps<T>
- Parameters:
m3d
- the model to which the rectangle should be added.z
- the z coordinate of the rectangle's vertices.x1
- the x coordinate of the first vertex.y1
- the y coordinate of the first vertex.x3
- the x coordinate of the third vertex.y3
- the y coordinate of the third vertex.color
- the color for the rectangle; null if none is specified
-
addV
public static <T extends Model3DOps.Triangle,M extends Model3DOps<T>> void addV(M m3d, double x1, double y1, double z1, double x3, double y3, double z3, Color color, Object tag) Add a rectangle whose sides are vertical, given a color and tag. The vertices are numbered 1 to 4, traversed counterclockwise when looking at the side of the rectangle that will be on the outside of a closed manifold. The order of the vertices is(x1,y1,z1)---->(x3,y3,z1)---->(x3,y3,z3)---->(x1,y1,z3),
circling the normal vector in the counterclockwise direction when viewed from the direction the normal vector points and corresponding to the use of a right-hand rule for determining the direction of the normal vector.- Type Parameters:
T
- the type of an implementation ofModel3DOps.Triangle
M
- the type of an implementation ofModel3DOps<T>
- Parameters:
m3d
- the model to which the rectangle should be added.x1
- the x coordinate of the first vertex.y1
- the y coordinate of the first vertex.z1
- the z coordinate of the first vertex.x3
- the x coordinate of the third vertex.y3
- the y coordinate of the third vertex.z3
- the z coordinate of the third vertex.color
- the color for the rectangle; null if none is specifiedtag
- an Object naming an instance of a tag
-
addFlippedV
public static <T extends Model3DOps.Triangle,M extends Model3DOps<T>> void addFlippedV(M m3d, double x1, double y1, double z1, double x3, double y3, double z3, Color color, Object tag) Add a "flipped" rectangle whose sides are either vertical, given a color and tag. The vertices are numbered 1 to 4, traversed counterclockwise when looking at the side of the rectangle that will be on the inside of a closed manifold. The order of the vertices is(x1,y1,z1)---->(x3,y3,z1)---->(x3,y3,z3)---->(z1,y1,z3),
circling the normal vector in the clockwise direction when viewed from the direction the normal vector points.Flipped rectangles are useful when paired with one that is not flipped, as most of the arguments will be the same.
- Type Parameters:
T
- the type of an implementation ofModel3DOps.Triangle
M
- the type of an implementation ofModel3DOps<T>
- Parameters:
m3d
- the model to which the rectangle should be added.x1
- the x coordinate of the first vertex.y1
- the y coordinate of the first vertex.z1
- the z coordinate of the first vertex.x3
- the x coordinate of the third vertex.y3
- the y coordinate of the third vertex.z3
- the z coordinate of the third vertex.color
- the color for the rectangle; null if none is specifiedtag
- an Object naming an instance of a tag
-
addH
public static <T extends Model3DOps.Triangle,M extends Model3DOps<T>> void addH(M m3d, double z, double x1, double y1, double x3, double y3, Color color, Object tag) Add a rectangle whose sides are horizontal, given a color and tag. The vertices are numbered 1 to 4, traversed counterclockwise when looking at the side of the rectangle that will be on the outside of a closed manifold. The order in which the vertices are traversed is(x1, y1, z)---->(x3,y1,z)---->(x3,y3,z)---->(x1,y3,z)
- Type Parameters:
T
- the type of an implementation ofModel3DOps.Triangle
M
- the type of an implementation ofModel3DOps<T>
- Parameters:
m3d
- the model to which the rectangle should be added.z
- the z coordinate of the rectangle's vertices.x1
- the x coordinate of the first vertex.y1
- the y coordinate of the first vertex.x3
- the x coordinate of the third vertex.y3
- the y coordinate of the third vertex.color
- the color for the rectangle; null if none is specifiedtag
- an Object naming an instance of a tag
-
addFlippedH
public static <T extends Model3DOps.Triangle,M extends Model3DOps<T>> void addFlippedH(M m3d, double z, double x1, double y1, double x3, double y3, Color color, Object tag) Add a "flipped" rectangle whose sides are horizontal, given a color and tag. The vertices are numbered 1 to 4, traversed counterclockwise when looking at the side of the rectangle that will be on the inside of a closed manifold.Flipped rectangles are useful when paired with one that is not flipped, as most of the arguments will be the same.
- Type Parameters:
T
- the type of an implementation ofModel3DOps.Triangle
M
- the type of an implementation ofModel3DOps<T>
- Parameters:
m3d
- the model to which the rectangle should be added.z
- the z coordinate of the rectangle's vertices.x1
- the x coordinate of the first vertex.y1
- the y coordinate of the first vertex.x3
- the x coordinate of the third vertex.y3
- the y coordinate of the third vertex.color
- the color for the rectangle; null if none is specifiedtag
- an Object naming an instance of a tag
-