Blender  V3.3
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
blender::opensubdiv::MeshTopology Class Reference

#include <mesh_topology.h>

Classes

struct  Edge
 
struct  EdgeTag
 
struct  VertexTag
 

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 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_
 
vector< VertexTagvertex_tags_
 
int num_edges_
 
vector< Edgeedges_
 
vector< EdgeTagedge_tags_
 
int num_faces_
 
vector< int > face_vertex_indices_
 
vector< int > faces_first_vertex_index_
 

Detailed Description

Definition at line 54 of file mesh_topology.h.

Constructor & Destructor Documentation

◆ MeshTopology() [1/3]

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

Definition at line 26 of file mesh_topology.cc.

◆ MeshTopology() [2/3]

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

◆ MeshTopology() [3/3]

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

◆ ~MeshTopology()

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

Definition at line 30 of file mesh_topology.cc.

Member Function Documentation

◆ ensureEdgeTagsSize()

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

Definition at line 171 of file mesh_topology.cc.

References edge_tags_.

Referenced by setEdgeSharpness().

◆ ensureNumEdgesAtLeast()

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

Definition at line 164 of file mesh_topology.cc.

References edges_.

Referenced by setEdgeVertexIndices().

◆ ensureVertexTagsSize()

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

Definition at line 70 of file mesh_topology.cc.

References vertex_tags_.

Referenced by setVertexSharpness().

◆ finishResizeTopology()

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

Definition at line 265 of file mesh_topology.cc.

References face_vertex_indices_, and faces_first_vertex_index_.

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

◆ getEdgeSharpness()

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

Definition at line 151 of file mesh_topology.cc.

References edge_tags_.

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

◆ getEdgeVertexIndices()

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

Definition at line 108 of file mesh_topology.cc.

References edges_, getNumEdges(), v1, and v2.

◆ 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()

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

Definition at line 85 of file mesh_topology.cc.

References num_edges_.

Referenced by getEdgeVertexIndices(), isEdgeEqual(), setEdgeSharpness(), and setEdgeVertexIndices().

◆ getNumFaces()

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

◆ getNumFaceVertices()

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

◆ getNumVertices()

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

Definition at line 42 of file mesh_topology.cc.

References num_vertices_.

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

◆ getVertexSharpness()

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

Definition at line 57 of file mesh_topology.cc.

References getNumVertices(), and vertex_tags_.

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

◆ isEdgeEqual()

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

Definition at line 124 of file mesh_topology.cc.

References edges_, and getNumEdges().

◆ isEqualToConverter()

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

◆ isFaceVertexIndicesEqual() [1/2]

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

Definition at line 241 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

◆ operator=() [2/2]

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

◆ setEdgeSharpness()

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

Definition at line 137 of file mesh_topology.cc.

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

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

◆ setEdgeVertexIndices()

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

Definition at line 90 of file mesh_topology.cc.

References edges_, ensureNumEdgesAtLeast(), getNumEdges(), getNumVertices(), v1, and v2.

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

◆ 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 80 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 181 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 195 of file mesh_topology.cc.

References faces_first_vertex_index_, and getNumFaces().

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

◆ setNumVertices()

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

Definition at line 37 of file mesh_topology.cc.

References num_vertices_.

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

◆ setVertexSharpness()

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

Definition at line 47 of file mesh_topology.cc.

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

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

Member Data Documentation

◆ edge_tags_

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

Definition at line 161 of file mesh_topology.h.

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

◆ edges_

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

◆ face_vertex_indices_

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

Definition at line 167 of file mesh_topology.h.

Referenced by finishResizeTopology(), and getFaceVertexIndicesStorage().

◆ faces_first_vertex_index_

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

◆ num_edges_

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

Definition at line 159 of file mesh_topology.h.

Referenced by getNumEdges(), and setNumEdges().

◆ num_faces_

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

Definition at line 163 of file mesh_topology.h.

Referenced by getNumFaces(), and setNumFaces().

◆ num_vertices_

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

Definition at line 156 of file mesh_topology.h.

Referenced by getNumVertices(), and setNumVertices().

◆ vertex_tags_

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

Definition at line 157 of file mesh_topology.h.

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


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