Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoPrimitiveVertex Class Reference

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

#include <Inventor/SoPrimitiveVertex.h>

Public Member Functions

 SoPrimitiveVertex ()
 Default constructor.
 
 SoPrimitiveVertex (const SoPrimitiveVertex &pv)
 Constructor.
 
 ~SoPrimitiveVertex ()
 Destructor.
 
const SbVec3fgetPoint () const
 Returns the surface point in object space.
 
const SbVec3fgetNormal () const
 Returns the normal in object space.
 
const SbVec4fgetTextureCoords () const
 Returns the 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 SoPointDetailgetPointDetail () const
 Returns the point detail giving more information about the vertex.
 
const SoDetailgetDetail () const
 Returns the detail giving more information about the vertex.
 
SoPrimitiveVertexoperator= (const SoPrimitiveVertex &pv)
 Copies the given vertex.
 

Detailed Description

Represents a vertex of a generated primitive.

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 refers an instance of an SoDetail subclass. This detail may contain more information about the vertex, or may be NULL 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 98 of file SoPrimitiveVertex.h.

Constructor & Destructor Documentation

◆ SoPrimitiveVertex() [1/2]

SoPrimitiveVertex::SoPrimitiveVertex ( )

Default constructor.

◆ SoPrimitiveVertex() [2/2]

SoPrimitiveVertex::SoPrimitiveVertex ( const SoPrimitiveVertex pv)

Constructor.

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

◆ ~SoPrimitiveVertex()

SoPrimitiveVertex::~SoPrimitiveVertex ( )

Destructor.

Member Function Documentation

◆ getDetail()

const SoDetail * SoPrimitiveVertex::getDetail ( ) const
inline

Returns the detail giving more information about the vertex.

Note that the return value is NULL if there is no more info.

Definition at line 151 of file SoPrimitiveVertex.h.

◆ getMaterialIndex()

int SoPrimitiveVertex::getMaterialIndex ( ) const
inline

Returns the index into the current set of materials of the material active at the vertex.

Definition at line 139 of file SoPrimitiveVertex.h.

◆ getNormal()

const SbVec3f & SoPrimitiveVertex::getNormal ( ) const
inline

Returns the normal in object space.

Definition at line 129 of file SoPrimitiveVertex.h.

◆ getPoint()

const SbVec3f & SoPrimitiveVertex::getPoint ( ) const
inline

Returns the surface point in object space.

Definition at line 125 of file SoPrimitiveVertex.h.

◆ getPointDetail()

const SoPointDetail * SoPrimitiveVertex::getPointDetail ( ) const
inline

Returns the point detail giving more information about the vertex.

Note that the return value is NULL if there is no more info.

Definition at line 145 of file SoPrimitiveVertex.h.

◆ getTextureCoords()

const SbVec4f & SoPrimitiveVertex::getTextureCoords ( ) const

Returns the texture coordinates in object space.

◆ operator=()

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

Copies the given vertex.

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


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