Tanoda
Leap.Unity.GraphicalRenderer.AtlasUvs Class Reference

A class that contains mapping information that specifies how a texture is packed into an atlas. More...

Classes

class  TextureToRect
 

Public Member Functions

Rect GetRect (int channel, UnityEngine.Object key)
 Given a texture object and a uv channel, return the rect that this texture occupies within the atlas. If the key is not present in the atlas, the default rect is returned. If a null texture is passed in, the rect for the empty texture (which is valid!) is returned. More...
 
void SetRect (int channel, UnityEngine.Object key, Rect rect)
 Given a texture object and a uv channel, store into this data structure the rect that the texture takes up inside of the atlas. A null texture object is valid, and represents the empty texture. More...
 

Detailed Description

A class that contains mapping information that specifies how a texture is packed into an atlas.

Definition at line 23 of file AtlasBuilder.cs.

Member Function Documentation

◆ GetRect()

Rect Leap.Unity.GraphicalRenderer.AtlasUvs.GetRect ( int  channel,
UnityEngine.Object  key 
)

Given a texture object and a uv channel, return the rect that this texture occupies within the atlas. If the key is not present in the atlas, the default rect is returned. If a null texture is passed in, the rect for the empty texture (which is valid!) is returned.

Definition at line 47 of file AtlasBuilder.cs.

◆ SetRect()

void Leap.Unity.GraphicalRenderer.AtlasUvs.SetRect ( int  channel,
UnityEngine.Object  key,
Rect  rect 
)

Given a texture object and a uv channel, store into this data structure the rect that the texture takes up inside of the atlas. A null texture object is valid, and represents the empty texture.

Definition at line 62 of file AtlasBuilder.cs.


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