コード例 #1
0
        protected override void Initialize()
        {
            // Inputs
            InputSlot.CreateOrResetRequired <Surface>(ref surfaceInputSlot, this);
            InputSlot.CreateOrResetRequired <Topology>(ref topologyInputSlot, this);
            InputSlot.CreateOrResetRequired <IVertexAttribute <Vector3> >(ref vertexPositionsInputSlot, this);

            // Outputs
            OutputSlot.CreateOrReset <UniversalFaceSpatialPartitioning>(ref partitioningOutputSlot, this, "Face Spatial Partitioning");
        }
コード例 #2
0
        protected override void Initialize()
        {
            // Inputs
            InputSlot.CreateOrResetRequired <DynamicMesh>(ref dynamicMeshInputSlot, this);

            // Fields
            meshPrefab = null;

            // Outputs
            OutputSlot.CreateOrReset <GameObject>(ref prefabOutputSlot, this, "Prefab");
        }
コード例 #3
0
        protected override void Initialize()
        {
            // Fields
            radius              = 1f;
            primaryPole         = Vector3.up;
            equatorialPole      = Vector3.right;
            isInverted          = false;
            sphericalPolyhedron = SphericalPolyhedrons.Icosahedron;
            subdivisionDegree   = 10;
            useDualPolyhedron   = true;

            // Outputs
            OutputSlot.CreateOrReset <SphericalSurface>(ref surfaceOutputSlot, this, "Surface");
            OutputSlot.CreateOrReset <Topology>(ref topologyOutputSlot, this, "Topology");
            OutputSlot.CreateOrResetGrouped <IVertexAttribute <Vector3> >(ref vertexPositionsOutputSlot, this, "Vertex Positions", "Attributes");
        }
コード例 #4
0
        protected override void Initialize()
        {
            // Fields
            _version = "1.1";

            tileType = TileTypes.Quadrilateral;
            size     = new IntVector2(64, 64);
            SetHexTileShape(HexTileShapes.RegularPointUp, true);
            SetQuadTileShape(QuadTileShapes.Square, true);

            isAxis0Wrapped = false;
            isAxis1Wrapped = false;

            hexGridAxisStyle = HexGridAxisStyles.Staggered;
            swapAxes         = false;

            origin   = Vector3.zero;
            rotation = Vector3.zero;

            // Outputs
            OutputSlot.CreateOrReset <QuadrilateralSurface>(ref surfaceOutputSlot, this, "Surface");
            OutputSlot.CreateOrReset <Topology>(ref topologyOutputSlot, this, "Topology");
            OutputSlot.CreateOrResetGrouped <IVertexAttribute <Vector3> >(ref vertexPositionsOutputSlot, this, "Vertex Positions", "Attributes");
        }
コード例 #5
0
ファイル: MeshGenerator.cs プロジェクト: againey/MakeIt.Tile
        protected override void Initialize()
        {
            // Inputs
            InputSlot.CreateOrResetRequired <Topology>(ref topologyInputSlot, this);
            InputSlot.CreateOrResetRequired <FaceGroupCollection>(ref faceGroupCollectionInputSlot, this);
            InputSlot.CreateOrResetRequired <FaceGroup>(ref faceGroupInputSlot, this);
            ringVertexPositionsInputSlots   = new InputSlot[0];
            ringVertexNormalsInputSlots     = new InputSlot[0];
            ringVertexColorsInputSlots      = new InputSlot[0];
            ringVertexColor32sInputSlots    = new InputSlot[0];
            ringVertexUV1sInputSlots        = new InputSlot[0];
            ringVertexUV2sInputSlots        = new InputSlot[0];
            ringVertexUV3sInputSlots        = new InputSlot[0];
            ringVertexUV4sInputSlots        = new InputSlot[0];
            ringVertexTangentsInputSlots    = new InputSlot[0];
            centerVertexPositionsInputSlots = new InputSlot[0];
            centerVertexNormalsInputSlots   = new InputSlot[0];
            centerVertexColorsInputSlots    = new InputSlot[0];
            centerVertexColor32sInputSlots  = new InputSlot[0];
            centerVertexUV1sInputSlots      = new InputSlot[0];
            centerVertexUV2sInputSlots      = new InputSlot[0];
            centerVertexUV3sInputSlots      = new InputSlot[0];
            centerVertexUV4sInputSlots      = new InputSlot[0];
            centerVertexTangentsInputSlots  = new InputSlot[0];
            UpdateVertexAttributeInputSlots();

            // Fields
            sourceType            = SourceType.InternalFaces;
            triangulation         = Triangulation.Fan;
            ringDepth             = 1;
            maxVerticesPerSubmesh = 65534;

            // Outputs
            OutputSlot.CreateOrReset <DynamicMesh>(ref dynamicMeshOutputSlot, this, "Dynamic Mesh");
            meshOutputSlots = new OutputSlot[0];
        }