Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

nvsg::HighlightBox Class Reference

Base class for Highlighting objects that can be attached to Geosets. More...

#include <HighlightBox.h>

Inheritance diagram for nvsg::HighlightBox:

Inheritance graph
[legend]
Collaboration diagram for nvsg::HighlightBox:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual NVSG_API const HighlightBox * clone (void) const
 Create a HighlightBox by cloning this. More...

virtual NVSG_API bool isBoundingSphereValid (void) const
 Ask if the bounding sphere of this HighlightBox is valid. More...

virtual NVSG_API const nvmath::Sphere3fgetBoundingSphere (void) const
 Get the bounding sphere of this HighlightObject. More...

NVSG_API void setVertices (nvmath::Vec3f *vertices)
 set the vertices (edges) of the bounding box. More...

NVSG_API const nvmath::Vec3fgetVertices () const
 return the vertices (edges) of the bounding box. More...

NVSG_API float getLineWidth () const
 return the line width used for drawing the box. More...

NVSG_API const nvmath::Vec3fgetColor () const
 return the line width used for drawing the box. More...


Static Public Methods

NVSG_API const HighlightBox * create (float width=2.0f, nvmath::Vec3f color=nvmath::Vec3f(1.0f, 0.0f, 0.0f))
 Create a HighlightBox. More...

NVSG_API const HighlightBox * createFromBase (const HighlightObject &rhs, float width=2.0f, nvmath::Vec3f color=nvmath::Vec3f(1.0f, 0.0f, 0.0f))
 Create a HighlightBox by copying from a HighlightObject. More...


Protected Methods

NVSG_API HighlightBox (float width, nvmath::Vec3f color)
 Constructor with line width and color. More...

NVSG_API HighlightBox (const HighlightObject &rhs, float width, nvmath::Vec3f color)
 Partial Constructor. More...

NVSG_API HighlightBox (const HighlightBox &rhs)
 Copy Constructor. More...


Protected Attributes

nvmath::Vec3f m_vertices [8]
 the box's edges. More...

float m_lineWidth
 line width used for drawing the bounding box. More...

nvmath::Vec3f m_color
 color used for drawing. More...

nvmath::BoundingSphere m_boundingSphere
 the box's bounding sphere. More...


Detailed Description

Base class for Highlighting objects that can be attached to Geosets.


Constructor & Destructor Documentation

NVSG_API nvsg::HighlightBox::HighlightBox float    width,
nvmath::Vec3f    color
[protected]
 

Constructor with line width and color.

NVSG_API nvsg::HighlightBox::HighlightBox const HighlightObject   rhs,
float    width,
nvmath::Vec3f    color
[protected]
 

Partial Constructor.

NVSG_API nvsg::HighlightBox::HighlightBox const HighlightBox &    rhs [protected]
 

Copy Constructor.


Member Function Documentation

NVSG_API const HighlightBox* nvsg::HighlightBox::create float    width = 2.0f,
nvmath::Vec3f    color = nvmath::Vec3f(1.0f, 0.0f, 0.0f)
[static]
 

Create a HighlightBox.

Returns:
a constant pointer to a HighlightBox.
Parameters:
width  default line width
color  default line color

NVSG_API const HighlightBox* nvsg::HighlightBox::createFromBase const HighlightObject   rhs,
float    width = 2.0f,
nvmath::Vec3f    color = nvmath::Vec3f(1.0f, 0.0f, 0.0f)
[static]
 

Create a HighlightBox by copying from a HighlightObject.

Returns:
a constant pointer to a HighlightBox.
Parameters:
rhs  HighlightObject to copy from
width  default line width
color  default line color

virtual NVSG_API const HighlightBox* nvsg::HighlightBox::clone void    const [virtual]
 

Create a HighlightBox by cloning this.

Returns:
a constant pointer to a HighlightBox.

bool nvsg::HighlightBox::isBoundingSphereValid void    const [inline, virtual]
 

Ask if the bounding sphere of this HighlightBox is valid.

If the bounding sphere isn't valid, it is tried to validate it.

Returns:
The valid state of the bounding sphere.

Implements nvsg::HighlightObject.

const nvmath::Sphere3f & nvsg::HighlightBox::getBoundingSphere void    const [inline, virtual]
 

Get the bounding sphere of this HighlightObject.

The bounding sphere of a Node is a sphere that completely contains the HighlightObject.

Note:
It is assumed that the bounding sphere of this HighlightObject is valid.
Returns:
A constant reference to the bounding sphere.

Implements nvsg::HighlightObject.

NVSG_API void nvsg::HighlightBox::setVertices nvmath::Vec3f   vertices
 

set the vertices (edges) of the bounding box.

const nvmath::Vec3f * nvsg::HighlightBox::getVertices   const [inline]
 

return the vertices (edges) of the bounding box.

float nvsg::HighlightBox::getLineWidth   const [inline]
 

return the line width used for drawing the box.

const nvmath::Vec3f & nvsg::HighlightBox::getColor   const [inline]
 

return the line width used for drawing the box.


Member Data Documentation

nvmath::Vec3f nvsg::HighlightBox::m_vertices[8] [protected]
 

the box's edges.

float nvsg::HighlightBox::m_lineWidth [protected]
 

line width used for drawing the bounding box.

nvmath::Vec3f nvsg::HighlightBox::m_color [protected]
 

color used for drawing.

nvmath::BoundingSphere nvsg::HighlightBox::m_boundingSphere [protected]
 

the box's bounding sphere.


The documentation for this class was generated from the following file:
Generated on Tue Mar 1 13:20:27 2005 for NVSGSDK by NVIDIA