|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This class represents camera objects which can be used to render a world in the engine.
A camera has the following properties:
| Method Summary | |
iCamera |
Clone()
Create a clone of this camera. |
void |
correct(int n)
Eliminate roundoff error by snapping the camera orientation to a grid of density n. |
long |
getCameraNumber()
Get the camera number. |
csPlane3 |
getFarPlane()
Get the 3D far plane that should be used to clip all geometry. |
int |
getFOV()
Return the FOV (field of view) in pixels. |
float |
getFOVAngle()
Return the FOV (field of view) in degrees. |
float |
getInvFOV()
Return the inverse flield of view (1/FOV) in pixels. |
boolean |
getOnlyPortals()
Get the hit-only-portals flag. |
iSector |
getSector()
Get the current sector. |
float |
getShiftX()
Get the X shift amount. |
float |
getShiftY()
Get the Y shift amount. |
csOrthoTransform |
getTransform()
Get the transform corresponding to this camera. |
void |
invPerspective(csVector2 p,
float z,
csVector3 v)
Calculate inverse perspective corrected point for this camera. |
boolean |
isMirrored()
Return true if space is mirrored. |
void |
move(csVector3 v)
Moves the camera a relative amount in camera coordinates. |
void |
move(csVector3 v,
boolean cd)
Moves the camera a relative amount in camera coordinates. |
void |
moveUnrestricted(csVector3 v)
Moves the camera a relative amount in camera coordinates, ignoring portals and walls. |
void |
moveWorld(csVector3 v)
Moves the camera a relative amount in world coordinates. |
void |
moveWorld(csVector3 v,
boolean cd)
Moves the camera a relative amount in world coordinates. |
void |
moveWorldUnrestricted(csVector3 v)
Moves the camera a relative amount in world coordinates, ignoring portals and walls. |
void |
onlyPortals(boolean hop)
If the hit-only-portals flag is true then only portals will be checked with the 'MoveWorld()' function. |
void |
perspective(csVector3 v,
csVector2 p)
Calculate perspective corrected point for this camera. |
void |
setFarPlane(csPlane3 fp)
Set the 3D far plane used to clip all geometry. |
void |
setFOV(int fov,
int width)
Set the FOV in pixels. |
void |
setFOVAngle(float fov,
int width)
Set the FOV in radians. |
void |
setMirrored(boolean m)
Set mirrored state. |
void |
setPerspectiveCenter(float x,
float y)
Set the shift amount. |
void |
setSector(iSector sector)
Move to another sector. |
void |
setTransform(csOrthoTransform tr)
Set the transform corresponding to this camera. |
| Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase |
decRef, getName, getRefCount, getVersion, incRef, queryInterface, queryInterfaceSafe |
| Methods inherited from interface crystalspace.jbind.interfaces.iPointer |
changePointer, getPointer, isMemoryOwner, setMemoryOwner |
| Method Detail |
public iCamera Clone()
public int getFOV()
public float getInvFOV()
public float getFOVAngle()
public void setFOV(int fov,
int width)
fov - width -
public void setFOVAngle(float fov,
int width)
fov - width - public float getShiftX()
public float getShiftY()
public void setPerspectiveCenter(float x,
float y)
x - y - public csOrthoTransform getTransform()
public void setTransform(csOrthoTransform tr)
tr - public void moveWorld(csVector3 v)
v -
public void moveWorld(csVector3 v,
boolean cd)
v - cd - public void move(csVector3 v)
v -
public void move(csVector3 v,
boolean cd)
v - cd - public void moveWorldUnrestricted(csVector3 v)
v - public void moveUnrestricted(csVector3 v)
v - public iSector getSector()
public void setSector(iSector sector)
sector - public void correct(int n)
n - public boolean isMirrored()
public void setMirrored(boolean m)
m - public csPlane3 getFarPlane()
public void setFarPlane(csPlane3 fp)
fp - public long getCameraNumber()
public void perspective(csVector3 v,
csVector2 p)
v - p -
public void invPerspective(csVector2 p,
float z,
csVector3 v)
p - z - v - public void onlyPortals(boolean hop)
hop - public boolean getOnlyPortals()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||