Class RendererParticles_RenderBatch
The renderer for the base particles and pins.
Stores many matrices in which the data for the
mesh instancing is stored and rendered with
UnityEngine.Graphics.DrawMeshInstanced(Mesh, int, Material, List{Matrix4x4})
.
Inheritance
object
RendererParticles_RenderBatch
Assembly: .dll
Syntax
public class RendererParticles_RenderBatch
Constructors
|
Edit this page
View Source
RendererParticles_RenderBatch(PropertyBlockData)
Declaration
public RendererParticles_RenderBatch(RendererParticles_RenderBatch.PropertyBlockData properties)
Parameters
Fields
|
Edit this page
View Source
circuitHexCircPinMaterial
Declaration
private Material circuitHexCircPinMaterial
Field Value
Type |
Description |
Material |
|
|
Edit this page
View Source
circuitHexPinMaterial
Declaration
private Material circuitHexPinMaterial
Field Value
Type |
Description |
Material |
|
|
Edit this page
View Source
curAnimationLength
Declaration
private float curAnimationLength
Field Value
|
Edit this page
View Source
graphicalDataList
Declaration
private List<ParticleGraphicsAdapterImpl> graphicalDataList
Field Value
|
Edit this page
View Source
hexagonCircWithPinsMaterial
Declaration
private Material hexagonCircWithPinsMaterial
Field Value
Type |
Description |
Material |
|
|
Edit this page
View Source
hexagonWithPinsMaterial
Declaration
private Material hexagonWithPinsMaterial
Field Value
Type |
Description |
Material |
|
|
Edit this page
View Source
jmInterpolation
Declaration
private float jmInterpolation
Field Value
|
Edit this page
View Source
matrixTRS_zero
Declaration
private Matrix4x4 matrixTRS_zero
Field Value
Type |
Description |
Matrix4x4 |
|
|
Edit this page
View Source
maxArraySize
Declaration
private const int maxArraySize = 1023
Field Value
|
Edit this page
View Source
mesh_circle_particle
Declaration
private Mesh mesh_circle_particle
Field Value
|
Edit this page
View Source
mesh_circle_particleConnector
Declaration
private Mesh mesh_circle_particleConnector
Field Value
|
Edit this page
View Source
mesh_hex_particle
Declaration
private Mesh mesh_hex_particle
Field Value
|
Edit this page
View Source
particleMatricesCircle_ConnectionMatrices_Contracted
Declaration
private List<Matrix4x4[]> particleMatricesCircle_ConnectionMatrices_Contracted
Field Value
Type |
Description |
List<Matrix4x4[]> |
|
|
Edit this page
View Source
particleMatricesCircle_ConnectionMatrices_Contracting
Declaration
private List<Matrix4x4[]> particleMatricesCircle_ConnectionMatrices_Contracting
Field Value
Type |
Description |
List<Matrix4x4[]> |
|
|
Edit this page
View Source
particleMatricesCircle_ConnectionMatrices_Expanded
Declaration
private List<Matrix4x4[]> particleMatricesCircle_ConnectionMatrices_Expanded
Field Value
Type |
Description |
List<Matrix4x4[]> |
|
|
Edit this page
View Source
particleMatricesCircle_ConnectionMatrices_Expanding
Declaration
private List<Matrix4x4[]> particleMatricesCircle_ConnectionMatrices_Expanding
Field Value
Type |
Description |
List<Matrix4x4[]> |
|
|
Edit this page
View Source
particleMatricesCircle_Contracted
Declaration
private List<Matrix4x4[]> particleMatricesCircle_Contracted
Field Value
Type |
Description |
List<Matrix4x4[]> |
|
|
Edit this page
View Source
particleMatricesCircle_Contracting
Declaration
private List<Matrix4x4[]> particleMatricesCircle_Contracting
Field Value
Type |
Description |
List<Matrix4x4[]> |
|
|
Edit this page
View Source
particleMatricesCircle_Expanded
Declaration
private List<Matrix4x4[]> particleMatricesCircle_Expanded
Field Value
Type |
Description |
List<Matrix4x4[]> |
|
|
Edit this page
View Source
particleMatricesCircle_Expanding
Declaration
private List<Matrix4x4[]> particleMatricesCircle_Expanding
Field Value
Type |
Description |
List<Matrix4x4[]> |
|
|
Edit this page
View Source
particleMatricesPins_Contracted
Declaration
private List<Matrix4x4[]> particleMatricesPins_Contracted
Field Value
Type |
Description |
List<Matrix4x4[]> |
|
|
Edit this page
View Source
particleMatricesPins_Contracting
Declaration
private List<Matrix4x4[]> particleMatricesPins_Contracting
Field Value
Type |
Description |
List<Matrix4x4[]> |
|
|
Edit this page
View Source
particleMatricesPins_Expanded
Declaration
private List<Matrix4x4[]> particleMatricesPins_Expanded
Field Value
Type |
Description |
List<Matrix4x4[]> |
|
|
Edit this page
View Source
particleMatricesPins_Expanding
Declaration
private List<Matrix4x4[]> particleMatricesPins_Expanding
Field Value
Type |
Description |
List<Matrix4x4[]> |
|
|
Edit this page
View Source
particlePositionOffsets_jointMovementsInv
Declaration
private List<Vector3[]> particlePositionOffsets_jointMovementsInv
Field Value
Type |
Description |
List<Vector3[]> |
|
|
Edit this page
View Source
particleReferences
Declaration
private List<ParticleGraphicsAdapterImpl[]> particleReferences
Field Value
|
Edit this page
View Source
particleToParticleGraphicalDataMap
Declaration
private Dictionary<IParticleState, ParticleGraphicsAdapterImpl> particleToParticleGraphicalDataMap
Field Value
|
Edit this page
View Source
properties
Declaration
public RendererParticles_RenderBatch.PropertyBlockData properties
Field Value
|
Edit this page
View Source
propertyBlock_circle_connector_contracted
Declaration
private MaterialPropertyBlockData_Particles propertyBlock_circle_connector_contracted
Field Value
|
Edit this page
View Source
propertyBlock_circle_connector_contracting
Declaration
private MaterialPropertyBlockData_Particles propertyBlock_circle_connector_contracting
Field Value
|
Edit this page
View Source
propertyBlock_circle_connector_expanded
Declaration
private MaterialPropertyBlockData_Particles propertyBlock_circle_connector_expanded
Field Value
|
Edit this page
View Source
propertyBlock_circle_connector_expanding
Declaration
private MaterialPropertyBlockData_Particles propertyBlock_circle_connector_expanding
Field Value
|
Edit this page
View Source
propertyBlock_circle_contracted
Declaration
private MaterialPropertyBlockData_Particles propertyBlock_circle_contracted
Field Value
|
Edit this page
View Source
propertyBlock_circle_contracting
Declaration
private MaterialPropertyBlockData_Particles propertyBlock_circle_contracting
Field Value
|
Edit this page
View Source
propertyBlock_circle_expanded
Declaration
private MaterialPropertyBlockData_Particles propertyBlock_circle_expanded
Field Value
|
Edit this page
View Source
propertyBlock_circle_expanding
Declaration
private MaterialPropertyBlockData_Particles propertyBlock_circle_expanding
Field Value
Methods
|
Edit this page
View Source
CutAndCopyMatrices(int, int, int, int)
Copies the values from a specific matrix id
and position to another matrix id and position.
Used for reordering matrix positions.
Declaration
private void CutAndCopyMatrices(int orig_ListNumber, int orig_ListID, int moved_ListNumber, int moved_ListID)
Parameters
Type |
Name |
Description |
int |
orig_ListNumber |
Current list index of the matrices.
|
int |
orig_ListID |
Current array index of the matrices.
|
int |
moved_ListNumber |
New list index of the matrices.
|
int |
moved_ListID |
New array index of the matrices.
|
|
Edit this page
View Source
Init()
Initializes all the property blocks and materials.
Declaration
|
Edit this page
View Source
Particle_Add(ParticleGraphicsAdapterImpl)
Adds a particle to the render batch.
Declaration
public bool Particle_Add(ParticleGraphicsAdapterImpl graphicalData)
Parameters
Returns
Type |
Description |
bool |
true if and only if the particle
was added to this render batch.
|
|
Edit this page
View Source
Particle_Remove(ParticleGraphicsAdapterImpl)
Removes a particle from the render batch. The last element
in the last array takes its position afterwards, so that we
still have valid arrays for the
UnityEngine.Graphics.DrawMeshInstanced(Mesh, int, Material, List{Matrix4x4})
method.
Declaration
public bool Particle_Remove(ParticleGraphicsAdapterImpl graphicalData)
Parameters
Returns
Type |
Description |
bool |
true if and only if the particle
was removed from this render batch.
|
|
Edit this page
View Source
Render(ViewType)
Render loop of the particles. Calculates all timings
of movements and draws the particles on the screen.
Declaration
public void Render(ViewType viewType)
Parameters
Type |
Name |
Description |
ViewType |
viewType |
The view type that should be used
to visualize the particles.
|
|
Edit this page
View Source
Render_Circular()
Circular particle drawing. Part of the render loop.
Declaration
private void Render_Circular()
|
Edit this page
View Source
Render_Hexagonal(ViewType)
Hexagonal particle drawing. Part of the render loop.
Declaration
private void Render_Hexagonal(ViewType viewType)
Parameters
|
Edit this page
View Source
ResetMatrices(int, int)
Zeroes the values at a specific matrix id and position.
If this was rendered, nothing would show up
(but at the position (0,0) the mesh would still be
drawn and have performance impact).
Declaration
private void ResetMatrices(int listNumber, int listID)
Parameters
Type |
Name |
Description |
int |
listNumber |
The list index of the matrices to reset.
|
int |
listID |
The array index of the matrices to reset.
|
|
Edit this page
View Source
SetPinsVisible(bool)
Changes the visibility setting of pins in the base
hexagon or round hexagon view mode.
Declaration
public void SetPinsVisible(bool visible)
Parameters
Type |
Name |
Description |
bool |
visible |
Whether the pins should be
visible.
|
|
Edit this page
View Source
UpdateMatrix(ParticleGraphicsAdapterImpl, bool)
Updates the matrices for a specific particle. Usually done
once per round (if executeJointMovement
is false
).
This method is also used for continuously updating the joint movements each
frame (if executeJointMovement
is set to true
).
Declaration
public void UpdateMatrix(ParticleGraphicsAdapterImpl gd, bool executeJointMovement)
Parameters
Type |
Name |
Description |
ParticleGraphicsAdapterImpl |
gd |
The graphics adapter blonging to the particle to update.
|
bool |
executeJointMovement |
Whether this is the execution of a joint
movement which is done repeatedly.
(this might seem a little odd, but the system was added later and seemed to be easily implementable it this way)
|