VR-Forces 4.0.4 Class Documentation
include/vrvCore/DtIntersectionCache.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2010 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile:  $ $Revision:  $ $State:  $
00007 ******************************************************************************/
00008 
00012 
00013 #pragma once
00014 #include <vrvCore/vrvCore.h>
00015 #include <matrix/vlVector.h>
00016 
00017 namespace makVrv
00018 {
00019    class DtIntersectorResult;
00020 
00025    class DT_DLL_VRVCORE DtIntersectionCache
00026    {
00027    public:
00029       virtual ~DtIntersectionCache();;
00030 
00032       virtual void setCacheFromIntersectionResult(const DtIntersectorResult& result ) = 0;
00033 
00036       virtual bool intersectWithCache( const DtVector& point, const DtVector& dir, 
00037          DtVector& hitPoint, DtVector& hitNormal ) = 0;
00038 
00039    protected:
00040 
00042       DtIntersectionCache();;
00043    };
00044 
00048    class DT_DLL_VRVCORE DtTriangleIntersectionCache : public DtIntersectionCache
00049    {
00050    public:
00052       DtTriangleIntersectionCache();
00053 
00055       virtual ~DtTriangleIntersectionCache();
00056 
00058       virtual void setCacheFromIntersectionResult(const DtIntersectorResult& result );
00059 
00063       virtual bool intersectWithCache( const DtVector& point, const DtVector& dir, 
00064          DtVector& hitPoint, DtVector& hitNormal ); 
00065 
00066    protected:
00068       bool intersectRayTriangle( const DtVector& point, const DtVector& dir, 
00069          DtVector& hitPoint );
00070 
00071    protected:
00072       bool myCacheSet;
00073       DtVector myVert0;
00074       DtVector myVert1;
00075       DtVector myVert2;
00076       DtVector myNormal;
00077    };
00078 
00079 }
00080 

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)