我想知道是否有人知道ObjectARX中预定义的任何“碰撞检测”功能。我能找到的最接近的是:
- [font=Courier New][size=2]Public virtual unsafe Function IntersectWith([/size][/font]
- [font=Courier New][size=2] entityPointer As Entity, [/size][/font]
- [font=Courier New][size=2] intersectType As Autodesk.AutoCAD.DatabaseServices.Intersect, [/size][/font]
- [font=Courier New][size=2] points As Point3dCollection, [/size][/font]
- [font=Courier New][size=2] thisGraphicSystemMarker As Integer, [/size][/font]
- [font=Courier New][size=2] otherGraphicSystemMarker As Integer[/size][/font]
- [font=Courier New][size=2]) As void[/size][/font]
我相信我知道如何使用这个函数,尽管当我使用它时会得到有趣的结果。我有一个矩形块,希望在循环中插入块,直到它们与矩形块“碰撞”…
我设计了一个函数,检查插入块的几何范围与矩形的几何范围,这很好,尽管我希望有更多的…本地的…我想…
事实上,这就是我用Python进行碰撞检测的方式(几年前我在休病假时写了一个“突破”游戏)…
无论如何,当我使用“IntersectsWith()”时,我总是在points集合中获得至少3个Point3d对象,无论发生什么…hrm…这里有什么我遗漏的事情吗? |