org.eclipse.birt.chart.computation
Class Object3D

java.lang.Object
  extended byorg.eclipse.birt.chart.computation.Object3D

public class Object3D
extends java.lang.Object

This class represents a 3D object and is used to perform all 3d operations.


Constructor Summary
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
 
Method Summary
 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.)
 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()
           
 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 diretion.
 void transform(Matrix m)
          Performs transformation by given matrix
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Object3D

public Object3D(int points)
Construction by an empty array of coordinates


Object3D

public Object3D(Location3D la)
Construction by one 3d coordinate


Object3D

public Object3D(Location3D[] loa)
Construction by an array of 3d coordinates


Object3D

public Object3D(Location3D[] loa,
                boolean inverted)
Construction by an array of 3d coordinates

Parameters:
loa -
inverted - invert the order of points to change the surface orientation

Object3D

public Object3D(Object3D original)
Construction by another Object3D object

Method Detail

getLocation3D

public Location3D[] getLocation3D()
Returns the 3d coordinates for this object.


getNormal

public Vector getNormal()
returns the normal vector (pointing outside the enclosed volume for oriented polygons.)


getCenter

public Vector getCenter()
Returns center of gravity of polygon


reset

public void reset()
Resets all values to defaults.


getZMaxPoint

public Vector getZMaxPoint()

getZMinPoint

public Vector 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(Matrix m)
Performs transformation by given matrix


clip

public void clip(Engine3D engine)
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

public Vector[] getVectors()
Returns vectors in model frame for this object


getViewerVectors

public Vector[] getViewerVectors()
Returns vectors in viewer frame for this object


getPoints2D

public Location[] getPoints2D(double xOffset,
                              double yOffset)
Returns the projected 2D coordinates for this object


testSwap

public boolean testSwap(Object3D near,
                        Engine3D engine)
Tests if two objects need swapping.


testZOverlap

public boolean testZOverlap(Object3D near)
Tests if two objects overlap in Z diretion.


getSharedEdge

public Object3D getSharedEdge(Object3D other)


Copyright © 2005-2007 Actuate Corp. All rights reserved.