|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.media.j3d.SceneGraphObject
javax.media.j3d.Node
javax.media.j3d.Group
javax.media.j3d.Switch
com.vwp.j3d.VisiblePointLight
public class VisiblePointLight
The VisiblePointLight class is a small scene graph which contains a light source and some geometry below of a Switch where the visible parts of this light (a lens flare like effect) are mapped onto as texture. The texture and the geometry are created dynamically. The color of the light and the color of the visible parts can be defined separately, so that in case the light has to be completely white the visible part nevertheless can be colored.
| Field Summary | |
|---|---|
static int |
FASTEST
This constant insfluences the quality of the result. |
static int |
NICEST
Setting the quality to NICEST the results look better but they require more computing power |
| Fields inherited from class javax.media.j3d.Switch |
|---|
ALLOW_SWITCH_READ, ALLOW_SWITCH_WRITE, CHILD_ALL, CHILD_MASK, CHILD_NONE |
| Fields inherited from class javax.media.j3d.Group |
|---|
ALLOW_CHILDREN_EXTEND, ALLOW_CHILDREN_READ, ALLOW_CHILDREN_WRITE, ALLOW_COLLISION_BOUNDS_READ, ALLOW_COLLISION_BOUNDS_WRITE |
| Fields inherited from class javax.media.j3d.Node |
|---|
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING |
| Constructor Summary | |
|---|---|
VisiblePointLight(boolean visible,
int quality)
The default constructor for a VisiblePointLight. |
|
VisiblePointLight(javax.vecmath.Color3f lightColor,
javax.vecmath.Point3f position,
javax.vecmath.Point3f attenuation,
javax.vecmath.Color3f visibleColor,
int size,
int quality)
This constructor creates a new VisiblePointLight with the given values. |
|
| Method Summary | |
|---|---|
javax.media.j3d.Bounds |
getBounds()
This method returns the Bounds-object for the geometry part |
boolean |
getEnable()
This method returns the information if the light is enabled (true) and therefore visible or not (false) |
javax.vecmath.Color3f |
getVisibleColor()
This method returns the color of the light objects visible parts |
void |
setAppearanceCapability(int int0)
This method allows it to set a capability for the Appearance-part of this objects geometry. |
void |
setAttenuation(float float0,
float float1,
float float2)
This method allowes it to set new constant, linear and quadratic attenuation values for the light part of this object. |
void |
setEnable(boolean b)
A VisiblePointLight can be turned on (enabled) or off (disbled) with this method. |
void |
setGeometryCapability(int int0)
This method allows it to set a capability for the geometry-part of this object. |
void |
setGroupCapability(int int0)
This method allowes it to set a capability for the Group-node-parts of this object. |
void |
setInfluencingBounds(javax.media.j3d.Bounds bounds)
This method allows it to specify the working bounds for this object. |
void |
setLightColor(javax.vecmath.Color3f color3f)
This method allows it to specify a new color for the indirectly visible part of the light (the real lights color) |
void |
setPointLightCapability(int int0)
This method allows it to set a capability for the Light-parts of this object. |
void |
setPointLightCapabilityIsFrequent(int int0)
This method allows it to set a is-frequent-capability for the Light-parts of this object. |
void |
setShapeCapability(int int0)
This method allows it to set a capability for the Shape3D-part of this objects geometry. |
void |
setVisibleColor(javax.vecmath.Color3f color3f,
int size)
Comparing to setLightColor() this method doesn't affects the color of the light which is reflected on other objects but the visible part of it (the lens flare like effect). |
| Methods inherited from class javax.media.j3d.Switch |
|---|
cloneNode, currentChild, getChildMask, getWhichChild, setChildMask, setWhichChild |
| Methods inherited from class javax.media.j3d.Group |
|---|
addChild, getAllChildren, getAlternateCollisionTarget, getChild, getCollisionBounds, indexOfChild, insertChild, moveTo, numChildren, removeAllChildren, removeChild, removeChild, setAlternateCollisionTarget, setChild, setCollisionBounds |
| Methods inherited from class javax.media.j3d.Node |
|---|
cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBoundsAutoCompute, getCollidable, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable |
| Methods inherited from class javax.media.j3d.SceneGraphObject |
|---|
clearCapability, clearCapabilityIsFrequent, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData, updateNodeReferences |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int FASTEST
public static final int NICEST
| Constructor Detail |
|---|
public VisiblePointLight(boolean visible,
int quality)
visible - specifies if the light source has to be visible immediately.
If this parameter is set to false, the light source becomes visible
and active after the next call of setVisibleColor() and after the
requred working bound have been setquality - specifies the quality of the result using FASTEST or NICEST
public VisiblePointLight(javax.vecmath.Color3f lightColor,
javax.vecmath.Point3f position,
javax.vecmath.Point3f attenuation,
javax.vecmath.Color3f visibleColor,
int size,
int quality)
lightColor - specifies the color of the light which is reflected on
other objectsposition - specifies the position of the VisiblePointLights sourceattenuation - specifies the constant, linear and quadratic
attenuation; these values influence the light in the same way as
described for the PointLightvisibleColor - specifies the visible color part of the light source.
This color value normally should be similar to the lightColor, but
in case a completely white lightcolor was set, it could be necessary
to let the visibleColor differ for a proper effectsize - specifies the size of the used image and therefore it
influences the quality of the resultquality - specifies the quality of the result using FASTEST or NICEST| Method Detail |
|---|
public void setEnable(boolean b)
b - specifies if the light has to be turned on (true) or off (false)public boolean getEnable()
public javax.media.j3d.Bounds getBounds()
getBounds in class javax.media.j3d.Nodepublic void setInfluencingBounds(javax.media.j3d.Bounds bounds)
bounds - the Bounds object which is required in every case to let the
light become visible and to let the object work
public void setAttenuation(float float0,
float float1,
float float2)
float0 - the constant part of the attenuationfloat1 - the linear part of the attenuation which grows with the
distance from the light sourcefloat2 - this part of the attenuation grows quadratically with the
distancepublic void setLightColor(javax.vecmath.Color3f color3f)
color3f - the new color for the light
public void setVisibleColor(javax.vecmath.Color3f color3f,
int size)
color3f - the new color for the directly visible part of this lightsize - the scaling factor which specifies how big the corona of the
light has to bepublic javax.vecmath.Color3f getVisibleColor()
public void setPointLightCapability(int int0)
int0 - the capability constant which has to be setpublic void setPointLightCapabilityIsFrequent(int int0)
int0 - the capability constant which has to be setpublic void setAppearanceCapability(int int0)
int0 - the capability constant which has to be setpublic void setGeometryCapability(int int0)
int0 - the capability constant which has to be setpublic void setShapeCapability(int int0)
int0 - the capability constant which has to be setpublic void setGroupCapability(int int0)
int0 - the capability constant which has to be set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||