Tanoda
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, Vector3 localPos)
 
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.

Definition at line 22 of file InkCanvas.cs.

Member Function Documentation

◆ Erase() [1/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.

Definition at line 890 of file InkCanvas.cs.

◆ Erase() [2/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.

Definition at line 876 of file InkCanvas.cs.

◆ 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.

Definition at line 862 of file InkCanvas.cs.

◆ 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.

Definition at line 849 of file InkCanvas.cs.

◆ GetHeightTexture()

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

To get the original height map.

Parameters
materialNameMaterial name.
Returns
Original height map.

Definition at line 1008 of file InkCanvas.cs.

◆ GetMainTexture()

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

To get the original main texture.

Parameters
materialNameMaterial name.
Returns
Original main texture.

Definition at line 912 of file InkCanvas.cs.

◆ GetNormalTexture()

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

To get the original normal map.

Parameters
materialNameMaterial name.
Returns
Original normal map.

Definition at line 960 of file InkCanvas.cs.

◆ GetPaintHeightTexture()

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

To get the paint in height map.

Parameters
materialNameMaterial name.
Returns
Height map in paint.

Definition at line 1022 of file InkCanvas.cs.

◆ GetPaintMainTexture()

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

To get the main texture in paint.

Parameters
materialNameMaterial name.
Returns
Main texture in paint.

Definition at line 926 of file InkCanvas.cs.

◆ GetPaintNormalTexture()

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

To get the paint in normal map.

Parameters
materialNameMaterial name.
Returns
Normal map in paint.

Definition at line 974 of file InkCanvas.cs.

◆ Paint() [1/3]

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.

Definition at line 830 of file InkCanvas.cs.

◆ Paint() [2/3]

bool Es.InkPainter.InkCanvas.Paint ( Brush  brush,
Vector3  localPos 
)

Definition at line 812 of file InkCanvas.cs.

◆ Paint() [3/3]

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.

Definition at line 793 of file InkCanvas.cs.

◆ 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.

Definition at line 777 of file InkCanvas.cs.

◆ 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.

Definition at line 687 of file InkCanvas.cs.

◆ ResetPaint()

void Es.InkPainter.InkCanvas.ResetPaint ( )

To reset the paint.

Definition at line 899 of file InkCanvas.cs.

◆ SetPaintHeightTexture()

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

Set paint texture.

Parameters
materialNameMaterial name.
newTextureNew rendertexture.

Definition at line 1036 of file InkCanvas.cs.

◆ SetPaintMainTexture()

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

Set paint texture.

Parameters
materialNameMaterial name.
newTextureNew rendertexture.

Definition at line 940 of file InkCanvas.cs.

◆ SetPaintNormalTexture()

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

Set paint texture.

Parameters
materialNameMaterial name.
newTextureNew rendertexture.

Definition at line 988 of file InkCanvas.cs.

Property Documentation

◆ MeshOperator

MeshOperator Es.InkPainter.InkCanvas.MeshOperator
get

Definition at line 238 of file InkCanvas.cs.

◆ PaintDatas

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

Access data used for painting.

Definition at line 157 of file InkCanvas.cs.

Event Documentation

◆ OnCanvasAttached

Action<InkCanvas> Es.InkPainter.InkCanvas.OnCanvasAttached

Called by InkCanvas attached game object.

Definition at line 166 of file InkCanvas.cs.

◆ OnInitializedAfter

Action<InkCanvas> Es.InkPainter.InkCanvas.OnInitializedAfter

Called by InkCanvas initialization completion times.

Definition at line 176 of file InkCanvas.cs.

◆ OnInitializedStart

Action<InkCanvas> Es.InkPainter.InkCanvas.OnInitializedStart

Called by InkCanvas initialization start times.

Definition at line 171 of file InkCanvas.cs.

◆ OnPaintEnd

Action<InkCanvas> Es.InkPainter.InkCanvas.OnPaintEnd

Called at paint end.

Definition at line 186 of file InkCanvas.cs.

◆ OnPaintStart

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

Called at paint start.

Definition at line 181 of file InkCanvas.cs.


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