Coin  4.0.3
Coin3D core library
Loading...
Searching...
No Matches
SoPrimitiveVertex Class Reference

The SoPrimitiveVertex class represents a single vertex of a generated primitive. More...

#include <Inventor/SoPrimitiveVertex.h>

Public Member Functions

 SoPrimitiveVertex (const SoPrimitiveVertex &pv)
 
 SoPrimitiveVertex (void)
 
 ~SoPrimitiveVertex (void)
 
const SoDetailgetDetail (void) const
 
int getMaterialIndex (void) const
 
const SbVec3fgetNormal (void) const
 
uint32_t getPackedColor (void) const
 
const SbVec3fgetPoint (void) const
 
const SbVec4fgetTextureCoords (void) const
 
SoPrimitiveVertexoperator= (const SoPrimitiveVertex &pv)
 
void setDetail (SoDetail *d)
 
void setMaterialIndex (int index)
 
void setNormal (const SbVec3f &n)
 
void setNormal (float nx, float ny, float nz)
 
void setPackedColor (uint32_t rgba)
 
void setPoint (const SbVec3f &pt)
 
void setPoint (float x, float y, float z)
 
void setTextureCoords (const SbVec2f &tex)
 
void setTextureCoords (const SbVec3f &tex)
 
void setTextureCoords (const SbVec4f &tex)
 
void setTextureCoords (float tx, float ty)
 
void setTextureCoords (float tx, float ty, float tz)
 
void setTextureCoords (float tx, float ty, float tz, float tw)
 

Detailed Description

The SoPrimitiveVertex class represents a single vertex of a generated primitive.

Instances of SoPrimitiveVertex are constructed when generating primitive data, primarily during an SoCallbackAction traversal. Depending on the context the vertex could represent a single 3D point, one of the two vertices in a line or one of the three vertices in a triangle.

Constructor & Destructor Documentation

◆ SoPrimitiveVertex() [1/2]

SoPrimitiveVertex::SoPrimitiveVertex ( void )

Default constructor, sets up a "void" instance.

◆ SoPrimitiveVertex() [2/2]

SoPrimitiveVertex::SoPrimitiveVertex ( const SoPrimitiveVertex & pv)

Copy constructor. Does a shallow copy.

See also
SoPrimitiveVertex::operator=()

◆ ~SoPrimitiveVertex()

SoPrimitiveVertex::~SoPrimitiveVertex ( void )

Destructor. The detail instance is owned by client code and will not be destructed here.

Member Function Documentation

◆ getDetail()

const SoDetail * SoPrimitiveVertex::getDetail ( void ) const
inline

Returns pointer to detail instance with more information about the vertex. A detail instance may not be available, and if so NULL is returned.

◆ getMaterialIndex()

int SoPrimitiveVertex::getMaterialIndex ( void ) const
inline

Returns index of the vertex into the currently active material, if any.

◆ getNormal()

const SbVec3f & SoPrimitiveVertex::getNormal ( void ) const
inline

Returns normal vector, oriented in object space.

◆ getPackedColor()

uint32_t SoPrimitiveVertex::getPackedColor ( void ) const
inline

Returns the RGBA packed color for the given vertex.

Since
Coin 3.0

◆ getPoint()

const SbVec3f & SoPrimitiveVertex::getPoint ( void ) const
inline

Returns vertex coordinates, positioned in object space.

◆ getTextureCoords()

const SbVec4f & SoPrimitiveVertex::getTextureCoords ( void ) const
inline

Returns texture coordinates for vertex, specified in object space.

◆ operator=()

SoPrimitiveVertex & SoPrimitiveVertex::operator= ( const SoPrimitiveVertex & pv)

Copy operator.

When pv is copied into this instance, a shallow copy is made. I.e., only the reference to the detail instance is copied (if any), not the detail itself.

◆ setDetail()

void SoPrimitiveVertex::setDetail ( SoDetail * detail)
inline

Used internally from library client code setting up an SoPrimitiveVertex instance.

Note that it is the client's responsibility to do the deallocation of the detail instance after the SoPrimitiveVertex instance has gone out of scope.

◆ setMaterialIndex()

void SoPrimitiveVertex::setMaterialIndex ( int index)
inline

Used internally from library client code setting up an SoPrimitiveVertex instance.

◆ setNormal() [1/2]

void SoPrimitiveVertex::setNormal ( const SbVec3f & n)
inline

Used internally from library client code setting up an SoPrimitiveVertex instance.

◆ setNormal() [2/2]

void SoPrimitiveVertex::setNormal ( float nx,
float ny,
float nz )
inline

Used internally from library client code setting up an SoPrimitiveVertex instance.

◆ setPackedColor()

void SoPrimitiveVertex::setPackedColor ( uint32_t rgba)
inline

Used internally from library client code setting up an SoPrimitiveVertex instance.

◆ setPoint() [1/2]

void SoPrimitiveVertex::setPoint ( const SbVec3f & pt)
inline

Used internally from library client code setting up an SoPrimitiveVertex instance.

◆ setPoint() [2/2]

void SoPrimitiveVertex::setPoint ( float x,
float y,
float z )
inline

Used internally from library client code setting up an SoPrimitiveVertex instance.

◆ setTextureCoords() [1/6]

void SoPrimitiveVertex::setTextureCoords ( const SbVec2f & texcoords)
inline

Used internally from library client code setting up an SoPrimitiveVertex instance.

Convenience function. Will fill in 0 and 1 in the last two texture coordinates in the internal SbVec4f texture coordinate instance.

◆ setTextureCoords() [2/6]

void SoPrimitiveVertex::setTextureCoords ( const SbVec3f & texcoords)
inline

Convenience function. Will fill in 1 in the last coordinate.

This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.

Since
Coin 2.0

◆ setTextureCoords() [3/6]

void SoPrimitiveVertex::setTextureCoords ( const SbVec4f & texcoords)
inline

Used internally from library client code setting up an SoPrimitiveVertex instance.

◆ setTextureCoords() [4/6]

void SoPrimitiveVertex::setTextureCoords ( float tx,
float ty )
inline

Used internally from library client code setting up an SoPrimitiveVertex instance.

Convenience function. Will fill in 0 and 1 in the last two texture coordinates in the internal SbVec4f texture coordinate instance.

◆ setTextureCoords() [5/6]

void SoPrimitiveVertex::setTextureCoords ( float tx,
float ty,
float tz )
inline

Convenience function. Will fill in 1 in the last coordinate.

This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.

Since
Coin 2.5

◆ setTextureCoords() [6/6]

void SoPrimitiveVertex::setTextureCoords ( float tx,
float ty,
float tz,
float tw )
inline

Used internally from library client code setting up an SoPrimitiveVertex instance.

This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.

Since
Coin 2.5

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