#include <NIS_Triangulated.hxx>

Block of comments describing class NIS_Triangulated
anonymous enum [protected] |
| NIS_Triangulated::NIS_Triangulated | ( | const Standard_Integer | nNodes = 0, |
|
| const Handle_NCollection_BaseAllocator & | = 0L | |||
| ) |
Constructor. Optionally defines the number of nodes that will be allocated (this number may be defined later in methods Set*Prs) as well as the memory allocator where the nodes, lines and triangles will be stored by this instance.
| virtual NIS_Triangulated::~NIS_Triangulated | ( | ) | [virtual] |
Destructor.
| void NIS_Triangulated::allocateNodes | ( | const Standard_Integer | nNodes | ) | [protected] |
Create the memory buffer for the declared number of nodes, old nodes are deallocated.
| void NIS_Triangulated::Clear | ( | ) |
Reset all data memebers and free all allocated memory. Called from the destructor, also can be usedto re-initialize a given Interactive Objects.
| virtual void NIS_Triangulated::computeBox | ( | ) | [protected, virtual] |
Create a 3D bounding box of the object.
Implements NIS_InteractiveObject.
| static void NIS_Triangulated::ComputeBox | ( | Bnd_B3f & | theBox, | |
| const Standard_Integer | nNodes, | |||
| const Standard_ShortReal * | pNodes | |||
| ) | [static] |
| virtual Handle_NIS_Drawer NIS_Triangulated::DefaultDrawer | ( | ) | const [virtual] |
Create a default drawer instance.
Implements NIS_InteractiveObject.
| Quantity_Color NIS_Triangulated::GetColor | ( | const NIS_Drawer::DrawType | theDrawType | ) | const |
Get Normal, Transparent or Hilighted color of the presentation.
| theDrawType | The draw type, for which the color is retrieved. |
| virtual Standard_Boolean NIS_Triangulated::Intersect | ( | const Bnd_B3f & | theBox, | |
| const gp_Trsf & | theTrf, | |||
| const Standard_Boolean | isFull | |||
| ) | const [virtual] |
Intersect the InteractiveObject geometry with an oriented box.
| theBox | 3D box of selection | |
| theTrf | Position/Orientation of the box. | |
| isFull | True if full inclusion is required, False - if partial. |
Reimplemented from NIS_InteractiveObject.
| Standard_Real NIS_Triangulated::Intersect | ( | const gp_Ax1 & | theAxis, | |
| const Standard_Real | theOver | |||
| ) | const [virtual] |
Intersect the InteractiveObject geometry with a line/ray.
| theAxis | The line or ray in 3D space. | |
| theOver | Half-thickness of the selecting line. |
Implements NIS_InteractiveObject.
| Standard_Boolean NIS_Triangulated::IsLine | ( | Standard_Boolean & | isLoop | ) | const [inline] |
Query if there is Line component in the presentation.
| Standard_Boolean NIS_Triangulated::IsPolygons | ( | ) | const [inline] |
Query if there is Polygons component in the presentation.
| Standard_Boolean NIS_Triangulated::IsSegments | ( | ) | const [inline] |
Query if there is Segments component in the presentation.
| Standard_Boolean NIS_Triangulated::IsTriangulation | ( | ) | const [inline] |
Query if there is Triangulation component in the presentation.
| const Standard_Integer* NIS_Triangulated::LineNode | ( | const Standard_Integer | ind | ) | const [inline] |
Query the node of line or segments by index in the array of node indices. This method does not make distinction of the presentation type (field myType), so the correct definition of ind is to be done by the caller.
| Standard_Integer NIS_Triangulated::NLineNodes | ( | ) | const [inline] |
Query the number of line points.
| Standard_Integer NIS_Triangulated::NNodes | ( | ) | const [inline] |
Query the number of nodes.
| const Standard_ShortReal* NIS_Triangulated::Node | ( | const Standard_Integer | ind | ) | const [inline] |
Query the node by its index.
| Standard_Integer NIS_Triangulated::NPolygons | ( | ) | const [inline] |
Query the number of polygons.
| Standard_Integer NIS_Triangulated::NTriangles | ( | ) | const [inline] |
Query the number of triangles.
| const Standard_Integer NIS_Triangulated::Polygon | ( | const Standard_Integer | ind, | |
| Standard_Integer *& | outInd | |||
| ) | const [inline] |
Query the polygon.
| ind | rank of the polygon [0 .. N-1] | |
| outInd | [out] array of vertex indice |
| static int NIS_Triangulated::seg_box_included | ( | const Bnd_B3f & | theBox, | |
| const gp_Pnt | thePnt[2] | |||
| ) | [static] |
| static int NIS_Triangulated::seg_box_intersect | ( | const Bnd_B3f & | theBox, | |
| const gp_Pnt | thePnt[2] | |||
| ) | [static] |
| static int NIS_Triangulated::seg_line_intersect | ( | const gp_XYZ & | aStart, | |
| const gp_XYZ & | aDir, | |||
| const double | over2, | |||
| const float | V0[3], | |||
| const float | V1[3], | |||
| double * | tInter | |||
| ) | [static] |
| void NIS_Triangulated::SetColor | ( | const Quantity_Color & | theColor, | |
| const Standard_Boolean | isUpdateV = Standard_True | |||
| ) |
Set the normal color for presentation.
| theColor | New color to use for the presentation. | |
| isUpdateV | True if all views should be updated, otherwise wait till the next update |
| void NIS_Triangulated::SetDrawPolygons | ( | const Standard_Boolean | isDrawPolygons, | |
| const Standard_Boolean | isUpdateViews = Standard_True | |||
| ) |
Set the boolean flag defining if the polygons or the triangulation should be drawn. This method does not affect the presentation of Line/Segments.
| isDrawPolygons | True defines that no triangulation is drawn, only polygons are. False defines that only triangulation is draw, no polygons. | |
| isUpdateV | True if all views should be updated, otherwise wait till the next update |
| void NIS_Triangulated::SetDynHilightColor | ( | const Quantity_Color & | theColor, | |
| const Standard_Boolean | isUpdateV = Standard_True | |||
| ) |
Set the color for dynamic hilight presentation.
| theColor | New color to use for the presentation. | |
| isUpdateV | True if all views should be updated, otherwise wait till the next update |
| void NIS_Triangulated::SetHilightColor | ( | const Quantity_Color & | theColor, | |
| const Standard_Boolean | isUpdateV = Standard_True | |||
| ) |
Set the color for hilighted presentation.
| theColor | New color to use for the presentation. | |
| isUpdateV | True if all views should be updated, otherwise wait till the next update |
| void NIS_Triangulated::SetLineNode | ( | const Standard_Integer | ind, | |
| const Standard_Integer | iNode | |||
| ) |
Define the line node by index.
| void NIS_Triangulated::SetLinePrs | ( | const Standard_Integer | nPoints, | |
| const Standard_Boolean | isClosed, | |||
| const Standard_Integer | nNodes = 0 | |||
| ) |
Define the line presentration (polygon through points)
| nPoints | Number of nodes defining the line. If set to 0, line is cancelled | |
| isClosed | True if the polygon is closed, so the segment between the first and the last points is created automatically. | |
| nNodes | Optional: Number of nodes to allocate. If left as 0, the previous nodes allocation is used, otherwise a new allocation is created. |
| void NIS_Triangulated::SetLineWidth | ( | const Standard_Real | theWidth, | |
| const Standard_Boolean | isUpdateV = Standard_True | |||
| ) |
Set the width of line presentations in pixels.
| theWidth | New line width to use for the presentation. | |
| isUpdateV | True if all views should be updated, otherwise wait till the next update |
| void NIS_Triangulated::SetNode | ( | const Standard_Integer | ind, | |
| const gp_XY & | thePnt | |||
| ) |
Define the coordinates of node [ind]. Z coordinate is assigned to 0.
| void NIS_Triangulated::SetNode | ( | const Standard_Integer | ind, | |
| const gp_XYZ & | thePnt | |||
| ) |
Define the coordinates of node [ind].
| Standard_Integer* NIS_Triangulated::SetPolygon | ( | const Standard_Integer | ind, | |
| const Standard_Integer | theSz | |||
| ) |
Allocate a single polygon, should be called for each polygon following the call SetPolygonsPrs().
| ind | Index of the polygon, should be [0..Npolygons-1] | |
| theSz | Number of points (segments) in the polygon. |
| void NIS_Triangulated::SetPolygonsPrs | ( | const Standard_Integer | nPolygons, | |
| const Standard_Integer | nNodes = 0 | |||
| ) |
Define the polygonal presentration.
| nPolygons | Number of separate polygons. If set to 0, polygons are cancelled | |
| nNodes | Optional: Number of nodes to allocate. If left as 0, the previous nodes allocation is used, otherwise a new allocation is created. |
| void NIS_Triangulated::SetSegmentPrs | ( | const Standard_Integer | nSegments, | |
| const Standard_Integer | nNodes = 0 | |||
| ) |
Define the segments presentration. Each segment is defined by 2 nodes
| nSegments | Number of segments. If set to 0, segments presentation is cancelled | |
| nNodes | Optional: Number of nodes to allocate. If left as 0, the previous nodes allocation is used, otherwise a new allocation is created. |
| void NIS_Triangulated::SetTriangle | ( | const Standard_Integer | ind, | |
| const Standard_Integer | iNode0, | |||
| const Standard_Integer | iNode1, | |||
| const Standard_Integer | iNode2 | |||
| ) |
Define the triangle [ind] by indices of its three nodes.
| void NIS_Triangulated::SetTriangulationPrs | ( | const Standard_Integer | nTriangles, | |
| const Standard_Integer | nNodes = 0 | |||
| ) |
Define the triangulated presentration.
| nTriangles | Number of triangles. If set to 0, triangulation is cancelled | |
| nNodes | Optional: Number of nodes to allocate. If left as 0, the previous nodes allocation is used, otherwise a new allocation is created. |
| static int NIS_Triangulated::tri_line_intersect | ( | const double | start[3], | |
| const double | dir[3], | |||
| const float | V0[3], | |||
| const float | V1[3], | |||
| const float | V2[3], | |||
| double * | tInter | |||
| ) | [static] |
| const Standard_Integer* NIS_Triangulated::Triangle | ( | const Standard_Integer | ind | ) | const [inline] |
Query the triangle by its index.
NCollection_BaseAllocator* NIS_Triangulated::myAlloc [protected] |
Standard_Boolean NIS_Triangulated::myIsDrawPolygons [protected] |
Standard_Integer NIS_Triangulated::myNLineNodes [protected] |
Standard_Integer NIS_Triangulated::myNNodes [protected] |
Standard_Integer NIS_Triangulated::myNPolygons [protected] |
Standard_Integer NIS_Triangulated::myNTriangles [protected] |
Standard_Integer* NIS_Triangulated::mypLines [protected] |
Standard_ShortReal* NIS_Triangulated::mypNodes [protected] |
Standard_Integer** NIS_Triangulated::mypPolygons [protected] |
Standard_Integer* NIS_Triangulated::mypTriangles [protected] |
Standard_Integer NIS_Triangulated::myType [protected] |
Combination of Type_* constants
1.6.3