|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.engine.camera.CameraPerspective
public class CameraPerspective
This class encapsulates a camera's position and alignment.
Constructor Summary | |
---|---|
CameraPerspective(float x,
float y,
float z,
float rotX,
float rotY,
float near,
float far)
Creates a new camera perspective with the specified parameters. |
|
CameraPerspective(Point3D position,
float rotX,
float rotY,
float near,
float far)
Creates a new camera perspective with the specified parameters. |
Method Summary | |
---|---|
CameraPerspective |
clone()
|
AbstractMesh |
getAttachedMesh()
Returns the mesh this camera perspective is attached to, if there is one, else it returns null . |
float |
getDistanceToMesh()
Returns the distance of the camera perspective to the mesh |
float |
getFarPlane()
Returns the far plane of camera perspective |
float |
getFieldOfView()
Returns the field of view (viewing angle) of the camera (as used in gluPerspective()-method) |
float |
getNearPlane()
Returns the near plane of the camera perspective |
float |
getOffsetY()
Returns the height over the meshes center point of this camera perspective. |
Point3D |
getPosition()
Returns a copied point with the position of the camera |
float |
getRotX()
Returns the camera's rotation around the x axis |
float |
getRotY()
Returns the rotation around the y axis |
void |
setAttachedMesh(AbstractMesh mesh,
float dist,
float offsetY)
Sets the mesh to which this camera perspective is attached. |
void |
setDistanceToMesh(float dist)
Sets the distance that the camera perspective ought to keep up to the attached mesh |
void |
setFarPlane(float far)
Sets the far plane of the camera perspective to the specified value |
void |
setFieldOfView(float angle)
Sets the field of view (viewing angle) of the camera to the specified value. |
void |
setNearPlane(float near)
Sets the near plane of the camera perspective to the specified value |
void |
setOffestY(float offsetY)
Sets the height over the center of the mesh (y-offset) for this camera perspective. |
void |
setPosition(float x,
float y,
float z)
Sets the camera's position |
void |
setPosition(Point3D pos)
Sets the camera's position. |
void |
setRotX(float rotX)
Sets the rotation around the x axis |
void |
setRotY(float rotY)
Sets the rotation around the y axis |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CameraPerspective(Point3D position, float rotX, float rotY, float near, float far)
position
- position of the camerarotX
- rotation around the x axis of the camerarotY
- rotation around the y axis of the cameranear
- near clipping plane distancefar
- far clipping plane distancepublic CameraPerspective(float x, float y, float z, float rotX, float rotY, float near, float far)
x
- x coordinate of the cameray
- y coordinate of the cameraz
- z coordinate of the camerarotX
- rotation around the x axis of the camerarotY
- rotation around the y axis of the cameranear
- near clipping plane distancefar
- far clipping plane distanceMethod Detail |
---|
public void setAttachedMesh(AbstractMesh mesh, float dist, float offsetY)
mesh
- mesh to attach this camera perspective todist
- the distance to mesh that ought to be kept upoffsetY
- y-axis offset, i.e. height over center point of the meshpublic AbstractMesh getAttachedMesh()
null
.
null
.public void setDistanceToMesh(float dist)
dist
- distance to the meshpublic float getDistanceToMesh()
public void setOffestY(float offsetY)
offsetY
- height over the meshpublic float getOffsetY()
public Point3D getPosition()
public void setPosition(float x, float y, float z)
x
- x coordinatey
- y coordinatez
- z coordinatepublic void setPosition(Point3D pos)
pos
- position of the camerapublic float getRotX()
public void setRotX(float rotX)
rotX
- rotation around the x axispublic float getRotY()
public void setRotY(float rotY)
rotY
- rotation around y axispublic float getFarPlane()
public void setFarPlane(float far)
far
- far plane of the camera perspectivepublic float getNearPlane()
public void setNearPlane(float near)
near
- near plane of the camera perspectivepublic float getFieldOfView()
public void setFieldOfView(float angle)
angle
- field of view (viewing angle) for the camerapublic CameraPerspective clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |