Detailed Description

When Blaze is drawing graphics, it may spawn a camera to draw the image in 3D space. This in short means Blaze can use fully GPU accelerated drawing.

Public Member Functions

 TextureCamera (bool cpu)
 Creates a new camera. 256px texture space. More...
 
 TextureCamera (int size, bool cpu)
 Creates a new camera with the given texture space. More...
 
 TextureCamera (int sizeX, int sizeY, bool cpu)
 Creates a new camera with the given texture space. More...
 
GameObject CreateGameObject ()
 
void Clear ()
 
bool TryFit (DrawingTexture drawing)
 
void Add (DrawingTexture drawing)
 Adds the given drawing texture to the stack. More...
 
void DrawNow ()
 
void ReadInto (AtlasLocation atlas, int targetX, int targetY)
 
void SetOrthographicSize ()
 Set the ortho size of the camera. More...
 
void Destroy ()
 Permanently destroys this UI camera. More...
 

Public Attributes

const float MaxTime =5f
 The max amount of time a texture camera can hang around. More...
 
float Timer =0f
 A timer tracking how long this camera has been around. If it goes beyond MaxTime, this camera is destroyed. More...
 
float XOffset
 The base X offset. More...
 
float YOffset
 The base Y offset. More...
 
Camera SourceCamera
 The camera itself. More...
 
GameObject Gameobject
 The parent gameobject. More...
 
GameObject CameraObject
 The cameras gameobject. More...
 
Vector2 WorldPerPixel =new Vector2(0.1f,0.1f)
 World units per pixel. More...
 
int Size
 The size of the texture. Same as both pixelW and H. More...
 
bool RequiresRender
 True if this camera has letters that require rendering. More...
 
int pixelWidth
 The width of the texture space. More...
 
int FillX
 The amount of pixels that have been filled with content on the X axis. More...
 
int FillY
 The amount of pixels that have been filled with content on the Y axis. More...
 
bool CPUAccess
 True if all copying from this camera happens on the CPU. More...
 
int MaxWidth
 Current column width. More...
 
bool Available
 Is this camera available? (i.e. still got space) More...
 
bool IsDrawing
 True if this camera is currently drawing. More...
 
int pixelHeight
 The height of the texture space. More...
 
float HalfSizeByWorld
 Size divided by WorldPerPixel x. More...
 
Triangulator Triangulator
 A triangulator used for triangulating the interior of the shapes. More...
 
DrawingTexture FirstDrawing
 The first object being drawn with this camera. More...
 

Static Public Attributes

static float GlobalOffset =-150f
 Global position offset. More...
 

Private Attributes

const int DefaultSize =256
 The default camera size. More...
 
Color32[] CPUPixels
 The pixel set used for copying from. More...
 
Texture2D CPUBuffer
 An awkward texture used as a temporary buffer for CPU copying. More...
 
RenderTexture Texture
 

Constructor & Destructor Documentation

Blaze.TextureCamera.TextureCamera ( bool  cpu)
inline

Creates a new camera. 256px texture space.

Blaze.TextureCamera.TextureCamera ( int  size,
bool  cpu 
)
inline

Creates a new camera with the given texture space.

Blaze.TextureCamera.TextureCamera ( int  sizeX,
int  sizeY,
bool  cpu 
)
inline

Creates a new camera with the given texture space.

Member Function Documentation

void Blaze.TextureCamera.Add ( DrawingTexture  drawing)
inline

Adds the given drawing texture to the stack.

void Blaze.TextureCamera.Clear ( )
inline
GameObject Blaze.TextureCamera.CreateGameObject ( )
inline
void Blaze.TextureCamera.Destroy ( )
inline

Permanently destroys this UI camera.

void Blaze.TextureCamera.DrawNow ( )
inline
void Blaze.TextureCamera.ReadInto ( AtlasLocation  atlas,
int  targetX,
int  targetY 
)
inline
void Blaze.TextureCamera.SetOrthographicSize ( )
inline

Set the ortho size of the camera.

bool Blaze.TextureCamera.TryFit ( DrawingTexture  drawing)
inline

Member Data Documentation

bool Blaze.TextureCamera.Available

Is this camera available? (i.e. still got space)

GameObject Blaze.TextureCamera.CameraObject

The cameras gameobject.

bool Blaze.TextureCamera.CPUAccess

True if all copying from this camera happens on the CPU.

Texture2D Blaze.TextureCamera.CPUBuffer
private

An awkward texture used as a temporary buffer for CPU copying.

Color32 [] Blaze.TextureCamera.CPUPixels
private

The pixel set used for copying from.

const int Blaze.TextureCamera.DefaultSize =256
private

The default camera size.

int Blaze.TextureCamera.FillX

The amount of pixels that have been filled with content on the X axis.

int Blaze.TextureCamera.FillY

The amount of pixels that have been filled with content on the Y axis.

DrawingTexture Blaze.TextureCamera.FirstDrawing

The first object being drawn with this camera.

GameObject Blaze.TextureCamera.Gameobject

The parent gameobject.

float Blaze.TextureCamera.GlobalOffset =-150f
static

Global position offset.

float Blaze.TextureCamera.HalfSizeByWorld

Size divided by WorldPerPixel x.

bool Blaze.TextureCamera.IsDrawing

True if this camera is currently drawing.

const float Blaze.TextureCamera.MaxTime =5f

The max amount of time a texture camera can hang around.

int Blaze.TextureCamera.MaxWidth

Current column width.

int Blaze.TextureCamera.pixelHeight

The height of the texture space.

int Blaze.TextureCamera.pixelWidth

The width of the texture space.

bool Blaze.TextureCamera.RequiresRender

True if this camera has letters that require rendering.

int Blaze.TextureCamera.Size

The size of the texture. Same as both pixelW and H.

Camera Blaze.TextureCamera.SourceCamera

The camera itself.

RenderTexture Blaze.TextureCamera.Texture
private
float Blaze.TextureCamera.Timer =0f

A timer tracking how long this camera has been around. If it goes beyond MaxTime, this camera is destroyed.

Triangulator Blaze.TextureCamera.Triangulator

A triangulator used for triangulating the interior of the shapes.

Vector2 Blaze.TextureCamera.WorldPerPixel =new Vector2(0.1f,0.1f)

World units per pixel.

float Blaze.TextureCamera.XOffset

The base X offset.

float Blaze.TextureCamera.YOffset

The base Y offset.