Open CASCADE Technology  6.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions
Graphic3d_ArrayOfPrimitives Class Reference

This class furnish services to defined and fill an
array of primitives compatible with the use of
the OPENGl glDrawArrays() or glDrawElements() functions.
NOTE that the main goal of this kind of primitive
is to avoid multiple copies of datas between
each layer of the software.
So the array datas exist only one time and the use
of SetXxxxxx() methods enable to change dynamically
the aspect of this primitive.

Advantages are :
1) Decrease strongly the loading time.
2) Decrease strongly the display time using optimized Opengl
primitives.
3) Enable to change dynamically the components of the primitive
(vertice,normal,color,texture coordinates).
4) Add true triangle and quadrangle strips or fans capabilities.
More...

#include <Graphic3d_ArrayOfPrimitives.hxx>

Inheritance diagram for Graphic3d_ArrayOfPrimitives:
Inheritance graph
[legend]

Public Member Functions

void Destroy ()
 
 ~Graphic3d_ArrayOfPrimitives ()
 
Standard_Integer AddVertex (const gp_Pnt &aVertice)
 
 Adds a vertice in the array. <br>

returns the actual vertex number.
More...

 
Standard_Integer AddVertex (const Standard_Real X, const Standard_Real Y, const Standard_Real Z)
 
 Adds a vertice in the array. <br>

returns the actual vertex number.
More...

 
Standard_Integer AddVertex (const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal Z)
 
 Adds a vertice in the array. <br>

returns the actual vertex number.
More...

 
Standard_Integer AddVertex (const gp_Pnt &aVertice, const Quantity_Color &aColor)
 
 Adds a vertice and vertex color in the vertex array. <br>

returns the actual vertex number.
Warning: <aColor> is ignored when the <hasVColors>
constructor parameter is FALSE
More...

 
Standard_Integer AddVertex (const gp_Pnt &aVertice, const Standard_Integer aColor)
 
 Adds a vertice and vertex color in the vertex array. <br>

returns the actual vertex number.
Warning: <aColor> is ignored when the <hasVColors>
constructor parameter is FALSE
aColor = Alpha << 24 + Blue << 16 + Green << 8 + Red
On all architecture proccers type (x86 or SPARC) you can
use this byte order.
More...

 
Standard_Integer AddVertex (const gp_Pnt &aVertice, const gp_Dir &aNormal)
 
 Adds a vertice and vertex normal in the vertex array. <br>

returns the actual vertex number.
Warning: <aNormal> is ignored when the <hasVNormals>
constructor parameter is FALSE.
More...

 
Standard_Integer AddVertex (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real NX, const Standard_Real NY, const Standard_Real NZ)
 
 Adds a vertice and vertex normal in the vertex array. <br>

returns the actual vertex number.
Warning: <aNormal> is ignored when the <hasVNormals>
constructor parameter is FALSE.
More...

 
Standard_Integer AddVertex (const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal Z, const Standard_ShortReal NX, const Standard_ShortReal NY, const Standard_ShortReal NZ)
 
 Adds a vertice and vertex normal in the vertex array. <br>

returns the actual vertex number.
Warning: <aNormal> is ignored when the <hasVNormals>
constructor parameter is FALSE.
More...

 
Standard_Integer AddVertex (const gp_Pnt &aVertice, const gp_Dir &aNormal, const Quantity_Color &aColor)
 
 Adds a vertice,vertex normal and color in the vertex array. <br>

returns the actual vertex number.
Warning: <aNormal> is ignored when the <hasVNormals>
constructor parameter is FALSE.
<aColor> is ignored when the <hasVColors>
constructor parameter is FALSE
More...

 
Standard_Integer AddVertex (const gp_Pnt &aVertice, const gp_Dir &aNormal, const Standard_Integer aColor)
 
 Adds a vertice,vertex normal and color in the vertex array. <br>

returns the actual vertex number.
Warning: <aNormal> is ignored when the <hasVNormals>
constructor parameter is FALSE.
<aColor> is ignored when the <hasVColors>
constructor parameter is FALSE
aColor = Alpha << 24 + Blue << 16 + Green << 8 + Red
On all architecture proccers type (x86 or SPARC) you can
use this byte order.
More...

 
Standard_Integer AddVertex (const gp_Pnt &aVertice, const gp_Pnt2d &aTexel)
 
 Adds a vertice and vertex texture in the vertex array. <br>

returns the actual vertex number.
<aTexel> is ignored when the <hasVTexels>
constructor parameter is FALSE.
More...

 
Standard_Integer AddVertex (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real TX, const Standard_Real TY)
 
 Adds a vertice and vertex texture coordinates in the vertex array. <br>

returns the actual vertex number.
<aTexel> is ignored when the <hasVTexels>
constructor parameter is FALSE.
More...

 
Standard_Integer AddVertex (const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal Z, const Standard_ShortReal TX, const Standard_ShortReal TY)
 
 Adds a vertice and vertex texture coordinates in the vertex array. <br>

returns the actual vertex number.
<aTexel> is ignored when the <hasVTexels>
constructor parameter is FALSE.
More...

 
Standard_Integer AddVertex (const gp_Pnt &aVertice, const gp_Dir &aNormal, const gp_Pnt2d &aTexel)
 
 Adds a vertice,vertex normal and texture in the vertex array. <br>

returns the actual vertex number.
Warning: <aNormal> is ignored when the <hasVNormals>
constructor parameter is FALSE.
<aTexel> is ignored when the <hasVTexels>
constructor parameter is FALSE.
More...

 
Standard_Integer AddVertex (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real NX, const Standard_Real NY, const Standard_Real NZ, const Standard_Real TX, const Standard_Real TY)
 
 Adds a vertice,vertex normal and texture in the vertex array. <br>

returns the actual vertex number.
Warning: <aNormal> is ignored when the <hasVNormals>
constructor parameter is FALSE.
<aTexel> is ignored when the <hasVTexels>
constructor parameter is FALSE.
More...

 
Standard_Integer AddVertex (const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal Z, const Standard_ShortReal NX, const Standard_ShortReal NY, const Standard_ShortReal NZ, const Standard_ShortReal TX, const Standard_ShortReal TY)
 
 Adds a vertice,vertex normal and texture in the vertex array. <br>

returns the actual vertex number.
Warning: <aNormal> is ignored when the <hasVNormals>
constructor parameter is FALSE.
<aTexel> is ignored when the <hasVTexels>
constructor parameter is FALSE.
More...

 
Standard_Integer AddBound (const Standard_Integer edgeNumber)
 
 Adds a bound of length <edgeNumber> in the bound array <br>

returns the actual bounds number.
More...

 
Standard_Integer AddBound (const Standard_Integer edgeNumber, const Quantity_Color &aBColor)
 
 Adds a bound of length <edgeNumber> and bound color <br>

<aBColor> in the bound array.
returns the actual bounds number.
Warning: <aBColor> is ignored when the <hasBColors>
constructor parameter is FALSE
More...

 
Standard_Integer AddBound (const Standard_Integer edgeNumber, const Standard_Real R, const Standard_Real G, const Standard_Real B)
 
 Adds a bound of length <edgeNumber> and bound color <br>

coordinates in the bound array.
returns the actual bounds number.
Warning: <R,G,B> are ignored when the <hasBColors>
constructor parameter is FALSE
More...

 
Standard_Integer AddEdge (const Standard_Integer vertexIndex, const Standard_Boolean isVisible=Standard_True)
 
 Adds an edge in the range [1,VertexNumber()] in the array, <br>

if <isVisible> is FALSE the edge between <vertexIndex> and
the next edge will not be visible even if the SetEdgeOn() method
is activated in Graphic3d_AspectFillArea3d class.
returns the actual edges number.
Warning: <isVisible> is ignored when the <hasEdgeInfos>
constructor parameter is FALSE.
More...

 
Standard_Boolean Orientate (const gp_Dir &aNormal)
 
 Orientate correctly all vertexs & normals of this array <br>

according to the <aNormal> parameter and
returns TRUE when something has change in the array.
Warning: When the array has edges this method is apply
on edge sub array instead on vertex sub array.
More...

 
Standard_Boolean Orientate (const Standard_Integer aBoundIndex, const gp_Dir &aNormal)
 
 Orientate correctly all vertexs & normal of the bound <aBound> <br>

according to the <aNormal> parameter and
returns TRUE when something has change in the array.
Warning: When the array has edges this method is apply
on edge sub array instead on vertex sub array.
When this array has no bound, <aBoundIndex> design the item number
More...

 
void SetVertice (const Standard_Integer anIndex, const gp_Pnt &aVertice)
 Change the vertice of rank <anIndex> in the array.
More...
 
void SetVertice (const Standard_Integer anIndex, const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal Z)
 Change the vertice of rank <anIndex> in the array.
More...
 
void SetVertexColor (const Standard_Integer anIndex, const Quantity_Color &aColor)
 Change the vertex color of rank <anIndex> in the array.
More...
 
void SetVertexColor (const Standard_Integer anIndex, const Standard_Real R, const Standard_Real G, const Standard_Real B)
 Change the vertex color of rank <anIndex> in the array.
More...
 
void SetVertexColor (const Standard_Integer anIndex, const Standard_Integer aColor)
 
 Change the vertex color of rank <anIndex> in the array. <br>

aColor = Alpha << 24 + Blue << 16 + Green << 8 + Red
On all architecture proccers type (x86 or SPARC) you can
use this byte order.
More...

 
void SetVertexNormal (const Standard_Integer anIndex, const gp_Dir &aNormal)
 Change the vertex normal of rank <anIndex> in the array.
More...
 
void SetVertexNormal (const Standard_Integer anIndex, const Standard_Real NX, const Standard_Real NY, const Standard_Real NZ)
 Change the vertex normal of rank <anIndex> in the array.
More...
 
void SetVertexTexel (const Standard_Integer anIndex, const gp_Pnt2d &aTexel)
 Change the vertex texel of rank <anIndex> in the array.
More...
 
void SetVertexTexel (const Standard_Integer anIndex, const Standard_Real TX, const Standard_Real TY)
 Change the vertex texel of rank <anIndex> in the array.
More...
 
void SetBoundColor (const Standard_Integer anIndex, const Quantity_Color &aColor)
 Change the bound color of rank <anIndex> in the array.
More...
 
void SetBoundColor (const Standard_Integer anIndex, const Standard_Real R, const Standard_Real G, const Standard_Real B)
 Change the bound color of rank <anIndex> in the array.
More...
 
Graphic3d_PrimitiveArray Array () const
 Returns the array address.
More...
 
Graphic3d_TypeOfPrimitiveArray Type () const
 Returns the type of this primitive
More...
 
Standard_CString StringType () const
 Returns the string type of this primitive
More...
 
Standard_Boolean HasVertexNormals () const
 Returns TRUE when vertex normals array is defined.
More...
 
Standard_Boolean HasVertexColors () const
 Returns TRUE when vertex colors array is defined.
More...
 
Standard_Boolean HasVertexTexels () const
 Returns TRUE when vertex texels array is defined.
More...
 
Standard_Integer VertexNumber () const
 Returns the number of defined vertex
More...
 
gp_Pnt Vertice (const Standard_Integer aRank) const
 
 Returns the vertice at rank <aRank> <br>

from the vertex table if defined.
More...

 
void Vertice (const Standard_Integer aRank, Standard_Real &X, Standard_Real &Y, Standard_Real &Z) const
 
 Returns the vertice coordinates at rank <aRank> <br>

from the vertex table if defined.
More...

 
Quantity_Color VertexColor (const Standard_Integer aRank) const
 
 Returns the vertex color at rank <aRank> <br>

from the vertex table if defined.
More...

 
void VertexColor (const Standard_Integer aRank, Standard_Real &R, Standard_Real &G, Standard_Real &B) const
 
 Returns the vertex color values at rank <aRank> <br>

from the vertex table if defined.
More...

 
void VertexColor (const Standard_Integer aRank, Standard_Integer &aColor) const
 
 Returns the vertex color values at rank <aRank> <br>

from the vertex table if defined.
More...

 
gp_Dir VertexNormal (const Standard_Integer aRank) const
 
 Returns the vertex normal at rank <aRank> <br>

from the vertex table if defined.
More...

 
void VertexNormal (const Standard_Integer aRank, Standard_Real &NX, Standard_Real &NY, Standard_Real &NZ) const
 
 Returns the vertex normal coordinates at rank <aRank> <br>

from the vertex table if defined.
More...

 
gp_Pnt2d VertexTexel (const Standard_Integer aRank) const
 
 Returns the vertex texture at rank <aRank> <br>

from the vertex table if defined.
More...

 
void VertexTexel (const Standard_Integer aRank, Standard_Real &TX, Standard_Real &TY) const
 
 Returns the vertex texture coordinates at rank <aRank> <br>

from the vertex table if defined.
More...

 
Standard_Boolean HasEdgeInfos () const
 Returns TRUE when edge visibillity array is defined.
More...
 
Standard_Integer EdgeNumber () const
 Returns the number of defined edges
More...
 
Standard_Integer Edge (const Standard_Integer aRank) const
 
 Returns the vertex index at rank <aRank> <br>

in the range [1,VertexNumber()]
More...

 
Standard_Boolean EdgeIsVisible (const Standard_Integer aRank) const
 
 Returns TRUE when the edge at rank <aRank> <br>

is visible.
More...

 
Standard_Boolean HasBoundColors () const
 Returns TRUE when bound colors array is defined.
More...
 
Standard_Integer BoundNumber () const
 Returns the number of defined bounds
More...
 
Standard_Integer Bound (const Standard_Integer aRank) const
 Returns the edge number at rank <aRank>.
More...
 
Quantity_Color BoundColor (const Standard_Integer aRank) const
 
 Returns the bound color at rank <aRank> <br>

from the bound table if defined.
More...

 
void BoundColor (const Standard_Integer aRank, Standard_Real &R, Standard_Real &G, Standard_Real &B) const
 
 Returns the bound color values at rank <aRank> <br>

from the bound table if defined.
More...

 
Standard_Integer ItemNumber () const
 
Returns the number of total items according to <br>

the array type.
More...

 
Standard_Boolean IsValid ()
 
 Returns TRUE only when the contains of this array is <br>

available.
More...

 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void ShallowDump (Standard_OStream &) const
 
virtual const
Handle_Standard_Type & 
DynamicType () const
 Returns a type information object about this object. More...
 
Standard_Boolean IsInstance (const Handle_Standard_Type &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const Handle_Standard_Type &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
virtual Handle_Standard_Transient This () const
 Returns a Handle which references this object. Must never be called to objects created in stack. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 

Protected Member Functions

 Graphic3d_ArrayOfPrimitives (const Graphic3d_TypeOfPrimitiveArray aType, const Standard_Integer maxVertexs, const Standard_Integer maxBounds, const Standard_Integer maxEdges, const Standard_Boolean hasVNormals, const Standard_Boolean hasVColors, const Standard_Boolean hasBColors, const Standard_Boolean hasTexels, const Standard_Boolean hasEdgeInfos)
 
  Warning <br>

You must use a coherent set of AddVertex() methods according to the
<hasVNormals>,<hasVColors>,<hasVTexels>,<hasBColors>
User is responsible of confuse vertex and bad normal orientation.
You must use AddBound() method only if the <maxBounds>
constructor parameter is > 0.
You must use AddEdge() method only if the <maxEdges>
constructor parameter is > 0.
You must use a coherent set of AddEdge() methods according to the
<hasEdgeInfos> constructor parameter.
More...

 

Detailed Description

This class furnish services to defined and fill an
array of primitives compatible with the use of
the OPENGl glDrawArrays() or glDrawElements() functions.
NOTE that the main goal of this kind of primitive
is to avoid multiple copies of datas between
each layer of the software.
So the array datas exist only one time and the use
of SetXxxxxx() methods enable to change dynamically
the aspect of this primitive.

Advantages are :
1) Decrease strongly the loading time.
2) Decrease strongly the display time using optimized Opengl
primitives.
3) Enable to change dynamically the components of the primitive
(vertice,normal,color,texture coordinates).
4) Add true triangle and quadrangle strips or fans capabilities.

Constructor & Destructor Documentation

