Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PhysicsComponent

Hierarchy

Index

Constructors

Properties

__currentProcessStage: ProcessStageEnum = ProcessStage.Create
__entityRepository: EntityRepository

the instance of EntityRepository

__entityUid: number

the entity unique Id which this component belongs to

__memoryManager: MemoryManager

the instance of MemoryManager

__strategy: PhysicsStrategy = ...
_isAlive: boolean = true
InvalidObjectUID: -1 = -1
__componentsOfProcessStages: Map<ProcessStageEnum, Int32Array> = ...
__lengthOfArrayOfProcessStages: Map<ProcessStageEnum, number> = ...
_processStages: ProcessStageEnum[] = ...
currentMaxObjectCount: number = 0
invalidComponentSID: -1 = -1

Accessors

  • get componentSID(): number
  • get entityUID(): number
  • get maxNumberOfComponent(): number
  • get objectUID(): number
  • get uniqueName(): string
  • get componentTID(): number

Methods

  • $logic(): void
  • _destroy(): void
  • _setMaxNumberOfComponent(value: number): void
  • addThisComponentToEntity<EntityBase, SomeComponentClass>(base: EntityBase, _componentClass: SomeComponentClass): IsThisSparkGear<SomeComponentClass, IsThisEffekseer<SomeComponentClass, IsThisPhysics<SomeComponentClass, IsThisBlendShape<SomeComponentClass, IsThisSkeletal<SomeComponentClass, IsThisLight<SomeComponentClass, IsThisCamera<SomeComponentClass, IsThisCameraController<SomeComponentClass, IsThisMeshRenderer<SomeComponentClass, IsThisMesh<SomeComponentClass, IsThisSceneGraph<SomeComponentClass, IsThisTransform<SomeComponentClass, IsThisAnimation<SomeComponentClass, AllWellKnownComponentMethodsTypes>>>>>>>>>>>>> & EntityBase
  • override

    Add this component to the entity

    Type Parameters

    Parameters

    • base: EntityBase

      the target entity

    • _componentClass: SomeComponentClass

      the component class to add

    Returns IsThisSparkGear<SomeComponentClass, IsThisEffekseer<SomeComponentClass, IsThisPhysics<SomeComponentClass, IsThisBlendShape<SomeComponentClass, IsThisSkeletal<SomeComponentClass, IsThisLight<SomeComponentClass, IsThisCamera<SomeComponentClass, IsThisCameraController<SomeComponentClass, IsThisMeshRenderer<SomeComponentClass, IsThisMesh<SomeComponentClass, IsThisSceneGraph<SomeComponentClass, IsThisTransform<SomeComponentClass, IsThisAnimation<SomeComponentClass, AllWellKnownComponentMethodsTypes>>>>>>>>>>>>> & EntityBase

  • getDataByteInfo(memberName: string): { byteLength: number; byteOffsetInBuffer: number; byteOffsetInThisComponent: any; componentNumber: number; locationOffsetInBuffer: number; locationOffsetInThisComponent: any; thisComponentByteOffsetInBuffer: number; thisComponentLocationOffsetInBuffer: number }
  • get the bytes Information of the member

    Parameters

    • memberName: string

      the member of component in string

    Returns { byteLength: number; byteOffsetInBuffer: number; byteOffsetInThisComponent: any; componentNumber: number; locationOffsetInBuffer: number; locationOffsetInThisComponent: any; thisComponentByteOffsetInBuffer: number; thisComponentLocationOffsetInBuffer: number }

    bytes information

    • byteLength: number
    • byteOffsetInBuffer: number
    • byteOffsetInThisComponent: any
    • componentNumber: number
    • locationOffsetInBuffer: number
    • locationOffsetInThisComponent: any
    • thisComponentByteOffsetInBuffer: number
    • thisComponentLocationOffsetInBuffer: number
  • getTag(tagName: string): Tag
  • getTagValue(tagName: string): any
  • hasTag(tagName: string): boolean
  • matchTag(tagName: string, tagValue: string): boolean
  • matchTags(tags: RnTags): boolean
  • matchTagsAsFreeStrings(stringArray: string[]): boolean
  • registerDependency(component: Component, isMust: boolean): void
  • registerMember(bufferUse: EnumIO, memberName: string, dataClassType: unknown, componentType: ComponentTypeEnum, initValues: number[]): void
  • removeTag(tagName: string): void
  • submitToAllocation(count: number): void
  • takeOne(memberName: string, dataClassType: any, initValues: number[]): any
  • take one memory area for the specified member for all same type of the component instances.

    Parameters

    • memberName: string
    • dataClassType: any
    • initValues: number[]

    Returns any

  • tryToSetTag(tag: Tag): boolean
  • tryToSetUniqueName(name: string, toAddNameIfConflict: boolean): boolean
  • Try to set a unique name of the entity.

    Parameters

    • name: string
    • toAddNameIfConflict: boolean

      If true, force to add name string to the current unique name string. If false, give up to change name.

    Returns boolean

  • validateTagString(val: string): boolean
  • _reset(): void
  • common_$logic(): void
  • getAccessor(memberName: string, componentClass: Function): Accessor
  • getByteLengthSumOfMembers(bufferUse: EnumIO, componentClass: Function): number
  • getByteOffsetOfFirstOfThisMemberInBuffer(memberName: string, componentClass: Function): number
  • getByteOffsetOfFirstOfThisMemberInBufferView(memberName: string, componentClass: Function): number
  • getByteOffsetOfThisComponentTypeInBuffer(bufferUse: EnumIO, componentClass: Function): number
  • getComponentTypeOfMember(memberName: string, componentClass: Function): undefined | ComponentTypeEnum
  • getCompositionTypeOfMember(memberName: string, componentClass: Function): undefined | CompositionTypeEnum
  • getDataByteInfoByComponentSID(componentType: typeof Component, componentSID: number, memberName: string): undefined | { byteLength: number; byteOffsetInBuffer: number; byteOffsetInThisComponent: any; componentNumber: number; locationOffsetInBuffer: number; locationOffsetInThisComponent: any; thisComponentByteOffsetInBuffer: number; thisComponentLocationOffsetInBuffer: number }
  • get the bytes Information of the member (static version) by ComponentSID

    Parameters

    • componentType: typeof Component

      the Component type

    • componentSID: number

      the ComponentSID of the component

    • memberName: string

      the member of component in string

    Returns undefined | { byteLength: number; byteOffsetInBuffer: number; byteOffsetInThisComponent: any; componentNumber: number; locationOffsetInBuffer: number; locationOffsetInThisComponent: any; thisComponentByteOffsetInBuffer: number; thisComponentLocationOffsetInBuffer: number }

    bytes information

  • getDataByteInfoByEntityUID(componentType: typeof Component, entityUID: number, memberName: string): undefined | { byteLength: number; byteOffsetInBuffer: number; byteOffsetInThisComponent: any; componentNumber: number; locationOffsetInBuffer: number; locationOffsetInThisComponent: any; thisComponentByteOffsetInBuffer: number; thisComponentLocationOffsetInBuffer: number }
  • get the bytes Information of the member (static version) by EntityUID

    Parameters

    • componentType: typeof Component

      the component type

    • entityUID: number

      the EntityUID

    • memberName: string

      the member of component in string

    Returns undefined | { byteLength: number; byteOffsetInBuffer: number; byteOffsetInThisComponent: any; componentNumber: number; locationOffsetInBuffer: number; locationOffsetInThisComponent: any; thisComponentByteOffsetInBuffer: number; thisComponentLocationOffsetInBuffer: number }

    bytes information

  • getDataByteInfoInner(component: Component, memberName: string): { byteLength: number; byteOffsetInBuffer: number; byteOffsetInThisComponent: any; componentNumber: number; locationOffsetInBuffer: number; locationOffsetInThisComponent: any; thisComponentByteOffsetInBuffer: number; thisComponentLocationOffsetInBuffer: number }
  • get the bytes Information of the member

    Parameters

    • component: Component

      a instance of the component

    • memberName: string

      the member of component in string

    Returns { byteLength: number; byteOffsetInBuffer: number; byteOffsetInThisComponent: any; componentNumber: number; locationOffsetInBuffer: number; locationOffsetInThisComponent: any; thisComponentByteOffsetInBuffer: number; thisComponentLocationOffsetInBuffer: number }

    bytes information

    • byteLength: number
    • byteOffsetInBuffer: number
    • byteOffsetInThisComponent: any
    • componentNumber: number
    • locationOffsetInBuffer: number
    • locationOffsetInThisComponent: any
    • thisComponentByteOffsetInBuffer: number
    • thisComponentLocationOffsetInBuffer: number
  • getLocationOffsetOfMemberOfComponent(componentType: typeof Component, memberName: string): number
  • getRnObject(objectUid: number): RnObject
  • getRnObjectByName(uniqueName: string): undefined | RnObject
  • searchByTag(tag: string, value: string): undefined | RnObject

Generated using TypeDoc