An implementation of the IEnvironmentMap interface that generates a simple sky from a couple of color keys.
sealed class
|
EnvironmentMapSky
|
extends
|
EnvironmentMap
|
Overall ground color (dark).
public
property
|
GroundColorDark
{
get
set
}
|
||
type
|
int64
|
||
value
|
The overall ground color. |
See also:
ColorsOverall ground color (light).
public
property
|
GroundColorLight
{
get
set
}
|
||
type
|
int64
|
||
value
|
The overall ground color. |
See also:
ColorsShould hemispheric fog be used for this environment map?
public
override
property
|
HasHemisphericFog
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
hemispheric
fog
should
be
used,
false
if
not. |
||
implements
|
EnvironmentMap.HasHemisphericFog
|
Latitude of the prominent light in this environment map, if applicable.
public
override
property
|
LightLatitude
{
get
}
|
||
type
|
float64
|
||
value
|
|
The latitude angle in degrees or NanD if there is no prominent light. | |
overrides
|
EnvironmentMap.LightLatitude
|
Longitude of the prominent light in this environment map, if applicable.
public
override
property
|
LightLongitude
{
get
}
|
||
type
|
float64
|
||
value
|
|
The longitude angle in degrees or NanD if there is no prominent light. | |
overrides
|
EnvironmentMap.LightLongitude
|
Apparent size of prominent light in this environment map, if applicable.
public
override
property
|
LightSize
{
get
}
|
||
type
|
float64
|
||
value
|
|
The apparent diameter of the prominent light, given as an angle in degrees. Will be NanD if there is no prominent light. | |
overrides
|
EnvironmentMap.LightSize
|
Can the SetLight method be used to configure the prominent light?
public
override
property
|
SetLightMask
{
get
}
|
||
type
|
int32
|
||
value
|
Zero
or
more
of
the
following
bits:
1 :
LightLatitude
can
be
configured.
2 :
LightLongitude
can
be
configured.
4 :
LightSize
can
be
configured.
|
||
overrides
|
EnvironmentMap.SetLightMask
|
Overall sky color (dark).
public
property
|
SkyColorDark
{
get
set
}
|
||
type
|
int64
|
||
value
|
The overall sky color. |
See also:
ColorsHazy sky color at the horizon.
public
property
|
SkyColorHaze
{
get
set
}
|
||
type
|
int64
|
||
value
|
The sky haze color. |
See also:
ColorsOverall sky color (light).
public
property
|
SkyColorLight
{
get
set
}
|
||
type
|
int64
|
||
value
|
The overall sky color. |
See also:
ColorsApparent color of the sun.
public
property
|
SunColor
{
get
set
}
|
||
type
|
int64
|
||
value
|
The sun color. |
Relative size of the sun corona.
public
property
|
SunCorona
{
get
set
}
|
||
type
|
float64
|
||
value
|
|
The corona size, relative to the sun size. |
Returns the current version of object.
public
property
|
Version
{
get
}
|
||
type
|
int32
|
||
value
|
The current version number. | ||
inherited
|
VersionedBase.Version
|
Remarks:
For each modification, the version is incremented by at least one.
Creates a new instance of EnvironmentMapSky.
public
constructor
|
EnvironmentMapSky
(float64 lightLatitude = 45)
|
||
params
|
lightLatitude
|
Initial
value
for
LightLatitude.
Defaults
to
45° .
|
Computes the environment color at the given coordinates.
[Pure]
|
||||
public
override
method
|
ComputeEnvironmentColor
(float64 latitude,
float64 longitude)
|
|||
type
|
int64
|
|||
params
|
latitude
|
The latitude angle of the view direction, in the range [-90..90] degrees. The vertical center of the environment map is at 0° latitude.. The zenith is at 90° latitude. | ||
longitude
|
The longitude angle of the view direction, in the range [-180..180] degrees. The horizontal center of the environment map is at 0° longitude. | |||
returns
|
The computed environment map color. | |||
implements
|
EnvironmentMap.ComputeEnvironmentColor
|
See also:
ColorsCreates a new resource object, using the given graphics context.
[OwnerReturn]
|
||||
public
method
|
CreateResource
(Graphics graphics)
|
|||
type
|
IResource
|
|||
params
|
graphics
|
[not-null]
|
The graphics context to use. | |
returns
|
The
resource
object
or
null . |
|||
inherited
|
EnvironmentMap.CreateResource
|
Remarks:
Resource objects may implement the IMemoryConsumption interface. In this case, the reported memory consumption will be interpreted as an estimate on how much GPU memory is consumed by the resource. This estimate can then be used for resource caching (e.g. CacheMemory).
Compares this object with the given one.
[Pure]
|
||||
public
method
|
Equals
(IResourceHandle other)
|
|||
type
|
bool
|
|||
params
|
other
|
The object to compare to. | ||
returns
|
true
if
this
object
is
equal
to
other,
false
if
not.
|
|||
inherited
|
EnvironmentMap.Equals
|
[Pure]
|
||||
public
override
sealed
method
|
GetHashCode
()
|
|||
type
|
int32
|
|||
inherited
|
EnvironmentMap.GetHashCode
|
Configures the prominent light.
public
override
method
|
SetLight
(float64 latitude,
float64 longitude,
float64 size)
|
||
params
|
latitude
|
Latitude of the prominent light in this environment map (see LightLatitude). | |
longitude
|
Longitude of the prominent light in this environment map (see LightLongitude). | ||
size
|
Apparent size of prominent light in this environment map, in degrees (see LightSize). | ||
overrides
|
EnvironmentMap.SetLight
|