• Installation Guide
  • Amoebot Model
  • User Guide
  • Model Reference
  • Dev Guide
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • AS2
      • AlgorithmGenerator
      • AlgorithmGeneratorEditor
      • AlgorithmManager
      • AlgorithmManager.AlgorithmInfo
      • AmoebotFunctions
      • AmoebotSimulator
      • CameraUtils
      • CellRect
      • CellRect.CellRect_Iterator
      • ColorData
      • Config
      • ConfigData
      • ConfigData.AdditionalConfiguration
      • ConfigData.SettingsMenu
      • ConfigurationEditor
      • ConfigurationEditorBehavior
      • Constants
      • Direction
      • DirectionHelpers
      • EventDatabase
      • FileBrowser
      • FileBrowser.FileTypeHandler
      • FilePaths
      • InitModeSaveData
      • InitParticleSaveData
      • InitRandomWithHoles
      • Initialization
      • Initialization.Chirality
      • Initialization.Compass
      • InitializationMethod
      • InitializationMethod.DistanceSortedVectorList
      • InitializationMethodManager
      • InitializationMethodManager.AlgorithmInfo
      • InitializationStateSaveData
      • Log
      • MaterialDatabase
      • MessageSaveData
      • MinMax
      • MouseController
      • PSPlacementMode
      • ParticleAttributeEnumSaveData
      • ParticleAttributePCSaveData
      • ParticleAttributeSaveDataBase
      • ParticleAttributeSaveData<T>
      • ParticleObjectSaveData
      • ParticleStateSaveData
      • PinConfigurationHistorySaveData
      • PinConfigurationSaveData
      • RandomNumberGenerator
      • SaveStateUtility
      • SimulationStateSaveData
      • StatusInfoAttribute
      • TypeConverter
      • TypeConverter.ConversionResult
      • UIDatabase
      • ValueHistorySaveData<T>
    • AS2.Algos.BeepFailureTest
      • BeepFailureTestParticle
    • AS2.Algos.BinOpTest
      • BinOpTestInitializer
      • BinOpTestParticle
      • BinOpTestParticle.Mode
    • AS2.Algos.BoundaryTest
      • BoundaryTestParticle
      • Phase
      • SCMode
    • AS2.Algos.BoundaryTestSub
      • BoundaryTestSubParticle
    • AS2.Algos.ChiralityCompass
      • ChiralityAndCompassInitializer
      • ChiralityAndCompassParticle
      • CoinTossResult
      • DirectionMessage
    • AS2.Algos.CollisionTestAlgo
      • CollisionTestAlgoInitializer
      • CollisionTestAlgoParticle
    • AS2.Algos.CollisionTestAlgo2
      • CollisionTestAlgo2Initializer
      • CollisionTestAlgo2Particle
      • Role
    • AS2.Algos.ExpandedCircuitTest
      • ExpandedCircuitTestInitializer
      • ExpandedCircuitTestParticle
    • AS2.Algos.JMTest
      • JMTestInitializer
      • JMTestParticle
    • AS2.Algos.LeaderElection
      • LeaderElectionInitializer
      • LeaderElectionParticle
    • AS2.Algos.LineFormation
      • LineFormationInitializer
      • LineFormationParticleSync
      • LineFormationParticleSync.LFState
      • MyMessage
      • MyMessage.Direction
    • AS2.Algos.ObjectTest
      • ObjectTestInitializer
      • ObjectTestParticle
    • AS2.Algos.PASCTestAlgo
      • PASCTestAlgoInitializer
      • PASCTestAlgoParticle
    • AS2.Algos.SingleSourceSP
      • SingleSourceSPInitializer
      • SingleSourceSPParticle
      • SingleSourceSPParticle.Phase
    • AS2.Algos.SmartMaterial
      • SmartMaterialInitializer
      • SmartMaterialParticle
    • AS2.Algos.SubroutineTest
      • SubroutineTestInitializer
      • SubroutineTestParticle
    • AS2.Algos.SubroutineTest2
      • SubroutineTest2Initializer
      • SubroutineTest2Particle
    • AS2.Sim
      • ActionType
      • AlgorithmException
      • AmoebotSimException
      • BondMovementInfo
      • BondMovementInfoList
      • Circuit
      • CollisionChecker
      • CollisionChecker.DebugLine
      • EdgeMovement
      • IParticleAttribute
      • IParticleObject
      • IReplayHistory
      • InitializationParticle
      • InvalidActionException
      • JointMovementInfo
      • Message
      • Neighbor<T>
      • OpenInitParticle
      • Particle
      • ParticleAction
      • ParticleAlgorithm
      • ParticleAttributeBase
      • ParticleAttributeFactory
      • ParticleAttributeWithHistory<T>
      • ParticleAttribute_Bool
      • ParticleAttribute_Direction
      • ParticleAttribute_Enum<T>
      • ParticleAttribute_Float
      • ParticleAttribute_Int
      • ParticleAttribute_PinConfiguration
      • ParticleAttribute_String
      • ParticleAttribute<T>
      • ParticleException
      • ParticleFactory
      • ParticleObject
      • ParticleSystem
      • ParticleSystem_Utils
      • PartitionSet
      • Pin
      • PinConfiguration
      • SimulationException
      • SimulatorException
      • SimulatorStateException
      • SysPartitionSet
      • SysPin
      • SysPinConfiguration
      • ValueHistoryBondInfo
      • ValueHistoryJointMovement
      • ValueHistoryMessage
      • ValueHistoryPinConfiguration
      • ValueHistory<T>
    • AS2.Subroutines
      • Subroutine
    • AS2.Subroutines.BinStateHelpers
      • BinAttributeBitField
      • BinAttributeBool
      • BinAttributeDirection
      • BinAttributeEnum<T>
      • BinAttributeInt
      • BinAttribute<T>
    • AS2.Subroutines.BinaryOps
      • BinOpUtils
      • SubAddition
      • SubBinOps
      • SubBinOps.Mode
      • SubComparison
      • SubComparison.ComparisonResult
      • SubDivision
      • SubMSBDetection
      • SubMultiplication
      • SubSubtraction
    • AS2.Subroutines.BoundaryTest
      • SubBoundaryTest
    • AS2.Subroutines.ETT
      • Comparison
      • SubETT
    • AS2.Subroutines.LeaderElection
      • SubLeaderElection
    • AS2.Subroutines.LeaderElectionFast
      • SubLeaderElectionFast
    • AS2.Subroutines.LeaderElectionSync
      • SubLeaderElectionSync
    • AS2.Subroutines.PASC
      • SubPASC
      • SubPASC2
      • SubPASC2.NbrType
    • AS2.UI
      • ButtonHoldTrigger
      • ClickAction
      • ClickAction.ClickButton
      • ClickAction.ClickType
      • InitializationUIHandler
      • InputAction
      • InputAction.InputType
      • InputController
      • InputHandler
      • InputHandler.MouseState
      • InputManager
      • LineDrawer
      • LogUIHandler
      • LogUIHandler.EntryType
      • ObjectUIHandler
      • ParticleUIExtensionSmoothLerp
      • ParticleUIHandler
      • SettingsUIHandler
      • SizeFitter
      • Tooltip
      • TooltipHandler
      • UIHandler
      • UIHandler.UITool
      • UISetting
      • UISetting_Color
      • UISetting_Color.InputType
      • UISetting_Dropdown
      • UISetting_Header
      • UISetting_MinMax
      • UISetting_MinMax.InputType
      • UISetting_Slider
      • UISetting_Spacing
      • UISetting_Text
      • UISetting_Text.InputType
      • UISetting_Toggle
      • UISetting_ValueSlider
      • WorldSpaceBackgroundUIHandler
      • WorldSpaceUIHandler
      • WorldSpaceUIHandler.ParticleTextUIData
      • WorldSpaceUIHandler.TextType
    • AS2.Visuals
      • CircleDistributionCircleArea
      • CircleDistributionCircleLine
      • IGenerateDynamicMesh
      • IObjectInfo
      • IParticleGraphicsAdapter
      • IParticleState
      • InstancedDrawer
      • MaterialPropertyBlockData
      • MaterialPropertyBlockData_Circuits
      • MaterialPropertyBlockData_Objects
      • MaterialPropertyBlockData_Particles
      • MeshCreator_CircularView
      • MeshCreator_HexagonalView
      • ObjectGraphicsAdapter
      • ObjectGraphicsAdapter.VertexInfo
      • PSetDragHandler
      • ParticleBondGraphicState
      • ParticleGraphicsAdapterImpl
      • ParticleGraphicsAdapterImpl.ParticleMovement
      • ParticleGraphicsAdapterImpl.PositionSnap
      • ParticleJointMovementState
      • ParticleMovementState
      • ParticlePinGraphicState
      • ParticlePinGraphicState.CodeOverrideType_Node
      • ParticlePinGraphicState.NeighborPinConnection
      • ParticlePinGraphicState.PSetData
      • ParticlePinGraphicState.PSetData.GraphicalData
      • ParticlePinGraphicState.PSetData.GraphicalData.CodeOverrideType_PSet
      • ParticlePinGraphicState.PinDef
      • PartitionSetViewType
      • Polar2DCoordinate
      • PriorityQueue<T>
      • RenderBatchIndex
      • RenderSystem
      • RendererBackground
      • RendererCircuitPins_RenderBatch
      • RendererCircuitPins_RenderBatch.PropertyBlockData
      • RendererCircuitsAndBonds
      • RendererCircuits_Instance
      • RendererCircuits_Instance.GDRef
      • RendererCircuits_Instance.ParticleCircuitData
      • RendererCircuits_Instance.ParticleCircuitData.PSetInnerPinRef
      • RendererCircuits_Instance.ParticleCircuitData.PSetInnerPinRef.PinType
      • RendererCircuits_RenderBatch
      • RendererCircuits_RenderBatch.PropertyBlockData
      • RendererCircuits_RenderBatch.PropertyBlockData.ActiveState
      • RendererCircuits_RenderBatch.PropertyBlockData.LineType
      • RendererObjects
      • RendererParticles
      • RendererParticles_RenderBatch
      • RendererParticles_RenderBatch.PropertyBlockData
      • RendererUI
      • TextureCreator
      • ViewType
    • AS2.Visuals.Library
      • DegreeConstants
      • InterpolationConstants
      • MatrixConstants
      • MeshConstants
      • VectorConstants
      • BasicSample
      • CanvasSampleSaveFileImage
      • CanvasSampleSaveFileText
      • HexagonalExpansionPrototype

    Class RendererCircuitPins_RenderBatch

    Renderer for the circuit pins. Each instance of this class renders pins with the same properties (like color, type, etc.) with Unity's instanced drawing.

    Inheritance
    object
    RendererCircuitPins_RenderBatch
    Implements
    IGenerateDynamicMesh
    Namespace: AS2.Visuals
    Assembly: .dll
    Syntax
    public class RendererCircuitPins_RenderBatch : IGenerateDynamicMesh

    Constructors

    RendererCircuitPins_RenderBatch(PropertyBlockData)

    Declaration
    public RendererCircuitPins_RenderBatch(RendererCircuitPins_RenderBatch.PropertyBlockData properties)
    Parameters
    Type Name Description
    RendererCircuitPins_RenderBatch.PropertyBlockData properties

    Fields

    circuitMatrices_PinConnectors

    Declaration
    private List<Matrix4x4[]> circuitMatrices_PinConnectors
    Field Value
    Type Description
    List<Matrix4x4[]>

    circuitMatrices_Pins

    Declaration
    private List<Matrix4x4[]> circuitMatrices_Pins
    Field Value
    Type Description
    List<Matrix4x4[]>

    currentIndex

    Declaration
    private int currentIndex
    Field Value
    Type Description
    int

    currentIndex_connectors

    Declaration
    private int currentIndex_connectors
    Field Value
    Type Description
    int

    maxArraySize

    Declaration
    private const int maxArraySize = 1023
    Field Value
    Type Description
    int

    pinMaterial

    Declaration
    private Material pinMaterial
    Field Value
    Type Description
    Material

    pinQuad

    Declaration
    private Mesh pinQuad
    Field Value
    Type Description
    Mesh

    properties

    Declaration
    public RendererCircuitPins_RenderBatch.PropertyBlockData properties
    Field Value
    Type Description
    RendererCircuitPins_RenderBatch.PropertyBlockData

    propertyBlock_circuitMatrices_PinConnectors

    Declaration
    private MaterialPropertyBlockData_Circuits propertyBlock_circuitMatrices_PinConnectors
    Field Value
    Type Description
    MaterialPropertyBlockData_Circuits

    propertyBlock_circuitMatrices_Pins

    Declaration
    private MaterialPropertyBlockData_Circuits propertyBlock_circuitMatrices_Pins
    Field Value
    Type Description
    MaterialPropertyBlockData_Circuits

    zOffset

    Declaration
    private float zOffset
    Field Value
    Type Description
    float

    Methods

    AddConnectorPin(Vector2)

    Adds a connector pin. A connector pin is an internal pin in expanded particles that connects the two sides of the particle. It has the width and color of the circuit lines, so that two lines that go to the same point do not have visibly sharp edges and seem like a connected structure.

    Declaration
    public RenderBatchIndex AddConnectorPin(Vector2 pinPos)
    Parameters
    Type Name Description
    Vector2 pinPos

    The global pin center position.

    Returns
    Type Description
    RenderBatchIndex

    AddPin(Vector2, bool)

    Adds a pin.

    Declaration
    public RenderBatchIndex AddPin(Vector2 pinPos, bool singletonPin)
    Parameters
    Type Name Description
    Vector2 pinPos

    The global pin center position.

    bool singletonPin

    Whether this is a singleton pin. Singleton pins have their own pin size.

    Returns
    Type Description
    RenderBatchIndex

    The index of the new pin's matrix in this batch.

    ApplyMovementTimestamps(float, float)

    Applies the timestamps for the movement offsets.

    Declaration
    public void ApplyMovementTimestamps(float movementStartTime, float movementDuration)
    Parameters
    Type Name Description
    float movementStartTime

    Start time of the animation.

    float movementDuration

    Duration of the animation.

    ApplyUpdates(float)

    Applies the updates for the animations.

    Declaration
    public void ApplyUpdates(float animationStartTime)
    Parameters
    Type Name Description
    float animationStartTime

    The start time of the animation.

    CalculatePinConnectorMatrix(Vector2)

    Calculates the pin connector matrix from the positional information about the pin connector. We basically take a standard quad with a pin texture and transform it so that it forms a pin of the right size.

    Declaration
    private Matrix4x4 CalculatePinConnectorMatrix(Vector2 pinPos)
    Parameters
    Type Name Description
    Vector2 pinPos

    The global position of the pin center.

    Returns
    Type Description
    Matrix4x4

    A translation, rotation and scaling matrix for a pin mesh with the given properties.

    CalculatePinMatrix(Vector2, bool)

    Calculates the pin matrix from the positional information about the pin. We basically take a standard quad with a pin texture and transform it so that it forms a pin of the right size.

    Declaration
    private Matrix4x4 CalculatePinMatrix(Vector2 pinPos, bool isSingletonPin)
    Parameters
    Type Name Description
    Vector2 pinPos

    The global position of the pin.

    bool isSingletonPin

    Whether this is a singleton pin. Singleton pins have their own pin size.

    Returns
    Type Description
    Matrix4x4

    A translation, rotation and scaling matrix for a pin mesh with the given properties.

    ClearMatrices()

    Clears the matrices, so nothing gets rendered anymore. The lists can be filled with new data now. (Actually just sets the index to 0, so we don't draw anything anymore.)

    Declaration
    public void ClearMatrices()

    Init()

    Initializes the materials and settings of this class.

    Declaration
    public void Init()

    RegenerateMeshes()

    Regenerates the meshes of this class.

    Declaration
    public void RegenerateMeshes()

    Render(ViewType, bool)

    Renders the pins.

    Declaration
    public void Render(ViewType type, bool firstRenderFrame)
    Parameters
    Type Name Description
    ViewType type

    The current view type. Useful for deciding what to show.

    bool firstRenderFrame

    If this is the first frame of the new round.

    UpdateConnectorPin(Vector2, RenderBatchIndex)

    Updates a connector pin.

    Declaration
    public void UpdateConnectorPin(Vector2 pinPos, RenderBatchIndex index)
    Parameters
    Type Name Description
    Vector2 pinPos

    The new global pin center position.

    RenderBatchIndex index

    The batch index of the pin to update.

    UpdatePin(Vector2, bool, RenderBatchIndex)

    Updates a pin.

    Declaration
    public void UpdatePin(Vector2 pinPos, bool singletonPin, RenderBatchIndex index)
    Parameters
    Type Name Description
    Vector2 pinPos

    The global pin center position.

    bool singletonPin

    Whether this is a singleton pin. Singleton pins have their own pin size.

    RenderBatchIndex index

    The index of the pin to update.

    Implements

    IGenerateDynamicMesh
    In this article
    Back to top AmoebotSim 2.0 Documentation v1.11
    Copyright © 2025 AmoebotSim 2.0 Authors
    Generated by DocFX