Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NgxCapsuleGeometry

The Capsule geometry.

See the ngx3js docs page for details. See the ngx geometey page for a live demo.

Hierarchy

Index

Constructors

constructor

  • new NgxCapsuleGeometry(radius?: number, radiusSegments?: number, height?: number, heightSegments?: number, phiStart?: number, phiLength?: number): NgxCapsuleGeometry

constructor

Properties

MaxIndex

MaxIndex: number

attributes

attributes: {}

This hashmap has as id the name of the attribute to be set and as value the buffer to set it to. Rather than accessing this property directly, use .setAttribute and .getAttribute to access attributes of this geometry.

default

{}

Type declaration

boundingBox

boundingBox: I3JS.Box3

Bounding box for the bufferGeometry, which can be calculated with .computeBoundingBox(). Default is null.

default

null

boundingSphere

boundingSphere: I3JS.Sphere

Bounding sphere for the bufferGeometry, which can be calculated with .computeBoundingSphere(). Default is null.

default

null

drawRange

drawRange: { count: number; start: number }

Determines the part of the geometry to render. This should not be set directly, instead use .setDrawRange. Default is { start: 0, count: Infinity } For non-indexed BufferGeometry, count is the number of vertices to render. For indexed BufferGeometry, count is the number of indices to render.

default

{ start: 0, count: Infinity }

Type declaration

  • count: number
  • start: number

groups

groups: { count: number; materialIndex?: number; start: number }[]

Split the geometry into groups, each of which will be rendered in a separate WebGL draw call. This allows an array of materials to be used with the bufferGeometry. Each group is an object of the form: { start: Integer, count: Integer, materialIndex: Integer } where start specifies the first element in this draw call – the first vertex for non-indexed geometry, otherwise the first triangle index. Count specifies how many vertices (or indices) are included, and materialIndex specifies the material array index to use. Use .addGroup to add groups, rather than modifying this array directly.

default

[]

id

id: number

Unique number for this bufferGeometry instance.

index

Allows for vertices to be re-used across multiple triangles; this is called using "indexed triangles". Each triangle is associated with the indices of three vertices. This attribute therefore stores the index of each vertex for each triangular face. If this attribute is not set, the renderer assumes that each three contiguous positions represent a single triangle. Default is null.

default

null

Readonly isBufferGeometry

isBufferGeometry: true

morphAttributes

morphAttributes: {}

Hashmap of BufferAttributes holding details of the geometry's morph targets.

default

{}

Type declaration

morphTargetsRelative

morphTargetsRelative: boolean

Used to control the morph target behavior; when set to true, the morph target data is treated as relative offsets, rather than as absolute positions/normals. Default is false.

default

false

name

name: string

Optional name for this bufferGeometry instance. Default is an empty string.

default

''

parameters

parameters: { height: number; heightSegments: number; phiLength: number; phiStart: number; radius: number; radiusSegments: number }

The Parameters of capsule geometry

Type declaration

  • height: number
  • heightSegments: number
  • phiLength: number
  • phiStart: number
  • radius: number
  • radiusSegments: number

type

type: string
default

'BufferGeometry'

userData

userData: {}

An object that can be used to store custom data about the BufferGeometry. It should not hold references to functions as these will not be cloned.

default

{}

Type declaration

  • [key: string]: any

uuid

uuid: string

UUID of this object instance. This gets automatically assigned and shouldn't be edited.

Static MaxIndex

MaxIndex: number

Static attributes

attributes: {}

This hashmap has as id the name of the attribute to be set and as value the buffer to set it to. Rather than accessing this property directly, use .setAttribute and .getAttribute to access attributes of this geometry.

default

{}

Type declaration

Static boundingBox

boundingBox: I3JS.Box3

Bounding box for the bufferGeometry, which can be calculated with .computeBoundingBox(). Default is null.

default

null

Static boundingSphere

boundingSphere: I3JS.Sphere

Bounding sphere for the bufferGeometry, which can be calculated with .computeBoundingSphere(). Default is null.

default

null

Static drawRange

drawRange: { count: number; start: number }

Determines the part of the geometry to render. This should not be set directly, instead use .setDrawRange. Default is { start: 0, count: Infinity } For non-indexed BufferGeometry, count is the number of vertices to render. For indexed BufferGeometry, count is the number of indices to render.

default

{ start: 0, count: Infinity }

Type declaration

  • count: number
  • start: number

Static groups

groups: { count: number; materialIndex?: number; start: number }[]

Split the geometry into groups, each of which will be rendered in a separate WebGL draw call. This allows an array of materials to be used with the bufferGeometry. Each group is an object of the form: { start: Integer, count: Integer, materialIndex: Integer } where start specifies the first element in this draw call – the first vertex for non-indexed geometry, otherwise the first triangle index. Count specifies how many vertices (or indices) are included, and materialIndex specifies the material array index to use. Use .addGroup to add groups, rather than modifying this array directly.

default

[]

Static id

id: number

Unique number for this bufferGeometry instance.

Static index

