Class Object3D
java.lang.Object
org.eclipse.birt.chart.computation.Object3D
This class represents a 3D object and is used to perform all 3d operations.
-
Constructor Summary
ConstructorsConstructorDescriptionObject3D
(int points) Construction by an empty array of coordinatesConstruction by another Object3D objectObject3D
(Location3D la) Construction by one 3d coordinateObject3D
(Location3D[] loa) Construction by an array of 3d coordinatesObject3D
(Location3D[] loa, boolean inverted) Construction by an array of 3d coordinates -
Method Summary
Modifier and TypeMethodDescriptionvoid
Check and clip vectors by given engine.Returns center of gravity of polygonReturns the 3d coordinates for this object.returns the normal vector (pointing outside the enclosed volume for oriented polygons.)static Vector
getPlaneNormal
(Vector pt0, Vector pt1, Vector pt2) return the normal (orientation) vector of the plane determined by points pt0, pt1 and pt2Location[]
getPoints2D
(double xOffset, double yOffset) Returns the projected 2D coordinates for this objectgetSharedEdge
(Object3D other) Vector[]
Returns vectors in model frame for this objectVector[]
Returns vectors in viewer frame for this objectdouble
getXMax()
Returns maximum X value for this objectdouble
getXMin()
Returns minimum X value for this objectdouble
getYMax()
Returns maximum Y value for this objectdouble
getYMin()
Returns minimum Y value for this objectdouble
getZMax()
Returns maximum Z value for this objectdouble
getZMin()
Returns minimum Z value for this objectboolean
void
perspective
(double distance) Perspective transformation of the vectors.void
Prepars for Z-sortingvoid
reset()
Resets all values to defaults.boolean
Tests if two objects need swapping.boolean
testZOverlap
(Object3D near) Tests if two objects overlap in Z direction.void
transform
(org.eclipse.birt.chart.internal.computations.Matrix m) Performs transformation by given matrix
-
Constructor Details
-
Object3D
public Object3D(int points) Construction by an empty array of coordinates -
Object3D
Construction by one 3d coordinate -
Object3D
Construction by an array of 3d coordinates- Parameters:
the
- points that constitue the 3D object. If there are more than 2 points the order of points decides the orientation of the surface. Only the outside face is painted, unless the object is double-sided. Note that polygons making a volume should not be double-sided.
-
Object3D
Construction by an array of 3d coordinates- Parameters:
loa
-inverted
- invert the order of points to change the surface orientation
-
Object3D
Construction by another Object3D object
-
-
Method Details
-
getLocation3D
Returns the 3d coordinates for this object. -
getPlaneNormal
return the normal (orientation) vector of the plane determined by points pt0, pt1 and pt2- Parameters:
pt0
-pt1
-pt2
-- Returns:
-
getNormal
returns the normal vector (pointing outside the enclosed volume for oriented polygons.) -
getCenter
Returns center of gravity of polygon -
reset
public void reset()Resets all values to defaults. -
getZMaxPoint
-
getZMinPoint
-
getXMax
public double getXMax()Returns maximum X value for this object -
getXMin
public double getXMin()Returns minimum X value for this object -
getYMax
public double getYMax()Returns maximum Y value for this object -
getYMin
public double getYMin()Returns minimum Y value for this object -
getZMax
public double getZMax()Returns maximum Z value for this object -
getZMin
public double getZMin()Returns minimum Z value for this object -
transform
public void transform(org.eclipse.birt.chart.internal.computations.Matrix m) Performs transformation by given matrix -
clip
Check and clip vectors by given engine. -
prepareZSort
public void prepareZSort()Prepars for Z-sorting -
perspective
public void perspective(double distance) Perspective transformation of the vectors. -
getVectors
Returns vectors in model frame for this object -
getViewerVectors
Returns vectors in viewer frame for this object -
getPoints2D
Returns the projected 2D coordinates for this object -
isBehind
-
testSwap
Tests if two objects need swapping. -
testZOverlap
Tests if two objects overlap in Z direction.
-