Variables
Const c00
c00
: Vec3 = new Vec3(0, 0, 0)
Const c01
c01
: Vec3 = new Vec3(0, 0, 0)
Const c10
c10
: Vec3 = new Vec3(0, 0, 0)
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(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 temp3
temp3
: Vec3 = new Vec3(0, 0, 0)
Functions
applyDefaultCircleOptions
applyDefaultGeometryOptions
- applyDefaultGeometryOptions<GeometryOptions>(options?: RecursivePartial<IGeometryOptions>): GeometryOptions
-
Type parameters
Parameters
Returns GeometryOptions
capsule
- capsule(radiusTop?: number, radiusBottom?: number, height?: number, opts?: RecursivePartial<ICapsuteOptions>): { boundingRadius: number; indices: number[]; maxPos: Vec3; minPos: Vec3; normals: number[]; positions: number[]; uvs: number[] }
-
Parameters
-
Default value radiusTop: number = 0.5
-
Default value radiusBottom: number = 0.5
-
Default value height: number = 2
-
Default value opts: RecursivePartial<ICapsuteOptions> = {}
Returns { boundingRadius: number; indices: number[]; maxPos: Vec3; minPos: Vec3; normals: number[]; positions: number[]; uvs: number[] }
-
boundingRadius: number
-
indices: number[]
-
-
-
normals: number[]
-
positions: number[]
-
uvs: number[]
cone
-
Parameters
-
Default value radius: number = 0.5
-
Default value height: number = 1
-
Default value opts: RecursivePartial<IConeOptions> = {}
cylinder
-
Parameters
-
Default value radiusTop: number = 0.5
-
Default value radiusBottom: number = 0.5
-
Default value height: number = 2
-
Default value opts: RecursivePartial<ICylinderOptions> = {}
invWinding
- invWinding(indices: number[]): number[]
-
Parameters
Returns number[]
normals
- normals(positions: number[], nms: number[], length?: number): any[]
-
Parameters
-
positions: number[]
-
nms: number[]
-
Default value length: number = 1
Returns any[]
scale
- scale(geometry: IGeometry, value: { x?: undefined | number; y?: undefined | number; z?: undefined | number }): IGeometry
-
Parameters
-
-
value: { x?: undefined | number; y?: undefined | number; z?: undefined | number }
-
Optional x?: undefined | number
-
Optional y?: undefined | number
-
Optional z?: undefined | number
sphere
-
Parameters
-
Default value radius: number = 0.5
-
Default value opts: RecursivePartial<ISphereOptions> = {}
toWavefrontOBJ
- toWavefrontOBJ(primitive: IGeometry, scale?: number): string
-
Parameters
-
-
Default value scale: number = 1
Returns string
torus
- torus(radius?: number, tube?: number, opts?: RecursivePartial<ITorusOptions>): { boundingRadius: number; indices: number[]; maxPos: Vec3; minPos: Vec3; normals: number[]; positions: number[]; uvs: number[] }
-
Parameters
-
Default value radius: number = 0.4
-
Default value tube: number = 0.1
-
Default value opts: RecursivePartial<ITorusOptions> = {}
Returns { boundingRadius: number; indices: number[]; maxPos: Vec3; minPos: Vec3; normals: number[]; positions: number[]; uvs: number[] }
-
boundingRadius: number
-
indices: number[]
-
-
-
normals: number[]
-
positions: number[]
-
uvs: number[]
translate
- translate(geometry: IGeometry, offset: { x?: undefined | number; y?: undefined | number; z?: undefined | number }): IGeometry
-
Parameters
-
-
offset: { x?: undefined | number; y?: undefined | number; z?: undefined | number }
-
Optional x?: undefined | number
-
Optional y?: undefined | number
-
Optional z?: undefined | number
wireframe
- wireframe(indices: number[]): number[]
-
Parameters
Returns number[]
应用默认圆参数。