Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Capsule

A MeshPrimitive prepopulated with capsule vertices and triangles

Hierarchy

  • MeshPrimitive
    • Capsule

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Capsule(radius: number, height: number, longLines?: number, latLines?: number, capUvFraction?: number, material?: Material): Capsule
  • Generate a new capsule geometry, long axis aligned to local Y.

    Parameters

    • radius: number

      The radius of the capsule.

    • height: number

      The height of the capsule including end caps. Must be at least 2 * radius.

    • Default value longLines: number = 12

      The number of polar vertex rings (running the length of the capsule).

    • Default value latLines: number = 8

      The number of equatorial vertex rings (not counting poles) per cap.

    • Default value capUvFraction: number = 0.2

      The amount of texture space the end caps should occupy.

    • Default value material: Material = null

      An initial material to apply to the capsule.

    Returns Capsule

Properties

material

material: Material

triangles

triangles: number[] = []

vertices

vertices: Vertex[] = []

Methods

getByteSize

  • getByteSize(scanId: number): number
  • Parameters

    • scanId: number

    Returns number

serialize