public final class Projector extends Object
Projector projects points in 3D space to 2D space.| 构造器 | 说明 |
|---|---|
Projector() |
The constructor of
Projector. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
int |
get2D_xTranslation() |
Gets the 2D x translation.
|
int |
get2D_yTranslation() |
Gets the 2D y translation.
|
Rectangle |
getBounds() |
Get bounds
|
Rectangle |
getBounds_noScale() |
Get bounds without scale
|
float |
getCosElevationAngle() |
Gets the cosine of elevation angle.
|
float |
getCosRotationAngle() |
Gets the cosine of rotation angle.
|
float |
getDistance() |
Gets the projector distance.
|
float |
getElevationAngle() |
Gets current elevation angle.
|
float |
getRotationAngle() |
Gets current rotation angle.
|
float |
getSinElevationAngle() |
Gets the sine of elevation angle.
|
float |
getSinRotationAngle() |
Gets the sine of rotation angle.
|
float |
getX2DScaling() |
Gets the x 2D scaling factor.
|
float |
getXScaling() |
Gets the scaling factor in x direction.
|
float |
getY2DScaling() |
Gets the x 2D scaling factor.
|
float |
getYScaling() |
Gets the scaling factor in y direction.
|
float |
getZScaling() |
Gets the scaling factor in z direction.
|
Point |
project(float x,
float y,
float z) |
Projects 3D points.
|
Point |
project_noScale(float x,
float y,
float z) |
Projects 3D points without scaling.
|
double[] |
projectAL(float x1,
float y1,
float z1,
float x2,
float y2,
float z2) |
Project angle and length from two points
|
void |
set2D_xTranslation(int x) |
Sets the 2D x translation.
|
void |
set2D_yTranslation(int y) |
Sets the 2D y translation.
|
void |
set2DScaling(float scaling) |
Sets the 2D scaling factor.
|
void |
set2DTranslation(int x,
int y) |
Sets the 2D translation.
|
void |
setDistance(float new_distance) |
Sets the projector distance.
|
void |
setElevationAngle(float angle) |
Sets the elevation angle.
|
void |
setProjectionArea(Rectangle r) |
Sets the projection area.
|
void |
setRotationAngle(float angle) |
Sets the rotation angle.
|
void |
setScaling(float scaling) |
Sets the same scaling factor for all direction.
|
void |
setScaling(float x,
float y,
float z) |
Sets the scaling factor in all direction.
|
void |
setX2DScaling(float scaling) |
Sets the x 2D scaling factor.
|
void |
setXScaling(float scaling) |
Sets the scaling factor in x direction.
|
void |
setY2DScaling(float scaling) |
Sets the 2D scaling factor.
|
void |
setYScaling(float scaling) |
Sets the scaling factor in y direction.
|
void |
setZRange(float zmin,
float zmax) |
|
void |
setZScaling(float scaling) |
Sets the scaling factor in z direction.
|
void |
update2DScaling() |
Update 2D scaling
|
public void setProjectionArea(Rectangle r)
r - the projection areapublic void setRotationAngle(float angle)
angle - the rotation angle in degreespublic float getRotationAngle()
public float getSinRotationAngle()
public float getCosRotationAngle()
public void setElevationAngle(float angle)
angle - the elevation angle in degreespublic float getElevationAngle()
public float getSinElevationAngle()
public float getCosElevationAngle()
public void setDistance(float new_distance)
new_distance - the new distancepublic float getDistance()
public void setXScaling(float scaling)
scaling - the scaling factorpublic float getXScaling()
public void setYScaling(float scaling)
scaling - the scaling factorpublic float getYScaling()
public void setZScaling(float scaling)
scaling - the scaling factorpublic float getZScaling()
public void setScaling(float x,
float y,
float z)
x - the scaling factor in x directiony - the scaling factor in y directionz - the scaling factor in z directionpublic void setScaling(float scaling)
scaling - the scaling factorpublic void set2DScaling(float scaling)
scaling - the scaling factorpublic void setX2DScaling(float scaling)
scaling - the x scaling factorpublic void setY2DScaling(float scaling)
scaling - the scaling factorpublic float getX2DScaling()
public float getY2DScaling()
public void set2DTranslation(int x,
int y)
x - the x translationy - the y translationpublic void set2D_xTranslation(int x)
x - the x translationpublic int get2D_xTranslation()
public void set2D_yTranslation(int y)
y - the y translationpublic int get2D_yTranslation()
public final Point project(float x, float y, float z)
x - the x coordinatey - the y coordinatez - the z coordinatepublic double[] projectAL(float x1,
float y1,
float z1,
float x2,
float y2,
float z2)
x1 - Point 1 xy1 - Point 1 yz1 - Point 1 zx2 - Point 2 xy2 - Point 2 yz2 - Point 2 zpublic final Point project_noScale(float x, float y, float z)
x - the x coordinatey - the y coordinatez - the z coordinatepublic void setZRange(float zmin,
float zmax)
public Rectangle getBounds()
public Rectangle getBounds_noScale()
public void update2DScaling()
Copyright © 2019. All rights reserved.