Graphic3d_ArrayOfPrimitives::~Graphic3d_ArrayOfPrimitives ( )
inline
Graphic3d_ArrayOfPrimitives::Graphic3d_ArrayOfPrimitives ( const Graphic3d_TypeOfPrimitiveArray  aType,
const Standard_Integer  maxVertexs,
const Standard_Integer  maxBounds,
const Standard_Integer  maxEdges,
const Standard_Boolean  hasVNormals,
const Standard_Boolean  hasVColors,
const Standard_Boolean  hasBColors,
const Standard_Boolean  hasTexels,
const Standard_Boolean  hasEdgeInfos 
)
protected

  Warning <br>

You must use a coherent set of AddVertex() methods according to the
<hasVNormals>,<hasVColors>,<hasVTexels>,<hasBColors>
User is responsible of confuse vertex and bad normal orientation.
You must use AddBound() method only if the <maxBounds>
constructor parameter is > 0.
You must use AddEdge() method only if the <maxEdges>
constructor parameter is > 0.
You must use a coherent set of AddEdge() methods according to the
<hasEdgeInfos> constructor parameter.

Member Function Documentation

Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound ( const Standard_Integer  edgeNumber)

 Adds a bound of length <edgeNumber> in the bound array <br>

returns the actual bounds number.

Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound ( const Standard_Integer  edgeNumber,
const Quantity_Color aBColor 
)

 Adds a bound of length <edgeNumber> and bound color <br>

<aBColor> in the bound array.
returns the actual bounds number.
Warning: <aBColor> is ignored when the <hasBColors>
constructor parameter is FALSE

Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound ( const Standard_Integer  edgeNumber,
const Standard_Real  R,
const Standard_Real  G,
const Standard_Real  B 
)

 Adds a bound of length <edgeNumber> and bound color <br>

coordinates in the bound array.
returns the actual bounds number.
Warning: <R,G,B> are ignored when the <hasBColors>
constructor parameter is FALSE

Standard_Integer Graphic3d_ArrayOfPrimitives::AddEdge ( const Standard_Integer  vertexIndex,
const Standard_Boolean  isVisible = Standard_True 
)

 Adds an edge in the range [1,VertexNumber()] in the array, <br>

if <isVisible> is FALSE the edge between <vertexIndex> and
the next edge will not be visible even if the SetEdgeOn() method
is activated in Graphic3d_AspectFillArea3d class.
returns the actual edges number.
Warning: <isVisible> is ignored when the <hasEdgeInfos>
constructor parameter is FALSE.

Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex ( const gp_Pnt aVertice)

 Adds a vertice in the array. <br>

returns the actual vertex number.

Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex ( const Standard_Real  X,
const Standard_Real  Y,
const Standard_Real  Z 
)

 Adds a vertice in the array. <br>

returns the actual vertex number.

Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex ( const Standard_ShortReal  X,
const Standard_ShortReal  Y,
const Standard_ShortReal  Z 
)

 Adds a vertice in the array. <br>

returns the actual vertex number.

Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex ( const gp_Pnt aVertice,
const Quantity_Color aColor 
)

 Adds a vertice and vertex color in the vertex array. <br>

returns the actual vertex number.
Warning: <aColor> is ignored when the <hasVColors>
constructor parameter is FALSE

Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex ( const gp_Pnt aVertice,
const Standard_Integer  aColor 
)

 Adds a vertice and vertex color in the vertex array. <br>

returns the actual vertex number.
Warning: <aColor> is ignored when the <hasVColors>
constructor parameter is FALSE
aColor = Alpha << 24 + Blue << 16 + Green << 8 + Red
On all architecture proccers type (x86 or SPARC) you can
use this byte order.

Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex ( const gp_Pnt aVertice,
const gp_Dir aNormal 
)

 Adds a vertice and vertex normal in the vertex array. <br>

returns the actual vertex number.
Warning: <aNormal> is ignored when the <hasVNormals>
constructor parameter is FALSE.

Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex ( const Standard_Real  X,
const Standard_Real  Y,
const Standard_Real  Z,
const Standard_Real  NX,
const Standard_Real  NY,
const Standard_Real  NZ 
)

 Adds a vertice and vertex normal in the vertex array. <br>

