• 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 MeshConstants

    Inheritance
    object
    MeshConstants
    Namespace: AS2.Visuals.Library
    Assembly: .dll
    Syntax
    public static class MeshConstants

    Methods

    AddManualBoundsToMesh(Mesh, Vector3, float, bool)

    Adds some manual bounds to the mesh. Useful for shaders with vertex offsets.

    Declaration
    public static Mesh AddManualBoundsToMesh(Mesh mesh, Vector3 boundPivotWorldSpace, float boundRadius, bool flatZ = false)
    Parameters
    Type Name Description
    Mesh mesh

    The mesh to edit.

    Vector3 boundPivotWorldSpace

    The pivot of the cubic bounds.

    float boundRadius

    The radius of the cubic bounds.

    bool flatZ
    Returns
    Type Description
    Mesh

    getCustomIndependantQuadGrid(float, float, Vector2, int, int)

    Declaration
    public static Mesh getCustomIndependantQuadGrid(float length, float z, Vector2 pivot, int sizeX, int sizeY)
    Parameters
    Type Name Description
    float length
    float z
    Vector2 pivot
    int sizeX
    int sizeY
    Returns
    Type Description
    Mesh

    getCustomIndependantQuadGrid_Normals(float, float, Vector2, int, int)

    Declaration
    public static Vector3[] getCustomIndependantQuadGrid_Normals(float length, float z, Vector2 pivot, int sizeX, int sizeY)
    Parameters
    Type Name Description
    float length
    float z
    Vector2 pivot
    int sizeX
    int sizeY
    Returns
    Type Description
    Vector3[]

    getCustomIndependantQuadGrid_Triangles(float, float, Vector2, int, int)

    Declaration
    public static int[] getCustomIndependantQuadGrid_Triangles(float length, float z, Vector2 pivot, int sizeX, int sizeY)
    Parameters
    Type Name Description
    float length
    float z
    Vector2 pivot
    int sizeX
    int sizeY
    Returns
    Type Description
    int[]

    getCustomIndependantQuadGrid_UVs(float, float, Vector2, int, int)

    Declaration
    public static Vector2[] getCustomIndependantQuadGrid_UVs(float length, float z, Vector2 pivot, int sizeX, int sizeY)
    Parameters
    Type Name Description
    float length
    float z
    Vector2 pivot
    int sizeX
    int sizeY
    Returns
    Type Description
    Vector2[]

    getCustomIndependantQuadGrid_Vertices(float, float, Vector2, int, int)

    Declaration
    public static Vector3[] getCustomIndependantQuadGrid_Vertices(float length, float z, Vector2 pivot, int sizeX, int sizeY)
    Parameters
    Type Name Description
    float length
    float z
    Vector2 pivot
    int sizeX
    int sizeY
    Returns
    Type Description
    Vector3[]

    getDefaultMeshQuad()

    Returns a copy the default mesh with length 1 and pivot (0.5, 0.5).

    Declaration
    public static Mesh getDefaultMeshQuad()
    Returns
    Type Description
    Mesh

    getDefaultMeshQuad(float)

    Returns a default mesh with the given bound radius. Useful for shaders with vertex offsets.

    Declaration
    public static Mesh getDefaultMeshQuad(float boundRadius)
    Parameters
    Type Name Description
    float boundRadius

    The manually set bounds of the mesh.

    Returns
    Type Description
    Mesh

    getDefaultMeshQuad(float, float, Vector2)

    Returns a copy the default mesh with definable length, z coordinate and pivot.

    Declaration
    public static Mesh getDefaultMeshQuad(float length, float z, Vector2 pivot)
    Parameters
    Type Name Description
    float length

    The length of a side.

    float z

    z coordinate.

    Vector2 pivot

    Pivot must be between (0,0) and (1,1).

    Returns
    Type Description
    Mesh

    getDefaultMeshQuad(Vector2)

    Returns a copy the default mesh with definable pivot.

    Declaration
    public static Mesh getDefaultMeshQuad(Vector2 pivot)
    Parameters
    Type Name Description
    Vector2 pivot

    Pivot must be between (0,0) and (1,1).

    Returns
    Type Description
    Mesh

    getDefaultNormalsForQuad()

    Returns the default normals for a quad. (Vector3.up x4).

    Declaration
    public static Vector3[] getDefaultNormalsForQuad()
    Returns
    Type Description
    Vector3[]

    getDefaultTrianglesForQuad()

    Returns the default triangles fitting to the other methods in this class! (0, 2, 1, 1, 2, 3)

    Declaration
    public static int[] getDefaultTrianglesForQuad()
    Returns
    Type Description
    int[]

    getDefaultTrianglesForQuadGrid(int)

    Returns the default triangles for the quad grid starting from the bottom left for each row up to the top right.

    Declaration
    public static int[] getDefaultTrianglesForQuadGrid(int gridSize)
    Parameters
    Type Name Description
    int gridSize
    Returns
    Type Description
    int[]

    getDefaultUVMapForQuad()

    Returns the default UV map for a texture. (0,0), (1,0), (0,1), (1,1).

    Declaration
    public static Vector2[] getDefaultUVMapForQuad()
    Returns
    Type Description
    Vector2[]

    getDefaultUVMapForQuadGrid(int)

    Returns the default uv map that fits to the default vertices for the quad grid.

    Declaration
    public static Vector2[] getDefaultUVMapForQuadGrid(int gridSize)
    Parameters
    Type Name Description
    int gridSize
    Returns
    Type Description
    Vector2[]

    getDefaultVerticesForQuad()

    Returns the default Quad Vertices with length 1 and pivot (0.5,0.5).

    Declaration
    public static Vector3[] getDefaultVerticesForQuad()
    Returns
    Type Description
    Vector3[]

    getDefaultVerticesForQuad(float, float, Vector2)

    Returns the default Quad Vertices with definable length, z coordinate and pivot. (0,0); (1,0); (0,1); (1,1) for length 1 and pivot (0,0). Pivot must be between (0,0) and (1,1).

    Declaration
    public static Vector3[] getDefaultVerticesForQuad(float length, float z, Vector2 pivot)
    Parameters
    Type Name Description
    float length

    The length of a side.

    float z

    z coordinate.

    Vector2 pivot

    Pivot must be between (0,0) and (1,1).

    Returns
    Type Description
    Vector3[]

    getDefaultVerticesForQuad(Vector2)

    Returns the default Quad Vertices with length 1 and custom pivot.

    Declaration
    public static Vector3[] getDefaultVerticesForQuad(Vector2 pivot)
    Parameters
    Type Name Description
    Vector2 pivot
    Returns
    Type Description
    Vector3[]

    getDefaultVerticesForQuadGrid(int, float, float, Vector2)

    Returns the default Quad Grid Vertices with definable size, quad length, z coordinate and pivot in the lower left quad. (0,1); (1,1); (0,0); (1,0) for length 1 and pivot (0,0). Pivot must be between (0,0) and (1,1).

    Declaration
    public static Vector3[] getDefaultVerticesForQuadGrid(int gridSize, float length, float z, Vector2 pivot)
    Parameters
    Type Name Description
    int gridSize
    float length
    float z
    Vector2 pivot
    Returns
    Type Description
    Vector3[]

    getVerticesForIndependantQuadGrid(int, float, float, Vector2, int)

    Returns Quad Grid Vertices where each Quad does not share vertices with the next Quad. Has the option for multiple of the same vertices on top of each other (e.g. for blending multiple textures on top of each other). Includes definable size, quad length, z coordinate and pivot in the lower left quad. (0,1); (1,1); (0,0); (1,0) for length 1 and pivot (0,0). Pivot must be between (0,0) and (1,1). Note: For example if we have amountOfQuadsOnTopOfEachOther=2: We draw the first Quad in the bottom left, then the same Quad again, then the next Quad to the right, then again this one, ...

    Declaration
    public static Vector3[] getVerticesForIndependantQuadGrid(int gridSize, float length, float z, Vector2 pivot, int amountOfQuadsOnTopOfEachOther)
    Parameters
    Type Name Description
    int gridSize
    float length
    float z
    Vector2 pivot
    int amountOfQuadsOnTopOfEachOther
    Returns
    Type Description
    Vector3[]

    offsetMeshVertices(Mesh, Vector3)

    Offsets the mesh's vertices by a certain vector.

    Declaration
    public static Mesh offsetMeshVertices(Mesh mesh, Vector3 offsetVector)
    Parameters
    Type Name Description
    Mesh mesh
    Vector3 offsetVector
    Returns
    Type Description
    Mesh

    scaleMeshAroundPivot(Mesh, Vector3)

    Scales a mesh around the pivot. From the scaleVector each coordinate is multiplied with the corresponding coordinates from the mesh vertices.

    Declaration
    public static Mesh scaleMeshAroundPivot(Mesh mesh, Vector3 scaleVector)
    Parameters
    Type Name Description
    Mesh mesh
    Vector3 scaleVector
    Returns
    Type Description
    Mesh
    In this article
    Back to top AmoebotSim 2.0 Documentation v1.11
    Copyright © 2025 AmoebotSim 2.0 Authors
    Generated by DocFX