Base interface for classes that compute samples of an environment map.
interface
|
IEnvironmentMap
|
extends
|
ILightProvider
|
||
IResourceHandle
|
|||||
IVersioned
|
|||||
base of
|
EnvironmentMap
|
Environment maps are used to model the visual appearance of material reflectivity and gloss. For this purpose, an environment map is rasterized into a ColorCube and then encoded as a mipmapped cubemap texture, which in turn is used during rendering. Ambient lighting is computed from the smallest mipmaps, thus mimicking hemispheric sampling. If an environment map contains a single prominent light feature, it may expose it via the LightLatitude, LightLongitude and LightSize properties. These will be then used for diffuse lighting.
IEnvironmentMap objects act as resource handles and produce EnvironmentMapResource resource objects.
Should hemispheric fog be used for this environment map?
property
|
HasHemisphericFog
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
hemispheric
fog
should
be
used,
false
if
not. |
Latitude of the prominent light in this environment map, if applicable.
property
|
LightLatitude
{
get
}
|
||
type
|
float64
|
||
value
|
|
The latitude angle in degrees or NanD if there is no prominent light. | |
inherited
|
ILightProvider.LightLatitude
|
Longitude of the prominent light in this environment map, if applicable.
property
|
LightLongitude
{
get
}
|
||
type
|
float64
|
||
value
|
|
The longitude angle in degrees or NanD if there is no prominent light. | |
inherited
|
ILightProvider.LightLongitude
|
Apparent size of prominent light in this environment map, if applicable.
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. | |
inherited
|
ILightProvider.LightSize
|
Can the SetLight method be used to configure the prominent light?
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.
|
||
inherited
|
ILightProvider.SetLightMask
|
Returns the current version of object.
property
|
Version
{
get
}
|
||
type
|
int32
|
||
value
|
The current version number. | ||
inherited
|
IVersioned.Version
|
Remarks:
For each modification, the version is incremented by at least one.
Computes the environment color at the given coordinates.
[Pure]
|
||||
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. |
See also:
ColorsCreates a new resource object, using the given graphics context.
[OwnerReturn]
|
||||
method
|
CreateResource
(Graphics graphics)
|
|||
type
|
IResource
|
|||
params
|
graphics
|
[not-null]
|
The graphics context to use. | |
returns
|
The
resource
object
or
null . |
|||
inherited
|
IResourceHandle.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).
Configures the prominent light.
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). | ||
inherited
|
ILightProvider.SetLight
|
Rasterizes this environment map into the given color cube.
method
|
Rasterize
(ColorCube cube,
bool edgeFixup = true)
|
||
params
|
cube
|
[not-null]
|
The output color cube. |
edgeFixup
|
Perform
edge
fixup
during
rasterization?
During
rendering,
the
non-principal
axes
of
the
cubemap
texture
coordinates
then
need
to
be
scaled
by
the
factor
1-0.5/n ,
where
n
is
the
cubemap
texture
size,
divided
by
two.
Defaults
to
true .
|