Files
sbox-public/engine/Definitions/hammer/Tools/BlockTool.def
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

48 lines
1.1 KiB
Modula-2

#include "toolblock.h"
#include "mapdoclib/options.h"
#include "toolblock.h"
// Glue for the geometry tool, we could do the entire thing in C# with some more APIs exposed and avoid all this.
managed static class Editor.MapEditor.BlockToolGlue
{
void BuildGeometry( CMapMesh mesh, CToolBlockState blockState );
QWidget BuildUI( CToolBlock tool );
void SetInProgress( bool inProgress );
void SetOverrideEntity( string entityName );
}
// Glue - we won't need this when we do the ray picking in C# too
native class CToolBlock
{
void OnObjectTypeChanged();
void SetPrimitiveType2D( bool primitiveIs2D );
inline bool GetOrientPrimitives()
{
return Options.view2d.bOrientPrimitives;
}
inline void SetOrientPrimitives( bool bOrientPrimitives )
{
Options.view2d.bOrientPrimitives = bOrientPrimitives;
}
string m_OverrideMaterial;
}
native class CToolBlockState
{
inline BBox GetAABBBounds()
{
return self->GetBounds().AsAABB();
}
cref CWorkPlane GetDragWorkPlane();
}
native class CWorkPlane
{
Matrix GetWorkPlaneToWorldTransform();
}