mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-11 00:10:46 +00:00
pathshape cleanups and callbacks
sceneObject:
UpdateXformChange(mat); operates on the parent object, so made no sense to shove it in void SceneObject::PerformUpdatesForChildren(MatrixF mat){
provide callbacks for when the parent/child relationship changes
simpath+camerapline+pathshape
provide a mechanism to embed a callback for a pathshape defined on a path node. example:
new Marker() {
seqNum = "7";
hitCommand = "TheCommand" // <------------------------------;
position = "-17.0856 -92.2349 4.00051";
rotation = "0.0334943 -0.254411 0.966516 179.495";
};
function PathShapeData::TheCommand(%this,%obj)
{
echo("Do the thing");
}
This commit is contained in:
parent
f59c5f152f
commit
f4e6060b52
7 changed files with 42 additions and 21 deletions
|
|
@ -840,6 +840,13 @@ class SceneObject : public NetObject, private SceneContainer::Link, public Proce
|
|||
SceneObject* nextSibling; ///< Link to next child object of this object's parent
|
||||
MatrixF objToParent; ///< this obects transformation in the parent object's space
|
||||
MatrixF RenderobjToParent; ///< this obects Render Offset transformation to the parent object
|
||||
AttachInfo() {
|
||||
firstChild = NULL;
|
||||
parent = NULL;
|
||||
nextSibling = NULL;
|
||||
objToParent.identity();
|
||||
RenderobjToParent.identity();
|
||||
};
|
||||
} mGraph;
|
||||
// PATHSHAPE END
|
||||
|
||||
|
|
@ -934,13 +941,17 @@ class SceneObject : public NetObject, private SceneContainer::Link, public Proce
|
|||
|
||||
|
||||
/// Called to let instance specific code happen
|
||||
virtual void onLostParent(SceneObject *oldParent);
|
||||
virtual void onLostParent(SceneObject *oldParent);
|
||||
DECLARE_CALLBACK(void, onLostParent, (SceneObject *oldParent));
|
||||
/// Called to let instance specific code happen
|
||||
virtual void onNewParent(SceneObject *newParent);
|
||||
virtual void onNewParent(SceneObject *newParent);
|
||||
DECLARE_CALLBACK(void, onNewParent, (SceneObject *oldParent));
|
||||
/// notification that a direct child object has been attached
|
||||
virtual void onNewChild(SceneObject *subObject);
|
||||
virtual void onNewChild(SceneObject *subObject);
|
||||
DECLARE_CALLBACK(void, onNewChild, (SceneObject *subObject));
|
||||
/// notification that a direct child object has been detached
|
||||
virtual void onLostChild(SceneObject *subObject);
|
||||
virtual void onLostChild(SceneObject *subObject);
|
||||
DECLARE_CALLBACK(void, onLostChild, (SceneObject *subObject));
|
||||
// PATHSHAPE END
|
||||
|
||||
virtual void getUtilizedAssets(Vector<StringTableEntry>* usedAssetsList) {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue