mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
gfxDrawutil, gizmo shadowvar cleanups
This commit is contained in:
parent
77e9f3c6d4
commit
2580e3329c
2 changed files with 10 additions and 10 deletions
|
|
@ -1041,9 +1041,9 @@ void GFXDrawUtil::_drawSolidPolyhedron( const GFXStateBlockDesc &desc, const Any
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
U32 numPoints = poly.extractFace( i, &indices[ idx ], numIndices - idx );
|
U32 polyIDx = poly.extractFace( i, &indices[ idx ], numIndices - idx );
|
||||||
numIndicesForPoly[ numPolys ] = numPoints;
|
numIndicesForPoly[ numPolys ] = polyIDx;
|
||||||
idx += numPoints;
|
idx += polyIDx;
|
||||||
|
|
||||||
numPolys ++;
|
numPolys ++;
|
||||||
}
|
}
|
||||||
|
|
@ -1083,11 +1083,11 @@ void GFXDrawUtil::drawObjectBox( const GFXStateBlockDesc &desc, const Point3F &s
|
||||||
PrimBuild::color( color );
|
PrimBuild::color( color );
|
||||||
PrimBuild::begin( GFXLineList, 48 );
|
PrimBuild::begin( GFXLineList, 48 );
|
||||||
|
|
||||||
static const Point3F cubePoints[8] =
|
Point3F cubePts[8];
|
||||||
|
for (U32 i = 0; i < 8; i++)
|
||||||
{
|
{
|
||||||
Point3F(-0.5, -0.5, -0.5), Point3F(-0.5, -0.5, 0.5), Point3F(-0.5, 0.5, -0.5), Point3F(-0.5, 0.5, 0.5),
|
cubePts[i] = cubePoints[i]/2;
|
||||||
Point3F( 0.5, -0.5, -0.5), Point3F( 0.5, -0.5, 0.5), Point3F( 0.5, 0.5, -0.5), Point3F( 0.5, 0.5, 0.5)
|
}
|
||||||
};
|
|
||||||
|
|
||||||
// 8 corner points of the box
|
// 8 corner points of the box
|
||||||
for ( U32 i = 0; i < 8; i++ )
|
for ( U32 i = 0; i < 8; i++ )
|
||||||
|
|
|
||||||
|
|
@ -612,12 +612,12 @@ bool Gizmo::collideAxisGizmo( const Gui3DMouseEvent & event )
|
||||||
Point3F(mOrigin + (p1 + p2) * scale)
|
Point3F(mOrigin + (p1 + p2) * scale)
|
||||||
};
|
};
|
||||||
|
|
||||||
Point3F end = camPos + event.vec * smProjectDistance;
|
Point3F endProj = camPos + event.vec * smProjectDistance;
|
||||||
F32 t = plane.intersect(camPos, end);
|
F32 t = plane.intersect(camPos, endProj);
|
||||||
if ( t >= 0 && t <= 1 )
|
if ( t >= 0 && t <= 1 )
|
||||||
{
|
{
|
||||||
Point3F pos;
|
Point3F pos;
|
||||||
pos.interpolate(camPos, end, t);
|
pos.interpolate(camPos, endProj, t);
|
||||||
|
|
||||||
// check if inside our 'poly' of this axisIdx vector...
|
// check if inside our 'poly' of this axisIdx vector...
|
||||||
bool inside = true;
|
bool inside = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue