![]() |
http://www.sim.no http://www.coin3d.org |
#include <Inventor/SoPrimitiveVertex.h>
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.
Public Member Functions | |
SoPrimitiveVertex (void) | |
SoPrimitiveVertex (const SoPrimitiveVertex &pv) | |
~SoPrimitiveVertex () | |
const SbVec3f & | getPoint (void) const |
const SbVec3f & | getNormal (void) const |
const SbVec4f & | getTextureCoords (void) const |
int | getMaterialIndex (void) const |
const SoDetail * | getDetail (void) const |
SoPrimitiveVertex & | operator= (const SoPrimitiveVertex &pv) |
void | setPoint (const SbVec3f &point) |
void | setNormal (const SbVec3f &normal) |
void | setTextureCoords (const SbVec2f &texcoords) |
void | setTextureCoords (const SbVec3f &texcoords) |
void | setTextureCoords (const SbVec4f &texcoords) |
void | setMaterialIndex (const int index) |
void | setDetail (SoDetail *const detail) |
SoPrimitiveVertex::SoPrimitiveVertex | ( | void | ) |
Default constructor, sets up a "void" instance.
SoPrimitiveVertex::SoPrimitiveVertex | ( | const SoPrimitiveVertex & | pv | ) |
SoPrimitiveVertex::~SoPrimitiveVertex | ( | ) |
Destructor. The detail instance is owned by client code and will not be destructed here.
const SbVec3f & SoPrimitiveVertex::getPoint | ( | void | ) | const |
Returns vertex coordinates, positioned in object space.
const SbVec3f & SoPrimitiveVertex::getNormal | ( | void | ) | const |
Returns normal vector, oriented in object space.
const SbVec4f & SoPrimitiveVertex::getTextureCoords | ( | void | ) | const |
Returns texture coordinates for vertex, specified in object space.
int SoPrimitiveVertex::getMaterialIndex | ( | void | ) | const |
Returns index of the vertex into the currently active material, if any.
const SoDetail * SoPrimitiveVertex::getDetail | ( | void | ) | const |
Returns pointer to detail instance with more information about the vertex. A detail instance may not be available, and if so NULL
is returned.
SoPrimitiveVertex & SoPrimitiveVertex::operator= | ( | const SoPrimitiveVertex & | 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.
void SoPrimitiveVertex::setPoint | ( | const SbVec3f & | pointref | ) |
Used internally from library client code setting up an SoPrimitiveVertex instance.
void SoPrimitiveVertex::setNormal | ( | const SbVec3f & | normalref | ) |
Used internally from library client code setting up an SoPrimitiveVertex instance.
void SoPrimitiveVertex::setTextureCoords | ( | const SbVec2f & | texcoords | ) |
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 SbVec3f & | texcoords | ) |
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.
void SoPrimitiveVertex::setTextureCoords | ( | const SbVec4f & | texcoords | ) |
Used internally from library client code setting up an SoPrimitiveVertex instance.
void SoPrimitiveVertex::setMaterialIndex | ( | const int | index | ) |
Used internally from library client code setting up an SoPrimitiveVertex instance.
void SoPrimitiveVertex::setDetail | ( | SoDetail *const | detailptr | ) |
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.
Copyright © 1998-2005 by Systems in Motion AS. All rights reserved.
Generated on Sun Apr 15 02:57:28 2007 for Coin by Doxygen. 1.5.2