Particle Playground - Script Reference  3.0.1
Framework for controlling particles in the Unity Engine.
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
ParticlePlayground.PaintObjectC Class Reference

Holds information about a Paint source. More...

Public Member Functions

void Initialize ()
 Initializes a PaintObject for painting. More...
 
bool Paint (Ray ray, Color32 color)
 Live paints into this PaintObject using a Ray and color information. More...
 
int Paint (Vector3 pos, Vector3 norm, Transform parent, Color32 color)
 Live paints into this PaintObject (single point with information about position, normal, parent and color), returns current painted index. More...
 
bool Erase (Vector3 pos, float radius)
 Removes painted positions in this PaintObject using a position and radius, returns true if position was erased. More...
 
bool Erase (int index)
 Removes painted positions in this PaintObject using a specified index, returns true if position at index was found and removed. More...
 
Vector3 GetPosition (int index)
 Returns position at index of PaintObject's PaintPosition. More...
 
Color32 GetColor (int index)
 Returns color at index of PaintObject's PaintPosition. More...
 
Vector3 GetNormal (int index)
 Returns normal at index of PaintObject's PaintPosition. More...
 
Transform GetParent (int index)
 Returns parent at index of PaintObject's PaintPosition. More...
 
Quaternion GetRotation (int index)
 Returns rotation of parent at index of PaintObject's PaintPosition. More...
 
void Update ()
 Live positioning of paintPositions regarding their parent. This happens automatically in PlaygroundParticlesC.Update() - only use this if you need to set all positions at once. More...
 
void Update (int thisPosition)
 Updates specific position. More...
 
void RemoveNonParented ()
 Clears out all emission positions where the parent transform has been removed. More...
 
bool RemoveNonParented (int thisPosition)
 Clears out emission position where the parent transform has been removed. Returns true if this position didn't have a parent. More...
 
void ClearPaint ()
 Clears out the painted positions. More...
 
PaintObjectC Clone ()
 Clones this PaintObject. More...
 

Public Attributes

List< PaintPositionCpaintPositions
 Position data for each origin point. More...
 
int positionLength
 The current length of position array. More...
 
Vector3 lastPaintPosition
 The last painted position. More...
 
COLLISIONTYPEC collisionType
 The collider type this PaintObject sees when painting. More...
 
float minDepth = -1f
 Minimum depth for 2D collisions. More...
 
float maxDepth = 1f
 Maximum depth for 2D collisions. More...
 
float spacing
 The required space between the last and current paint position. More...
 
LayerMask layerMask = -1
 The layers this PaintObject sees when painting. More...
 
PlaygroundBrushC brush
 The brush data for this PaintObject. More...
 
bool exceedMaxStopsPaint
 Should painting stop when paintPositions is equal to maxPositions (if false paint positions will be removed from list when painting new ones). More...
 
bool initialized = false
 Is this PaintObject initialized yet? More...
 

Detailed Description

Holds information about a Paint source.

Member Function Documentation

void ParticlePlayground.PaintObjectC.ClearPaint ( )

Clears out the painted positions.

PaintObjectC ParticlePlayground.PaintObjectC.Clone ( )

Clones this PaintObject.

bool ParticlePlayground.PaintObjectC.Erase ( Vector3  pos,
float  radius 
)

Removes painted positions in this PaintObject using a position and radius, returns true if position was erased.

Parameters
posPosition.
radiusRadius.
bool ParticlePlayground.PaintObjectC.Erase ( int  index)

Removes painted positions in this PaintObject using a specified index, returns true if position at index was found and removed.

Parameters
indexIndex.
Color32 ParticlePlayground.PaintObjectC.GetColor ( int  index)

Returns color at index of PaintObject's PaintPosition.

Returns
The color.
Parameters
indexIndex.
Vector3 ParticlePlayground.PaintObjectC.GetNormal ( int  index)

Returns normal at index of PaintObject's PaintPosition.

Returns
The normal.
Parameters
indexIndex.
Transform ParticlePlayground.PaintObjectC.GetParent ( int  index)

Returns parent at index of PaintObject's PaintPosition.

Returns
The parent.
Parameters
indexIndex.
Vector3 ParticlePlayground.PaintObjectC.GetPosition ( int  index)

Returns position at index of PaintObject's PaintPosition.

Returns
The position.
Parameters
indexIndex.
Quaternion ParticlePlayground.PaintObjectC.GetRotation ( int  index)

Returns rotation of parent at index of PaintObject's PaintPosition.

Returns
The rotation.
Parameters
indexIndex.
void ParticlePlayground.PaintObjectC.Initialize ( )

Initializes a PaintObject for painting.

bool ParticlePlayground.PaintObjectC.Paint ( Ray  ray,
Color32  color 
)

Live paints into this PaintObject using a Ray and color information.

Parameters
rayRay.
colorColor.
int ParticlePlayground.PaintObjectC.Paint ( Vector3  pos,
Vector3  norm,
Transform  parent,
Color32  color 
)

Live paints into this PaintObject (single point with information about position, normal, parent and color), returns current painted index.

Parameters
posPosition.
normNormal.
parentParent.
colorColor.
void ParticlePlayground.PaintObjectC.RemoveNonParented ( )

Clears out all emission positions where the parent transform has been removed.

bool ParticlePlayground.PaintObjectC.RemoveNonParented ( int  thisPosition)

Clears out emission position where the parent transform has been removed. Returns true if this position didn't have a parent.

Returns
true, if non parented was removed, false otherwise.
Parameters
thisPositionThis position.
void ParticlePlayground.PaintObjectC.Update ( )

Live positioning of paintPositions regarding their parent. This happens automatically in PlaygroundParticlesC.Update() - only use this if you need to set all positions at once.

void ParticlePlayground.PaintObjectC.Update ( int  thisPosition)

Updates specific position.

Parameters
thisPositionThis position.

Member Data Documentation

PlaygroundBrushC ParticlePlayground.PaintObjectC.brush

The brush data for this PaintObject.

COLLISIONTYPEC ParticlePlayground.PaintObjectC.collisionType

The collider type this PaintObject sees when painting.

bool ParticlePlayground.PaintObjectC.exceedMaxStopsPaint

Should painting stop when paintPositions is equal to maxPositions (if false paint positions will be removed from list when painting new ones).

bool ParticlePlayground.PaintObjectC.initialized = false

Is this PaintObject initialized yet?

Vector3 ParticlePlayground.PaintObjectC.lastPaintPosition

The last painted position.

LayerMask ParticlePlayground.PaintObjectC.layerMask = -1

The layers this PaintObject sees when painting.

float ParticlePlayground.PaintObjectC.maxDepth = 1f

Maximum depth for 2D collisions.

float ParticlePlayground.PaintObjectC.minDepth = -1f

Minimum depth for 2D collisions.

List<PaintPositionC> ParticlePlayground.PaintObjectC.paintPositions

Position data for each origin point.

int ParticlePlayground.PaintObjectC.positionLength

The current length of position array.

float ParticlePlayground.PaintObjectC.spacing

The required space between the last and current paint position.


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