Open Inventor Reference
SoPrimitiveVertex Class Reference

Represents a vertex of a generated primitive. More...

#include <Inventor/SoPrimitiveVertex.h>

Public Member Functions

 SoPrimitiveVertex ()
 Constructors and destructor.
 
 SoPrimitiveVertex (const SoPrimitiveVertex &pv)
 Constructors and destructor.
 
 ~SoPrimitiveVertex ()
 Constructors and destructor.
 
const SbVec3fgetPoint () const
 These return the surface point, normal, and texture coordinates in object space.
 
const SbVec3fgetNormal () const
 These return the surface point, normal, and texture coordinates in object space.
 
const SbVec4fgetTextureCoords () const
 These return the surface point, normal, and texture coordinates in object space.
 
int getMaterialIndex () const
 Returns the index into the current set of materials of the material active at the vertex.
 
const SoDetailgetDetail () const
 Returns the detail giving more information about the vertex.
 
SoPrimitiveVertexoperator= (const SoPrimitiveVertex &pv)
 Copies the given vertex.
 
void setPoint (const SbVec3f &pt)
 These methods are typically called by shape classes during primtiive generation.
 
void setNormal (const SbVec3f &norm)
 
void setTextureCoords (const SbVec4f &t)
 
void setMaterialIndex (int index)
 Sets the material index. The index is set to 0 during construction.
 
void setDetail (SoDetail *d)
 Sets the detail corresponding to the vertex.
 

Detailed Description

An SoPrimitiveVertex represents a vertex of a primitive (triangle, line segment, or point) that is being generated by an SoCallbackAction. It contains an object-space point, normal, texture coordinates, material index, and a pointer to an instance of an SoDetail subclass. This detail may contain more information about the vertex, or may be a NULL pointer if there is no such info.

Instances of SoPrimitiveVertex are typically created on the stack by shape classes while they are generating primitives. Anyone who wants to save them as return values from SoCallbackAction should probably make copies of them.

Definition at line 84 of file SoPrimitiveVertex.h.

Constructor & Destructor Documentation

◆ SoPrimitiveVertex() [1/2]

SoPrimitiveVertex::SoPrimitiveVertex ( )

Note that copying a primitive vertex copies the detail pointer, and not the detail itself.

◆ SoPrimitiveVertex() [2/2]

SoPrimitiveVertex::SoPrimitiveVertex ( const SoPrimitiveVertex pv)

Note that copying a primitive vertex copies the detail pointer, and not the detail itself.

◆ ~SoPrimitiveVertex()

SoPrimitiveVertex::~SoPrimitiveVertex ( )

Note that copying a primitive vertex copies the detail pointer, and not the detail itself.

Member Function Documentation

◆ getDetail()

const SoDetail * SoPrimitiveVertex::getDetail ( ) const
inline

Note that this pointer may be NULL if there is no more info.

Definition at line 115 of file SoPrimitiveVertex.h.

◆ getMaterialIndex()

int SoPrimitiveVertex::getMaterialIndex ( ) const
inline

Definition at line 111 of file SoPrimitiveVertex.h.

◆ getNormal()

const SbVec3f & SoPrimitiveVertex::getNormal ( ) const
inline

Definition at line 104 of file SoPrimitiveVertex.h.

◆ getPoint()

const SbVec3f & SoPrimitiveVertex::getPoint ( ) const
inline

Definition at line 101 of file SoPrimitiveVertex.h.

◆ getTextureCoords()

const SbVec4f & SoPrimitiveVertex::getTextureCoords ( ) const
inline

Definition at line 107 of file SoPrimitiveVertex.h.

◆ operator=()

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

Note that just the pointer to the detail is copied, and not the detail itself.

◆ setDetail()

void SoPrimitiveVertex::setDetail ( SoDetail d)
inline

The pointer may be NULL, although it is set to NULL during construction.

Definition at line 136 of file SoPrimitiveVertex.h.

◆ setMaterialIndex()

void SoPrimitiveVertex::setMaterialIndex ( int  index)
inline

Definition at line 132 of file SoPrimitiveVertex.h.

◆ setNormal()

void SoPrimitiveVertex::setNormal ( const SbVec3f norm)
inline

Definition at line 128 of file SoPrimitiveVertex.h.

◆ setPoint()

void SoPrimitiveVertex::setPoint ( const SbVec3f pt)
inline

These set the object space point, normal, and texture coordinates:

Definition at line 127 of file SoPrimitiveVertex.h.

◆ setTextureCoords()

void SoPrimitiveVertex::setTextureCoords ( const SbVec4f t)
inline

Definition at line 129 of file SoPrimitiveVertex.h.


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