public class Object3D
extends java.lang.Object
Constructor and Description |
---|
Object3D(int points)
Construction by an empty array of coordinates
|
Object3D(Location3D la)
Construction by one 3d coordinate
|
Object3D(Location3D[] loa)
Construction by an array of 3d coordinates
|
Object3D(Location3D[] loa,
boolean inverted)
Construction by an array of 3d coordinates
|
Object3D(Object3D original)
Construction by another Object3D object
|
Modifier and Type | Method and Description |
---|---|
void |
clip(Engine3D engine)
Check and clip vectors by given engine.
|
Vector |
getCenter()
Returns center of gravity of polygon
|
Location3D[] |
getLocation3D()
Returns the 3d coordinates for this object.
|
Vector |
getNormal()
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 pt2
|
Location[] |
getPoints2D(double xOffset,
double yOffset)
Returns the projected 2D coordinates for this object
|
Object3D |
getSharedEdge(Object3D other) |
Vector[] |
getVectors()
Returns vectors in model frame for this object
|
Vector[] |
getViewerVectors()
Returns vectors in viewer frame for this object
|
double |
getXMax()
Returns maximum X value for this object
|
double |
getXMin()
Returns minimum X value for this object
|
double |
getYMax()
Returns maximum Y value for this object
|
double |
getYMin()
Returns minimum Y value for this object
|
double |
getZMax()
Returns maximum Z value for this object
|
Vector |
getZMaxPoint() |
double |
getZMin()
Returns minimum Z value for this object
|
Vector |
getZMinPoint() |
boolean |
isBehind(Vector point) |
void |
perspective(double distance)
Perspective transformation of the vectors.
|
void |
prepareZSort()
Prepars for Z-sorting
|
void |
reset()
Resets all values to defaults.
|
boolean |
testSwap(Object3D near,
Engine3D engine)
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
|
public Object3D(int points)
public Object3D(Location3D la)
public Object3D(Location3D[] loa)
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.public Object3D(Location3D[] loa, boolean inverted)
loa
- inverted
- invert the order of points to change the surface orientationpublic Object3D(Object3D original)
public Location3D[] getLocation3D()
public static Vector getPlaneNormal(Vector pt0, Vector pt1, Vector pt2)
pt0
- pt1
- pt2
- public Vector getNormal()
public Vector getCenter()
public void reset()
public Vector getZMaxPoint()
public Vector getZMinPoint()
public double getXMax()
public double getXMin()
public double getYMax()
public double getYMin()
public double getZMax()
public double getZMin()
public void transform(org.eclipse.birt.chart.internal.computations.Matrix m)
public void clip(Engine3D engine)
public void prepareZSort()
public void perspective(double distance)
public Vector[] getVectors()
public Vector[] getViewerVectors()
public Location[] getPoints2D(double xOffset, double yOffset)
public boolean isBehind(Vector point)
public boolean testSwap(Object3D near, Engine3D engine)
public boolean testZOverlap(Object3D near)
Copyright © 2005-2014 OpenText Corp. All rights reserved.