SYNOPSIS

#include <Inventor/SoPrimitiveVertex.h>

Public Member Functions

SoPrimitiveVertex (void)

SoPrimitiveVertex (const SoPrimitiveVertex &pv)

~SoPrimitiveVertex (void)

SoPrimitiveVertex & operator= (const SoPrimitiveVertex &pv)

const SbVec3f & getPoint (void) const

const SbVec3f & getNormal (void) const

const SbVec4f & getTextureCoords (void) const

int getMaterialIndex (void) const

uint32_t getPackedColor (void) const

const SoDetail * getDetail (void) const

void setPoint (const SbVec3f &pt)

void setPoint (float x, float y, float z)

void setNormal (const SbVec3f &n)

void setNormal (float nx, float ny, float nz)

void setTextureCoords (const SbVec2f &tex)

void setTextureCoords (float tx, float ty)

void setTextureCoords (const SbVec3f &tex)

void setTextureCoords (float tx, float ty, float tz)

void setTextureCoords (const SbVec4f &tex)

void setTextureCoords (float tx, float ty, float tz, float tw)

void setMaterialIndex (int index)

void setPackedColor (uint32_t rgba)

void setDetail (SoDetail *d)

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::SoPrimitiveVertex (void)

Default constructor, sets up a 'void' instance.

SoPrimitiveVertex::SoPrimitiveVertex (const \fBSoPrimitiveVertex\fP &pv)

Copy constructor. Does a shallow copy.

See also:

SoPrimitiveVertex::operator=()

SoPrimitiveVertex::~SoPrimitiveVertex (void)

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

Member Function Documentation

\fBSoPrimitiveVertex\fP & SoPrimitiveVertex::operator= (const \fBSoPrimitiveVertex\fP &pv)

Copy operator.

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

const \fBSbVec3f\fP & SoPrimitiveVertex::getPoint (void) const\fC [inline]\fP

Returns vertex coordinates, positioned in object space.

const \fBSbVec3f\fP & SoPrimitiveVertex::getNormal (void) const\fC [inline]\fP

Returns normal vector, oriented in object space.

const \fBSbVec4f\fP & SoPrimitiveVertex::getTextureCoords (void) const\fC [inline]\fP

Returns texture coordinates for vertex, specified in object space.

int SoPrimitiveVertex::getMaterialIndex (void) const\fC [inline]\fP

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

uint32_t SoPrimitiveVertex::getPackedColor (void) const\fC [inline]\fP

Returns the rgba packed color for the given vertex.

Since:

Coin 3.0

const \fBSoDetail\fP * SoPrimitiveVertex::getDetail (void) const\fC [inline]\fP

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

void SoPrimitiveVertex::setPoint (const \fBSbVec3f\fP &pt)\fC [inline]\fP

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

void SoPrimitiveVertex::setPoint (floatx, floaty, floatz)\fC [inline]\fP

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

void SoPrimitiveVertex::setNormal (const \fBSbVec3f\fP &n)\fC [inline]\fP

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

void SoPrimitiveVertex::setNormal (floatnx, floatny, floatnz)\fC [inline]\fP

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

void SoPrimitiveVertex::setTextureCoords (const \fBSbVec2f\fP &texcoords)\fC [inline]\fP

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

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

void SoPrimitiveVertex::setTextureCoords (floattx, floatty)\fC [inline]\fP

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

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

void SoPrimitiveVertex::setTextureCoords (const \fBSbVec3f\fP &texcoords)\fC [inline]\fP

Covenience function. Will fill in 1 in the last coord.

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

void SoPrimitiveVertex::setTextureCoords (floattx, floatty, floattz)\fC [inline]\fP

Covenience function. Will fill in 1 in the last coord.

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

void SoPrimitiveVertex::setTextureCoords (const \fBSbVec4f\fP &texcoords)\fC [inline]\fP

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

void SoPrimitiveVertex::setMaterialIndex (intindex)\fC [inline]\fP

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

void SoPrimitiveVertex::setPackedColor (uint32_trgba)\fC [inline]\fP

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

void SoPrimitiveVertex::setDetail (\fBSoDetail\fP *detail)\fC [inline]\fP

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

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

Author

Generated automatically by Doxygen for Coin from the source code.