docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Cylinder

    Represents a basic cylinder shape.

    Inheritance
    object
    Shape
    Cylinder
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.ProBuilder.Shapes
    Assembly: Unity.ProBuilder.dll
    Syntax
    [Shape("Cylinder")]
    public class Cylinder : Shape

    Methods

    CopyShape(Shape)

    Overwrites this shape's property values by copying them from the specified Shape object.

    Declaration
    public override void CopyShape(Shape shape)
    Parameters
    Type Name Description
    Shape shape

    The Shape to copy property values from.

    Overrides
    Shape.CopyShape(Shape)

    RebuildMesh(ProBuilderMesh, Vector3, Quaternion)

    Rebuilds the specified mesh using the existing property values for this shape. This includes building a list of vertices and normals for each face, applying smoothing to the faces if required, and calculating the bounds of the mesh.

    Declaration
    public override Bounds RebuildMesh(ProBuilderMesh mesh, Vector3 size, Quaternion rotation)
    Parameters
    Type Name Description
    ProBuilderMesh mesh

    The mesh to rebuild.

    Vector3 size

    The position of the opposite corner of the bounding box for this shape.

    Quaternion rotation

    The rotation (orientation) to use for this mesh.

    Returns
    Type Description
    Bounds

    The bounds calculated for this shape after rebuilding it.

    Overrides
    Shape.RebuildMesh(ProBuilderMesh, Vector3, Quaternion)

    UpdateBounds(ProBuilderMesh, Vector3, Quaternion, Bounds)

    Allows the user to redefine the default bounding box for this shape.

    Declaration
    public override Bounds UpdateBounds(ProBuilderMesh mesh, Vector3 size, Quaternion rotation, Bounds bounds)
    Parameters
    Type Name Description
    ProBuilderMesh mesh

    The mesh to find the bounds for.

    Vector3 size

    The desired size for the shape defined when using the Shape Tool.

    Quaternion rotation

    The rotation (orientation) to use for this mesh.

    Bounds bounds

    The default bounds computed for the shape.

    Returns
    Type Description
    Bounds

    The bounds from this shape's bounds property.

    Overrides
    Shape.UpdateBounds(ProBuilderMesh, Vector3, Quaternion, Bounds)
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)