Es.InkPainter.InkCanvas Class Reference

Texture paint to canvas. To set the per-material. More...

Inheritance diagram for Es.InkPainter.InkCanvas:

Classes

class  PaintSet
 

Public Member Functions

bool PaintUVDirect (Brush brush, Vector2 uv, Func< PaintSet, bool > materialSelector=null)
 Paint processing that UV coordinates to the specified. More...
 
bool PaintNearestTriangleSurface (Brush brush, Vector3 worldPos, Func< PaintSet, bool > materialSelector=null, Camera renderCamera=null)
 Paint of points close to the given world-space position on the Mesh surface. More...
 
bool Paint (Brush brush, Vector3 worldPos, Func< PaintSet, bool > materialSelector=null, Camera renderCamera=null)
 Paint processing that use world-space surface position. More...
 
bool Paint (Brush brush, RaycastHit hitInfo, Func< PaintSet, bool > materialSelector=null)
 Paint processing that use raycast hit data. Must MeshCollider is set to the canvas. More...
 
bool EraseUVDirect (Brush brush, Vector2 uv, Func< PaintSet, bool > materialSelector=null)
 Erase processing that UV coordinates to the specified. More...
 
bool EraseNearestTriangleSurface (Brush brush, Vector3 worldPos, Func< PaintSet, bool > materialSelector=null, Camera renderCamera=null)
 Erase of points close to the given world-space position on the Mesh surface. More...
 
bool Erase (Brush brush, Vector3 worldPos, Func< PaintSet, bool > materialSelector=null, Camera renderCamera=null)
 Erase processing that use world-space surface position. More...
 
bool Erase (Brush brush, RaycastHit hitInfo, Func< PaintSet, bool > materialSelector=null)
 Erase processing that use raycast hit data. Must MeshCollider is set to the canvas. More...
 
void ResetPaint ()
 To reset the paint. More...
 
Texture GetMainTexture (string materialName)
 To get the original main texture. More...
 
RenderTexture GetPaintMainTexture (string materialName)
 To get the main texture in paint. More...
 
void SetPaintMainTexture (string materialName, RenderTexture newTexture)
 Set paint texture. More...
 
Texture GetNormalTexture (string materialName)
 To get the original normal map. More...
 
RenderTexture GetPaintNormalTexture (string materialName)
 To get the paint in normal map. More...
 
void SetPaintNormalTexture (string materialName, RenderTexture newTexture)
 Set paint texture. More...
 
Texture GetHeightTexture (string materialName)
 To get the original height map. More...
 
RenderTexture GetPaintHeightTexture (string materialName)
 To get the paint in height map. More...
 
void SetPaintHeightTexture (string materialName, RenderTexture newTexture)
 Set paint texture. More...
 

Properties

List< PaintSetPaintDatas [get, set]
 Access data used for painting. More...
 
MeshOperator MeshOperator [get]
 

Events

Action< InkCanvasOnCanvasAttached
 Called by InkCanvas attached game object. More...
 
Action< InkCanvasOnInitializedStart
 Called by InkCanvas initialization start times. More...
 
Action< InkCanvasOnInitializedAfter
 Called by InkCanvas initialization completion times. More...
 
Action< InkCanvas, BrushOnPaintStart
 Called at paint start. More...
 
Action< InkCanvasOnPaintEnd
 Called at paint end. More...
 

Detailed Description

Texture paint to canvas. To set the per-material.

Member Function Documentation

◆ Erase() [1/2]

bool Es.InkPainter.InkCanvas.Erase ( Brush  brush,
Vector3  worldPos,
Func< PaintSet, bool >  materialSelector = null,
Camera  renderCamera = null 
)

Erase processing that use world-space surface position.

Parameters
brushBrush data.
worldPosPoint on object surface (world-space).
renderCameraCamera to use to render the object.
Returns
The success or failure of the erase.

◆ Erase() [2/2]

bool Es.InkPainter.InkCanvas.Erase ( Brush  brush,
RaycastHit  hitInfo,
Func< PaintSet, bool >  materialSelector = null 
)

Erase processing that use raycast hit data. Must MeshCollider is set to the canvas.

Parameters
brushBrush data.
hitInfoRaycast hit info.
Returns
The success or failure of the erase.

◆ EraseNearestTriangleSurface()

bool Es.InkPainter.InkCanvas.EraseNearestTriangleSurface ( Brush  brush,
Vector3  worldPos,
Func< PaintSet, bool >  materialSelector = null,
Camera  renderCamera = null 
)

Erase of points close to the given world-space position on the Mesh surface.

Parameters
brushBrush data.
worldPosApproximate point.
renderCameraCamera to use to render the object.
Returns
The success or failure of the erase.

◆ EraseUVDirect()

bool Es.InkPainter.InkCanvas.EraseUVDirect ( Brush  brush,
Vector2  uv,
Func< PaintSet, bool >  materialSelector = null 
)

Erase processing that UV coordinates to the specified.

