XNA Creators Club Online
Page 1 of 1 (11 items)
Sort Posts: Previous Next

XNA Collision library in Directx March 2009

Last post 9/30/2009 9:53 PM by NMEAI. 10 replies.
  • 3/30/2009 5:07 PM

    XNA Collision library in Directx March 2009

    hello
    can you please convert this to xna c# and implant it into this framework we are paying for.

    why are all the cool feutures allways implanted into a framework you are not paying for.
    dont forget all this

    Introducing XNA Math

    XNA Math provides developers a cross-platform native-code method of generating SIMD instructions without having to resort to special case code. Based on the Xbox 360 SDK's Xbox math library, this set of headers supports the most common vectorized math operations used in graphics and animation. The implementation supports Windows 32-bit (x86) and Windows 64-bit (x64) targets using SSE2 intrinsics, and is fully cross-platform with the optimized Xbox 360 XDK version.

    That is what i'am talking about

    XNA Collision library

    All of the types and functions shown in the following tables are defined in the XNACollision.h header, with the implementation in XNACollision.cpp, and are in the XNA C++ namespace.

    Structure Description
    AxisAlignedBox

    Describes an axis-aligned box.

    Frustum

    Describes an oriented frustum.

    OrientedBox

    Describes an oriented box.

    Sphere

    Describes a sphere.

    Function Description
    ComputeBoundingAxisAlignedBoxFromPoints

    Builds a bounding axis-aligned box from an array of points.

    ComputeBoundingOrientedBoxFromPoints

    Builds a bounding oriented box from an array of points.

    ComputeBoundingSphereFromPoints

    Builds a bounding sphere from an array of points.

    ComputeFrustumFromProjection

    Builds a frustum from a perspective projection matrix.

    ComputePlanesFromFrustum

    Builds the six planes that make up a frustum.

    IntersectAxisAlignedBox6Planes

    Tests whether an axis-aligned box intersects six planes (usually, forming a frustum).

    IntersectAxisAlignedBoxAxisAlignedBox

    Tests whether two axis-aligned boxes intersect.

    IntersectAxisAlignedBoxFrustum

    Tests whether an axis-aligned box intersects a frustum.

    IntersectAxisAlignedBoxOrientedBox

    Tests whether an axis-aligned box intersects an oriented box.

    IntersectAxisAlignedBoxPlane

    Tests whether an axis-aligned box intersects an plane.

    IntersectFrustum6Planes

    Tests whether a frustum intersects six planes (usually, forming a frustum).

    IntersectFrustumFrustum

    Tests whether two frustums intersect.

    IntersectFrustumPlane

    Tests whether a frustum intersects a plane.

    IntersectOrientedBox6Planes

    Tests whether an oriented box intersects six planes (usually, forming a frustum).

    IntersectOrientedBoxFrustum

    Tests whether an oriented box intersects a frustum.

    IntersectOrientedBoxOrientedBox

    Tests whether two oriented boxes intersect.

    IntersectOrientedBoxPlane

    Tests whether a plane interesects an axis-aligned box.

    IntersectPointAxisAlignedBox

    Tests whether a point is contained within an axis-aligned box.

    IntersectPointFrustum

    Tests whether a point is contained within a frustum.

    IntersectPointOrientedBox

    Test whether a point is contained within an oriented box.

    IntersectPointSphere

    Tests whether a point is contained in sphere.

    IntersectRayAxisAlignedBox

    Tests whether a ray intersects an axis-aligned box.

    IntersectRayOrientedBox

    Tests whether a ray intersects an oriented box.

    IntersectRaySphere

    Tests whether a ray intersects a sphere.

    IntersectRayTriangle

    Tests whether a ray intersects a triangle.

    IntersectSphere6Planes

    Tests whether a sphere intersects six planes (usually, forming a frustum).

    IntersectSphereAxisAlignedBox

    Tests whether a sphere intersects an axis-aligned box.

    IntersectSphereFrustum

    Tests whether a sphere intersects a frustum.

    IntersectSphereOrientedBox

    Tests whether a sphere intersects an oriented box.

    IntersectSpherePlane

    Tests whether a plane intersects with a sphere.

    IntersectSphereSphere

    Tests whether two spheres intersect.

    IntersectTriangle6Planes

    Tests whether a triangle intersects six planes (usually, forming a frustum).

    IntersectTriangleAxisAlignedBox

    Tests whether a triangle intersects an axis-aligned box.

    IntersectTriangleFrustum

    Test whether a triangle intersects a frustum.

    IntersectTriangleOrientedBox

    Tests whether a triangle intersects an oriented box.

    IntersectTrianglePlane

    Tests whether a triangle intersects a plane.

    IntersectTriangleSphere

    Tests whether a triangle intersects a sphere.

    IntersectTriangleTriangle

    Tests whether two triangles intersect.

    TransformAxisAlignedBox

    Applies an angle-preserving transform operation to an axis-aligned box.

    TransformFrustum

    Applies an angle-preserving transform operation to a frustum.

    TransformOrientedBox

    Applies an angle-preserving transform operation to an oriented box.

    TransformSphere

    Applies an angle-preserving transform operation to a sphere.





    Best regards

    Michael

     

    follow the dev. on youtube channel

    The legend of the old spice , name rank and number soldier ... Join the Xna Developer Group at youtube , the place where you can show off your creations
  • 3/30/2009 8:05 PM In reply to

    Re: XNA Collision library in Directx March 2009

    I'm totally agree with Michael, the new xna math lab seems so attractive.
    Any plan for the xna team to support this feature in managed code?
  • 3/30/2009 8:20 PM In reply to
    • (2342)
    • premium membership MVP
    • Posts 1,226

    Re: XNA Collision library in Directx March 2009

    C# has no intrinsic support on the PC or Xbox 360.  Therefore it would be kinda hard to port a low-level SSE/AltiVec vector math library.

    As far as the actual collision detection stuff, that's all fully implemented in the BoundingBox, BoundingSphere, and BoundingFrustum classes.
    Matt Pettineo | DirectX/XNA MVP


    Ride into The Danger Zone | PIX With XNA Tutorial
  • 3/30/2009 8:23 PM In reply to

    Re: XNA Collision library in Directx March 2009

    That is a native code math library. The XNA Framework already includes a managed code math library (in the Microsoft.Xna.Framework namespace) which provides all those same bounding volume types and intersection test methods.
    XNA Framework Developer - blog - homepage
  • 3/30/2009 8:29 PM In reply to

    Re: XNA Collision library in Directx March 2009

    Hi,

    I'm guessing the major issue is the lack of SIMD instructions in MSIL.

    Miguel de Icaza posted something on his blog about support for this in Mono a few weeks ago (http://tirania.org/blog/archive/2008/Nov-03.html). The results seem impressive.

    Regards,
    Nick.
    Senior Software Engineer Coyote Software, GmbH
  • 5/1/2009 10:07 AM In reply to

    Re: XNA Collision library in Directx March 2009


    tanks for the link

    i was talking about "optimized Xbox 360 XDK version" <--- = xna only

    and the triangle routiens of boundingbox hit test on triangle

    i was kiend of hoping and optimized version only for xbox360 so we can do speed math without bugging the garbeage collector

    with all those floats and vector3 alocations

    please give us a wrapper around "native code math library"  on the xbox360 only
    follow the dev. on youtube channel

    The legend of the old spice , name rank and number soldier ... Join the Xna Developer Group at youtube , the place where you can show off your creations
  • 5/1/2009 11:47 AM In reply to

    Re: XNA Collision library in Directx March 2009

    EvoFx Studio:
    with all those floats and vector3 allocations

    floats and Vector3 are structs, and thus do not generate garbage

    Also... here's how to submit a feature request.
  • 5/1/2009 3:03 PM In reply to
    • (2342)
    • premium membership MVP
    • Posts 1,226

    Re: XNA Collision library in Directx March 2009

    EvoFx Studio:

    please give us a wrapper around "native code math library"  on the xbox360 only


    These things are not so simple.  Managed->native transitions are expensive, thus it's hard to make a native high-performance math library work well in a managed setting. 
    Matt Pettineo | DirectX/XNA MVP


    Ride into The Danger Zone | PIX With XNA Tutorial
  • 5/1/2009 7:24 PM In reply to

    Re: XNA Collision library in Directx March 2009

    Just another reason why the Xbox CLR needs to branch from its cell-phone roots and become a dedicated games-based CLR for platforms like the Xbox.  There's no technical reason why the Xbox CLR could not support a powerful, SIMD-enhanced math library or even Altivec code generation for MSIL; it's all a matter of how much time they want to put into it.  Just throwing some hand-written code in a native library and creating a managed interface is not the way to go here, as others have pointed out.

    Has anyone else looked at Mono/PPC lately?  It's working quite well on my PS3. ;)
    Microsoft DirectX/XNA MVP
  • 5/1/2009 8:40 PM In reply to
    • (2342)
    • premium membership MVP
    • Posts 1,226

    Re: XNA Collision library in Directx March 2009

    ShawMishrak:
    There's no technical reason why the Xbox CLR could not support a powerful, SIMD-enhanced math library or even Altivec code generation for MSIL;



    *sigh*

    We can all dream, right?  :-)
    Matt Pettineo | DirectX/XNA MVP


    Ride into The Danger Zone | PIX With XNA Tutorial
  • 9/30/2009 9:53 PM In reply to

    Re: XNA Collision library in Directx March 2009

    Where does the managed XNA framework perform triangle and oriented bounding box tests?
Page 1 of 1 (11 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG