00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #pragma once
00013
00015 #include "nvsgcommon.h"
00016
00017 #include "nvsg/HighlightObject.h"
00018 #include "nvmath/Sphere3f.h"
00019 #include "nvmath/Vec3f.h"
00020
00021 namespace nvsg
00022 {
00024 class HighlightEdges : public HighlightObject
00025 {
00026 public:
00028
00029 NVSG_API static const HighlightEdges * create( float width = 2.0f
00030 , nvmath::Vec3f color = nvmath::Vec3f(1.0f, 0.0f, 0.0f)
00031 );
00032
00034
00035 NVSG_API static const HighlightEdges * createFromBase( const HighlightObject &rhs
00036 , float width = 2.0f
00037 , nvmath::Vec3f color = nvmath::Vec3f(1.0f,0.0f,0.0f)
00038 );
00039
00041
00042 NVSG_API virtual const HighlightEdges * clone( void ) const;
00043
00045
00046 NVSG_API virtual bool isBoundingSphereValid( void ) const;
00047
00049
00050 NVSG_API virtual const nvmath::Sphere3f & getBoundingSphere( void ) const;
00051
00053 NVSG_API float getLineWidth( void ) const;
00054
00056 NVSG_API const nvmath::Vec3f & getColor( void ) const;
00057
00058 protected:
00060 NVSG_API HighlightEdges( float width, nvmath::Vec3f color );
00061
00063 NVSG_API HighlightEdges( const HighlightObject &rhs, float width, nvmath::Vec3f color );
00064
00066 NVSG_API HighlightEdges( const HighlightEdges &rhs );
00067
00068 protected:
00069 float m_lineWidth;
00070 nvmath::Vec3f m_color;
00071
00072 private:
00073 HighlightEdges( void );
00074 };
00075
00076 inline bool HighlightEdges::isBoundingSphereValid( void ) const
00077 {
00078 return( false );
00079 }
00080
00081 inline const nvmath::Sphere3f & HighlightEdges::getBoundingSphere( void ) const
00082 {
00083 __TRACE();
00084 __ASSERT( false );
00085 return( nvmath::cUnitSphere );
00086 }
00087
00088 inline float HighlightEdges::getLineWidth( void ) const
00089 {
00090 __TRACE();
00091 return m_lineWidth;
00092 }
00093
00094 inline const nvmath::Vec3f & HighlightEdges::getColor( void ) const
00095 {
00096 __TRACE();
00097 return m_color;
00098 }
00099 }