Chunks
Moddable voxel sandbox for room-scale VR.
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Chunks.Graphics.Texture Class Reference
Inheritance diagram for Chunks.Graphics.Texture:
Chunks.Plugins.PluginResource

Public Member Functions

 Texture ()
 
 Texture (int width, int height, TextureFormat format=TextureFormat.Argb32)
 
void CopyFromRenderTexture (RenderTexture rt)
 
void CopyFromRenderTexture (RenderTexture rt, int sourceX, int sourceY, int width, int height, int destX, int destY)
 
void GetPixelData (byte[] dest, TextureOrientation orientation=TextureOrientation.Default)
 
void Dispose ()
 
- Public Member Functions inherited from Chunks.Plugins.PluginResource
override string ToString ()
 Returns the fully qualified name of this resource. More...
 

Public Attributes

int Width => Internal.width
 
int Height => Internal.height
 
- Public Attributes inherited from Chunks.Plugins.PluginResource
bool IsValid => Plugin == null || Plugin.IsLoaded
 

Protected Member Functions

override void OnReadDefinition (JToken token, string directory)
 When overridden in an inheriting class, handles reading information about the resource from a json token. More...
 
- Protected Member Functions inherited from Chunks.Plugins.PluginResource
 PluginResource ()
 
void AssertIsValid ()
 
virtual void OnInitialize ()
 
ResourceName GetResourceName (JToken token)
 Converts a json token to a resource name, associating it with the current namespace. Only valid from within OnReadDefinition. More...
 
ResourceName GetResourceName (JToken token, ResourceName @default)
 Converts a json token to a resource name, associating it with the current namespace. Only valid from within OnReadDefinition. If the token is null, default is used. More...
 

Additional Inherited Members

- Properties inherited from Chunks.Plugins.PluginResource
Plugin Plugin [get]
 Plugin this resource was loaded from. More...
 
ResourceName Name [get]
 Name of this resource. More...
 

Constructor & Destructor Documentation

Chunks.Graphics.Texture.Texture ( )
Chunks.Graphics.Texture.Texture ( int  width,
int  height,
TextureFormat  format = TextureFormat.Argb32 
)

Member Function Documentation

void Chunks.Graphics.Texture.CopyFromRenderTexture ( RenderTexture  rt)
void Chunks.Graphics.Texture.CopyFromRenderTexture ( RenderTexture  rt,
int  sourceX,
int  sourceY,
int  width,
int  height,
int  destX,
int  destY 
)
void Chunks.Graphics.Texture.Dispose ( )
void Chunks.Graphics.Texture.GetPixelData ( byte[]  dest,
TextureOrientation  orientation = TextureOrientation.Default 
)
override void Chunks.Graphics.Texture.OnReadDefinition ( JToken  token,
string  directory 
)
protectedvirtual

When overridden in an inheriting class, handles reading information about the resource from a json token.

Parameters
tokenToken to load the resource from
directoryLocation of the loaded json file's parent directory

Reimplemented from Chunks.Plugins.PluginResource.

Member Data Documentation

int Chunks.Graphics.Texture.Height => Internal.height
int Chunks.Graphics.Texture.Width => Internal.width

The documentation for this class was generated from the following file: