Blender V5.0
blender::opensubdiv::MeshTopology Class Reference

#include <mesh_topology.h>

Classes

struct  VertexTag
struct  Edge
struct  EdgeTag

Public Member Functions

 MeshTopology ()
 MeshTopology (const MeshTopology &other)=default
 MeshTopology (MeshTopology &&other) noexcept=default
 ~MeshTopology ()
MeshTopologyoperator= (const MeshTopology &other)=default
MeshTopologyoperator= (MeshTopology &&other)=default
void setNumVertices (int num_vertices)
int getNumVertices () const
void setVertexSharpness (int vertex_index, float sharpness)
float getVertexSharpness (int vertex_index) const
void setNumEdges (int num_edges)
int getNumEdges () const
void setEdgeVertexIndices (int edge_index, int v1, int v2)
void getEdgeVertexIndices (int edge_index, int *v1, int *v2) const
bool isEdgeEqual (int edge_index, int expected_v1, int expected_v2) const
void setEdgeSharpness (int edge_index, float sharpness)
float getEdgeSharpness (int edge_index) const
void setNumFaces (int num_faces)
int getNumFaces () const
void setNumFaceVertices (int face_index, int num_face_vertices)
int getNumFaceVertices (int face_index) const
void setFaceVertexIndices (int face_index, int num_face_vertex_indices, const int *face_vertex_indices)
bool isFaceVertexIndicesEqual (int face_index, int num_expected_face_vertex_indices, const int *expected_face_vertex_indices) const
bool isFaceVertexIndicesEqual (int face_index, const std::vector< int > &expected_face_vertex_indices) const
void finishResizeTopology ()
bool isEqualToConverter (const OpenSubdiv_Converter *converter) const

Protected Member Functions

void ensureNumEdgesAtLeast (int num_edges)
void ensureVertexTagsSize (int num_vertices)
void ensureEdgeTagsSize (int num_edges)
int * getFaceVertexIndicesStorage (int face_index)
const int * getFaceVertexIndicesStorage (int face_index) const
 MEM_CXX_CLASS_ALLOC_FUNCS ("MeshTopology")

Protected Attributes

int num_vertices_
std::vector< VertexTagvertex_tags_
int num_edges_
std::vector< Edgeedges_
std::vector< EdgeTagedge_tags_
int num_faces_
std::vector< int > face_vertex_indices_
std::vector< int > faces_first_vertex_index_

Detailed Description

Definition at line 40 of file mesh_topology.h.

Constructor & Destructor Documentation

◆ MeshTopology() [1/3]

blender::opensubdiv::MeshTopology::MeshTopology ( )

◆ MeshTopology() [2/3]

blender::opensubdiv::MeshTopology::MeshTopology ( const MeshTopology & other)
default

References MeshTopology().

◆ MeshTopology() [3/3]

blender::opensubdiv::MeshTopology::MeshTopology ( MeshTopology && other)
defaultnoexcept

References MeshTopology().

◆ ~MeshTopology()

blender::opensubdiv::MeshTopology::~MeshTopology ( )
default

Member Function Documentation

◆ ensureEdgeTagsSize()

void blender::opensubdiv::MeshTopology::ensureEdgeTagsSize ( int num_edges)
protected

Definition at line 154 of file mesh_topology.cc.

References edge_tags_.

Referenced by setEdgeSharpness().

◆ ensureNumEdgesAtLeast()

void blender::opensubdiv::MeshTopology::ensureNumEdgesAtLeast ( int num_edges)
protected

Definition at line 147 of file mesh_topology.cc.

References edges_.

Referenced by setEdgeVertexIndices().

◆ ensureVertexTagsSize()

void blender::opensubdiv::MeshTopology::ensureVertexTagsSize ( int num_vertices)
protected

Definition at line 53 of file mesh_topology.cc.

References vertex_tags_.

Referenced by setVertexSharpness().

◆ finishResizeTopology()

void blender::opensubdiv::MeshTopology::finishResizeTopology ( )

◆ getEdgeSharpness()

float blender::opensubdiv::MeshTopology::getEdgeSharpness ( int edge_index) const

Definition at line 134 of file mesh_topology.cc.

References assert, and edge_tags_.

Referenced by blender::opensubdiv::isEqualEdgeTags(), and blender::opensubdiv::TEST().

◆ getEdgeVertexIndices()

void blender::opensubdiv::MeshTopology::getEdgeVertexIndices ( int edge_index,
int * v1,
int * v2 ) const

◆ getFaceVertexIndicesStorage() [1/2]

int * blender::opensubdiv::MeshTopology::getFaceVertexIndicesStorage ( int face_index)
protected

◆ getFaceVertexIndicesStorage() [2/2]

const int * blender::opensubdiv::MeshTopology::getFaceVertexIndicesStorage ( int face_index) const
protected

◆ getNumEdges()

◆ getNumFaces()

◆ getNumFaceVertices()

int blender::opensubdiv::MeshTopology::getNumFaceVertices ( int face_index) const

◆ getNumVertices()

int blender::opensubdiv::MeshTopology::getNumVertices ( ) const

◆ getVertexSharpness()

float blender::opensubdiv::MeshTopology::getVertexSharpness ( int vertex_index) const

◆ isEdgeEqual()