Parameters
brushBrush data.
uvUV coordinates for the hit location.
Returns
The success or failure of the erase.

◆ GetHeightTexture()

Texture Es.InkPainter.InkCanvas.GetHeightTexture ( string  materialName)

To get the original height map.

Parameters
materialNameMaterial name.
Returns
Original height map.

◆ GetMainTexture()

Texture Es.InkPainter.InkCanvas.GetMainTexture ( string  materialName)

To get the original main texture.

Parameters
materialNameMaterial name.
Returns
Original main texture.

◆ GetNormalTexture()

Texture Es.InkPainter.InkCanvas.GetNormalTexture ( string  materialName)

To get the original normal map.

Parameters
materialNameMaterial name.
Returns
Original normal map.

◆ GetPaintHeightTexture()

RenderTexture Es.InkPainter.InkCanvas.GetPaintHeightTexture ( string  materialName)

To get the paint in height map.

Parameters
materialNameMaterial name.
Returns
Height map in paint.

◆ GetPaintMainTexture()

RenderTexture Es.InkPainter.InkCanvas.GetPaintMainTexture ( string  materialName)

To get the main texture in paint.

Parameters
materialNameMaterial name.
Returns
Main texture in paint.

◆ GetPaintNormalTexture()

RenderTexture Es.InkPainter.InkCanvas.GetPaintNormalTexture ( string  materialName)

To get the paint in normal map.

Parameters
materialNameMaterial name.
Returns
Normal map in paint.

◆ Paint() [1/2]

bool Es.InkPainter.InkCanvas.Paint ( Brush  brush,
Vector3  worldPos,
Func< PaintSet, bool >  materialSelector = null,
Camera  renderCamera = null 
)

Paint processing that use world-space surface position.

Parameters
brushBrush data.
worldPosPoint on object surface (world-space).
renderCameraCamera to use to render the object.
Returns
The success or failure of the paint.

◆ Paint() [2/2]

bool Es.InkPainter.InkCanvas.Paint ( Brush  brush,
RaycastHit  hitInfo,
Func< PaintSet, bool >  materialSelector = null 
)

Paint processing that use raycast hit data. Must MeshCollider is set to the canvas.

Parameters
brushBrush data.
hitInfoRaycast hit info.
Returns
The success or failure of the paint.

◆ PaintNearestTriangleSurface()

bool Es.InkPainter.InkCanvas.PaintNearestTriangleSurface ( Brush  brush,
Vector3  worldPos,
Func< PaintSet, bool >  materialSelector = null,
Camera  renderCamera = null 
)

Paint of points close to the given world-space position on the Mesh surface.

Parameters
brushBrush data.
worldPosApproximate point.
renderCameraCamera to use to render the object.
Returns
The success or failure of the paint.

◆ PaintUVDirect()

bool Es.InkPainter.InkCanvas.PaintUVDirect ( Brush  brush,
Vector2  uv,
Func< PaintSet, bool >  materialSelector = null 
)

Paint processing that UV coordinates to the specified.

Parameters
brushBrush data.
uvUV coordinates for the hit location.
Returns
The success or failure of the paint.

◆ ResetPaint()

void Es.InkPainter.InkCanvas.ResetPaint ( )

To reset the paint.

◆ SetPaintHeightTexture()

void Es.InkPainter.InkCanvas.SetPaintHeightTexture ( string  materialName,
RenderTexture  newTexture 
)

Set paint texture.

Parameters
materialNameMaterial name.
newTextureNew rendertexture.

◆ SetPaintMainTexture()

void Es.InkPainter.InkCanvas.SetPaintMainTexture ( string  materialName,
RenderTexture  newTexture 
)

Set paint texture.

Parameters
materialNameMaterial name.
newTextureNew rendertexture.

◆ SetPaintNormalTexture()

void Es.InkPainter.InkCanvas.SetPaintNormalTexture ( string  materialName,
RenderTexture  newTexture 
)

Set paint texture.

Parameters
materialNameMaterial name.
newTextureNew rendertexture.

Property Documentation

◆ PaintDatas

List<PaintSet> Es.InkPainter.InkCanvas.PaintDatas
getset

Access data used for painting.

Event Documentation

◆ OnCanvasAttached

Action<InkCanvas> Es.InkPainter.InkCanvas.OnCanvasAttached

Called by InkCanvas attached game object.

◆ OnInitializedAfter

Action<InkCanvas> Es.InkPainter.InkCanvas.OnInitializedAfter

Called by InkCanvas initialization completion times.

◆ OnInitializedStart

Action<InkCanvas> Es.InkPainter.InkCanvas.OnInitializedStart

Called by InkCanvas initialization start times.

◆ OnPaintEnd

Action<InkCanvas> Es.InkPainter.InkCanvas.OnPaintEnd

Called at paint end.

◆ OnPaintStart

Action<InkCanvas, Brush> Es.InkPainter.InkCanvas.OnPaintStart

Called at paint start.


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