Wraps the graphics resources of an IEnvironmentMap instance.
sealed class
|
EnvironmentMapResource
|
extends
|
Disposable
|
||
implements
|
ILightProvider
|
||||
IResource
|
|||||
IUpdateableFrameTime
|
The properties of the ILightProvider interface will return the values of the owning IEnvironmentMap, at the time the cubemap environment texture (see Texture) has been computed.
The texture format to use.
public
property
|
Format
{
get
set
}
|
||
type
|
TextureFormat
|
||
value
|
|
The texture format. |
Remarks:
Defaults to A8R8G8B8.
Returns the lifecycle state of this object.
public
virtual
property
|
LifecycleState
{
get
}
|
||
type
|
LifecycleState
|
||
value
|
The lifecycle state. | ||
inherited
|
Disposable.LifecycleState
|
Latitude of the prominent light in this environment map, if applicable.
public
property
|
LightLatitude
{
get
}
|
||
type
|
float64
|
||
value
|
|
The latitude angle in degrees or NanD if there is no prominent light. | |
implements
|
ILightProvider.LightLatitude
|
Longitude of the prominent light in this environment map, if applicable.
public
property
|
LightLongitude
{
get
}
|
||
type
|
float64
|
||
value
|
|
The longitude angle in degrees or NanD if there is no prominent light. | |
implements
|
ILightProvider.LightLongitude
|
Computes the mipmap level to use for sampling the diffuse light color.
public
property
|
LightMipmap
{
get
}
|
||
type
|
float32
|
||
value
|
|
The mipmap level. |
Apparent size of prominent light in this environment map, if applicable.
public
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. | |
implements
|
ILightProvider.LightSize
|
Returns the estimated memory consumption of this object.
public
property
|
MemoryConsumption
{
get
}
|
||
type
|
int64
|
||
value
|
|
The estimated memory consumption, in bytes. | |
implements
|
IMemoryConsumption.MemoryConsumption
|
Can the SetLight method be used to configure the prominent light?
public
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.
|
||
implements
|
ILightProvider.SetLightMask
|
The cubemap texture size.
public
property
|
Size
{
get
set
}
|
||
type
|
int32
|
||
value
|
|
The texture size. |
Remarks:
Defaults
to
256
.
The environment texture.
public
property
|
Texture
{
get
}
|
||
type
|
ITextureCube
|
||
value
|
The
cubemap
texture
or
null
if
not
yet
available. |
Acquires a strong reference to this disposable object.
[OwnerReturn, ThreadSafe]
|
||||
public
method
|
AcquireTry
()
|
|||
type
|
IDisposable
|
|||
returns
|
this
if
a
new
strong
reference
has
been
acquired,
null
if
this
object
is
already
being
disposed.
|
|||
inherited
|
Disposable.AcquireTry
|
Remarks:
The object will not be actually disposed by calls to Dispose when there is at least one strong reference left. Code that calls the AcquireTry method is responsible for calling the Dispose method accordingly.
This method is not intended to be used in performance-critical code. It should only be used to high-level resource management.
Applies the render state for the given environment map.
public
method
|
ApplyLightingState
(LightingState state)
|
||
params
|
state
|
[not-null]
|
The state object to use. |
Remarks:
The following state variables are set:
Delays the automatic computation of higher environment map resolutions for the given amount of time.
public
method
|
DelayUpdate
(float32 seconds)
|
||
params
|
seconds
|
[>=0]
|
The delay, in seconds. |
Remarks:
The next automatic computation will not occur before the given time span has elapsed.
Releases all resources held by this object if there are no more strong references to it, decrements the reference counter by one otherwise.
[Dispose, OwnerThis, ThreadSafe]
|
||||
public
method
|
Dispose
()
|
|||
inherited
|
Disposable.Dispose
|
Remarks:
The Dispose method silently returns if the object has already been disposed.
Configures the prominent light.
public
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). | ||
implements
|
ILightProvider.SetLight
|
This method is called once per application frame.
public
method
|
UpdateFrameTime
(float32 time)
|
||
type
|
bool
|
||
params
|
time
|
[>0]
|
The amount of time that has elapsed since the last frame, in seconds. |
returns
|
true
if
the
object
needs
to
be
presented
again,
false
if
the
current
presentation
is
still
valid.
|
||
implements
|
IUpdateableFrameTime.UpdateFrameTime
|