|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.threed.jpct.util.ReflectionHelper
A helper class for creating planar mirrors like water surfaces or marble floors. This works when using an OpenGL renderer only. The software renderers don't support this effect.
Constructor Summary | |
ReflectionHelper(FrameBuffer buffer,
Object3D planeObj,
int maxSize,
int blendingMode)
Creates a new helper. |
Method Summary | |
void |
drawScene(World world,
FrameBuffer buffer)
Draws the scene into the reflection map. |
void |
drawScene(World world,
FrameBuffer buffer,
World[] additionalWorlds)
Draws the scene into the reflection map. |
void |
exclude(Object3D obj)
Excludes an object from the reflection. |
void |
finalize()
|
float |
getClippingPlaneOffset()
Returns the clipping offset. |
Texture |
getReflectionTexture()
Returns the texture used as reflection map. |
void |
include(Object3D obj)
Re-includes an object in the reflection. |
void |
setClearColor(java.awt.Color col)
Sets the clear color for the reflection map. |
void |
setClippingPlaneOffset(float clippingPlaneOffset)
Sets an offset for the internal clipping plane. |
void |
setEnabled(boolean enabled)
Enables/Disables the reflection. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ReflectionHelper(FrameBuffer buffer, Object3D planeObj, int maxSize, int blendingMode)
buffer
- the current FrameBufferplaneObj
- the object that ir the mirror, i.e. the floor or the water surfacemaxSize
- the maximum size of the texture which is used as a reflection mapblendingMode
- the blending mode for the reflection (as defined in TextureInfo)TextureInfo
Method Detail |
public void exclude(Object3D obj)
obj
- the object to excludepublic void include(Object3D obj)
obj
- the object to re-includepublic void setClearColor(java.awt.Color col)
col
- the colorpublic Texture getReflectionTexture()
public void setEnabled(boolean enabled)
enabled
- is it on?public void drawScene(World world, FrameBuffer buffer)
world
- the worldbuffer
- the frame bufferpublic void drawScene(World world, FrameBuffer buffer, World[] additionalWorlds)
world
- the worldbuffer
- the frame bufferadditionalWorlds
- an array of additional worlds that should be rendered into the mappublic void finalize()
public void setClippingPlaneOffset(float clippingPlaneOffset)
clippingPlaneOffset
- the new offsetpublic float getClippingPlaneOffset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |