mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
* Fixes description for a few Scene methods
* Adds method to Scene to delete dynamic objects in the scene * Add getNodeTransform to ShapeBase * Add sanity check to AFX ea_update function to avoid divide by zero * Adds ability to set color mul on GuiBitmapBorderCtrl like bitmapCtrl * MatrixF utilty functions/operators * Add ability to ignore an object in the containerBoxEmpty method call * Adds some better initialization/sanity handling for resetWorldBox and resetRenderWorldBox for SceneObject
This commit is contained in:
parent
e630ab859a
commit
da06fc1d96
10 changed files with 98 additions and 15 deletions
|
|
@ -2184,6 +2184,29 @@ void ShapeBase::getEyeCameraTransform(IDisplayDevice *displayDevice, U32 eyeId,
|
|||
*outMat = cameraTransform * temp;
|
||||
}
|
||||
|
||||
void ShapeBase::getNodeTransform(const char* nodeName, const MatrixF& xfm, MatrixF* outMat)
|
||||
{
|
||||
if (!mShapeInstance)
|
||||
return;
|
||||
|
||||
S32 nodeIDx = mDataBlock->getShapeResource()->findNode(nodeName);
|
||||
|
||||
MatrixF nodeTransform(xfm);
|
||||
const Point3F& scale = getScale();
|
||||
if (nodeIDx != -1)
|
||||
{
|
||||
nodeTransform = mShapeInstance->mNodeTransforms[nodeIDx];
|
||||
nodeTransform.mul(xfm);
|
||||
}
|
||||
// The position of the mount point needs to be scaled.
|
||||
Point3F position = nodeTransform.getPosition();
|
||||
position.convolve(scale);
|
||||
nodeTransform.setPosition(position);
|
||||
// Also we would like the object to be scaled to the model.
|
||||
outMat->mul(mObjToWorld, nodeTransform);
|
||||
return;
|
||||
}
|
||||
|
||||
void ShapeBase::getCameraParameters(F32 *min,F32* max,Point3F* off,MatrixF* rot)
|
||||
{
|
||||
*min = mDataBlock->cameraMinDist;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue