Helix-toolkit doesn't have collision detection, but the code below gives an idea of how to use Visual3DHelper.FindBounds
and Rect3D.Intersect
to get something close, which might solve your problem.
The problem is that rotating the cube, as commented, may not work perfectly, as the Boundinbox is aligned with the axes, so if the cube is not aligned with the axes, the BoundingBox will be bigger than the cube itself, generating a false positive in the intersection in some cases.
If the wall is aligned with the axis and you don't worry about the cube colliding with the corners of the wall (like an infinite plane), this will work fine even if you rotate the cube.
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Margin="5">
<Slider x:Name="SliderX" Margin="5,10" Minimum="-30" Maximum="30" ValueChanged="Slider1_ValueChanged"/>
<Slider x:Name="SliderY" Margin="5,10" Minimum="-30" Maximum="30" ValueChanged="Slider1_ValueChanged"/>
</StackPanel>
<hx:HelixViewport3D x:Name="MyViewport" Grid.Column="1">
<hx:DefaultLights/>
<hx:BoxVisual3D x:Name="Wall" Height="30" Width="30" Length="1" Fill="Gray" Center="10,0,0"/>
<hx:BoxVisual3D x:Name="Object" Height="10" Width="3" Length="10" Fill="Yellow" Center="-10,0,0">
<hx:BoxVisual3D.Transform>
<Transform3DGroup>
<TranslateTransform3D OffsetX="{Binding ElementName=SliderX, Path=Value}" OffsetY="{Binding ElementName=SliderY, Path=Value}"/>
<RotateTransform3D CenterX="-10" CenterY="0" CenterZ="0">
<RotateTransform3D.Rotation>
<AxisAngleRotation3D Axis="0,0,1" Angle="45"/>
</RotateTransform3D.Rotation>
</RotateTransform3D>
</Transform3DGroup>
</hx:BoxVisual3D.Transform>
</hx:BoxVisual3D>
</hx:HelixViewport3D>
</Grid>
private void Slider1_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
var rect1 = Visual3DHelper.FindBounds(Wall, Transform3D.Identity);
var rect2 = Visual3DHelper.FindBounds(Object, Transform3D.Identity);
var intersect = Rect3D.Intersect(rect1, rect2);
if (intersect != Rect3D.Empty)
Object.Fill = Brushes.Red;
else
Object.Fill = Brushes.Blue;
}