Table of Contents
GAME_OBJECT
Abstract class
Category: Data
Properties
Position
Scale
Orientation
Name
Active
- Type:
boolean
- Expected:
boolean value
Functions
translate
move
resetOrientation
void resetOrientation()
lookAt
void lookAt(target [, up [, lockOnUpAxis]])
void lookAt(target, lockOnUpAxis)
rotateAround
void rotateAround(pivot, rotation)
Name | Type | Description |
---|---|---|
pivot | vec3f | |
rotation | quaternion |
void rotateAround(pivot, vector, angle)
rotate
rotateX
rotateY
rotateZ
setRotationX
setRotationY
setRotationZ
rotateLocal
rotateLocalX
rotateLocalY
rotateLocalZ
setScale
scale
void scale(scale)
Name | Type | Description |
---|---|---|
scale | vec3f |
void scale(scale)
Name | Type | Description |
---|---|---|
scale | float |
scaleAround
generateGlobalMatrix
setLocalMatrix
setGlobalPosition
setGlobalOrientation
setGlobalTransform
void setGlobalTransform(position, orientation)
Name | Type | Description |
---|---|---|
position | vec3f | |
orientation | quaternion |
void setGlobalTransform(position, orientation, scale)
Name | Type | Description |
---|---|---|
position | vec3f | |
orientation | quaternion | |
scale | vec3f |
setGlobalMatrix
setGlobalMatrixIgnoreScale
getGlobalPosition
vec3f getGlobalPosition()
getGlobalOrientation
quaternion getGlobalOrientation()
globalLookAt
getLevel
LEVEL getLevel()
destroy
void destroy()
destroyAllChild
void destroyAllChild()
getParent
GAME_OBJECT getParent()
setParent
void setParent(parent [, keepWorldTransform])
Name | Type | Description |
---|---|---|
parent | GAME_OBJECT | |
keepWorldTransform | boolean |
isParentedTo
forEachChild
void forEachChild(function)
Name | Type | Description |
---|---|---|
function | function<void|boolean(GAME_OBJECT child)> | If false is returned, the iteration stops. Returns true by default. |
forEachChildRecursive
void forEachChildRecursive(function)
Name | Type | Description |
---|---|---|
function | function<void|boolean(GAME_OBJECT child)> | If false is returned, the iteration stops. Returns true by default. |
forEachComponent
void forEachComponent(function)
Name | Type | Description |
---|---|---|
function | function<void|boolean(COMPONENT)> | If false is returned, the iteration stops. Returns true by default. |
forEachComponentReverse
void forEachComponentReverse(function)
Name | Type | Description |
---|---|---|
function | function<void|boolean(COMPONENT)> | If false is returned, the iteration stops. Returns true by default. |
buildMinMaxBounding
boolean buildMinMaxBounding(outMin, outMax)
Name | Type | Description |
---|---|---|
outMin | vec3f | Out argument |
outMax | vec3f | Out argument |
getId
guid getId()
addComponent
COMPONENT addComponent(componentType [, enabled])
Name | Type | Description |
---|---|---|
componentType | component_type | |
enabled | boolean |
getOrCreateComponent
COMPONENT getOrCreateComponent(componentType [, replaceExistingVariant])
Name | Type | Description |
---|---|---|
componentType | component_type | |
replaceExistingVariant | boolean |
getComponent
getEnabledComponent
removeComponent
findFirstParentWithComponent
findFirstObjectWithComponentUp
findFirstObjectWithComponentDown
COMPONENT findFirstObjectWithComponentDown(type [, ignoreDestroyingObject])
Name | Type | Description |
---|---|---|
type | component_type | |
ignoreDestroyingObject | boolean |