Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TransformComponent

Hierarchy

Index

Constructors

Properties

Accessors

Methods

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

__updateCountAtLastLogic: number = 0
_dependentAnimationComponentId: number = 0
_invMatrix: MutableMatrix44 = ...
_isAlive: boolean = true
_is_inverse_trs_matrix_updated: boolean
_is_normal_trs_matrix_updated: boolean
_is_quaternion_updated: boolean
_is_scale_updated: boolean
_is_translate_updated: boolean
_is_trs_matrix_updated: boolean
_matrix: MutableMatrix44 = ...
_normalMatrix: MutableMatrix33 = ...
_quaternion: MutableQuaternion = ...
_scale: MutableVector3 = ...
_translate: MutableVector3 = ...
_updateCount: number = 0
InvalidObjectUID: -1 = -1
__componentsOfProcessStages: Map<ProcessStageEnum, Int32Array> = ...
__lengthOfArrayOfProcessStages: Map<ProcessStageEnum, number> = ...
__tmpMatrix44_0: MutableMatrix44 = ...
__tmpQuaternion_0: MutableQuaternion = ...
__tmpVector3_0: MutableVector3 = ...
__tmpVector3_1: MutableVector3 = ...
__tmpVector3_2: MutableVector3 = ...
_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
  • get renderedPropertyCount(): null

Methods

  • $logic(): void
  • __updateMatrix(): void
  • __updateRotation(): void
  • __updateScale(): void
  • __updateTransform(): void
  • __updateTranslate(): void
  • _destroy(): void
  • _needUpdate(): 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
  • setPropertiesFromJson(arg: JSON): void
  • Set multiple transform information at once. By using this method, we reduce the cost of automatically updating other transform components inside this class. This method may be useful for animation processing and so on.

    The transform components of these arguments must not be mutually discrepant. for example. The transform components of matrix argument (translate, rotate/quaternion, scale) must be equal to translate, rotate, scale, quaternion arguments. And both rotate and quaternion arguments must be same rotation. If there is an argument passed with null or undefined, it is interpreted as unchanged.

    Parameters

    Returns 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
  • 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