|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The iLight interface is the SCF interface for the csLight class. First some terminology about all the several types of lights that Crystal Space supports: * Static light. This is a normal static light that cannot move and cannot change intensity/color. All lighting information from all static lights is collected in one static lightmap. * Pseudo-dynamic light. This is a static light that still cannot move but the intensity/color can change. The shadow information from every pseudo-dynamic light is kept in a separate shadow-map. Shadowing is very accurate with pseudo-dynamic lights since they use the same algorithm as static lights. * Dynamic light. This is a light that can move and change intensity/color. These lights are the most flexible. All lighting information from all dynamic lights is collected in one dynamic lightmap (separate from the pseudo-dynamic shadow-maps). Shadows for dynamic lights will be less accurate because things will not cast accurate shadows (due to computation speed limitations).
Method Summary | |
void |
addAffectedLightingInfo(iLightingInfo li)
Add a mesh to this light. |
void |
calculateAttenuationVector(int atttype)
Calculate the attenuation vector for a given attenuation type. |
void |
calculateAttenuationVector(int atttype,
float radius)
Calculate the attenuation vector for a given attenuation type. |
void |
calculateAttenuationVector(int atttype,
float radius,
float brightness)
Calculate the attenuation vector for a given attenuation type. |
iCrossHalo |
createCrossHalo(float intensity,
float cross)
Create a cross halo for this light. |
iFlareHalo |
createFlareHalo()
Create a flare halo for this light. |
iNovaHalo |
createNovaHalo(int seed,
int num_spokes,
float roundness)
Create a nova halo for this light. |
int |
getAttenuation()
Return current attenuation mode. |
csVector3 |
getAttenuationVector()
Get attenuation vector csVector3(ant, linear, quadric);. |
float |
getBrightnessAtDistance(float d)
Get the brightness of a light at a given distance. |
csVector3 |
getCenter()
Get the position of this light. |
csColor |
getColor()
Get the color of this light. |
boolean |
getDistanceForBrightness(float brightness,
float distance)
Get the distance for a given light brightness. |
int |
getDynamicType()
Get the dynamic type of this light. |
csFlags |
getFlags()
Get flags for this light. |
float |
getInfluenceRadius()
Get the influence radius of the light. |
float |
getInfluenceRadiusSq()
Get the squared influence radius of the light. |
iLightCallback |
getLightCallback(int idx)
Get the specified light callback. |
int |
getLightCallbackCount()
Get the number of light callbacks. |
java.lang.String |
getLightID()
Get the id of this light. |
int |
getLightNumber()
Return a number that changes when the light changes (color, or position);. |
iLight |
getNext()
Get the next dynamic light in the list. @ TEMPORARY. @ Implemented in csLight::Light, and csIsoFakeLight. |
iSector |
getSector()
Get the sector for this light. |
iObject |
queryObject()
Get the iObject for this light. |
void |
removeAffectedLightingInfo(iLightingInfo li)
Remove a mesh from this light. |
void |
removeLightCallback(iLightCallback cb)
Remove a light callback. |
void |
setAttenuation(int a)
Set attenuation mode. |
void |
setAttenuationVector(csVector3 attenv)
Set attenuation vector csVector3(ant, linear, quadric); FIXME: examples. |
void |
setCenter(csVector3 pos)
Set the position of this light. |
void |
setColor(csColor col)
Set the color of this light. |
void |
setInfluenceRadius(float radius)
Override the influence radius. |
void |
setLightCallback(iLightCallback cb)
Set the light callback. |
void |
setup()
For a dynamic light you need to call this to do the actual lighting calculations. |
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 void addAffectedLightingInfo(iLightingInfo li)
li
- public void calculateAttenuationVector(int atttype)
atttype
- public void calculateAttenuationVector(int atttype, float radius)
atttype
- radius
- public void calculateAttenuationVector(int atttype, float radius, float brightness)
atttype
- radius
- brightness
- public iCrossHalo createCrossHalo(float intensity, float cross)
intensity
- cross
-
public iFlareHalo createFlareHalo()
public iNovaHalo createNovaHalo(int seed, int num_spokes, float roundness)
seed
- num_spokes
- roundness
-
public int getAttenuation()
public csVector3 getAttenuationVector()
public float getBrightnessAtDistance(float d)
d
-
public csVector3 getCenter()
public csColor getColor()
public boolean getDistanceForBrightness(float brightness, float distance)
brightness
- distance
-
public int getDynamicType()
public csFlags getFlags()
public float getInfluenceRadius()
public float getInfluenceRadiusSq()
public iLightCallback getLightCallback(int idx)
idx
-
public int getLightCallbackCount()
public java.lang.String getLightID()
public int getLightNumber()
public iLight getNext()
public iSector getSector()
public iObject queryObject()
public void removeAffectedLightingInfo(iLightingInfo li)
li
- public void removeLightCallback(iLightCallback cb)
cb
- public void setAttenuation(int a)
a
- public void setAttenuationVector(csVector3 attenv)
attenv
- public void setCenter(csVector3 pos)
pos
- public void setColor(csColor col)
col
- public void setInfluenceRadius(float radius)
radius
- public void setLightCallback(iLightCallback cb)
cb
- public void setup()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |