mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-25 23:29:24 +00:00
Merge pull request #1699 from Azaezel/alpha41/decalEd_pill
fix decal editor bounds and decalmanager raycast
This commit is contained in:
commit
1ee72ff9bd
2 changed files with 14 additions and 9 deletions
|
|
@ -516,11 +516,12 @@ void GuiDecalEditorCtrl::renderScene(const RectI & updateRect)
|
|||
if ( gDecalManager->clipDecal( mSELDecal, &mSELEdgeVerts ) )
|
||||
_renderDecalEdge( mSELEdgeVerts, ColorI( 255, 255, 255, 255 ) );
|
||||
|
||||
const F32 &decalSize = mSELDecal->mSize;
|
||||
const F32 &decalSize = mSELDecal->mSize * 0.5;
|
||||
Point3F boxSize( decalSize, decalSize, decalSize );
|
||||
|
||||
MatrixF worldMat( true );
|
||||
mSELDecal->getWorldMatrix( &worldMat, true );
|
||||
mSELDecal->getWorldMatrix( &worldMat, true );
|
||||
RectF rect = mSELDecal->mDataBlock->texRect[mSELDecal->mTextureRectIdx];
|
||||
worldMat.scale(Point3F(rect.extent.x, rect.extent.y, 0.25f));
|
||||
|
||||
drawUtil->drawObjectBox( desc, boxSize, mSELDecal->mPosition, worldMat, ColorI( 255, 255, 255, 255 ) );
|
||||
}
|
||||
|
|
@ -531,11 +532,13 @@ void GuiDecalEditorCtrl::renderScene(const RectI & updateRect)
|
|||
if ( gDecalManager->clipDecal( mHLDecal, &mHLEdgeVerts ) )
|
||||
_renderDecalEdge( mHLEdgeVerts, ColorI( 255, 255, 255, 255 ) );
|
||||
|
||||
const F32 &decalSize = mHLDecal->mSize;
|
||||
const F32 &decalSize = mHLDecal->mSize * 0.5;
|
||||
Point3F boxSize( decalSize, decalSize, decalSize );
|
||||
|
||||
MatrixF worldMat( true );
|
||||
mHLDecal->getWorldMatrix( &worldMat, true );
|
||||
RectF rect = mHLDecal->mDataBlock->texRect[mHLDecal->mTextureRectIdx];
|
||||
worldMat.scale(Point3F(rect.extent.x, rect.extent.y, 0.25f));
|
||||
|
||||
drawUtil->drawObjectBox( desc, boxSize, mHLDecal->mPosition, worldMat, ColorI( 255, 255, 255, 255 ) );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue