NIS_Surface Class Reference

#include <NIS_Surface.hxx>

Inheritance diagram for NIS_Surface:
Inheritance graph
[legend]

Public Member Functions

 NIS_Surface (const Handle_Poly_Triangulation &theTri, const Handle_NCollection_BaseAllocator &theAlloc=0L)
 NIS_Surface (const TopoDS_Shape &theShape, const Handle_NCollection_BaseAllocator &theAlloc=0L)
virtual ~NIS_Surface ()
Standard_Integer NNodes () const
Standard_Integer NTriangles () const
const Standard_ShortRealNode (const Standard_Integer theIndex) const
const Standard_IntegerTriangle (const Standard_Integer theIndex) const
const Standard_ShortRealNormal (const Standard_Integer theIndex) const
virtual Handle_NIS_Drawer DefaultDrawer () const
void SetColor (const Quantity_Color &theColor)
void SetBackColor (const Quantity_Color &theColor)
void SetPolygonOffset (const Standard_Real theValue)
void SetTransparency (const Standard_Real theValue)
virtual Standard_Real Intersect (const gp_Ax1 &theAxis, const Standard_Real theOver) const
virtual Standard_Boolean Intersect (const Bnd_B3f &theBox, const gp_Trsf &theTrf, const Standard_Boolean isFull) const

Protected Member Functions

virtual void computeBox ()
Standard_Boolean computeNormal (Standard_Integer theIndex, gp_XYZ &theNormal) const

Detailed Description

This class describes a presentation of a meshed surface.


Constructor & Destructor Documentation

NIS_Surface::NIS_Surface ( const Handle_Poly_Triangulation &  theTri,
const Handle_NCollection_BaseAllocator &  theAlloc = 0L 
)

Constructor

NIS_Surface::NIS_Surface ( const TopoDS_Shape theShape,
const Handle_NCollection_BaseAllocator &  theAlloc = 0L 
)

Constructor. Creates the presentation of all faces in 'theShape' object. theShape Source geometry. It should contain triangulations inside.

Parameters:
theAlloc Allocator used for nodes and triangles in this presentation.
virtual NIS_Surface::~NIS_Surface (  )  [virtual]

Destructor


Member Function Documentation

virtual void NIS_Surface::computeBox (  )  [protected, virtual]

Create a 3D bounding box of the object.

Implements NIS_InteractiveObject.

Standard_Boolean NIS_Surface::computeNormal ( Standard_Integer  theIndex,
gp_XYZ theNormal 
) const [protected]

Compute normal to the surface at the node with the given index. Returns true if the vertex is artificial at this node.

virtual Handle_NIS_Drawer NIS_Surface::DefaultDrawer (  )  const [virtual]

Create a default drawer instance.

Implements NIS_InteractiveObject.

virtual Standard_Boolean NIS_Surface::Intersect ( const Bnd_B3f theBox,
const gp_Trsf theTrf,
const Standard_Boolean  isFull 
) const [virtual]

Intersect the InteractiveObject geometry with an oriented box.

Parameters:
theBox 3D box of selection
theTrf Position/Orientation of the box.
isFull True if full inclusion is required, False - if partial.
Returns:
True if the InteractiveObject geometry intersects the box or is inside it

Reimplemented from NIS_InteractiveObject.

virtual Standard_Real NIS_Surface::Intersect ( const gp_Ax1 theAxis,
const Standard_Real  theOver 
) const [virtual]

Intersect the InteractiveObject geometry with a line/ray.

Parameters:
theAxis The line or ray in 3D space.
theOver Half-thickness of the selecting line - ignored.
Returns:
If the return value is more than 0.1*RealLast() then no intersection is detected. Otherwise returns the coordinate of the nearest intersection on the ray. May be negative.

Implements NIS_InteractiveObject.

Standard_Integer NIS_Surface::NNodes (  )  const [inline]

Query the number of nodes.

const Standard_ShortReal* NIS_Surface::Node ( const Standard_Integer  theIndex  )  const [inline]

Query the node by its index.

Returns:
pointer to array of 3 Standard_ShortReal values (X,Y,Z coordinates)
const Standard_ShortReal* NIS_Surface::Normal ( const Standard_Integer  theIndex  )  const [inline]

Query the normal vector at the given triangulation node (by index)

Returns:
pointer to array of 3 Standard_ShortReal values (X,Y,Z coordinates)
Standard_Integer NIS_Surface::NTriangles (  )  const [inline]

Query the number of triangles.

void NIS_Surface::SetBackColor ( const Quantity_Color theColor  ) 

Set the color for presentation of the back side of triangles.

Parameters:
theColor New color to use for the presentation.
void NIS_Surface::SetColor ( const Quantity_Color theColor  ) 

Set the normal color for presentation.

Parameters:
theColor New color to use for the presentation.
void NIS_Surface::SetPolygonOffset ( const Standard_Real  theValue  ) 

Set the offset for the presentation.

Parameters:
theValue New offset to use for the presentation.
void NIS_Surface::SetTransparency ( const Standard_Real  theValue  ) 

Set the transparency factor.

Parameters:
theValue 1.0 means full transparency, 0.0 means opaque. Valid quantities are in this interval.

Reimplemented from NIS_InteractiveObject.

const Standard_Integer* NIS_Surface::Triangle ( const Standard_Integer  theIndex  )  const [inline]

Query the triangle by its index.

Returns:
pointer to array of 3 Standard_Integer values (nodes 0, 1, 2)

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Thu Mar 3 10:59:55 2011 for Open CASCADE Technology by  doxygen 1.6.3