BufferGeometry
Core.BufferGeometry exported from @manycore/aholo-viewer.
Type Parameters
- T extends Topology = TriangleList
Hierarchy
- BufferGeometryBase
- BufferGeometry
Constructors
constructor
Type Parameters
- T extends Topology = TriangleList
Returns BufferGeometry<T>
Inherited from BufferGeometryBase.constructor
Properties
name
Inherited from BufferGeometryBase.name
type
The type of this instance. This will be give in extended class.
Inherited from BufferGeometryBase.type
is Buffer Geometry
Flag to indicate the type of this class. This value should not be changed by user.
Inherited from BufferGeometryBase.isBufferGeometry
parameters
This object is used to record all parameters which are set when instance is initialized. But, change the value of this object may not change the geometry directly.
Inherited from FatLineBufferGeometry.parameters
mesh BVH
Use BVH to accelerate rendering. This value usually dose not need you to change it, it is built by the engine automatically.
Inherited from BufferGeometryBase.meshBVH
_ indexnull
Allows for vertices to be re-used across multiple triangles; this is called using "indexed triangles".
and works much the same as it does in Geometry: 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.
This should be set by setIndex| setIndex() to avoid error.
Inherited from BufferGeometryBase._index
attributes
Core data of Geometry such as vertex positions, normals, UVs and color.
Remarks
See BufferAttribute for more details.
Inherited from BufferGeometryBase.attributes
draw Range{ start: 0, count: Infinity }
Determines which part of buffer will be rendered.
Inherited from BufferGeometryBase.drawRange
__ topology Mark
id
Inherited from BufferGeometryBase.id
Readonlyuser Data
Inherited from BufferGeometryBase.userData
_ uuid
Inherited from BufferGeometryBase._uuid
uuid
Inherited from BufferGeometryBase.uuid
_ listeners
Inherited from BufferGeometryBase._listeners
Accessors
index
- get index(): IndexBufferAttribute
Returns IndexBufferAttribute
Inherited from BufferGeometryBase.index
- set index(v: IndexBufferAttribute): void
Parameters
- v: IndexBufferAttribute
Returns void
Inherited from BufferGeometryBase.index
position
Returns BufferAttribute<TypedArray>
Inherited from BufferGeometryBase.position
uv
Returns BufferAttribute<TypedArray>
Inherited from BufferGeometryBase.uv
business Tag
- get businessTag(): string
Returns string
Inherited from BufferGeometryBase.businessTag
- set businessTag(v: string): void
Parameters
- v: string
Returns void
Inherited from BufferGeometryBase.businessTag
Methods
get Group
get group at index
Parameters
- index: number
Returns BufferGroup | undefined
Inherited from BufferGeometryBase.getGroup
set Group
Split the data into different groups.
Parameters
- group: BufferGroup
- index: number
Returns void
Inherited from BufferGeometryBase.setGroup
set Groups
set entire groups
Parameters
- groups: BufferGroup[]
Returns this
Inherited from BufferGeometryBase.setGroups
push Group
push a group
Parameters
- group: BufferGroup
Returns this
Inherited from BufferGeometryBase.pushGroup
add Group
clear Groups
Clean all objects in the groups| groups.
Returns void
Inherited from BufferGeometryBase.clearGroups
get Bounding Box
If boundingBox| boundingBox is null, it will be calculated a new one.
Returns Box3
Inherited from BufferGeometryBase.getBoundingBox
get Bounding Sphere
If boundingSphere| boundingSphere is null, it will be calculated a new one.
Returns Sphere
Inherited from BufferGeometryBase.getBoundingSphere
notify Shape Changed
Clear the bounding box and sphere and recalculate them later.
Returns void
Inherited from BufferGeometryBase.notifyShapeChanged
get Attribute Layout Key
Generate a hash key according to index| index and all attributes| attributes.
Returns string
Inherited from BufferGeometryBase.getAttributeLayoutKey
class Name
The name of instance's class.
Returns string
Inherited from BufferGeometryBase.className
attribute Changed
Clean old data of engine and load new data in next update.
Returns void
Inherited from BufferGeometryBase.attributeChanged
get Buffer Geometry
Return current instance of this class.
Returns this
Inherited from BufferGeometryBase.getBufferGeometry
get Line Buffer Geometry
Return current instance of this class.
Returns this
Inherited from BufferGeometryBase.getLineBufferGeometry
get Index
Return the instance of index| index.
Returns IndexBufferAttribute
Inherited from BufferGeometryBase.getIndex
on Attribute Update
Call this method to let engine refresh data of meshBVH.
Returns void
Inherited from BufferGeometryBase.onAttributeUpdate
set Index
Use this method to set new index| index for geometry.
Parameters
- index: TypedArray | number[] | IndexBufferAttribute
source data of the index.
Returns this
Inherited from BufferGeometryBase.setIndex
- index: TypedArray | number[] | IndexBufferAttribute
add Attribute
Parameters
- name: string
- attribute: BufferAttribute
Returns this
Inherited from BufferGeometryBase.addAttribute
set Attribute
Change the given attributes| attributes for geometry.
Parameters
- name: string
the name of data such as position, uv and normal.
- attribute: BufferAttribute
source data. see BufferAttribute for more details.
Returns this
Inherited from BufferGeometryBase.setAttribute
- name: string
add Or Set Attribute
Get specified attributes| attributes from geometry.
Parameters
- name: string
the name of target attributes.
- array: TypedArray
- itemSize: number
Returns void
Inherited from BufferGeometryBase.addOrSetAttribute
- name: string
get Attribute
Parameters
- name: string
Returns BufferAttribute<TypedArray> | undefined
Inherited from BufferGeometryBase.getAttribute
remove Attribute
Remove specified attributes| attributes from geometry.
Parameters
- name: string
the name of target attributes.
Returns this
Inherited from BufferGeometryBase.removeAttribute
- name: string
remove And Destroy Attribute
Parameters
- name: string
Returns this
Inherited from BufferGeometryBase.removeAndDestroyAttribute
get Group By Vertex Index
Find the group which the vertex belong to.
Parameters
- index: number
Queried vertex index.
Returns { group: BufferGroup; groupIndex: number }
Inherited from BufferGeometryBase.getGroupByVertexIndex
- index: number
set Draw Range
Change the value of drawRange.
Parameters
- start: number
- count: number
Returns void
Inherited from BufferGeometryBase.setDrawRange
compute Bounding Box
Computes bounding box according to vertexes, updating boundingBox attribute. Bounding boxes aren't computed by default. They need to be explicitly computed, otherwise they are null.
Returns void
Inherited from BufferGeometryBase.computeBoundingBox
compute Bounding Sphere
Computes bounding sphere according to vertexes, updating boundingSphere attribute. Bounding spheres aren't computed by default. They need to be explicitly computed, otherwise they are null.
Returns void
Inherited from BufferGeometryBase.computeBoundingSphere
copy
Copy the data to this object from source. This method need override in derived classes to copy extended data.
Parameters
- source: BufferGeometryBase
the data source.
Returns BufferGeometryBase
Inherited from BufferGeometryBase.copy
- source: BufferGeometryBase
_ compute Groups
Parameters
- geometry: Geometry
Returns void
Inherited from BufferGeometryBase._computeGroups
get UUID
UUID of this BufferGeometries instance. This gets automatically assigned, so this shouldn't be edited.
Returns string
Inherited from BufferGeometryBase.getUUID
serialize
Store the attributes of this class into string as serializing format.
Parameters
- ctx: Serializer
this parameter has not supported external Serializer yet. It may cause that this method can not be used directly.
Returns void
Inherited from BufferGeometryBase.serialize
- ctx: Serializer
deserialize
Parse the data for this class from string according to serializing format.
Parameters
- ctx: Deserializer
this parameter has not supported external Deserializer yet. It may cause that this method can not be used directly.
Returns void
Inherited from BufferGeometryBase.deserialize
- ctx: Deserializer
free GPU
Clear the current geometry's data in memory.
Returns void
Inherited from BufferGeometryBase.freeGPU
destroy
Returns void
Inherited from BufferGeometryBase.destroy
destroy Attributes
Returns void
Inherited from BufferGeometryBase.destroyAttributes
free Attributes Gpu Resource
Returns void
Inherited from BufferGeometryBase.freeAttributesGpuResource
destroy All Resources Owned
Returns void
Inherited from BufferGeometryBase.destroyAllResourcesOwned
free All Gpu Resource Owned
Returns void
Inherited from BufferGeometryBase.freeAllGpuResourceOwned
force Cast Topology
Type Parameters
- R extends Topology
Returns BufferGeometry<R>
Inherited from BufferGeometryBase.forceCastTopology
clone
notify Geometry Content Change
Returns void
Inherited from BufferGeometryBase.notifyGeometryContentChange
mark Business Tag
Parameters
- v: string
Returns this
Inherited from BufferGeometryBase.markBusinessTag
is Destroyed
Returns boolean
Inherited from BufferGeometryBase.isDestroyed
validate
Returns void
Inherited from BufferGeometryBase.validate
on
once
has
off
emit
Active the event and call the registered listener.
Parameters
- type: EventType<never>
Returns void
Inherited from BufferGeometryBase.emit
clear All Listeners
Removes all listeners from listening list.
Returns void
Inherited from BufferGeometryBase.clearAllListeners
The name of viewer, which could be empty.