MShow_Vertex_Normals

Functions

void MShow_Net_Vertex_Normals (HC_KEY key, int offset, int pcount, HC_VECTOR *normals)
 Similar to MShow_Vertex_Normals(), but returns the net effective normals set on the vertices of some geometry. More...
 
void MShow_Specific_Vertex_Normals (HC_KEY key, int count, const int *indices, HC_VECTOR *normals)
 Returns the normals set on the specific vertices of some geometry without having to open each vertex. More...
 
int MShow_Specific_Vertex_Normals_With_Existence (HC_KEY key, int count, const int *indices, char *existence, HC_VECTOR *normals)
 Returns the normals set on the vertices of some geometry without having to open each vertex. More...
 
void MShow_Vertex_Normals (HC_KEY key, int offset, int count, HC_VECTOR *normals)
 Returns the normals set on the vertices of some geometry without having to open each vertex. More...
 
int MShow_Vertex_Normals_With_Existence (HC_KEY key, int offset, int count, char *existence, HC_VECTOR *normals)
 Returns the normals set on the vertices of some geometry without having to open each vertex. More...
 

Detailed Description

Function Documentation

◆ MShow_Net_Vertex_Normals()

void MShow_Net_Vertex_Normals ( HC_KEY  key,
int  offset,
int  count,
HC_VECTOR *  normals 
)

Similar to MShow_Vertex_Normals(), but returns the net effective normals set on the vertices of some geometry.

Parameters
key- Key to the piece of geometry to query.
offset- Index of the key's point array on which to start querying values.
count- Number of points from offset to query.
normals- Array of (x,y, z) triplets. Passed by reference. Returned to user.

DETAILS

MShow_Net_Vertex_Normals differs from the regular MShow_Vertex_Normals in that it can return the normals that HOOPS calculates automatically, in cases where the normals are not explicitly set. This is particularly useful when dealing with NURBS surfaces, as it is the only way to query the normals associated with the HOOPS-specific tesselation of a NURBS Surface.

See also
MSet_Vertex_Normals, Set_Normal, Show_Normal, MSet_Vertex_Parameters, Set_Parameter, Show_Parameter

◆ MShow_Specific_Vertex_Normals()

void MShow_Specific_Vertex_Normals ( HC_KEY  key,
int  count,
const int *  indices,
HC_VECTOR *  normals 
)

Returns the normals set on the specific vertices of some geometry without having to open each vertex.

Parameters
key- Key to the piece of geometry to query.
count- The number of faces in the indices list.
indices- The list of vertices.
normals- Array of (x,y, z) triplets. Passed by reference. Returned to user.
See also
MSet_Vertex_Normals, Set_Normal, Show_Normal, MSet_Vertex_Parameters, Set_Parameter, Show_Parameter

◆ MShow_Specific_Vertex_Normals_With_Existence()

int MShow_Specific_Vertex_Normals_With_Existence ( HC_KEY  key,
int  count,
const int *  indices,
char *  existence,
HC_VECTOR *  normals 
)

Returns the normals set on the vertices of some geometry without having to open each vertex.

Parameters
key- Key to the piece of geometry to query.
count- Number of elements in the indices array.
indices- The list of vertices.
existence- An array of size count whose values would be populated with either 0 (does not exist) or 1 (exists). Passed by reference. Returned to user.
normals- Array of (x,y, z) triplets. Passed by reference. Returned to user.
Returns
The number of items that have the attribute set.

DETAILS

See MShow_Vertex_Normals_With_Existence() for more details.

See also
MSet_Vertex_Normals, Set_Normal, Show_Normal, MSet_Vertex_Parameters, Set_Parameter, Show_Parameter

◆ MShow_Vertex_Normals()

void MShow_Vertex_Normals ( HC_KEY  key,
int  offset,
int  count,
HC_VECTOR *  normals 
)

Returns the normals set on the vertices of some geometry without having to open each vertex.

Parameters
key- Key to the piece of geometry to query.
offset- Index of the key's point array on which to start querying values.
count- Number of points from offset to query.
normals- Array of (x,y, z) triplets. Passed by reference. Returned to user.
See also
MSet_Vertex_Normals, Set_Normal, Show_Normal, MSet_Vertex_Parameters, Set_Parameter, Show_Parameter

◆ MShow_Vertex_Normals_With_Existence()

int MShow_Vertex_Normals_With_Existence ( HC_KEY  key,
int  offset,
int  count,
char *  existence,
HC_VECTOR *  normals 
)

Returns the normals set on the vertices of some geometry without having to open each vertex.

Parameters
key- Key to the piece of geometry to query.
offset- Index of the key's point array on which to start querying values.
count- Number of points from offset to query.
existence- An array of size count whose values would be populated with either 0 (does not exist) or 1 (exists). Passed by reference. Returned to user.
normals- Array of (x,y, z) triplets. Passed by reference. Returned to user.
Returns
The number of items that have the attribute set.

DETAILS

Use MShow_Vertex_Normals_With_Existence to query vertex normal values efficiently. Since normal values may or may not exist, the return values gives you the total number of normals that have been set. The existence array gives you further information about each vertex's normal setting. For a given vertex, the existence value may be one of the following:

  • 0 : There was no normal value set.
  • 1 : The normal value is set.

See also
MSet_Vertex_Normals, Set_Normal, Show_Normal, MSet_Vertex_Parameters, Set_Parameter, Show_Parameter