returns the actual vertex number.
Warning: <aNormal> is ignored when the <hasVNormals>
constructor parameter is FALSE.

Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex ( const Standard_ShortReal  X,
const Standard_ShortReal  Y,
const Standard_ShortReal  Z,
const Standard_ShortReal  NX,
const Standard_ShortReal  NY,
const Standard_ShortReal  NZ 
)

 Adds a vertice and vertex normal in the vertex array. <br>

returns the actual vertex number.
Warning: <aNormal> is ignored when the <hasVNormals>
constructor parameter is FALSE.

Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex ( const gp_Pnt aVertice,
const gp_Dir aNormal,
const Quantity_Color aColor 
)

 Adds a vertice,vertex normal and color in the vertex array. <br>

returns the actual vertex number.
Warning: <aNormal> is ignored when the <hasVNormals>
constructor parameter is FALSE.
<aColor> is ignored when the <hasVColors>
constructor parameter is FALSE

Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex ( const gp_Pnt aVertice,
const gp_Dir aNormal,
const Standard_Integer  aColor 
)

 Adds a vertice,vertex normal and color in the vertex array. <br>

returns the actual vertex number.
Warning: <aNormal> is ignored when the <hasVNormals>
constructor parameter is FALSE.
<aColor> is ignored when the <hasVColors>
constructor parameter is FALSE
aColor = Alpha << 24 + Blue << 16 + Green << 8 + Red
On all architecture proccers type (x86 or SPARC) you can
use this byte order.

Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex ( const gp_Pnt aVertice,
const gp_Pnt2d aTexel 
)

 Adds a vertice and vertex texture in the vertex array. <br>

returns the actual vertex number.
<aTexel> is ignored when the <hasVTexels>
constructor parameter is FALSE.

Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex ( const Standard_Real  X,
const Standard_Real  Y,
const Standard_Real  Z,
const Standard_Real  TX,
const Standard_Real  TY 
)

 Adds a vertice and vertex texture coordinates in the vertex array. <br>

returns the actual vertex number.
<aTexel> is ignored when the <hasVTexels>
constructor parameter is FALSE.

Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex ( const Standard_ShortReal  X,
const Standard_ShortReal  Y,
const Standard_ShortReal  Z,
const Standard_ShortReal  TX,
const Standard_ShortReal  TY 
)

 Adds a vertice and vertex texture coordinates in the vertex array. <br>

returns the actual vertex number.
<aTexel> is ignored when the <hasVTexels>
constructor parameter is FALSE.

Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex ( const gp_Pnt aVertice,
const gp_Dir aNormal,
const gp_Pnt2d aTexel 
)

 Adds a vertice,vertex normal and texture in the vertex array. <br>

returns the actual vertex number.
Warning: <aNormal> is ignored when the <hasVNormals>
constructor parameter is FALSE.
<aTexel> is ignored when the <hasVTexels>
constructor parameter is FALSE.

Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex ( const Standard_Real  X,
const Standard_Real  Y,
const Standard_Real  Z,
const Standard_Real  NX,
const Standard_Real  NY,
const Standard_Real  NZ,
const Standard_Real  TX,
const Standard_Real  TY 
)

 Adds a vertice,vertex normal and texture in the vertex array. <br>

returns the actual vertex number.
Warning: <aNormal> is ignored when the <hasVNormals>
constructor parameter is FALSE.
<aTexel> is ignored when the <hasVTexels>
constructor parameter is FALSE.

Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex ( const Standard_ShortReal  X,
const Standard_ShortReal  Y,
const Standard_ShortReal  Z,
const Standard_ShortReal  NX,
const Standard_ShortReal  NY,
const Standard_ShortReal  NZ,
const Standard_ShortReal  TX,
const Standard_ShortReal  TY 
)

 Adds a vertice,vertex normal and texture in the vertex array. <br>

returns the actual vertex number.
Warning: <aNormal> is ignored when the <hasVNormals>
constructor parameter is FALSE.
<aTexel> is ignored when the <hasVTexels>
constructor parameter is FALSE.

Graphic3d_PrimitiveArray Graphic3d_ArrayOfPrimitives::Array ( ) const

Returns the array address.

Standard_Integer Graphic3d_ArrayOfPrimitives::Bound ( const Standard_Integer  aRank) const

Returns the edge number at rank <aRank>.

Quantity_Color Graphic3d_ArrayOfPrimitives::BoundColor ( const Standard_Integer  aRank) const

 Returns the bound color at rank <aRank> <br>

from the bound table if defined.

void Graphic3d_ArrayOfPrimitives::BoundColor ( const Standard_Integer  aRank,
Standard_Real R,
Standard_Real G,
Standard_Real B 
) const

 Returns the bound color values at rank <aRank> <br>

from the bound table if defined.

Standard_Integer Graphic3d_ArrayOfPrimitives::BoundNumber ( ) const

Returns the number of defined bounds

void Graphic3d_ArrayOfPrimitives::Destroy ( )
Standard_Integer Graphic3d_ArrayOfPrimitives::Edge ( const Standard_Integer  aRank) const

 Returns the vertex index at rank <aRank> <br>

in the range [1,VertexNumber()]

Standard_Boolean Graphic3d_ArrayOfPrimitives::EdgeIsVisible ( const Standard_Integer  aRank) const

 Returns TRUE when the edge at rank <aRank> <br>

is visible.

Standard_Integer Graphic3d_ArrayOfPrimitives::EdgeNumber ( ) const

Returns the number of defined edges

Standard_Boolean Graphic3d_ArrayOfPrimitives::HasBoundColors ( ) const

Returns TRUE when bound colors array is defined.

Standard_Boolean Graphic3d_ArrayOfPrimitives::HasEdgeInfos ( ) const

Returns TRUE when edge visibillity array is defined.

Standard_Boolean Graphic3d_ArrayOfPrimitives::HasVertexColors ( ) const

Returns TRUE when vertex colors array is defined.

Standard_Boolean Graphic3d_ArrayOfPrimitives::HasVertexNormals ( ) const

Returns TRUE when vertex normals array is defined.

Standard_Boolean Graphic3d_ArrayOfPrimitives::HasVertexTexels ( ) const

Returns TRUE when vertex texels array is defined.

Standard_Boolean Graphic3d_ArrayOfPrimitives::IsValid ( )

 Returns TRUE only when the contains of this array is <br>

available.

Standard_Integer Graphic3d_ArrayOfPrimitives::ItemNumber ( ) const

Returns the number of total items according to <br>

the array type.

Standard_Boolean Graphic3d_ArrayOfPrimitives::Orientate ( const gp_Dir aNormal)

 Orientate correctly all vertexs & normals of this array <br>

according to the <aNormal> parameter and
returns TRUE when something has change in the array.
Warning: When the array has edges this method is apply
on edge sub array instead on vertex sub array.

Standard_Boolean Graphic3d_ArrayOfPrimitives::Orientate ( const Standard_Integer  aBoundIndex,
const gp_Dir aNormal 
)

 Orientate correctly all vertexs & normal of the bound <aBound> <br>

according to the <aNormal> parameter and
returns TRUE when something has change in the array.
Warning: When the array has edges this method is apply
on edge sub array instead on vertex sub array.
When this array has no bound, <aBoundIndex> design the item number

void Graphic3d_ArrayOfPrimitives::SetBoundColor ( const Standard_Integer  anIndex,
const Quantity_Color aColor 
)

Change the bound color of rank <anIndex> in the array.

void Graphic3d_ArrayOfPrimitives::SetBoundColor ( const Standard_Integer  anIndex,
const Standard_Real  R,
const Standard_Real  G,
const Standard_Real  B 
)

Change the bound color of rank <anIndex> in the array.

void Graphic3d_ArrayOfPrimitives::SetVertexColor ( const Standard_Integer  anIndex,
const Quantity_Color aColor 
)

Change the vertex color of rank <anIndex> in the array.

void Graphic3d_ArrayOfPrimitives::SetVertexColor ( const Standard_Integer  anIndex,
const Standard_Real  R,
const Standard_Real  G,
const Standard_Real  B 
)

Change the vertex color of rank <anIndex> in the array.

void Graphic3d_ArrayOfPrimitives::SetVertexColor ( const Standard_Integer  anIndex,
const Standard_Integer  aColor 
)

 Change the vertex color of rank <anIndex> in the array. <br>

