CloudPoint

Represents one particle of a points cloud system.

Hierarchy

  • CloudPoint

Index

Constructors

constructor

Find examples in Playground
  • Creates a Point Cloud object. Don't create particles manually, use instead the PCS internal tools like _addParticle()

    Parameters

    • particleIndex: number

      (integer) is the particle index in the PCS pool. It's also the particle identifier.

    • group: PointsGroup

      (PointsGroup) is the group the particle belongs to

    • groupId: number

      (integer) is the group identifier in the PCS.

    • idxInGroup: number

      (integer) is the index of the particle in the current point group (ex: the 10th point of addPoints(30))

    • pcs: PointsCloudSystem

      defines the PCS it is associated to

    Returns CloudPoint

Properties

_group

Find examples in Playground
_group: PointsGroup

Group this particle belongs to

color

Find examples in Playground

The color of the particle

groupId

Find examples in Playground
groupId: number

Group id of this particle

idx

Find examples in Playground
idx: number

particle global index

idxInGroup

Find examples in Playground
idxInGroup: number

Index of the particle in its group id (Internal use)

parentId

Find examples in Playground
parentId: Nullable<number>

Parent particle Id, if any. Default null.

pivot

Find examples in Playground
pivot: Vector3

The pivot point in the particle local space.

position

Find examples in Playground
position: Vector3

The world space position of the particle.

quaternion

Find examples in Playground
quaternion: Nullable<Quaternion>

Legacy support, changed quaternion to rotationQuaternion

rotation

Find examples in Playground
rotation: Vector3

The world space rotation of the particle. (Not use if rotationQuaternion is set)

rotationQuaternion

Find examples in Playground
rotationQuaternion: Nullable<Quaternion>

The world space rotation quaternion of the particle.

size

Find examples in Playground
size: Vector3

Set point size

translateFromPivot

Find examples in Playground
translateFromPivot: boolean

Must the particle be translated from its pivot point in its local space ? In this case, the pivot point is set at the origin of the particle local space and the particle is translated. Default : false

uv

Find examples in Playground

The uv of the particle.

velocity

Find examples in Playground
velocity: Vector3

The current speed of the particle.

Methods

intersectsMesh

Find examples in Playground
  • intersectsMesh(target: Mesh, isSphere: boolean): boolean
  • Returns a boolean. True if the particle intersects a mesh, else false The intersection is computed on the particle position and Axis Aligned Bounding Box (AABB) or Sphere

    Parameters

    • target: Mesh

      is the object (point or mesh) what the intersection is computed against

    • isSphere: boolean

      is boolean flag when false (default) bounding box of mesh is used, when true the bouding sphere is used

    Returns boolean

    true if it intersects

Generated using TypeDoc