Loonim.RasterSurfaceTexture Class Reference

Detailed Description

A raster texture which is applied to a surface. Should generally be avoided as they're fixed size.

Inheritance diagram for Loonim.RasterSurfaceTexture:
Loonim.SurfaceTexture

Public Member Functions

 RasterSurfaceTexture (Texture2D image)
 Creates a raster surface texture with the given image. More...
 
- Public Member Functions inherited from Loonim.SurfaceTexture
 SurfaceTexture ()
 
void Load (byte[] data)
 
void LoadProperties (TextureReader reader)
 Loads the set of properties from the given reader. More...
 
void Set (string property, Texture value)
 Convenience function. It also helps to cache the original property value and straight edit that. More...
 
void Set (string property, Color value)
 Convenience function. It also helps to cache the original property value and straight edit that. More...
 
void Set (string property, float value)
 Convenience function. It also helps to cache the original property value and straight edit that. More...
 
TextureNode getElementByInstanceId (int layerID)
 
Texture2D DrawAlbedo (int size)
 Renders as a static image (albedo only, not HDR). Please don't spam me! It creates a texture and draw meta, so.. More...
 
Texture ForceDraw (DrawInfo settings)
 Always draws even if properties haven't changed. Typically responds with a RenderTexture but it depends on your tree (i.e. if your tree is just a constant, then you'll actually get a Texture2D back). More...
 
Texture Draw (DrawInfo settings)
 The fastest of all the drawing approaches. Typically responds with a RenderTexture but it depends on your tree (i.e. if your tree is just a constant, then you'll actually get a Texture2D back). More...
 
Texture2D DrawAlbedo (int size, bool hdr)
 Renders as a static image (albedo only, optionally HDR). Please don't spam me! It allocates a texture, draw meta and probably a pixel buffer. More...
 
void CreateMap ()
 Builds or rebuilds the property map. More...
 
void RemoveProperty (string property)
 Removes the given property by its nice name. More...
 
void SetProperty (string property, Values.PropertyValue value)
 Sets the named property. More...
 
SurfaceProperty GetProperty (string property, bool create)
 Gets the named property by nice name, optionally creating it. More...
 

Public Attributes

Texture2D Image
 The raw image. More...
 
- Public Attributes inherited from Loonim.SurfaceTexture
bool Changed
 True if this texture has changed in some way and it needs to be redrawn. Note! If you have RenderTexture's as inputs then this will be wrong (i.e. it doesn't know that the source properties are always changing). More...
 
TextureNode Root
 Noise describing the surface. More...
 
SurfaceProperty[] Properties
 The raw set of properties if there are any. More...
 
SurfaceDrawMode Mode =SurfaceDrawMode.GPU
 Draw using the GPU as often as possible. More...
 
Dictionary< string,
SurfaceProperty
PropertyMap
 A map of properties. Created if a property is requested by name. See this[string]. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Loonim.SurfaceTexture
static Texture2D ToTexture2D (Texture img, bool hdr)
 Converts an image (usually a RenderTexture) to a Texture2D. Optionally the resulting texture is HDR. More...
 
static void CopyTo (Texture2D image, RenderTexture rt)
 Copies a render texture into the given image. More...
 
- Properties inherited from Loonim.SurfaceTexture
Texture Texture [get]
 The output texture. Available after PreAllocate or Draw has been called. More...
 
SurfaceProperty this[int property] [get, set]
 Gets/sets a property by its nice name. More...
 
Values.PropertyValue this[string property] [get, set]
 Gets a property value by its nice name. Note that nice names are generally rare. Null if it doesn't exist. More...
 

Constructor & Destructor Documentation

Loonim.RasterSurfaceTexture.RasterSurfaceTexture ( Texture2D  image)
inline

Creates a raster surface texture with the given image.

Member Data Documentation

Texture2D Loonim.RasterSurfaceTexture.Image

The raw image.