aColor = Alpha << 24 + Blue << 16 + Green << 8 + Red
On all architecture proccers type (x86 or SPARC) you can
use this byte order.

void Graphic3d_ArrayOfPrimitives::SetVertexNormal ( const Standard_Integer  anIndex,
const gp_Dir aNormal 
)

Change the vertex normal of rank <anIndex> in the array.

void Graphic3d_ArrayOfPrimitives::SetVertexNormal ( const Standard_Integer  anIndex,
const Standard_Real  NX,
const Standard_Real  NY,
const Standard_Real  NZ 
)

Change the vertex normal of rank <anIndex> in the array.

void Graphic3d_ArrayOfPrimitives::SetVertexTexel ( const Standard_Integer  anIndex,
const gp_Pnt2d aTexel 
)

Change the vertex texel of rank <anIndex> in the array.

void Graphic3d_ArrayOfPrimitives::SetVertexTexel ( const Standard_Integer  anIndex,
const Standard_Real  TX,
const Standard_Real  TY 
)

Change the vertex texel of rank <anIndex> in the array.

void Graphic3d_ArrayOfPrimitives::SetVertice ( const Standard_Integer  anIndex,
const gp_Pnt aVertice 
)

Change the vertice of rank <anIndex> in the array.

void Graphic3d_ArrayOfPrimitives::SetVertice ( const Standard_Integer  anIndex,
const Standard_ShortReal  X,
const Standard_ShortReal  Y,
const Standard_ShortReal  Z 
)

Change the vertice of rank <anIndex> in the array.

Standard_CString Graphic3d_ArrayOfPrimitives::StringType ( ) const

Returns the string type of this primitive

Graphic3d_TypeOfPrimitiveArray Graphic3d_ArrayOfPrimitives::Type ( ) const

Returns the type of this primitive

Quantity_Color Graphic3d_ArrayOfPrimitives::VertexColor ( const Standard_Integer  aRank) const

 Returns the vertex color at rank <aRank> <br>

from the vertex table if defined.

void Graphic3d_ArrayOfPrimitives::VertexColor ( const Standard_Integer  aRank,
Standard_Real R,
Standard_Real G,
Standard_Real B 
) const

 Returns the vertex color values at rank <aRank> <br>

from the vertex table if defined.

void Graphic3d_ArrayOfPrimitives::VertexColor ( const Standard_Integer  aRank,
Standard_Integer aColor 
) const

 Returns the vertex color values at rank <aRank> <br>

from the vertex table if defined.

gp_Dir Graphic3d_ArrayOfPrimitives::VertexNormal ( const Standard_Integer  aRank) const

 Returns the vertex normal at rank <aRank> <br>

from the vertex table if defined.

void Graphic3d_ArrayOfPrimitives::VertexNormal ( const Standard_Integer  aRank,
Standard_Real NX,
Standard_Real NY,
Standard_Real NZ 
) const

 Returns the vertex normal coordinates at rank <aRank> <br>

from the vertex table if defined.

Standard_Integer Graphic3d_ArrayOfPrimitives::VertexNumber ( ) const

Returns the number of defined vertex

gp_Pnt2d Graphic3d_ArrayOfPrimitives::VertexTexel ( const Standard_Integer  aRank) const

 Returns the vertex texture at rank <aRank> <br>

from the vertex table if defined.

void Graphic3d_ArrayOfPrimitives::VertexTexel ( const Standard_Integer  aRank,
Standard_Real TX,
Standard_Real TY 
) const

 Returns the vertex texture coordinates at rank <aRank> <br>

from the vertex table if defined.

gp_Pnt Graphic3d_ArrayOfPrimitives::Vertice ( const Standard_Integer  aRank) const

 Returns the vertice at rank <aRank> <br>

from the vertex table if defined.

void Graphic3d_ArrayOfPrimitives::Vertice ( const Standard_Integer  aRank,
Standard_Real X,
Standard_Real Y,
Standard_Real Z 
) const

 Returns the vertice coordinates at rank <aRank> <br>

from the vertex table if defined.


The documentation for this class was generated from the following file: