Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class 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 Member Functions

virtual NVSG_API const HighlightBoxclone (void) const
 Create a HighlightBox by cloning this.
virtual NVSG_API bool isBoundingSphereValid (void) const
 Ask if the bounding sphere of this HighlightBox is valid.
virtual NVSG_API const nvmath::Sphere3fgetBoundingSphere (void) const
 Get the bounding sphere of this HighlightObject.
NVSG_API void setVertices (nvmath::Vec3f *vertices)
 set the vertices (edges) of the bounding box
NVSG_API const nvmath::Vec3fgetVertices () const
 return the vertices (edges) of the bounding box
NVSG_API float getLineWidth () const
 return the line width used for drawing the box
NVSG_API const nvmath::Vec3fgetColor () const
 return the line width used for drawing the box

Static Public Member Functions

static NVSG_API const HighlightBoxcreate (float width=2.0f, nvmath::Vec3f color=nvmath::Vec3f(1.0f, 0.0f, 0.0f))
 Create a HighlightBox.
static NVSG_API const HighlightBoxcreateFromBase (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.

Protected Member Functions

NVSG_API HighlightBox (float width, nvmath::Vec3f color)
 Constructor with line width and color.
NVSG_API HighlightBox (const HighlightObject &rhs, float width, nvmath::Vec3f color)
 Partial Constructor.
NVSG_API HighlightBox (const HighlightBox &rhs)
 Copy Constructor.

Protected Attributes

nvmath::Vec3f m_vertices [8]
 the box's edges
float m_lineWidth
 line width used for drawing the bounding box
nvmath::Vec3f m_color
 color used for drawing
nvmath::BoundingSphere m_boundingSphere
 the box's bounding sphere

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

static 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

static 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:47 2005 for NVSGSDK by NVIDIA