jv.project
Interface PvLightIf
-
- All Superinterfaces:
- PgGeometryIf, PsUpdateIf
- All Known Implementing Classes:
- PvLight
public interface PvLightIf extends PgGeometryIf
Interface for lights used in the JavaView display. Additional to the built-in lights of JavaView a user may add third-party lights fulfilling this interface to any JavaView display.- Author:
- Konrad Polthier
- Version:
- 23.07.07, 1.20 revised (kp) Reference coordinate system added.
31.12.03, 1.10 revised (kp) Additional lights head and sky added.
11.08.02, 1.01 revised (kp) Method setName(String) added.
18.06.02, 1.00 created (kp)
-
-
Field Summary
Fields Modifier and Type Field and Description static intLIGHT_AMBIENTNon-directional global illumination of scene.static intLIGHT_DIRECTIONDirectional global illumination of scene with parallel light.static intLIGHT_HEADHeadlight always shines from the position of the camera, i.e. observer, on the scene.static intLIGHT_POINTPoint light source shines in all direction from point in space.static intLIGHT_SHADOWShadow light simply produces a shadow on other geometries.static intLIGHT_SKYVertical light shines from north pole of the sky dome on the scene.static intLIGHT_SPOTDirectional illumination of a part of scene which lies within the spot cone.static intMODEL_LIGHTAdditionally to surface material use lighting information obtained from lights.static intMODEL_SURFACEUse surface color and global material properties of a geometry.static intREFERENCE_CAMERALight position is given relative to the camera coordinate system.static intREFERENCE_SCENELight position is given relative to the scene coordinate system (default).static intSHADING_FULLSPHEREShading function illuminates full of sphere with decay towards opposite pole.static intSHADING_HALFSPHEREShading function illuminates visible half of sphere with decay towards equator.static intSHADING_SYMMETRICShading function illuminates full sphere with symmetric half sphere shading.-
Fields inherited from interface jv.project.PgGeometryIf
AMBIENT_H2_HYPERBOLIC, AMBIENT_H3_HYPERBOLIC, AMBIENT_H4_HYPERBOLIC, AMBIENT_PROJECTIONS, AMBIENT_R1_EUCLIDEAN, AMBIENT_R2_EUCLIDEAN, AMBIENT_R3_EUCLIDEAN, AMBIENT_R4_EUCLIDEAN, AMBIENT_R5_EUCLIDEAN, AMBIENT_S1_SPHERE, AMBIENT_S2_SPHERE, AMBIENT_S3_SPHERE, AMBIENT_S4_SPHERE, AMBIENT_SPACES, BLEND_ALPHA, BLEND_MATERIAL, BLEND_REPLACE, FILTER_DIRECT, FILTER_LINEAR, FILTER_QUADRATIC, HAS_METHOD_MENU, INSPECTOR_CONTROL, INSPECTOR_CONTROL_EXT, INSPECTOR_MATERIAL, INSPECTOR_MATERIAL_EXT, INSPECTOR_TEXTURE, INSPECTOR_TEXTURE_EXT, LABEL_BASE, LABEL_CENTER, LABEL_HEAD, LABEL_MIDDLE, LABEL_TAIL, LABEL_TOP, m_numLabelTypes, METHOD_EXT, PERIODIC_BOTH, PERIODIC_HEIGHT, PERIODIC_NONE, PERIODIC_WIDTH, PROJ_KLEIN_BALL, PROJ_PARALLEL, PROJ_POINCARE_BALL, PROJ_STEREOGRAPHIC, PROJ_UPPER_HALFSPACE, SIDE_BACK, SIDE_BOTH, SIDE_FRONT, SIDE_NONE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description doublegetAngle()Get angle of spot cone of light.java.awt.ColorgetColor()Get color of light.doublegetCorona()Get angle of corona of spot cone.doublegetExponent()Get exponent which determines the size of a highlight.doublegetFalloff()Get fall off angle of spot cone.doublegetIntensity()Get intensity of light.PdVectorgetInterest()Get interest of light.intgetLightType()Get type of the light among public variables likeLIGHT_AMBIENT.PdVectorgetPosition()Get position of light.intgetReference()Get reference coordinate system of the light among public variables likeREFERENCE_SCENE.intgetShading()Get shading type of the light among public variables likeSHADING_SYMMETRIC.booleanisHighlight()Determines if light throughs a highlight.booleanisSwitchedOn()Get flag if light is currently switched on within the scene, i.e. whether is contributes to the total light.voidsetAngle(double angle)Set angle of spot cone of light.voidsetColor(java.awt.Color color)Set color of light.voidsetCorona(double corona)Set angle of corona of spot cone.voidsetExponent(double exponent)Set exponent which determines the size of a highlight.voidsetFalloff(double falloff)Set fall off angle of spot cone.voidsetHighlight(boolean bHighlight)Enables if light throughs a highlight.voidsetIntensity(double intensity)Set intensity of light.voidsetInterest(double x, double y, double z)Set interest of light.voidsetInterest(PdVector interest)Set interest of light.voidsetLightType(int lightType)Set type of the light among public variables likeLIGHT_AMBIENT.voidsetName(java.lang.String name)Set name of instance.voidsetPosition(double x, double y, double z)Set position of light.voidsetPosition(PdVector position)Set position of light.voidsetReference(int reference)Set reference coordinate system of the light among public variables likeREFERENCE_SCENE.voidsetShading(int shading)Set shading type of the light among public variables likeSHADING_SYMMETRIC.voidsetSwitchedOn(boolean flag)Set flag if light is currently switched on within the scene, i.e. whether is contributes to the total light.-
Methods inherited from interface jv.project.PgGeometryIf
addDisplay, addElement, addPolygon, addVertex, assureInspector, blend, clearTagElement, clearTagPolygon, clearTagVertex, clone, fillMethodMenu, fillMethodMenu, getAmbientInvMatrix, getAmbientMatrix, getAmbientProjection, getAmbientSpace, getAuthorInfo, getControlPanel, getDimOfSimplex, getDimOfVertices, getDisplays, getElement, getGeometryInfo, getInfoPanel, getJvx, getMaterialPanel, getModelMatrix, getName, getPolygon, getTextureImage, getTextureImageName, getTitle, getType, getVertex, hasAmbientMatrix, hasDisplay, hasModelMatrix, hasTag, hasTagElement, hasTagPolygon, hasTagVertex, intersectionWithLine, isConfigurable, isVisible, merge, paint, reflect, removeDisplay, removeElement, removeMethodMenus, removePolygon, removeVertex, setAmbientMatrix, setAmbientProjection, setAmbientSpace, setAuthorInfo, setElement, setGeometryInfo, setJvx, setModelMatrix, setPolygon, setState, setTagElement, setTagPolygon, setTagVertex, setTextureImage, setTextureImageName, setTitle, setVertex, setVisible, toString
-
Methods inherited from interface jv.object.PsUpdateIf
getFather, setParent, update
-
-
-
-
Field Detail
-
MODEL_SURFACE
static final int MODEL_SURFACE
Use surface color and global material properties of a geometry.- See Also:
- Constant Field Values
-
MODEL_LIGHT
static final int MODEL_LIGHT
Additionally to surface material use lighting information obtained from lights.- See Also:
- Constant Field Values
-
REFERENCE_SCENE
static final int REFERENCE_SCENE
Light position is given relative to the scene coordinate system (default).- Since:
- JavaView 3.90.021
- See Also:
- Constant Field Values
-
REFERENCE_CAMERA
static final int REFERENCE_CAMERA
Light position is given relative to the camera coordinate system. In this case a light does not react on any viewing transformation.- Since:
- JavaView 3.90.021
- See Also:
- Constant Field Values
-
LIGHT_AMBIENT
static final int LIGHT_AMBIENT
Non-directional global illumination of scene.- See Also:
- Constant Field Values
-
LIGHT_DIRECTION
static final int LIGHT_DIRECTION
Directional global illumination of scene with parallel light.- See Also:
- Constant Field Values
-
LIGHT_POINT
static final int LIGHT_POINT
Point light source shines in all direction from point in space.- See Also:
- Constant Field Values
-
LIGHT_SPOT
static final int LIGHT_SPOT
Directional illumination of a part of scene which lies within the spot cone.- See Also:
- Constant Field Values
-
LIGHT_SHADOW
static final int LIGHT_SHADOW
Shadow light simply produces a shadow on other geometries.- See Also:
- Constant Field Values
-
LIGHT_HEAD
static final int LIGHT_HEAD
Headlight always shines from the position of the camera, i.e. observer, on the scene.- See Also:
- Constant Field Values
-
LIGHT_SKY
static final int LIGHT_SKY
Vertical light shines from north pole of the sky dome on the scene.- See Also:
- Constant Field Values
-
SHADING_SYMMETRIC
static final int SHADING_SYMMETRIC
Shading function illuminates full sphere with symmetric half sphere shading. HACK: value must correspond to ordering of items in PvLight_IP.- Since:
- JavaView 3.90.022
- See Also:
- Constant Field Values
-
SHADING_HALFSPHERE
static final int SHADING_HALFSPHERE
Shading function illuminates visible half of sphere with decay towards equator. Light illuminates only the front side of a sphere while leaving the back side black. HACK: value must correspond to ordering of items in PvLight_IP.- Since:
- JavaView 3.90.022
- See Also:
- Constant Field Values
-
SHADING_FULLSPHERE
static final int SHADING_FULLSPHERE
Shading function illuminates full of sphere with decay towards opposite pole. HACK: value must correspond to ordering of items in PvLight_IP.- Since:
- JavaView 3.90.022
- See Also:
- Constant Field Values
-
-
Method Detail
-
setName
void setName(java.lang.String name)
Set name of instance. since JavaView 2.31- Specified by:
setNamein interfacePgGeometryIf- See Also:
PgGeometryIf.getName(),PgGeometryIf.setTitle(String)
-
getReference
int getReference()
Get reference coordinate system of the light among public variables likeREFERENCE_SCENE.- Returns:
- reference coordinate system of this light source
- Since:
- JavaView 3.90.021
-
setReference
void setReference(int reference)
Set reference coordinate system of the light among public variables likeREFERENCE_SCENE.- Parameters:
reference- new reference coordinate system- Since:
- JavaView 3.90.021
-
getShading
int getShading()
Get shading type of the light among public variables likeSHADING_SYMMETRIC.- Returns:
- shading type of this light
- Since:
- JavaView 3.90.022
-
setShading
void setShading(int shading)
Set shading type of the light among public variables likeSHADING_SYMMETRIC.- Parameters:
shading- new shading type of this light- Since:
- JavaView 3.90.022
-
getLightType
int getLightType()
Get type of the light among public variables likeLIGHT_AMBIENT.- Returns:
- type of this light source
-
setLightType
void setLightType(int lightType)
Set type of the light among public variables likeLIGHT_AMBIENT.- Parameters:
lightType- new type of this light source
-
isSwitchedOn
boolean isSwitchedOn()
Get flag if light is currently switched on within the scene, i.e. whether is contributes to the total light.
-
setSwitchedOn
void setSwitchedOn(boolean flag)
Set flag if light is currently switched on within the scene, i.e. whether is contributes to the total light.
-
getPosition
PdVector getPosition()
Get position of light.- Returns:
- position is a 3d vector
-
setPosition
void setPosition(PdVector position)
Set position of light.- Parameters:
position- position is a 3d vector
-
setPosition
void setPosition(double x, double y, double z)Set position of light.- Parameters:
x- x coordinate of position of lighty- y coordinate of position of lightz- z coordinate of position of light
-
getInterest
PdVector getInterest()
Get interest of light.- Returns:
- interest is a 3d position.
-
setInterest
void setInterest(PdVector interest)
Set interest of light.- Parameters:
interest- interest is a 3d position.
-
setInterest
void setInterest(double x, double y, double z)Set interest of light.- Parameters:
x- x coordinate of interest of lighty- y coordinate of interest of lightz- z coordinate of interest of light
-
getColor
java.awt.Color getColor()
Get color of light.- Returns:
- color of light
-
setColor
void setColor(java.awt.Color color)
Set color of light.- Parameters:
color- new color of light
-
getIntensity
double getIntensity()
Get intensity of light.- Returns:
- intensity of light
-
setIntensity
void setIntensity(double intensity)
Set intensity of light.- Parameters:
intensity- intensity of light
-
getAngle
double getAngle()
Get angle of spot cone of light.- Returns:
- angle of spot cone of light
-
setAngle
void setAngle(double angle)
Set angle of spot cone of light.- Parameters:
angle- angle of spot cone of light
-
getCorona
double getCorona()
Get angle of corona of spot cone.- Returns:
- angle of corona of spot cone
-
setCorona
void setCorona(double corona)
Set angle of corona of spot cone.- Parameters:
corona- angle of corona of spot cone
-
getFalloff
double getFalloff()
Get fall off angle of spot cone.- Returns:
- fall off angle of spot cone
-
setFalloff
void setFalloff(double falloff)
Set fall off angle of spot cone.- Parameters:
falloff- fall off angle of spot cone
-
getExponent
double getExponent()
Get exponent which determines the size of a highlight.- Returns:
- specular exponent
-
setExponent
void setExponent(double exponent)
Set exponent which determines the size of a highlight.- Parameters:
exponent- specular exponent
-
isHighlight
boolean isHighlight()
Determines if light throughs a highlight.- Returns:
- flag if light throughs a highlight
- Since:
- JavaView 3.90.021
-
setHighlight
void setHighlight(boolean bHighlight)
Enables if light throughs a highlight.- Parameters:
bHighlight- flag- Since:
- JavaView 3.90.021
-
-
"