MObject3d
(testing, starting with MObject3d) |
m (link corrected) |
||
Line 7: | Line 7: | ||
camera->setPosition(MVector3(0,0,0)); | camera->setPosition(MVector3(0,0,0)); | ||
</pre> | </pre> | ||
− | This works because [[[[MOCamera]]]] is derived from '''MObject3d''' which has the method [[ | + | This works because [[[[MOCamera]]]] is derived from '''MObject3d''' which has the method ''[[#setPosition|setPosition()]]''. |
Notice the derived objects has the '''O''' in the name for "Object3d" to suggest their base class (e.g. M'''O'''Entity). | Notice the derived objects has the '''O''' in the name for "Object3d" to suggest their base class (e.g. M'''O'''Entity). |
Revision as of 01:27, 22 August 2013
MObject3d is a base object from which other important objects are derived (e.g. MOEntity, MOCamera, MOText).
It allows basic operations like translation/rotation, parent/child linking, etc.
All its methods can be called from the derived object:
camera->setPosition(MVector3(0,0,0));
This works because [[MOCamera]] is derived from MObject3d which has the method setPosition().
Notice the derived objects has the O in the name for "Object3d" to suggest their base class (e.g. MOEntity).
Contents[hide] |
Source code
API
Matrix
updateMatrix
[...]
computeLocalMatrix
[...]
getMatrix
[...]
Childs
unlinkChilds
[...]
computeChildsMatrices
[...]
Transform
getUniformRotatedVector
[...]
getInverseRotatedVector
[...]
getRotatedVector
[...]
getInversePosition
[...]
getTransformedVector
[...]
Position
setPosition
[...]
getTransformedPosition
[...]
getPosition
[...]
Rotation
setEulerRotation
[...]
setAxisAngleRotation
[...]
addAxisAngleRotation
[...]
setRotation
[...]
getTransformedRotation
[...]
getEulerRotation
[...]
getRotation
[...]
Scale
setScale
[...]
getTransformedScale
[...]
getScale
[...]
Linking
linkTo
[...]
unLink
[...]
setParent
[...]
addChild
[...]
hasParent
[...]
getChildsNumber
[...]
getParent
[...]
getChild
[...]
Behaviors
updateBehaviors
[...]
drawBehaviors
[...]
deleteBehavior
[...]
invertBehavior
[...]
changeBehavior
[...]
addBehavior
[...]
getBehaviorsNumber
[...]
getBehavior
[...]
Need to update
needToUpdate
[...]
Active
setActive
[...]
isActive
[...]
Visibility
Invisible objects can still be transformed and have an influence in the scene (e.g. physics).
setVisible
Set the visibility of the object. True or false.
isVisible
Check if the object is visible. True or false.
updateVisibility
[...]
Name
setName
[...]
getName
[...]
Type
getType
[...]
Update
update
[...]