| 限定符和类型 | 类 | 说明 |
|---|---|---|
static class |
LightComponent.LightType |
Enumerates light types.
|
| 构造器 | 说明 |
|---|---|
LightComponent() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
Vector3 |
getColor() |
Obtains the light color.
|
float |
getIntensity() |
Obtains the light intensity.
|
LightComponent.LightType |
getLightType() |
Obtains the light type.
|
float |
getRange() |
Obtains the range of point lights or spot lights.
|
float |
getSpotInnerAngle() |
Obtains the inner angle of spot lights.
|
float |
getSpotOuterAngle() |
Obtains the outer angle of spot lights.
|
boolean |
isShadowEnabled() |
Checks whether the current lights support projection.
|
void |
setColor(Vector3 color) |
Sets the light color.
|
void |
setIntensity(float intensity) |
Sets the light intensity.
|
void |
setLightType(LightComponent.LightType lightType) |
Sets the light type.
|
void |
setRange(float range) |
Sets the range of point lights or spot lights.
|
void |
setShadowEnabled(boolean isShadowEnabled) |
Sets whether the current lights support projection.
|
void |
setSpotInnerAngle(float spotInnerAngle) |
Sets the inner angle of spot lights.
|
void |
setSpotOuterAngle(float spotOuterAngle) |
Sets the outer angle of spot lights.
|
public LightComponent.LightType getLightType()
public void setLightType(LightComponent.LightType lightType)
lightType - Indicates the light type to set.public Vector3 getColor()
public void setColor(Vector3 color)
color - Indicates the light color to set.public float getIntensity()
public void setIntensity(float intensity)
intensity - Indicates the light intensity to set.public float getRange()
public void setRange(float range)
range - Indicates the range to set.public float getSpotInnerAngle()
public void setSpotInnerAngle(float spotInnerAngle)
spotInnerAngle - Indicates the inner angle to set.public float getSpotOuterAngle()
public void setSpotOuterAngle(float spotOuterAngle)
spotOuterAngle - Indicates the outer angle to set.public boolean isShadowEnabled()
true if projection is supported; returns false otherwise.public void setShadowEnabled(boolean isShadowEnabled)
isShadowEnabled - Specifies whether the current lights support projection. true indicates that
projection is supported, and false indicates the opposite.