public final class R2LightSphericalSingle extends Object implements R2LightSphericalSingleType
Modifier and Type | Method and Description |
---|---|
com.io7m.jcanephora.core.JCGLArrayObjectUsableType |
arrayObject() |
com.io7m.jtensors.core.parameterized.vectors.PVector3D<R2SpaceRGBType> |
color() |
double |
falloff() |
double |
geometryScaleFactor() |
double |
intensity() |
long |
lightID() |
static R2LightSphericalSingle |
newLight(R2UnitSphereUsableType in_sphere,
R2IDPoolType in_pool)
Construct a new light.
|
com.io7m.jtensors.core.parameterized.vectors.PVector3D<R2SpaceWorldType> |
originPosition() |
double |
radius() |
void |
setColor(com.io7m.jtensors.core.parameterized.vectors.PVector3D<R2SpaceRGBType> in_color)
Set the color of the light.
|
void |
setFalloff(double f)
Set the light falloff exponent
|
void |
setGeometryScaleFactor(double f)
Set the geometry scale factor.
|
void |
setIntensity(double i)
Set the current light intensity
|
void |
setOriginPosition(com.io7m.jtensors.core.parameterized.vectors.PVector3D<R2SpaceWorldType> p)
Set the origin position of the light.
|
void |
setRadius(double r)
Set the light radius in world-space units.
|
R2TransformReadableType |
transform() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
matchLightVolumeSingleReadable
matchLightSingle
public static R2LightSphericalSingle newLight(R2UnitSphereUsableType in_sphere, R2IDPoolType in_pool)
in_sphere
- The light volumein_pool
- The ID poolpublic double radius()
radius
in interface R2LightSphericalReadableType
public void setRadius(double r)
R2LightSphericalWritableType
setRadius
in interface R2LightSphericalWritableType
r
- The light radiuspublic double falloff()
falloff
in interface R2LightSphericalReadableType
public void setFalloff(double f)
R2LightSphericalWritableType
setFalloff
in interface R2LightSphericalWritableType
f
- The light falloffpublic com.io7m.jtensors.core.parameterized.vectors.PVector3D<R2SpaceRGBType> color()
color
in interface R2LightReadableType
public double intensity()
intensity
in interface R2LightReadableType
public void setColor(com.io7m.jtensors.core.parameterized.vectors.PVector3D<R2SpaceRGBType> in_color)
R2LightWritableType
setColor
in interface R2LightWritableType
in_color
- The light colorpublic void setIntensity(double i)
R2LightWritableType
setIntensity
in interface R2LightWritableType
i
- The intensity (typically [0.0 .. 1.0]
)public com.io7m.jtensors.core.parameterized.vectors.PVector3D<R2SpaceWorldType> originPosition()
originPosition
in interface R2LightSphericalReadableType
public com.io7m.jcanephora.core.JCGLArrayObjectUsableType arrayObject()
arrayObject
in interface R2LightSingleReadableType
public long lightID()
lightID
in interface R2LightReadableType
public R2TransformReadableType transform()
transform
in interface R2LightSingleReadableType
public double geometryScaleFactor()
geometryScaleFactor
in interface R2LightSphericalSingleReadableType
R2LightSphericalSingleWritableType.setGeometryScaleFactor(double)
public void setOriginPosition(com.io7m.jtensors.core.parameterized.vectors.PVector3D<R2SpaceWorldType> p)
R2LightSphericalSingleWritableType
setOriginPosition
in interface R2LightSphericalSingleWritableType
p
- The position of the origin of the light in world-spacepublic void setGeometryScaleFactor(double f)
R2LightSphericalSingleWritableType
R2LightSphericalReadableType.radius()
* f
. This is used to artificially enlarge the light volume to
account for, for example, the fact that a low-polygon approximation of a
sphere will typically have a smaller volume than a real sphere would.setGeometryScaleFactor
in interface R2LightSphericalSingleWritableType
f
- The scale factorCopyright © 2017 <code@io7m.com> http://io7m.com