T
- is the type of GeoShapes of the composite.public abstract class GeoBaseCompositeShape<T extends GeoShape> extends BasePlanetObject implements GeoShape
Modifier and Type | Field and Description |
---|---|
protected List<T> |
shapes
Shape's container
|
planetModel
Constructor and Description |
---|
GeoBaseCompositeShape(PlanetModel planetModel)
Constructor.
|
GeoBaseCompositeShape(PlanetModel planetModel,
InputStream inputStream,
Class<T> clazz)
Constructor for deserialization.
|
Modifier and Type | Method and Description |
---|---|
void |
addShape(T shape)
Add a shape to the composite.
|
boolean |
equals(Object o) |
void |
getBounds(Bounds bounds)
Compute bounds for the shape.
|
GeoPoint[] |
getEdgePoints()
Return a sample point that is on the outside edge/boundary of the shape.
|
T |
getShape(int index)
Get shape at index
|
int |
hashCode() |
boolean |
intersects(Plane p,
GeoPoint[] notablePoints,
Membership... bounds)
Assess whether a plane, within the provided bounds, intersects
with the shape's edges.
|
boolean |
isWithin(double x,
double y,
double z)
Check if a point is within this shape.
|
boolean |
isWithin(Vector point)
Check if a point is within this shape.
|
int |
size()
Get the number of shapes in the composite
|
void |
write(OutputStream outputStream)
Serialize to output stream.
|
getPlanetModel
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getPlanetModel
readBitSet, readBoolean, readByteArray, readClass, readDouble, readHeterogeneousArray, readHomogeneousArray, readInt, readLong, readObject, readObject, readObject, readObject, readPlanetObject, readPointArray, readPolygonArray, readString, writeBitSet, writeBoolean, writeByteArray, writeClass, writeDouble, writeHeterogeneousArray, writeHeterogeneousArray, writeHomogeneousArray, writeHomogeneousArray, writeInt, writeLong, writeObject, writePlanetObject, writePointArray, writePointArray, writePolygonArray, writePolygonArray, writeString
public GeoBaseCompositeShape(PlanetModel planetModel)
public GeoBaseCompositeShape(PlanetModel planetModel, InputStream inputStream, Class<T> clazz) throws IOException
planetModel
- is the planet model.inputStream
- is the input stream.clazz
- is the class of the generic.IOException
public void addShape(T shape)
shape
- is the shape to add.public int size()
public T getShape(int index)
public void write(OutputStream outputStream) throws IOException
SerializableObject
write
in interface SerializableObject
write
in class BasePlanetObject
outputStream
- is the output stream to write to.IOException
public boolean isWithin(Vector point)
Membership
isWithin
in interface Membership
point
- is the point to check.public boolean isWithin(double x, double y, double z)
Membership
isWithin
in interface Membership
x
- is x coordinate of point to check.y
- is y coordinate of point to check.z
- is z coordinate of point to check.public GeoPoint[] getEdgePoints()
GeoShape
getEdgePoints
in interface GeoShape
public boolean intersects(Plane p, GeoPoint[] notablePoints, Membership... bounds)
GeoShape
intersects
in interface GeoShape
p
- is the plane to assess for intersection with the shape's edges or
bounding curves.notablePoints
- represents the intersections of the plane with the supplied
bounds. These are used to disambiguate when two planes are identical and it needs
to be determined whether any points exist that fulfill all the bounds.bounds
- are a set of bounds that define an area that an
intersection must be within in order to qualify (provided by a GeoArea).public void getBounds(Bounds bounds)
Bounded
public int hashCode()
hashCode
in class BasePlanetObject
public boolean equals(Object o)
equals
in class BasePlanetObject
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.