TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class EnvironmentMapResource in Tinman.AddOns.Components

Wraps the graphics resources of an IEnvironmentMap instance.

sealed class EnvironmentMapResource extends Disposable
  implements ILightProvider
  IResource
  IUpdateableFrameTime

Remarks

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.

Public / Attributes

Format

The texture format to use.

public property Format { get set }
type TextureFormat
value [not-null] The texture format.

Remarks:

Defaults to A8R8G8B8.

LifecycleState

Returns the lifecycle state of this object.

public virtual property LifecycleState { get }
type LifecycleState
value The lifecycle state.
inherited Disposable.LifecycleState

LightLatitude

Latitude of the prominent light in this environment map, if applicable.

public property LightLatitude { get }
type float64
value [-90..90] The latitude angle in degrees or NanD if there is no prominent light.
implements ILightProvider.LightLatitude

LightLongitude

Longitude of the prominent light in this environment map, if applicable.

public property LightLongitude { get }
type float64
value [-180..180] The longitude angle in degrees or NanD if there is no prominent light.
implements ILightProvider.LightLongitude

LightMipmap

Computes the mipmap level to use for sampling the diffuse light color.

public property LightMipmap { get }
type float32
value [>=0] The mipmap level.

LightSize

Apparent size of prominent light in this environment map, if applicable.

public property LightSize { get }
type float64
value [>=0] 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

MemoryConsumption

Returns the estimated memory consumption of this object.

public property MemoryConsumption { get }
type int64
value [>=0] The estimated memory consumption, in bytes.
implements IMemoryConsumption.MemoryConsumption

SetLightMask

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

Size

The cubemap texture size.

public property Size { get set }
type int32
value [pow2] The texture size.

Remarks:

Defaults to 256.

Texture

The environment texture.

public property Texture { get }
type ITextureCube
value The cubemap texture or null if not yet available.

Public / Methods

AcquireTry

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.

ApplyLightingState

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:

DelayUpdate

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.

Dispose

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.

SetLight

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

UpdateFrameTime

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