Options
All
  • Public
  • Public/Protected
  • All
Menu

External module primitive

Index

Type aliases

IConeOptions

IConeOptions: ICylinderOptions

Variables

Const c0

c0: Vec3 = new Vec3()

Const c00

c00: Vec3 = new Vec3(0, 0, 0)

Const c01

c01: Vec3 = new Vec3(0, 0, 0)

Const c1

c1: Vec3 = new Vec3()

Const c10

c10: Vec3 = new Vec3(0, 0, 0)

Const c2

c2: Vec3 = new Vec3()

Const c3

c3: Vec3 = new Vec3()

Const c4

c4: Vec3 = new Vec3()

Const c5

c5: Vec3 = new Vec3()

Const c6

c6: Vec3 = new Vec3()

Const c7

c7: Vec3 = new Vec3()

Const r

r: Vec3 = new Vec3()

Const r

r: Vec3 = new Vec3(0, 0, 0)

Const temp1

temp1: Vec3 = new Vec3(0, 0, 0)

Const temp1

temp1: Vec3 = new Vec3(0, 0, 0)

Const temp1

temp1: Vec3 = new Vec3()

Const temp1

temp1: Vec3 = new Vec3(0, 0, 0)

Const temp2

temp2: Vec3 = new Vec3(0, 0, 0)

Const temp2

temp2: Vec3 = new Vec3(0, 0, 0)

Const temp2

temp2: Vec3 = new Vec3(0, 0, 0)

Const temp2

temp2: Vec3 = new Vec3()

Const temp3

temp3: Vec3 = new Vec3()

Const temp3

temp3: Vec3 = new Vec3(0, 0, 0)

Functions

applyDefaultCircleOptions

applyDefaultGeometryOptions

  • applyDefaultGeometryOptions<GeometryOptions>(options?: RecursivePartial<IGeometryOptions>): GeometryOptions

applyDefaultPlaneOptions

box

capsule

  • capsule(radiusTop?: number, radiusBottom?: number, height?: number, opts?: RecursivePartial<ICapsuteOptions>): object
  • Generate a capsule with radiusTop radiusBottom 0.5, height 2, centered at origin, but may be repositioned through the center option.

    生成一个胶囊体。

    Parameters

    • Default value radiusTop: number = 0.5

      顶部半径。

    • Default value radiusBottom: number = 0.5

      底部半径。

    • Default value height: number = 2
    • Default value opts: RecursivePartial<ICapsuteOptions> = {}

      胶囊体参数选项。

    Returns object

    • boundingRadius: number
    • indices: number[]
    • maxPos: Vec3
    • minPos: Vec3
    • normals: number[]
    • positions: number[]
    • uvs: number[]

circle

cone

  • 生成一个圆锥。

    Parameters

    • Default value radius: number = 0.5

      圆锥半径。

    • Default value height: number = 1

      圆锥高度。

    • Default value opts: RecursivePartial<IConeOptions> = {}

      圆锥参数选项。

    Returns IGeometry

cylinder

  • 生成一个圆柱。

    Parameters

    • Default value radiusTop: number = 0.5

      顶部半径。

    • Default value radiusBottom: number = 0.5

      底部半径。

    • Default value height: number = 2
    • Default value opts: RecursivePartial<ICylinderOptions> = {}

      圆柱参数选项。

    Returns IGeometry

invWinding

  • invWinding(indices: number[]): number[]

normals

  • normals(positions: number[], nms: number[], length?: number): any[]

plane

quad

scale

sphere

toWavefrontOBJ

  • toWavefrontOBJ(primitive: IGeometry, scale?: number): string

torus

  • torus(radius?: number, tube?: number, opts?: RecursivePartial<ITorusOptions>): object
  • 生成一个环面。

    Parameters

    • Default value radius: number = 0.4

      环面半径。

    • Default value tube: number = 0.1

      管形大小。

    • Default value opts: RecursivePartial<ITorusOptions> = {}

      参数选项。

    Returns object

    • boundingRadius: number
    • indices: number[]
    • maxPos: Vec3
    • minPos: Vec3
    • normals: number[]
    • positions: number[]
    • uvs: number[]

translate

wireframe

  • wireframe(indices: number[]): number[]

wireframed

Generated using TypeDoc