Allows for vertices to be re-used across multiple triangles; this is called using "indexed triangles". Each triangle is associated with the indices of three vertices. This attribute therefore stores the index of each vertex for each triangular face. If this attribute is not set, the renderer assumes that each three contiguous positions represent a single triangle. Default is null.

default

null

Static Readonly isBufferGeometry

isBufferGeometry: true

Static morphAttributes

morphAttributes: {}

Hashmap of BufferAttributes holding details of the geometry's morph targets.

default

{}

Type declaration

Static morphTargetsRelative

morphTargetsRelative: boolean

Used to control the morph target behavior; when set to true, the morph target data is treated as relative offsets, rather than as absolute positions/normals. Default is false.

default

false

Static name

name: string

Optional name for this bufferGeometry instance. Default is an empty string.

default

''

Static Optional parameters

parameters?: any

An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.

Static type

type: string
default

'BufferGeometry'

Static userData

userData: {}

An object that can be used to store custom data about the BufferGeometry. It should not hold references to functions as these will not be cloned.

default

{}

Type declaration

  • [key: string]: any

Static uuid

uuid: string

UUID of this object instance. This gets automatically assigned and shouldn't be edited.

Methods

addAttribute

  • addAttribute(name: any, array: any, itemSize: any): any

addEventListener

addGroup

  • addGroup(start: number, count: number, materialIndex?: number): void

applyMatrix4

applyQuaternion

center

clearGroups

  • clearGroups(): void

clone

computeBoundingBox

  • computeBoundingBox(): void
  • Computes bounding box of the geometry, updating .boundingBox attribute. Bounding boxes aren't computed by default. They need to be explicitly computed, otherwise they are null.

    Returns void

computeBoundingSphere

  • computeBoundingSphere(): void
  • Computes bounding sphere of the geometry, updating .boundingSphere attribute. Bounding spheres aren't computed by default. They need to be explicitly computed, otherwise they are null.

    Returns void

computeTangents

  • computeTangents(): void
  • Calculates and adds a tangent attribute to this geometry. The computation is only supported for indexed geometries and if position, normal, and uv attributes are defined.

    Returns void

computeVertexNormals

  • computeVertexNormals(): void

copy

deleteAttribute

dispatchEvent

  • dispatchEvent(event: Event): void

dispose

  • dispose(): void
  • Disposes the object from memory. You need to call this when you want the BufferGeometry removed while the application is running.

    Returns void

getAttribute

getIndex

hasAttribute

hasEventListener

lookAt

merge

normalizeNormals

  • normalizeNormals(): void
  • Every normal vector in a geometry will have a magnitude of 1. This will correct lighting on the geometry surfaces.

    Returns void

removeEventListener

rotateX

rotateY

rotateZ

scale

setAttribute

setDrawRange

  • setDrawRange(start: number, count: number): void
  • Set the .drawRange property. For non-indexed BufferGeometry, count is the number of vertices to render. For indexed BufferGeometry, count is the number of indices to render.

    Parameters

    • start: number
    • count: number

    Returns void

setFromPoints

setIndex

toJSON

  • toJSON(): any

toNonIndexed

translate

Static addAttribute

  • addAttribute(name: any, array: any, itemSize: any): any

Static addEventListener

Static addGroup

  • addGroup(start: number, count: number, materialIndex?: number): void

Static applyMatrix4

Static applyQuaternion

Static center

Static clearGroups

  • clearGroups(): void

Static clone

Static computeBoundingBox

  • computeBoundingBox(): void
  • Computes bounding box of the geometry, updating .boundingBox attribute. Bounding boxes aren't computed by default. They need to be explicitly computed, otherwise they are null.

    Returns void

Static computeBoundingSphere

  • computeBoundingSphere(): void
  • Computes bounding sphere of the geometry, updating .boundingSphere attribute. Bounding spheres aren't computed by default. They need to be explicitly computed, otherwise they are null.

    Returns void

Static computeTangents

  • computeTangents(): void
  • Calculates and adds a tangent attribute to this geometry. The computation is only supported for indexed geometries and if position, normal, and uv attributes are defined.

    Returns void

Static computeVertexNormals

  • computeVertexNormals(): void

Static copy

Static deleteAttribute

Static dispatchEvent

  • dispatchEvent(event: Event): void

Static dispose

  • dispose(): void
  • Disposes the object from memory. You need to call this when you want the BufferGeometry removed while the application is running.

    Returns void

Static getAttribute

Static getIndex

Static hasAttribute

Static hasEventListener

Static lookAt

Static merge

Static normalizeNormals

  • normalizeNormals(): void
  • Every normal vector in a geometry will have a magnitude of 1. This will correct lighting on the geometry surfaces.

    Returns void

Static removeEventListener

Static rotateX

Static rotateY

Static rotateZ

Static scale

Static setAttribute

Static setDrawRange

  • setDrawRange(start: number, count: number): void
  • Set the .drawRange property. For non-indexed BufferGeometry, count is the number of vertices to render. For indexed BufferGeometry, count is the number of indices to render.

    Parameters

    • start: number
    • count: number

    Returns void

Static setFromPoints

Static setIndex

Static toJSON

  • toJSON(): any

Static toNonIndexed

Static translate

Generated using TypeDoc