bool blender::opensubdiv::MeshTopology::isEdgeEqual ( int edge_index,
int expected_v1,
int expected_v2 ) const

◆ isEqualToConverter()

bool blender::opensubdiv::MeshTopology::isEqualToConverter ( const OpenSubdiv_Converter * converter) const

◆ isFaceVertexIndicesEqual() [1/2]

bool blender::opensubdiv::MeshTopology::isFaceVertexIndicesEqual ( int face_index,
const std::vector< int > & expected_face_vertex_indices ) const

Definition at line 224 of file mesh_topology.cc.

References isFaceVertexIndicesEqual().

◆ isFaceVertexIndicesEqual() [2/2]

bool blender::opensubdiv::MeshTopology::isFaceVertexIndicesEqual ( int face_index,
int num_expected_face_vertex_indices,
const int * expected_face_vertex_indices ) const

◆ MEM_CXX_CLASS_ALLOC_FUNCS()

blender::opensubdiv::MeshTopology::MEM_CXX_CLASS_ALLOC_FUNCS ( "MeshTopology" )
protected

◆ operator=() [1/2]

MeshTopology & blender::opensubdiv::MeshTopology::operator= ( const MeshTopology & other)
default

References MeshTopology().

◆ operator=() [2/2]

MeshTopology & blender::opensubdiv::MeshTopology::operator= ( MeshTopology && other)
default

References MeshTopology(), and v2.

◆ setEdgeSharpness()

void blender::opensubdiv::MeshTopology::setEdgeSharpness ( int edge_index,
float sharpness )

Definition at line 120 of file mesh_topology.cc.

References assert, edge_tags_, ensureEdgeTagsSize(), and getNumEdges().

Referenced by blender::opensubdiv::TEST().

◆ setEdgeVertexIndices()

void blender::opensubdiv::MeshTopology::setEdgeVertexIndices ( int edge_index,
int v1,
int v2 )

◆ setFaceVertexIndices()

void blender::opensubdiv::MeshTopology::setFaceVertexIndices ( int face_index,
int num_face_vertex_indices,
const int * face_vertex_indices )

◆ setNumEdges()

void blender::opensubdiv::MeshTopology::setNumEdges ( int num_edges)

Definition at line 63 of file mesh_topology.cc.

References num_edges_.

Referenced by blender::opensubdiv::TEST().

◆ setNumFaces()

void blender::opensubdiv::MeshTopology::setNumFaces ( int num_faces)

Definition at line 164 of file mesh_topology.cc.

References faces_first_vertex_index_, and num_faces_.

Referenced by blender::opensubdiv::TEST().

◆ setNumFaceVertices()

void blender::opensubdiv::MeshTopology::setNumFaceVertices ( int face_index,
int num_face_vertices )

Definition at line 178 of file mesh_topology.cc.

References assert, faces_first_vertex_index_, and getNumFaces().

Referenced by blender::opensubdiv::TEST().

◆ setNumVertices()

void blender::opensubdiv::MeshTopology::setNumVertices ( int num_vertices)

Definition at line 20 of file mesh_topology.cc.

References num_vertices_.

Referenced by blender::opensubdiv::TEST(), and blender::opensubdiv::TEST().

◆ setVertexSharpness()

void blender::opensubdiv::MeshTopology::setVertexSharpness ( int vertex_index,
float sharpness )

Definition at line 30 of file mesh_topology.cc.

References assert, ensureVertexTagsSize(), getNumVertices(), and vertex_tags_.

Referenced by blender::opensubdiv::TEST().

Member Data Documentation

◆ edge_tags_

std::vector<EdgeTag> blender::opensubdiv::MeshTopology::edge_tags_
protected

Definition at line 151 of file mesh_topology.h.

Referenced by ensureEdgeTagsSize(), getEdgeSharpness(), and setEdgeSharpness().

◆ edges_

std::vector<Edge> blender::opensubdiv::MeshTopology::edges_
protected

◆ face_vertex_indices_

std::vector<int> blender::opensubdiv::MeshTopology::face_vertex_indices_
protected

Definition at line 157 of file mesh_topology.h.

Referenced by finishResizeTopology(), and getFaceVertexIndicesStorage().

◆ faces_first_vertex_index_

std::vector<int> blender::opensubdiv::MeshTopology::faces_first_vertex_index_
protected

◆ num_edges_

int blender::opensubdiv::MeshTopology::num_edges_
protected

Definition at line 149 of file mesh_topology.h.

Referenced by getNumEdges(), MeshTopology(), and setNumEdges().

◆ num_faces_

int blender::opensubdiv::MeshTopology::num_faces_
protected

Definition at line 153 of file mesh_topology.h.

Referenced by getNumFaces(), MeshTopology(), and setNumFaces().

◆ num_vertices_

int blender::opensubdiv::MeshTopology::num_vertices_
protected

Definition at line 146 of file mesh_topology.h.

Referenced by getNumVertices(), MeshTopology(), and setNumVertices().

◆ vertex_tags_

std::vector<VertexTag> blender::opensubdiv::MeshTopology::vertex_tags_
protected

Definition at line 147 of file mesh_topology.h.

Referenced by ensureVertexTagsSize(), getVertexSharpness(), and setVertexSharpness().


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